else
return Mult;
default:
- PyErr_Format(PyExc_Exception, "invalid augassign: %s", STR(n));
+ PyErr_Format(PyExc_SystemError, "invalid augassign: %s", STR(n));
return 0;
}
}
if (strcmp(STR(n), "is") == 0)
return Is;
default:
- PyErr_Format(PyExc_Exception, "invalid comp_op: %s",
+ PyErr_Format(PyExc_SystemError, "invalid comp_op: %s",
STR(n));
return 0;
}
if (strcmp(STR(CHILD(n, 0)), "is") == 0)
return IsNot;
default:
- PyErr_Format(PyExc_Exception, "invalid comp_op: %s %s",
+ PyErr_Format(PyExc_SystemError, "invalid comp_op: %s %s",
STR(CHILD(n, 0)), STR(CHILD(n, 1)));
return 0;
}
}
- PyErr_Format(PyExc_Exception, "invalid comp_op: has %d children",
+ PyErr_Format(PyExc_SystemError, "invalid comp_op: has %d children",
NCH(n));
return 0;
}
i += 3;
break;
default:
- PyErr_Format(PyExc_Exception,
+ PyErr_Format(PyExc_SystemError,
"unexpected node in varargslist: %d @ %d",
TYPE(ch), i);
goto error;
return Repr(expression, LINENO(n));
}
default:
- PyErr_Format(PyExc_Exception, "unhandled atom %d",
- TYPE(ch));
+ PyErr_Format(PyExc_SystemError, "unhandled atom %d", TYPE(ch));
return NULL;
}
}
case power:
return ast_for_power(c, n);
default:
- abort();
- PyErr_Format(PyExc_Exception, "unhandled expr: %d", TYPE(n));
+ PyErr_Format(PyExc_SystemError, "unhandled expr: %d", TYPE(n));
return NULL;
}
/* should never get here */
return Raise(expr1, expr2, expr3, LINENO(n));
}
default:
- PyErr_Format(PyExc_Exception,
+ PyErr_Format(PyExc_SystemError,
"unexpected flow_stmt: %d", TYPE(ch));
return NULL;
}
case STAR:
return alias(PyString_InternFromString("*"), NULL);
default:
- PyErr_Format(PyExc_Exception,
+ PyErr_Format(PyExc_SystemError,
"unexpected import name: %d", TYPE(n));
return NULL;
}
free_alias(mod);
return import;
}
- PyErr_Format(PyExc_Exception,
+ PyErr_Format(PyExc_SystemError,
"unknown import statement: starts with command '%s'",
STR(CHILD(n, 0)));
return NULL;
expr_ty expr1, globals = NULL, locals = NULL;
int n_children = NCH(n);
if (n_children != 2 && n_children != 4 && n_children != 6) {
- PyErr_Format(PyExc_Exception,
+ PyErr_Format(PyExc_SystemError,
"poorly formed 'exec' statement: %d parts to statement",
n_children);
return NULL;
return Assert(expr1, expr2, LINENO(n));
}
- PyErr_Format(PyExc_Exception,
+ PyErr_Format(PyExc_SystemError,
"improper number of parts to 'assert' statement: %d",
NCH(n));
return NULL;
orelse, LINENO(n));
}
else {
- PyErr_Format(PyExc_Exception,
+ PyErr_Format(PyExc_SystemError,
"unexpected token in 'if' statement: %s", s);
return NULL;
}
return While(expression, seq1, seq2, LINENO(n));
}
else {
- PyErr_Format(PyExc_Exception,
+ PyErr_Format(PyExc_SystemError,
"wrong number of tokens for 'while' statement: %d",
NCH(n));
return NULL;
return excepthandler(expression, e, suite_seq);
}
else {
- PyErr_Format(PyExc_Exception,
+ PyErr_Format(PyExc_SystemError,
"wrong number of children for 'except' clause: %d",
NCH(exc));
return NULL;
case assert_stmt:
return ast_for_assert_stmt(c, n);
default:
- PyErr_Format(PyExc_Exception,
+ PyErr_Format(PyExc_SystemError,
"unhandled small_stmt: TYPE=%d NCH=%d\n",
TYPE(n), NCH(n));
return NULL;
case classdef:
return ast_for_classdef(c, ch);
default:
- PyErr_Format(PyExc_Exception,
+ PyErr_Format(PyExc_SystemError,
"unhandled small_stmt: TYPE=%d NCH=%d\n",
TYPE(n), NCH(n));
return NULL;