示例#1
0
 def p_if_else_statement(self, p):
     """
     if_statement : IF LBRACKET relation RBRACKET body ELSE body
     """
     p[0] = ast.If(p[3], p[5], p[7])
示例#2
0
 def p_if_statement(self, p):
     """
     if_statement : IF LBRACKET relation RBRACKET body %prec IF
     """
     p[0] = ast.If(p[3], p[5])