diff python/c3/lexer.py @ 191:6b2bec5653f1

Added assembler testset
author Windel Bouwman
date Sun, 26 May 2013 15:28:07 +0200
parents 8104fc8b5e90
children b01429a5d695
line wrap: on
line diff
--- a/python/c3/lexer.py	Sat May 25 15:15:42 2013 +0200
+++ b/python/c3/lexer.py	Sun May 26 15:28:07 2013 +0200
@@ -1,14 +1,11 @@
 import collections, re
 
-from ppci import CompilerError, SourceLocation
+from ppci import CompilerError, SourceLocation, Token
 
 """
  Lexical analyzer part. Splits the input character stream into tokens.
 """
 
-# Token is used in the lexical analyzer:
-Token = collections.namedtuple('Token', 'typ val loc')
-
 keywords = ['and', 'or', 'not','true', 'false', \
    'else', 'if', 'while', 'return', \
    'function', 'var', 'type', 'const', \