Home
last modified time | relevance | path

Searched refs:newtok (Results 1 – 5 of 5) sorted by relevance

/external/python/cpython3/Parser/
Dtokenizer.c934 char *newtok = PyOS_Readline(stdin, stdout, tok->prompt); in tok_nextc() local
936 if (newtok != NULL) { in tok_nextc()
937 char *translated = translate_newlines(newtok, 0, tok); in tok_nextc()
938 PyMem_FREE(newtok); in tok_nextc()
941 newtok = translated; in tok_nextc()
943 if (tok->encoding && newtok && *newtok) { in tok_nextc()
947 PyObject *u = translate_into_utf8(newtok, tok->encoding); in tok_nextc()
948 PyMem_FREE(newtok); in tok_nextc()
955 newtok = PyMem_MALLOC(buflen+1); in tok_nextc()
956 if (newtok == NULL) { in tok_nextc()
[all …]
/external/ply/ply/ply/
Dlex.py350 newtok = func(tok)
353 if not newtok:
360 if newtok.type not in self.lextokens_all:
363 func.__name__, newtok.type), lexdata[lexpos:])
365 return newtok
386 newtok = self.lexerrorf(tok)
391 if not newtok:
393 return newtok
406 newtok = self.lexeoff(tok)
407 return newtok
/external/selinux/python/sepolgen/src/sepolgen/
Dlex.py350 newtok = func(tok)
353 if not newtok:
360 if newtok.type not in self.lextokens_all:
363 func.__name__, newtok.type), lexdata[lexpos:])
365 return newtok
386 newtok = self.lexerrorf(tok)
391 if not newtok:
393 return newtok
406 newtok = self.lexeoff(tok)
407 return newtok
/external/python/cpython2/Parser/
Dtokenizer.c884 char *newtok = PyOS_Readline(stdin, stdout, tok->prompt); in tok_nextc() local
887 if (newtok == NULL) in tok_nextc()
889 else if (*newtok == '\0') { in tok_nextc()
890 PyMem_FREE(newtok); in tok_nextc()
894 else if (tok_stdin_decode(tok, &newtok) != 0) in tok_nextc()
895 PyMem_FREE(newtok); in tok_nextc()
900 size_t newlen = oldlen + strlen(newtok); in tok_nextc()
907 PyMem_FREE(newtok); in tok_nextc()
914 strcpy(tok->buf + oldlen, newtok); in tok_nextc()
915 PyMem_FREE(newtok); in tok_nextc()
[all …]
/external/libchrome/third_party/ply/
Dlex.py348 newtok = func(tok)
351 if not newtok:
358 if not newtok.type in self.lextokens:
361 func.__name__, newtok.type),lexdata[lexpos:])
363 return newtok
384 newtok = self.lexerrorf(tok)
389 if not newtok: continue
390 return newtok