Пример #1
0
 def statement_terminal(element):
     """Creates a CFG consisting of only one IR node"""
     return CfgSimple(Graph.single_node(element), terminals={element})
Пример #2
0
 def statements(*elements):
     """Concatenates a sequence of basic IR nodes"""
     return CfgSimple(Graph.linear(*elements), terminals=set())
Пример #3
0
 def empty():
     """Creates an empty CFG"""
     return CfgSimple(Graph.empty(), set())