closer
This commit is contained in:
+7
-5
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user