Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: tools/nixysa/third_party/ply-3.1/test/lex_many_tokens.py

Issue 2043006: WTF NPAPI extension. Early draft. Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 # lex_many_tokens.py
2 #
3 # Test lex's ability to handle a large number of tokens (beyond the
4 # 100-group limit of the re module)
5
6 import sys
7 if ".." not in sys.path: sys.path.insert(0,"..")
8
9 import ply.lex as lex
10
11 tokens = ["TOK%d" % i for i in range(1000)]
12
13 for tok in tokens:
14 if sys.version_info[0] < 3:
15 exec("t_%s = '%s:'" % (tok,tok))
16 else:
17 exec("t_%s = '%s:'" % (tok,tok), globals())
18
19 t_ignore = " \t"
20
21 def t_error(t):
22 pass
23
24 lex.lex(optimize=1,lextab="manytab")
25 lex.runmain(data="TOK34: TOK143: TOK269: TOK372: TOK452: TOK561: TOK999:")
26
27
OLDNEW
« no previous file with comments | « tools/nixysa/third_party/ply-3.1/test/lex_literal2.py ('k') | tools/nixysa/third_party/ply-3.1/test/lex_module.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698