Cleanup grammar.

This commit is contained in:
yhirose 2015-07-08 10:30:11 -04:00
parent 8f585f958e
commit ff6231bcbe
2 changed files with 80 additions and 86 deletions

View File

@ -18,10 +18,7 @@
MULTIPLICATIVE <- CALL (MULTIPLICATIVE_OPERATOR CALL)*
CALL <- PRIMARY (ARGUMENTS / INDEX)*
#FUNCTION_CALL <- IDENTIFIER ARGUMENTS
ARGUMENTS <- '(' _ (EXPRESSION (',' _ EXPRESSION)*)? ')' _
#ARRAY_REFERENCE <- IDENTIFIER INDEX
INDEX <- '[' _ EXPRESSION ']' _
PRIMARY <- WHILE / IF / FUNCTION / IDENTIFIER / ARRAY / NUMBER / BOOLEAN / STRING / INTERPOLATED_STRING / '(' _ EXPRESSION ')' _

View File

@ -24,10 +24,7 @@ static auto g_grammar = R"(
MULTIPLICATIVE <- CALL (MULTIPLICATIVE_OPERATOR CALL)*
CALL <- PRIMARY (ARGUMENTS / INDEX)*
#FUNCTION_CALL <- IDENTIFIER ARGUMENTS
ARGUMENTS <- '(' _ (EXPRESSION (',' _ EXPRESSION)*)? ')' _
#ARRAY_REFERENCE <- IDENTIFIER INDEX
INDEX <- '[' _ EXPRESSION ']' _
PRIMARY <- WHILE / IF / FUNCTION / IDENTIFIER / ARRAY / NUMBER / BOOLEAN / STRING / INTERPOLATED_STRING / '(' _ EXPRESSION ')' _