Beispiel #1
0
 def p_variable_selector(p):
     """ variable : ID vector """
     p[0] = AST.Selector(p.linespan(0), AST.Identifier(p.linespan(1), p[1]),
                         p[2])
Beispiel #2
0
 def p_statement_for(p):
     """ statement : FOR ID ASSIGN range statement """
     p[0] = AST.ForStatement(p.linespan(0),
                             AST.Identifier(p.linespan(0), p[2]), p[4],
                             p[5])
Beispiel #3
0
 def p_variable_id(p):
     """ variable : ID """
     p[0] = AST.Identifier(p.linespan(0), p[1])