Ejemplo n.º 1
0
def p_actions_evolution(p):
    '''actions : block
               | actions block'''
    if len(p) == 2:
        p[0] = AST.Actions(series=[p[1]])
    else:
        p[0] = AST.Actions(series=[p[1], p[2]])
Ejemplo n.º 2
0
def p_block_evolution(p):
    '''block : CURL_BRACKET actions CLOSE_CURL_BRACKET
             | action'''
    p[0] = AST.Actions(series=[p[1] if len(p) == 2 else p[2]])