summaryrefslogtreecommitdiff
path: root/ext/ply/example/ansic/cparse.py
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2009-08-16 13:39:58 -0700
committerNathan Binkert <nate@binkert.org>2009-08-16 13:39:58 -0700
commite1270f81bdc81f5a575b34c2d2c294bdde3e6f4f (patch)
treeb54af3469a338609faf04e67603c5264e79d59a5 /ext/ply/example/ansic/cparse.py
parentbcaf93d182f43bf72d52104bb909324945904120 (diff)
downloadgem5-e1270f81bdc81f5a575b34c2d2c294bdde3e6f4f.tar.xz
ply: update PLY to version 3.2
Diffstat (limited to 'ext/ply/example/ansic/cparse.py')
-rw-r--r--ext/ply/example/ansic/cparse.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/ply/example/ansic/cparse.py b/ext/ply/example/ansic/cparse.py
index d474378c8..c9b916455 100644
--- a/ext/ply/example/ansic/cparse.py
+++ b/ext/ply/example/ansic/cparse.py
@@ -155,7 +155,7 @@ def p_struct_declaration_list_1(t):
pass
def p_struct_declaration_list_2(t):
- 'struct_declaration_list : struct_declarator_list struct_declaration'
+ 'struct_declaration_list : struct_declaration_list struct_declaration'
pass
# init-declarator-list:
@@ -778,12 +778,12 @@ def p_unary_expression_5(t):
def p_unary_expression_6(t):
'unary_expression : SIZEOF LPAREN type_name RPAREN'
pass
-
+
#unary-operator
def p_unary_operator(t):
'''unary_operator : AND
| TIMES
- | PLUS
+ | PLUS
| MINUS
| NOT
| LNOT '''
@@ -837,7 +837,7 @@ def p_argument_expression_list(t):
pass
# constant:
-def p_constant(t):
+def p_constant(t):
'''constant : ICONST
| FCONST
| CCONST'''
@@ -849,7 +849,7 @@ def p_empty(t):
pass
def p_error(t):
- print "Whoa. We're hosed"
+ print("Whoa. We're hosed")
import profile
# Build the grammar