smarter string handling

This commit is contained in:
Tom Everett
2016-03-01 17:42:07 -07:00
parent bd65c3a3a6
commit 0efc47881d
+9 -5
View File
@@ -72,7 +72,7 @@ atom
: variable
| LOC
| RELOC
| STRING
| string
| DECIMAL
| DECIMAL_MINUS
| OCTAL
@@ -80,6 +80,10 @@ atom
| d
;
string
: STRING '>'?
;
d
: '-'? DECIMAL_LITERAL
;
@@ -114,7 +118,7 @@ opcode
| 'sad'
| 'jmp'
| 'nop'
| 'i'
// | 'i'
| 'law'
| 'cma'
| 'las'
@@ -190,9 +194,10 @@ opcode
| 'dprc'
| 'crsf'
| 'crrb'
| 'sys'
| 'czm'
;
LOC
: '.'
;
@@ -237,7 +242,6 @@ OCTAL_LITERAL
: '0' [0-7]*
;
DECIMAL_LITERAL
: [1-9] [0-9]*
;
@@ -259,7 +263,7 @@ DECIMAL_MINUS
STRING
: '<' [a-zA-Z0-9$*,%/] + '>'
: '<' [a-zA-Z0-9$*,%/]*
;