1
0
mirror of https://github.com/livingcomputermuseum/pdp7-unix.git synced 2026-02-06 00:25:37 +00:00
This commit is contained in:
Tom Everett
2016-02-29 20:53:18 -07:00
parent f6c2df8ff4
commit c4b37b58b7

View File

@@ -45,19 +45,21 @@ declarations
;
declaration
: instruction
| label
| expression
: label? (instruction | assignment | expression)?
;
instruction
: opcode argument+
: opcode argument*
;
argument
: expression
;
assignment
: variable '=' expression
;
expression
: multiplyingExpression ((PLUS|MINUS) multiplyingExpression)*
;
@@ -87,7 +89,7 @@ comment
;
label
: LABEL argument?
: LABEL
;
variable