|
<<Grammar Name="calc0_tree">>
[1]^^Calc: ((^'print' / Assign / Sum)
([\r\n]/!./FATAL<"end of line expected">)
[ \r\n\t\v]* )+
(!./FATAL<"not recognized">);
[2]^Assign:S ident S '=' S Sum;
[3]^Sum: Prod (^[+-] S @Prod)*;
[4]^Prod: Value (^[*/] S @Value)*;
[5] Value: (Number/'('S Sum @')'S/Call/ident) S;
[6]^Call: ident S '(' @Sum @')' S;
[7]^Number:[0-9]+ ('.' [0-9]+)?([eE][+-][0-9]+)?;
[8]^ident: [A-Za-z_][A-Za-z_0-9]*;
[9] S: [ \t\v]*;
<</Grammar>>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.