Optional statement terminator wherever possibile.

This commit is contained in:
Stefano Sanfilippo 2014-11-25 00:39:27 +01:00
parent 7197bd707a
commit 90c75e9b5a

View File

@ -66,11 +66,14 @@ main:
MAIN statements MAIN statements
; ;
statements: statements:
/* epsilon */ | statement COMMA statements | assert_stmt statements | fun_call statements /* epsilon */ |
nonending_statement COMMA statements | ending_statement statements
; ;
statement: ending_statement:
var_decl | assign_stmt | print_stmt | input_stmt | return_stmt | assert_stmt | fun_call | print_stmt | input_stmt | abort_stmt | branch_stmt
loop_stmt | branch_stmt | abort_stmt | /* epsilon */ ;
nonending_statement:
var_decl | assign_stmt | return_stmt | loop_stmt | /* epsilon */
; ;
var_decl: var_decl:
VARDECL variable COMMA pointer TYPENAME var_init VARDECL variable COMMA pointer TYPENAME var_init