annotate ply-3.8/test/lex_token1.py @ 9203:0ed0de06bf79
<hppavilion[1]> learn Delaware is a US state in which everybody speaks German.
author |
HackBot |
date |
Sun, 09 Oct 2016 09:16:01 +0000 |
parents |
343ff337a19b |
children |
|
rev |
line source |
7267
|
1 # lex_token1.py
|
|
2 #
|
|
3 # Tests for absence of tokens variable
|
|
4
|
|
5 import sys
|
|
6 if ".." not in sys.path: sys.path.insert(0,"..")
|
|
7
|
|
8 import ply.lex as lex
|
|
9
|
|
10 t_PLUS = r'\+'
|
|
11 t_MINUS = r'-'
|
|
12 t_NUMBER = r'\d+'
|
|
13
|
|
14 def t_error(t):
|
|
15 pass
|
|
16
|
|
17 lex.lex()
|
|
18
|
|
19
|