• Home
  • Raw
  • Download

Lines Matching refs:err_ret

16 static int initerr(perrdetail *err_ret, PyObject * filename);
20 PyParser_ParseString(const char *s, grammar *g, int start, perrdetail *err_ret) in PyParser_ParseString() argument
22 return PyParser_ParseStringFlagsFilename(s, NULL, g, start, err_ret, 0); in PyParser_ParseString()
27 perrdetail *err_ret, int flags) in PyParser_ParseStringFlags() argument
30 g, start, err_ret, flags); in PyParser_ParseStringFlags()
36 perrdetail *err_ret, int flags) in PyParser_ParseStringFlagsFilename() argument
40 err_ret, &iflags); in PyParser_ParseStringFlagsFilename()
46 perrdetail *err_ret, int *flags) in PyParser_ParseStringObject() argument
51 if (initerr(err_ret, filename) < 0) in PyParser_ParseStringObject()
59 err_ret->error = PyErr_Occurred() ? E_DECODE : E_NOMEM; in PyParser_ParseStringObject()
64 Py_INCREF(err_ret->filename); in PyParser_ParseStringObject()
65 tok->filename = err_ret->filename; in PyParser_ParseStringObject()
67 return parsetok(tok, g, start, err_ret, flags); in PyParser_ParseStringObject()
73 perrdetail *err_ret, int *flags) in PyParser_ParseStringFlagsFilenameEx() argument
81 err_ret->error = E_ERROR; in PyParser_ParseStringFlagsFilenameEx()
86 n = PyParser_ParseStringObject(s, filename, g, start, err_ret, flags); in PyParser_ParseStringFlagsFilenameEx()
98 perrdetail *err_ret) in PyParser_ParseFile() argument
101 g, start, ps1, ps2, err_ret, 0); in PyParser_ParseFile()
108 perrdetail *err_ret, int flags) in PyParser_ParseFileFlags() argument
112 ps2, err_ret, &iflags); in PyParser_ParseFileFlags()
119 perrdetail *err_ret, int *flags) in PyParser_ParseFileObject() argument
123 if (initerr(err_ret, filename) < 0) in PyParser_ParseFileObject()
127 err_ret->error = E_NOMEM; in PyParser_ParseFileObject()
131 Py_INCREF(err_ret->filename); in PyParser_ParseFileObject()
132 tok->filename = err_ret->filename; in PyParser_ParseFileObject()
134 return parsetok(tok, g, start, err_ret, flags); in PyParser_ParseFileObject()
141 perrdetail *err_ret, int *flags) in PyParser_ParseFileFlagsEx() argument
149 err_ret->error = E_ERROR; in PyParser_ParseFileFlagsEx()
155 start, ps1, ps2, err_ret, flags); in PyParser_ParseFileFlagsEx()
184 parsetok(struct tok_state *tok, grammar *g, int start, perrdetail *err_ret, in parsetok() argument
192 err_ret->error = E_NOMEM; in parsetok()
210 err_ret->error = tok->done; in parsetok()
231 err_ret->error = E_NOMEM; in parsetok()
243 err_ret->error = E_SYNTAX; in parsetok()
249 err_ret->expected = NOTEQUAL; in parsetok()
250 err_ret->error = E_SYNTAX; in parsetok()
263 if ((err_ret->error = in parsetok()
266 &(err_ret->expected))) != E_OK) { in parsetok()
267 if (err_ret->error != E_DONE) { in parsetok()
269 err_ret->token = type; in parsetok()
275 if (err_ret->error == E_DONE) { in parsetok()
296 err_ret->error = E_BADSINGLE; in parsetok()
319 err_ret->error = E_EOF; in parsetok()
320 err_ret->lineno = tok->lineno; in parsetok()
324 err_ret->offset = (int)(tok->cur - tok->buf); in parsetok()
326 err_ret->text = (char *) PyObject_MALLOC(len + 1); in parsetok()
327 if (err_ret->text != NULL) { in parsetok()
329 strncpy(err_ret->text, tok->buf, len); in parsetok()
330 err_ret->text[len] = '\0'; in parsetok()
341 err_ret->error = E_NOMEM; in parsetok()
362 initerr(perrdetail *err_ret, PyObject *filename) in initerr() argument
364 err_ret->error = E_OK; in initerr()
365 err_ret->lineno = 0; in initerr()
366 err_ret->offset = 0; in initerr()
367 err_ret->text = NULL; in initerr()
368 err_ret->token = -1; in initerr()
369 err_ret->expected = -1; in initerr()
373 err_ret->filename = filename; in initerr()
376 err_ret->filename = PyUnicode_FromString("<string>"); in initerr()
377 if (err_ret->filename == NULL) { in initerr()
378 err_ret->error = E_ERROR; in initerr()