Sign in
gem5
/
public
/
gem5
/
579c2cd54b1b29e8283f789a5bb221edb53e6f83
/
.
/
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
()