Updated PL/0 grammar file.

This commit is contained in:
yhirose 2015-07-30 17:28:13 -04:00
parent 38ac34d1ad
commit d7e8cf03f3

View File

@ -12,8 +12,8 @@ call <- 'CALL' _ ident
statements <- 'BEGIN' _ statement (';' _ statement )* 'END' _ statements <- 'BEGIN' _ statement (';' _ statement )* 'END' _
if <- 'IF' _ condition 'THEN' _ statement if <- 'IF' _ condition 'THEN' _ statement
while <- 'WHILE' _ condition 'DO' _ statement while <- 'WHILE' _ condition 'DO' _ statement
out <- '!' _ expression out <- ('out' / 'write' / '!') _ expression
in <- '?' _ ident in <- ('in' / 'read' / '?') _ ident
condition <- odd / compare condition <- odd / compare
odd <- 'ODD' _ expression odd <- 'ODD' _ expression