real language

Bookmarking Digg Diigo DZone Earthlink Google
Windows Live LookLater Ma.gnolia Reddit Rojo StumbleUpon Technorati

Language GPML

(Gnarly Program Markup Language)

Author:Ronald S. Brown
Score: (2.50 in 2 votes)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE b-o-w [
     <!ELEMENT b-o-w (program-head+,data-declaration+,main+)>
     <!ELEMENT main
     <!ELEMENT program-head
     <!ELEMENT program-name (#PCDATA)>
     <!ELEMENT program-version (#PCDATA)>
     <!ELEMENT program-revision-date (#PCDATA)>
     <!ELEMENT program-author (#PCDATA)>
     <!ELEMENT program-purpose (#PCDATA)>
     <!ELEMENT data-declaration (declare-variables?,declare-strings?,define-array?)>
     <!ELEMENT declare-variables (#PCDATA)>
     <!ELEMENT declare-strings (#PCDATA)>
     <!ELEMENT define-array (numeric+ | string+)>
     <!ELEMENT numeric (#PCDATA)>
     <!ELEMENT string (#PCDATA)>
     <!ELEMENT loop (loop-count+,loop-stop+,loop-step+,loop-body+)>
     <!ELEMENT loop-count (#PCDATA)>
     <!ELEMENT loop-stop (#PCDATA)>
     <!ELEMENT loop-step (#PCDATA)>
     <!ELEMENT loop-body (#PCDATA)>
     <!ELEMENT comment (#PCDATA)>
     <!ELEMENT set-value ((string-name+ | variable-name+),value+)>
     <!ELEMENT string-name (#PCDATA)>
     <!ELEMENT variable-name (#PCDATA)>
     <!ELEMENT target-label (#PCDATA)>
     <!ELEMENT input (input-prompt?,(string-name+ | variable-name+))>
     <!ELEMENT input-prompt (#PCDATA)>
     <!ELEMENT test (test-condition+,test-action)>
     <!ELEMENT test-condition (#PCDATA)>
     <!ELEMENT test-data (#PCDATA)>
     <!ELEMENT operator (#PCDATA)>
     <!ELEMENT compare-to (#PCDATA)>  
     <!ELEMENT test-action (#PCDATA)>
     <!ELEMENT branch (#PCDATA)>
     <!ELEMENT compute (#PCDATA)>
     <!ELEMENT display ((tab? | loc?),(string-name+ | variable-name+))>
     <!ELEMENT tab (#PCDATA)>
     <!ELEMENT loc (#PCDATA)>
     <!ELEMENT perform (#PCDATA)>
     <!ELEMENT print (tab?,(string-name+ | variable-name+))>
     <!ELEMENT file (open+ | close+ | read+ | write+)>
     <!ELEMENT open (file-name+,file-use+,channel+)>
     <!ELEMENT file-name (#PCDATA)>
     <!ELEMENT file-use (#PCDATA)>
     <!ELEMENT channel (#PCDATA)>
     <!ELEMENT close (channel?)>
     <!ELEMENT write (channel+,(record-name+ | field-name+))>
     <!ELEMENT record-name (#PCDATA)>
     <!ELEMENT field-name (#PCDATA)>
     <!ELEMENT read (channel+,(record-name+ | field-name+))>


       <program-author>Ronald S. Brown</program-author>
       <program-purpose>This is a GPML version of a program to displays the lyrics to the song "99
Bottles of Beer on the Wall".</program-purpose>


                     loop-count; bottles of beer on the wall.<br/>
                     loop-count; bottles of beer.<br/>
                     Take one down and pass it around.<br/>
                     ((loop-count)-1); bottles of beer on the wall.<br/>
                     1; bottle of beer on the wall.<br/>
                     1; bottle of beer.<br/>
                     Take it down and pass it around.<br/>
                     No more bottles of beer on the wall.<br/>
                     No more bottles of beer on the wall.<br/>
                     No more bottles of beer.<br/>
                     Go to the store and buy some more.<br/>
                     99 bottles of beer on the wall.<br/>



Download Source | Write Comment

Alternative Versions


Download Source | Write Comment

Add Comment

Please provide a value for the fields Name, Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.

Please don't post large portions of code here! Use the form to submit new examples or updates instead!




Security Code: