mirror of
https://github.com/livingcomputermuseum/pdp7-unix.git
synced 2026-02-06 00:25:37 +00:00
closer
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user