1
# -----------------------------------------------------------------------------
3
# -----------------------------------------------------------------------------
6
if ".." not in sys.path: sys.path.insert(0,"..")
12
'PLUS','MINUS','TIMES','DIVIDE','EQUALS',
25
t_NAME = r'[a-zA-Z_][a-zA-Z0-9_]*'
30
t.value = int(t.value)
32
print("Integer value too large %s" % t.value)
38
def t_newline(self,t):
40
t.lineno += t.value.count("\n")
43
print("Illegal character '%s'" % t.value[0])
51
lex.runmain(data="3+4")