closer
This commit is contained in:
+18
-3
@@ -37,7 +37,7 @@ prog
|
|||||||
;
|
;
|
||||||
|
|
||||||
line
|
line
|
||||||
: ( label | declarations)* comment? eol
|
: declarations? comment? eol
|
||||||
;
|
;
|
||||||
|
|
||||||
declarations
|
declarations
|
||||||
@@ -46,6 +46,7 @@ declarations
|
|||||||
|
|
||||||
declaration
|
declaration
|
||||||
: instruction
|
: instruction
|
||||||
|
| label
|
||||||
;
|
;
|
||||||
|
|
||||||
instruction
|
instruction
|
||||||
@@ -85,7 +86,7 @@ comment
|
|||||||
;
|
;
|
||||||
|
|
||||||
label
|
label
|
||||||
: IDENTIFIER ':'
|
: LABEL argument?
|
||||||
;
|
;
|
||||||
|
|
||||||
variable
|
variable
|
||||||
@@ -103,6 +104,16 @@ opcode
|
|||||||
| 'sys'
|
| 'sys'
|
||||||
| 'sna'
|
| 'sna'
|
||||||
| 'spa'
|
| 'spa'
|
||||||
|
| 'lacq'
|
||||||
|
| 'lrss'
|
||||||
|
| 'dzm'
|
||||||
|
| 'sza'
|
||||||
|
| 'lmq'
|
||||||
|
| 'cll'
|
||||||
|
| 'als'
|
||||||
|
| 'omq'
|
||||||
|
| 'isz'
|
||||||
|
| 'sma'
|
||||||
;
|
;
|
||||||
|
|
||||||
LOC
|
LOC
|
||||||
@@ -129,8 +140,12 @@ DIV
|
|||||||
: '/'
|
: '/'
|
||||||
;
|
;
|
||||||
|
|
||||||
|
LABEL
|
||||||
|
: IDENTIFIER ':'
|
||||||
|
;
|
||||||
|
|
||||||
IDENTIFIER
|
IDENTIFIER
|
||||||
: [a-zA-Z]+
|
: [a-zA-Z0-9]+
|
||||||
;
|
;
|
||||||
|
|
||||||
OCTAL_LITERAL
|
OCTAL_LITERAL
|
||||||
|
|||||||
Reference in New Issue
Block a user