Skip to content

Commit

Permalink
remove strings from IR syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
Francois Chagnon committed Jun 15, 2015
1 parent a64f3f6 commit 825e996
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions tests/common/ply/ir_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def p_expression_paren(p):

def p_expression_uminus(p):
'expression : "-" expression %prec UNARY'
p[0] = - p[2]
p[0] = neg_t(p[2])

def p_expression_uplus(p):
'expression : "+" expression %prec UNARY'
Expand Down Expand Up @@ -119,10 +119,6 @@ def p_expression_number(p):
'expression : NUMBER'
p[0] = value_t(p[1], 32)

def p_arg_string(p):
'arg : STRING'
p[0] = p[1]

def p_arg_expression(p):
'arg : expression'
p[0] = p[1]
Expand Down Expand Up @@ -172,10 +168,6 @@ def p_assignee_expression(p):
'assignee : expression'
p[0] = p[1]

def p_assignee_string(p):
'assignee : STRING'
p[0] = p[1]

def p_assign(p):
'assign : assignable "=" assignee'
p[0] = assign_t(p[1], p[3])
Expand Down Expand Up @@ -264,12 +256,11 @@ def parse(text):
#~ sys.path.append('../../src/')

text = """
loc_1:
100:
a = 400; // foo
b = a - 900 + -100;
// bar
c = *(a + 4);
d = "blarg";
"""

print parse(text)
Expand Down

0 comments on commit 825e996

Please sign in to comment.