comparison python/c3/lexer.py @ 232:e621e3ba78d2

Added left shift instruction
author Windel Bouwman
date Sun, 14 Jul 2013 11:50:58 +0200
parents 1c7364bd74c7
children 05184b95fa16
comparison
equal deleted inserted replaced
231:521567d17388 232:e621e3ba78d2
27 ('NEWLINE', r'\n'), 27 ('NEWLINE', r'\n'),
28 ('SKIP', r'[ \t]'), 28 ('SKIP', r'[ \t]'),
29 ('COMMENTS', r'//.*'), 29 ('COMMENTS', r'//.*'),
30 ('LONGCOMMENTBEGIN', r'\/\*'), 30 ('LONGCOMMENTBEGIN', r'\/\*'),
31 ('LONGCOMMENTEND', r'\*\/'), 31 ('LONGCOMMENTEND', r'\*\/'),
32 ('LEESTEKEN', r'==|->|[\.,=:;\-+*\[\]/\(\)]|>=|<=|<>|>|<|{|}|&|\^|\|'), 32 ('LEESTEKEN', r'==|->|<<|>>|[\.,=:;\-+*\[\]/\(\)]|>=|<=|<>|>|<|{|}|&|\^|\|'),
33 ('STRING', r"'.*?'") 33 ('STRING', r"'.*?'")
34 ] 34 ]
35 tok_re = '|'.join('(?P<%s>%s)' % pair for pair in tok_spec) 35 tok_re = '|'.join('(?P<%s>%s)' % pair for pair in tok_spec)
36 gettok = re.compile(tok_re).match 36 gettok = re.compile(tok_re).match
37 line = 1 37 line = 1