1# lex_literal1.py 2# 3# Bad literal specification 4 5import sys 6if ".." not in sys.path: sys.path.insert(0,"..") 7 8import ply.lex as lex 9 10tokens = [ 11 "NUMBER", 12 ] 13 14literals = ["+","-","**"] 15 16def t_NUMBER(t): 17 r'\d+' 18 return t 19 20def t_error(t): 21 pass 22 23lex.lex() 24 25 26