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