Sign in
gem5
/
public
/
gem5
/
0e20edac34e6785bb3538e2d7ae848e8d3d0e71b
/
.
/
ext
/
ply
/
test
/
lex_error1.py
blob: 4508a8084569db29bc66fa561147d7328ef15c2b [
file
] [
log
] [
blame
]
# lex_error1.py
#
# Missing t_error() rule
import
sys
if
".."
not
in
sys
.
path
:
sys
.
path
.
insert
(
0
,
".."
)
import
ply
.
lex
as
lex
tokens
=
[
"PLUS"
,
"MINUS"
,
"NUMBER"
,
]
t_PLUS
=
r
'\+'
t_MINUS
=
r
'-'
t_NUMBER
=
r
'\d+'
lex
.
lex
()