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