blob: ed798034650884a5b081c424094ea3b5eba5af4c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# lex_token.py
#
# Missing t_error() rule
import lex
tokens = [
"PLUS",
"MINUS",
"NUMBER",
]
t_PLUS = r'\+'
t_MINUS = r'-'
t_NUMBER = r'\d+'
import sys
sys.tracebacklimit = 0
lex.lex()
|