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