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