# Hand-written grammar for the calculator.  Differs from
# the grammar that Glade learns.
pgm ::=  (stmt "\n") * ;
stmt ::= optAssign expr ;
optAssign ::= ident "=" | /* empty */ ;
ident ::=  "x" | "y" | "v" ;
expr ::= expr "*" term | expr "/" term | term ;
term ::= term "+" factor | term "-" factor | factor ;
factor ::= ident | const | "(" expr ")" ;
const ::= digit digit* ;
digit ::= "0" | "1" | "2" | "9" ;

