From 80c8c2d0a6e63745ff099b33ad2848b6fb17285a Mon Sep 17 00:00:00 2001 From: David Beazley Date: Tue, 21 Nov 2006 15:09:46 +0000 Subject: initial checkin --- test/lex_error4.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 test/lex_error4.py (limited to 'test/lex_error4.py') diff --git a/test/lex_error4.py b/test/lex_error4.py new file mode 100644 index 0000000..d05de74 --- /dev/null +++ b/test/lex_error4.py @@ -0,0 +1,27 @@ +# lex_token.py +# +# t_error defined as function, but too many 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(t,s): + pass + +sys.tracebacklimit = 0 + +lex.lex() + + -- cgit v1.2.1