(* l01 - constant expressions with declarations *) program = statement { ';' statement } '.' . statement = [ id '=' number | '!' expression ] . expression = [ '+' | '-' ] term { ( '+' | '-' ) term } . term = factor { ( '*' | '/' ) factor } . factor = number | id | '(' expression ')' . (* terminals: number id ! = ( * / + - ) ; . In l00 I had "statement = expression ." and the output of an expression value has been generated with the return from the outermost expression, i.e. without an (explicit) statement. How to distinguish between declarations and expressions if I want something like "x=1;x+2." to be a valid program? Having Wirth's PL/0 in mind, the most simple solution was to right now introduce the output statement with a new symbol. Instead, a new symbol could have been introduced for the declaration, but - adding keywords (CONST) here already seemed to expensive and - I didn't want to mistreat well known terminals (like '!' for declarations). Thus, no symbol/keyword is needed for declarations. Obviously, there's no need to require that declarations must preceed all expressions, so the declaration can be considered as statement as well. *)