cpython/Parser
Pablo Galindo 71876fa438
Refactor Parser/pgen and add documentation and explanations (GH-15373)
* Refactor Parser/pgen and add documentation and explanations

To improve the readability and maintainability of the parser
generator perform the following transformations:

    * Separate the metagrammar parser in its own class to simplify
      the parser generator logic.

    * Create separate classes for DFAs and NFAs and move methods that
      act exclusively on them from the parser generator to these
      classes.

    * Add docstrings and comment documenting the process to go from
      the grammar file into NFAs and then DFAs. Detail some of the
      algorithms and give some background explanations of some concepts
      that will helps readers not familiar with the parser generation
      process.

    * Select more descriptive names for some variables and variables.

    * PEP8 formatting and quote-style homogenization.

The output of the parser generator remains the same (Include/graminit.h
and Python/graminit.c remain untouched by running the new parser generator).
2019-08-22 02:38:39 +01:00
..
pgen Refactor Parser/pgen and add documentation and explanations (GH-15373) 2019-08-22 02:38:39 +01:00
acceler.c fix warnings by adding more const (GH-12924) 2019-04-23 20:39:37 +09:00
asdl.py Add ast.Constant 2016-01-26 00:40:57 +01:00
asdl_c.py bpo-37253: Remove PyAST_obj2mod_ex() function (GH-14020) 2019-06-13 09:18:45 +02:00
grammar1.c fix warnings by adding more const (GH-12924) 2019-04-23 20:39:37 +09:00
listnode.c bpo-36623: Clean parser headers and include files (GH-12253) 2019-04-13 17:05:14 +01:00
myreadline.c bpo-35436: Add missing PyErr_NoMemory() calls and other minor bug fixes. (GH-11015) 2018-12-07 12:11:30 +02:00
node.c bpo-33416: Add end positions to Python AST (GH-11605) 2019-01-22 11:18:22 +00:00
parser.c fix warnings by adding more const (GH-12924) 2019-04-23 20:39:37 +09:00
parser.h fix warnings by adding more const (GH-12924) 2019-04-23 20:39:37 +09:00
parsetok.c bpo-36842: Implement PEP 578 (GH-12613) 2019-05-23 08:45:22 -07:00
Python.asdl bpo-37593: Swap the positions of posonlyargs and args in the constructor of ast.parameters nodes (GH-14778) 2019-07-14 16:32:18 -07:00
token.c bpo-35975: Support parsing earlier minor versions of Python 3 (GH-12086) 2019-03-07 12:38:08 -08:00
tokenizer.c Indent code inside if block. (GH-15284) 2019-08-15 09:19:07 -07:00
tokenizer.h bpo-36623: Clean parser headers and include files (GH-12253) 2019-04-13 17:05:14 +01:00