def p_program_tail(p): """ program : statement program """ p[0] = AST.ProgramStatement(p.linespan(0), [p[1]] + p[2].statements)
def p_program_head(p): """ program : """ p[0] = AST.ProgramStatement(p.linespan(0), [])