diff options
Diffstat (limited to 'solve/ply-2.2/test/lex_error3.py')
| -rw-r--r-- | solve/ply-2.2/test/lex_error3.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/solve/ply-2.2/test/lex_error3.py b/solve/ply-2.2/test/lex_error3.py new file mode 100644 index 0000000..584600f --- /dev/null +++ b/solve/ply-2.2/test/lex_error3.py @@ -0,0 +1,27 @@ +# lex_token.py +# +# t_error defined as function, but with wrong # args + +import sys +sys.path.insert(0,"..") + +import ply.lex as lex + +tokens = [ + "PLUS", + "MINUS", + "NUMBER", + ] + +t_PLUS = r'\+' +t_MINUS = r'-' +t_NUMBER = r'\d+' + +def t_error(): + pass + +sys.tracebacklimit = 0 + +lex.lex() + + |
