aboutsummaryrefslogtreecommitdiff
path: root/GRAMMAR.txt
diff options
context:
space:
mode:
Diffstat (limited to 'GRAMMAR.txt')
-rw-r--r--GRAMMAR.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/GRAMMAR.txt b/GRAMMAR.txt
index bd7b4d4..68177fc 100644
--- a/GRAMMAR.txt
+++ b/GRAMMAR.txt
@@ -26,10 +26,11 @@ term -> numeral ( ( "<<" | ">>" ) numeral )*
numeral -> factor ( ( "+" | "-" ) factor )*
factor -> unary ( ( "*" | "/" ) unary )*
unary -> ( "-" | "!" | "~" )? primary
-primary -> grouping | literal | call
+primary -> grouping | literal | call | variable
grouping -> "(" expression ")"
literal -> string | number
string -> STRING*
number -> NUMBER IDENTIFIER
call -> IDENTIFIER "(" arg? ")"
arg -> expression ( "," arg )?
+variable -> IDENTIFIER