Mercurial > lcfOS
diff python/ppci/c3/lexer.py @ 315:084cccaa5deb
Added console and screen
author | Windel Bouwman |
---|---|
date | Sat, 21 Dec 2013 10:03:01 +0100 |
parents | b145f8e6050b |
children | 8d07a4254f04 |
line wrap: on
line diff
--- a/python/ppci/c3/lexer.py Wed Dec 18 20:22:20 2013 +0100 +++ b/python/ppci/c3/lexer.py Sat Dec 21 10:03:01 2013 +0100 @@ -8,7 +8,7 @@ """ keywords = ['and', 'or', 'not', 'true', 'false', - 'else', 'if', 'while', 'return', + 'else', 'if', 'while', 'for', 'return', 'function', 'var', 'type', 'const', 'struct', 'cast', 'import', 'module'] @@ -45,7 +45,7 @@ ('COMMENTS', r'//.*'), ('LONGCOMMENTBEGIN', r'\/\*'), ('LONGCOMMENTEND', r'\*\/'), - ('LEESTEKEN', r'==|->|<<|>>|!=|[\.,=:;\-+*\[\]/\(\)]|>=|<=|<>|>|<|{|}|&|\^|\|'), + ('LEESTEKEN', r'==|->|<<|>>|!=|\+\+|[\.,=:;\-+*\[\]/\(\)]|>=|<=|<>|>|<|{|}|&|\^|\|'), ('STRING', r"'.*?'") ] tok_re = '|'.join('(?P<%s>%s)' % pair for pair in tok_spec)