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