diff options
Diffstat (limited to 'tests/lex_literal3.py')
-rw-r--r-- | tests/lex_literal3.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/lex_literal3.py b/tests/lex_literal3.py new file mode 100644 index 0000000..9d697c9 --- /dev/null +++ b/tests/lex_literal3.py @@ -0,0 +1,23 @@ +# lex_literal3.py +# +# An empty literal specification given as a list +# Issue 8 : Literals empty list causes IndexError + +import ply.lex as lex + +tokens = [ + "NUMBER", + ] + +literals = [] + +def t_NUMBER(t): + r'\d+' + return t + +def t_error(t): + pass + +lex.lex() + + |