i am trying to parse a list of words/phrases using ply and using lex.lex from that library.
i have used lex.lex on a list of words before and it worked fine, just using a for loop to input into the lexer.
but i keep getting the following error
Traceback (most recent call last):
File "<pyshell#56>", line 2, in <module>
mylexer.input(a)
File "ply\lex.py", line 253, in input
c = s[:1]
TypeError: 'NoneType' object has no attribute '__getitem__'
the list i am trying to lex on this occasion is parsed json and as far as i can tell is the only difference, from the previous lexing that actually did work?
thanks for any help.