Mercurial > lcfOS
comparison python/c3/lexer.py @ 225:1c7364bd74c7
Fixed pointer deref
author | Windel Bouwman |
---|---|
date | Thu, 11 Jul 2013 07:42:30 +0200 |
parents | 848c4b15fd0b |
children | e621e3ba78d2 |
comparison
equal
deleted
inserted
replaced
224:5af52987f5bd | 225:1c7364bd74c7 |
---|---|
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 |