summaryrefslogtreecommitdiff
path: root/ext/ply/example/ansic/cparse.py
diff options
context:
space:
mode:
Diffstat (limited to 'ext/ply/example/ansic/cparse.py')
-rw-r--r--ext/ply/example/ansic/cparse.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/ply/example/ansic/cparse.py b/ext/ply/example/ansic/cparse.py
index ddfd5c72b..d474378c8 100644
--- a/ext/ply/example/ansic/cparse.py
+++ b/ext/ply/example/ansic/cparse.py
@@ -4,8 +4,9 @@
# Simple parser for ANSI C. Based on the grammar in K&R, 2nd Ed.
# -----------------------------------------------------------------------------
-import yacc
+import sys
import clex
+import ply.yacc as yacc
# Get the token map
tokens = clex.tokens
@@ -852,7 +853,10 @@ def p_error(t):
import profile
# Build the grammar
-profile.run("yacc.yacc()")
+
+yacc.yacc(method='LALR')
+
+#profile.run("yacc.yacc(method='LALR')")