lex_nowarn.py (339B)
1# lex_token.py 2# 3# Missing t_error() rule 4 5import sys 6sys.path.insert(0,"..") 7 8import ply.lex as lex 9 10tokens = [ 11 "PLUS", 12 "MINUS", 13 "NUMBER", 14 "NUMBER", 15 ] 16 17states = (('foo','exclusive'),) 18 19t_ignore = ' \t' 20t_PLUS = r'\+' 21t_MINUS = r'-' 22t_NUMBER = r'\d+' 23 24t_foo_NUMBER = r'\d+' 25 26sys.tracebacklimit = 0 27 28lex.lex(nowarn=1) 29 30