parent
4ce3e253c9
commit
480754b38e
|
@ -6,7 +6,7 @@ import re
|
||||||
class TalGrammar(Grammar):
|
class TalGrammar(Grammar):
|
||||||
rules = [
|
rules = [
|
||||||
PatternRule('spaces', '[ \t]+'),
|
PatternRule('spaces', '[ \t]+'),
|
||||||
RegionRule('comment', r'\(', Grammar, '\)'),
|
RegionRule('comment', r'\((?:[ \t]|$)', Grammar, '(?:^|[ \t])\)'),
|
||||||
PatternRule('delimiter', r'[\[\]{}]'),
|
PatternRule('delimiter', r'[\[\]{}]'),
|
||||||
PatternRule('tal.inst', r'(BRK|LIT|INC|POP|DUP|NIP|SWP|OVR|ROT|EQU|NEQ|GTH|LTH|JMP|JCN|JSR|STH|LDZ|STZ|LDR|STR|LDA|STA|DEI|DEO|ADD|SUB|MUL|DIV|AND|ORA|EOR|SFT)2?k?r?'), # instructions
|
PatternRule('tal.inst', r'(BRK|LIT|INC|POP|DUP|NIP|SWP|OVR|ROT|EQU|NEQ|GTH|LTH|JMP|JCN|JSR|STH|LDZ|STZ|LDR|STR|LDA|STA|DEI|DEO|ADD|SUB|MUL|DIV|AND|ORA|EOR|SFT)2?k?r?'), # instructions
|
||||||
PatternRule('tal.defmacro', r'%[^ \t\n]+'), # macro-define
|
PatternRule('tal.defmacro', r'%[^ \t\n]+'), # macro-define
|
||||||
|
|
Loading…
Reference in New Issue