This commit is contained in:
Tom Everett
2016-02-29 20:53:18 -07:00
parent f6c2df8ff4
commit c4b37b58b7
+7 -5
View File
@@ -45,19 +45,21 @@ declarations
; ;
declaration declaration
: instruction : label? (instruction | assignment | expression)?
| label
| expression
; ;
instruction instruction
: opcode argument+ : opcode argument*
; ;
argument argument
: expression : expression
; ;
assignment
: variable '=' expression
;
expression expression
: multiplyingExpression ((PLUS|MINUS) multiplyingExpression)* : multiplyingExpression ((PLUS|MINUS) multiplyingExpression)*
; ;
@@ -87,7 +89,7 @@ comment
; ;
label label
: LABEL argument? : LABEL
; ;
variable variable