1
# -----------------------------------------------------------------------------
4
# Writes table in a subdirectory structure.
5
# -----------------------------------------------------------------------------
8
if ".." not in sys.path: sys.path.insert(0,"..")
13
'PLUS','MINUS','TIMES','DIVIDE','EQUALS',
26
t_NAME = r'[a-zA-Z_][a-zA-Z0-9_]*'
31
t.value = int(t.value)
33
print("Integer value too large %s" % t.value)
41
t.lineno += t.value.count("\n")
44
print("Illegal character '%s'" % t.value[0])
48
lex.lex(optimize=1,lextab="lexdir.sub.calctab",outputdir="lexdir/sub")
49
lex.runmain(data="3+4")