diff options
Diffstat (limited to 'grammar.ebnf')
-rw-r--r-- | grammar.ebnf | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/grammar.ebnf b/grammar.ebnf index 1ac139e..5340ba4 100644 --- a/grammar.ebnf +++ b/grammar.ebnf @@ -1,9 +1,11 @@ Program ::= Statement+ -Statement ::= (VariableStatement | PrintStatement) SEMICOLON +Statement ::= (VariableStatement | PrintStatement | ReturnStatement) SEMICOLON VariableStatement ::= ("let" IDENTIFIER | IDENTIFIER) EQUALS Expression PrintStatement :== PRINT LPAREN Expression RPAREN +ReturnStatement :== RETURN Expression + Expression :== NUMBER | IDENTIFIER | Expression + Expression |