lexing and parsing unary operators

This commit is contained in:
Clemens-Dautermann 2020-08-20 17:11:43 +02:00
parent b2c2a2f497
commit 202c1d2ca2
21 changed files with 290 additions and 130 deletions

View file

@ -1,4 +1,5 @@
<program> ::= <function>
<function> ::= "int" <id> "(" ")" "{" <statement> "}"
<statement> ::= "return" <exp> ";"
<exp> ::= <int>
<exp> ::= <unary_op> <exp> | <int>
<unary_op> ::= "!" | "~" | "-"