mirror of
https://github.com/yhirose/cpp-peglib.git
synced 2024-12-22 20:05:31 +00:00
Cleanup grammar.
This commit is contained in:
parent
8f585f958e
commit
ff6231bcbe
@ -18,10 +18,7 @@
|
|||||||
MULTIPLICATIVE <- CALL (MULTIPLICATIVE_OPERATOR CALL)*
|
MULTIPLICATIVE <- CALL (MULTIPLICATIVE_OPERATOR CALL)*
|
||||||
|
|
||||||
CALL <- PRIMARY (ARGUMENTS / INDEX)*
|
CALL <- PRIMARY (ARGUMENTS / INDEX)*
|
||||||
|
|
||||||
#FUNCTION_CALL <- IDENTIFIER ARGUMENTS
|
|
||||||
ARGUMENTS <- '(' _ (EXPRESSION (',' _ EXPRESSION)*)? ')' _
|
ARGUMENTS <- '(' _ (EXPRESSION (',' _ EXPRESSION)*)? ')' _
|
||||||
#ARRAY_REFERENCE <- IDENTIFIER INDEX
|
|
||||||
INDEX <- '[' _ EXPRESSION ']' _
|
INDEX <- '[' _ EXPRESSION ']' _
|
||||||
|
|
||||||
PRIMARY <- WHILE / IF / FUNCTION / IDENTIFIER / ARRAY / NUMBER / BOOLEAN / STRING / INTERPOLATED_STRING / '(' _ EXPRESSION ')' _
|
PRIMARY <- WHILE / IF / FUNCTION / IDENTIFIER / ARRAY / NUMBER / BOOLEAN / STRING / INTERPOLATED_STRING / '(' _ EXPRESSION ')' _
|
||||||
|
@ -24,10 +24,7 @@ static auto g_grammar = R"(
|
|||||||
MULTIPLICATIVE <- CALL (MULTIPLICATIVE_OPERATOR CALL)*
|
MULTIPLICATIVE <- CALL (MULTIPLICATIVE_OPERATOR CALL)*
|
||||||
|
|
||||||
CALL <- PRIMARY (ARGUMENTS / INDEX)*
|
CALL <- PRIMARY (ARGUMENTS / INDEX)*
|
||||||
|
|
||||||
#FUNCTION_CALL <- IDENTIFIER ARGUMENTS
|
|
||||||
ARGUMENTS <- '(' _ (EXPRESSION (',' _ EXPRESSION)*)? ')' _
|
ARGUMENTS <- '(' _ (EXPRESSION (',' _ EXPRESSION)*)? ')' _
|
||||||
#ARRAY_REFERENCE <- IDENTIFIER INDEX
|
|
||||||
INDEX <- '[' _ EXPRESSION ']' _
|
INDEX <- '[' _ EXPRESSION ']' _
|
||||||
|
|
||||||
PRIMARY <- WHILE / IF / FUNCTION / IDENTIFIER / ARRAY / NUMBER / BOOLEAN / STRING / INTERPOLATED_STRING / '(' _ EXPRESSION ')' _
|
PRIMARY <- WHILE / IF / FUNCTION / IDENTIFIER / ARRAY / NUMBER / BOOLEAN / STRING / INTERPOLATED_STRING / '(' _ EXPRESSION ')' _
|
||||||
|
Loading…
Reference in New Issue
Block a user