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

Side by Side Diff: tools/nixysa/third_party/ply-3.1/test/yacc_nested.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 import sys
2
3 if ".." not in sys.path: sys.path.insert(0,"..")
4
5 from ply import lex, yacc
6
7 t_A = 'A'
8 t_B = 'B'
9 t_C = 'C'
10
11 tokens = ('A', 'B', 'C')
12
13 the_lexer = lex.lex()
14
15 def t_error(t):
16 pass
17
18 def p_error(p):
19 pass
20
21 def p_start(t):
22 '''start : A nest C'''
23 pass
24
25 def p_nest(t):
26 '''nest : B'''
27 print(t[-1])
28
29 the_parser = yacc.yacc(debug = False, write_tables = False)
30
31 the_parser.parse('ABC', the_lexer)
32 the_parser.parse('ABC', the_lexer, tracking=True)
33 the_parser.parse('ABC', the_lexer, tracking=True, debug=1)
OLDNEW
« no previous file with comments | « tools/nixysa/third_party/ply-3.1/test/yacc_missing1.py ('k') | tools/nixysa/third_party/ply-3.1/test/yacc_nodoc.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698