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