예제 #1
0
 def p_decl__machine1(self, p):
     "decl : MACHINE '(' enumeration pairs ')' ':' obj_decls '{' decls '}'"
     p[0] = ast.MachineAST(self, p[3], p[4], p[7], p[9])
예제 #2
0
파일: parser.py 프로젝트: liangwang/m5
 def p_decl__machine(self, p):
     "decl : MACHINE '(' ident pairs ')' ':' params '{' decls '}'"
     p[0] = ast.MachineAST(self, p[3], p[4], p[7], p[9])
예제 #3
0
 def p_decl__machine0(self, p):
     "decl : MACHINE '(' idents ')' ':' obj_decls '{' decls '}'"
     p[0] = ast.MachineAST(self, p[3], [], p[7], p[9])