start-symbol PROGRAM
context-free syntax
PROGRAM ::= "begin" DECLS "|" STATEMENTS "end"
DECLS ::= "declare" IDLIST
STATEMENTS ::= STATEMENT ";"
STATEMENTS ::=
IDLIST ::= ID ","
IDLIST ::=
context-free syntax
STATEMENT ::= ID ":=" EXP
context-free syntax
EXP ::= PROD-EXP PLUS-EXP'
PLUS-EXP' ::= "+" PROD-EXP PLUS-EXP'
PLUS-EXP' ::=
PROD-EXP ::= SINGLE-EXP PROD-EXP'
PROD-EXP' ::= "*" SINGLE-EXP PROD-EXP'
PROD-EXP' ::=
SINGLE-EXP ::= "-" SINGLE-EXP
SINGLE-EXP ::= ID
SINGLE-EXP ::= NAT
SINGLE-EXP ::= "(" EXP ")"
lexical syntax
ID ::= [a-z] ID'
ID' ::= [a-z0-9] ID'
ID' ::=
lexical syntax
NAT ::= [0]
NAT ::= [1-9] NAT'
NAT' ::= [0-9] NAT'
NAT' ::=
lexical syntax
LAYOUT ::= " " LAYOUT
LAYOUT ::= "\n" LAYOUT
LAYOUT ::=