Beispiel #1
0
 def p_pairsx__one(self, p):
     "pairsx : pair"
     p[0] = ast.PairListAST(self)
     p[0].addPair(p[1])
Beispiel #2
0
 def p_pairs__empty(self, p):
     "pairs : empty"
     p[0] = ast.PairListAST(self)
Beispiel #3
0
 def p_obj_decl__3(self, p):
     "obj_decl : type STAR ident ASSIGN expr SEMI"
     p[0] = ast.ObjDeclAST(self, p[1], p[3], ast.PairListAST(self), p[5],
                           True)
Beispiel #4
0
 def p_type_member__2(self, p):
     "type_member : type ident ASSIGN expr SEMI"
     p[0] = ast.TypeFieldMemberAST(self, p[1], p[2], ast.PairListAST(self),
                                   p[4])
Beispiel #5
0
 def p_obj_decl__2(self, p):
     "obj_decl : type ident ASSIGN expr SEMI"
     p[0] = ast.ObjDeclAST(self, p[1], p[2], ast.PairListAST(self), p[4],
                           False)