lex_error2.py revision 2632:1bb2f91485ea
1# lex_token.py 2# 3# t_error defined, but not function 4 5import lex 6 7tokens = [ 8 "PLUS", 9 "MINUS", 10 "NUMBER", 11 ] 12 13t_PLUS = r'\+' 14t_MINUS = r'-' 15t_NUMBER = r'\d+' 16 17t_error = "foo" 18 19import sys 20sys.tracebacklimit = 0 21 22lex.lex() 23 24 25