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