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