diff options
| author | Baitinq <[email protected]> | 2025-03-29 11:22:13 +0100 |
|---|---|---|
| committer | Baitinq <[email protected]> | 2025-03-29 11:27:15 +0100 |
| commit | d74c6a363cf457a2197f3f10c0d567a77573e79c (patch) | |
| tree | b82cad7904e8493c28cfa1612de2e0e081484e0c /grammar.ebnf | |
| parent | Codegen: Support void type (diff) | |
| download | pry-lang-d74c6a363cf457a2197f3f10c0d567a77573e79c.tar.gz pry-lang-d74c6a363cf457a2197f3f10c0d567a77573e79c.tar.bz2 pry-lang-d74c6a363cf457a2197f3f10c0d567a77573e79c.zip | |
Feature: Add basic support for pointer references and dereferences
Diffstat (limited to 'grammar.ebnf')
| -rw-r--r-- | grammar.ebnf | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/grammar.ebnf b/grammar.ebnf index 83da90a..85d824d 100644 --- a/grammar.ebnf +++ b/grammar.ebnf @@ -2,7 +2,7 @@ Program ::= Statement+ Statement ::= (AssignmentStatement | ExternDeclaration | FunctionCallStatement | IfStatement | WhileStatement | ReturnStatement) SEMICOLON -AssignmentStatement ::= "let"? IDENTIFIER EQUALS Expression +AssignmentStatement ::= ("let")? ("*")? IDENTIFIER EQUALS Expression ExternDeclaration ::= "extern" IDENTIFIER EQUALS Type @@ -24,7 +24,7 @@ AdditiveExpression ::= MultiplicativeExpression (("+" | "-") MultiplicativeExpre MultiplicativeExpression ::= UnaryExpression (("*" | "/" | "%") UnaryExpression)* -UnaryExpression ::= ("!" | "-") UnaryExpression | PrimaryExpression +UnaryExpression ::= ("!" | "-" | "*") UnaryExpression | PrimaryExpression PrimaryExpression ::= NUMBER | BOOLEAN | STRING | IDENTIFIER | FunctionCallStatement | FunctionDefinition | LPAREN Expression RPAREN |