예제 #1
0
파일: parser.py 프로젝트: jagadeeshe/kgen
 def p_pattern_list(self, p):
     'pattern_list : pattern_list pattern_element'
     p[0] = cross_product(p[1], p[2])
예제 #2
0
파일: parser.py 프로젝트: jagadeeshe/kgen
 def p_rhs_item_only_right_context(self, p):
     'rhs_item : UNDER pattern_list'
     p[0] = cross_product(self.ast.lhs, p[2])
     self.ast.rc = p[2]
예제 #3
0
파일: parser.py 프로젝트: jagadeeshe/kgen
 def p_rhs_item_both_left_right_context(self, p):
     'rhs_item : pattern_list UNDER pattern_list'
     p[0] = cross_product(p[1], cross_product(self.ast.lhs, p[3]))
     self.ast.lc = p[1]
     self.ast.rc = p[3]
예제 #4
0
파일: parser.py 프로젝트: jagadeeshe/kgen
 def p_rhs_item_only_left_context(self, p):
     'rhs_item : pattern_list UNDER'
     p[0] = cross_product(p[1], self.ast.lhs)
     self.ast.lc = p[1]