edits
parent
bd180e6ed6
commit
c149b13003
@ -1,15 +1,12 @@
|
|||||||
#lang brag
|
#lang brag
|
||||||
b-program : [b-line] (/NEWLINE+ [b-line])*
|
b-program : [b-line] (/NEWLINE [b-line])*
|
||||||
b-line : @b-line-number [b-statement] (/":" [b-statement])*
|
b-line : @b-line-number [b-statement] (/":" [b-statement])*
|
||||||
b-line-number : INTEGER
|
b-line-number : INTEGER
|
||||||
@b-statement : b-rem
|
@b-statement : b-rem | b-end | b-print | b-goto
|
||||||
| b-print
|
|
||||||
| b-goto
|
|
||||||
| b-end
|
|
||||||
b-rem : REM
|
b-rem : REM
|
||||||
b-print : /"print" (STRING | b-expr)*
|
b-end : /"end"
|
||||||
b-goto : /"goto" b-expr
|
b-print : /"print" [STRING | b-num-expr]
|
||||||
b-expr : b-sum
|
b-goto : /"goto" b-num-expr
|
||||||
|
b-num-expr : b-sum
|
||||||
b-sum : (b-number /"+")* b-number
|
b-sum : (b-number /"+")* b-number
|
||||||
@b-number : INTEGER | DECIMAL
|
@b-number : INTEGER | DECIMAL
|
||||||
b-end : /"end"
|
|
Loading…
Reference in New Issue