cpython/Parser
Victor Stinner f7e5b56c37
bpo-32030: Split Py_Main() into subfunctions (#4399)
* Don't use "Python runtime" anymore to parse command line options or
  to get environment variables: pymain_init() is now a strict
  separation.
* Use an error message rather than "crashing" directly with
  Py_FatalError(). Limit the number of calls to Py_FatalError(). It
  prepares the code to handle errors more nicely later.
* Warnings options (-W, PYTHONWARNINGS) and "XOptions" (-X) are now
  only added to the sys module once Python core is properly
  initialized.
* _PyMain is now the well identified owner of some important strings
  like: warnings options, XOptions, and the "program name". The
  program name string is now properly freed at exit.
  pymain_free() is now responsible to free the "command" string.
* Rename most methods in Modules/main.c to use a "pymain_" prefix to
  avoid conflits and ease debug.
* Replace _Py_CommandLineDetails_INIT with memset(0)
* Reorder a lot of code to fix the initialization ordering. For
  example, initializing standard streams now comes before parsing
  PYTHONWARNINGS.
* Py_Main() now handles errors when adding warnings options and
  XOptions.
* Add _PyMem_GetDefaultRawAllocator() private function.
* Cleanup _PyMem_Initialize(): remove useless global constants: move
  them into _PyMem_Initialize().
* Call _PyRuntime_Initialize() as soon as possible:
  _PyRuntime_Initialize() now returns an error message on failure.
* Add _PyInitError structure and following macros:

  * _Py_INIT_OK()
  * _Py_INIT_ERR(msg)
  * _Py_INIT_USER_ERR(msg): "user" error, don't abort() in that case
  * _Py_INIT_FAILED(err)
2017-11-15 15:48:08 -08:00
..
acceler.c
asdl.py Add ast.Constant 2016-01-26 00:40:57 +01:00
asdl_c.py bpo-31572: Get rid of _PyObject_HasAttrId() in the ASDL parser. (#3725) 2017-11-11 16:41:32 +02:00
bitset.c
firstsets.c
grammar.c properly free memory in pgen 2016-09-18 18:00:25 -07:00
grammar1.c bpo-31338 (#3374) 2017-09-14 18:13:16 -07:00
listnode.c Use NULL rather than 0. (#778) 2017-03-23 17:53:47 +02:00
metagrammar.c
myreadline.c bpo-30860: Consolidate stateful runtime globals. (#3397) 2017-09-07 23:51:28 -06:00
node.c replace PY_SIZE_MAX with SIZE_MAX 2016-09-07 09:26:18 -07:00
parser.c Issue #26130: Remove redundant variable 's' from Parser/parser.c 2016-03-28 00:45:28 +03:00
parser.h
parsetok.c replace Py_(u)intptr_t with the c99 standard types 2016-09-06 13:47:26 -07:00
parsetok_pgen.c
pgen.c properly free memory in pgen 2016-09-18 18:00:25 -07:00
pgenmain.c bpo-32030: Split Py_Main() into subfunctions (#4399) 2017-11-15 15:48:08 -08:00
printgrammar.c Silenced some warnings about comparison between signed and unsigned integer 2014-09-05 10:10:23 +03:00
Python.asdl bpo-29463: Add docstring field to some AST nodes. (#46) 2017-02-22 16:31:59 +01:00
tokenizer.c bpo-30406: Make async and await proper keywords (#1669) 2017-10-05 23:24:46 -04:00
tokenizer.h bpo-30406: Make async and await proper keywords (#1669) 2017-10-05 23:24:46 -04:00
tokenizer_pgen.c