mirror of
https://github.com/yhirose/cpp-peglib.git
synced 2024-12-22 20:05:31 +00:00
Changed to allow ';' between statements.
This commit is contained in:
parent
a783e0addd
commit
e0c657e52c
@ -6,7 +6,7 @@ using namespace std;
|
|||||||
static auto g_grammar = R"(
|
static auto g_grammar = R"(
|
||||||
PROGRAM <- _ STATEMENTS
|
PROGRAM <- _ STATEMENTS
|
||||||
|
|
||||||
STATEMENTS <- EXPRESSION*
|
STATEMENTS <- (EXPRESSION (';' _)?)*
|
||||||
|
|
||||||
EXPRESSION <- ASSIGNMENT / PRIMARY
|
EXPRESSION <- ASSIGNMENT / PRIMARY
|
||||||
ASSIGNMENT <- MUTABLE IDENTIFIER '=' _ EXPRESSION
|
ASSIGNMENT <- MUTABLE IDENTIFIER '=' _ EXPRESSION
|
||||||
|
Loading…
Reference in New Issue
Block a user