Lines Matching refs:err_ret
16 static int initerr(perrdetail *err_ret, PyObject * filename);
65 PyParser_ParseString(const char *s, grammar *g, int start, perrdetail *err_ret) in PyParser_ParseString() argument
67 return PyParser_ParseStringFlagsFilename(s, NULL, g, start, err_ret, 0); in PyParser_ParseString()
72 perrdetail *err_ret, int flags) in PyParser_ParseStringFlags() argument
75 g, start, err_ret, flags); in PyParser_ParseStringFlags()
81 perrdetail *err_ret, int flags) in PyParser_ParseStringFlagsFilename() argument
85 err_ret, &iflags); in PyParser_ParseStringFlagsFilename()
91 perrdetail *err_ret, int *flags) in PyParser_ParseStringObject() argument
96 if (initerr(err_ret, filename) < 0) in PyParser_ParseStringObject()
99 if (PySys_Audit("compile", "yO", s, err_ret->filename) < 0) { in PyParser_ParseStringObject()
100 err_ret->error = E_ERROR; in PyParser_ParseStringObject()
109 err_ret->error = PyErr_Occurred() ? E_DECODE : E_NOMEM; in PyParser_ParseStringObject()
116 Py_INCREF(err_ret->filename); in PyParser_ParseStringObject()
117 tok->filename = err_ret->filename; in PyParser_ParseStringObject()
120 return parsetok(tok, g, start, err_ret, flags); in PyParser_ParseStringObject()
126 perrdetail *err_ret, int *flags) in PyParser_ParseStringFlagsFilenameEx() argument
133 err_ret->error = E_ERROR; in PyParser_ParseStringFlagsFilenameEx()
137 n = PyParser_ParseStringObject(s, filename, g, start, err_ret, flags); in PyParser_ParseStringFlagsFilenameEx()
147 perrdetail *err_ret) in PyParser_ParseFile() argument
150 g, start, ps1, ps2, err_ret, 0); in PyParser_ParseFile()
157 perrdetail *err_ret, int flags) in PyParser_ParseFileFlags() argument
161 ps2, err_ret, &iflags); in PyParser_ParseFileFlags()
168 perrdetail *err_ret, int *flags) in PyParser_ParseFileObject() argument
172 if (initerr(err_ret, filename) < 0) in PyParser_ParseFileObject()
175 if (PySys_Audit("compile", "OO", Py_None, err_ret->filename) < 0) { in PyParser_ParseFileObject()
180 err_ret->error = E_NOMEM; in PyParser_ParseFileObject()
186 Py_INCREF(err_ret->filename); in PyParser_ParseFileObject()
187 tok->filename = err_ret->filename; in PyParser_ParseFileObject()
188 return parsetok(tok, g, start, err_ret, flags); in PyParser_ParseFileObject()
195 perrdetail *err_ret, int *flags) in PyParser_ParseFileFlagsEx() argument
202 err_ret->error = E_ERROR; in PyParser_ParseFileFlagsEx()
207 start, ps1, ps2, err_ret, flags); in PyParser_ParseFileFlagsEx()
216 parsetok(struct tok_state *tok, grammar *g, int start, perrdetail *err_ret, in parsetok() argument
226 err_ret->error = E_NOMEM; in parsetok()
232 err_ret->error = E_NOMEM; in parsetok()
258 err_ret->error = E_NOMEM; in parsetok()
270 err_ret->error = E_SYNTAX; in parsetok()
276 err_ret->expected = NOTEQUAL; in parsetok()
277 err_ret->error = E_SYNTAX; in parsetok()
307 err_ret->error = E_NOMEM; in parsetok()
314 err_ret->error = tok->done; in parsetok()
334 if ((err_ret->error = in parsetok()
337 &(err_ret->expected))) != E_OK) { in parsetok()
341 if (err_ret->error != E_DONE) { in parsetok()
343 err_ret->token = type; in parsetok()
349 if (err_ret->error == E_DONE) { in parsetok()
368 err_ret->error = res; in parsetok()
381 if (err_ret->error == E_DONE && start == single_input) { in parsetok()
393 err_ret->error = E_BADSINGLE; in parsetok()
417 err_ret->error = E_EOF; in parsetok()
418 err_ret->lineno = tok->lineno; in parsetok()
425 err_ret->offset = col_offset != -1 ? col_offset + 1 : ((int)(tok->cur - tok->buf)); in parsetok()
427 err_ret->text = (char *) PyObject_MALLOC(len + 1); in parsetok()
428 if (err_ret->text != NULL) { in parsetok()
430 strncpy(err_ret->text, tok->buf, len); in parsetok()
431 err_ret->text[len] = '\0'; in parsetok()
442 err_ret->error = E_NOMEM; in parsetok()
466 initerr(perrdetail *err_ret, PyObject *filename) in initerr() argument
468 err_ret->error = E_OK; in initerr()
469 err_ret->lineno = 0; in initerr()
470 err_ret->offset = 0; in initerr()
471 err_ret->text = NULL; in initerr()
472 err_ret->token = -1; in initerr()
473 err_ret->expected = -1; in initerr()
476 err_ret->filename = filename; in initerr()
479 err_ret->filename = PyUnicode_FromString("<string>"); in initerr()
480 if (err_ret->filename == NULL) { in initerr()
481 err_ret->error = E_ERROR; in initerr()