summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_peg_generator
Commit message (Collapse)AuthorAgeFilesLines
* [3.9] Fix 'gather' rules in the python parser generator (GH-22021) (GH-22080)Pablo Galindo2020-09-031-1/+15
| | | | | | | | | Currently, empty sequences in gather rules make the conditional for gather rules fail as empty sequences evaluate as "False". We need to explicitly check for "None" (the failure condition) to avoid false negatives. (cherry picked from commit e55a0e9) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-41112: Fix test_peg_generator on non-UTF-8 locales. (GH-21138)Miss Islington (bot)2020-06-251-2/+2
| | | | | (cherry picked from commit aad8f0eeca93b2150760b5e59ed0495e47d1be1e) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-41044: Generate valid PEG python parsers for opt+seq rules (GH-20995)Miss Islington (bot)2020-06-201-0/+8
| | | | | | Co-authored-by: Pablo Galindo <Pablogsal@gmail.com> (cherry picked from commit 55460ee6dc9a4f16bd68d6b6be3a8398c7d4a596) Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
* [3.9] Backport GH-20370 and GH-20436: Soft keywords (GH-20458)Lysandros Nikolaou2020-05-271-0/+42
|
* bpo-40334: Avoid collisions between parser variables and grammar variables ↵Pablo Galindo2020-05-101-0/+27
| | | | | | | | | | | | | | | (GH-19987) This is for the C generator: - Disallow rule and variable names starting with `_` - Rename most local variable names generated by the parser to start with `_` Exceptions: - Renaming `p` to `_p` will be a separate PR - There are still some names that might clash, e.g. - anything starting with `Py` - C reserved words (`if` etc.) - Macros like `EXTRA` and `CHECK`
* Fix some scripts in the peg generator folder (GH-19853)Pablo Galindo2020-05-022-63/+5
|
* bpo-40334: Rewrite test_c_parser to avoid memory leaks (GH-19694)Lysandros Nikolaou2020-04-241-80/+144
| | | | | | | | | | Previously every test was building an extension module and loading it into sys.modules. The tearDown function was thus not able to clean up correctly, resulting in memory leaks. With this commit, every test function now builds the extension module and runs the actual test code in a new process (using assert_python_ok), so that sys.modules stays intact and no memory gets leaked.
* bpo-40370: Use the same compile and link args as the interpreter used in ↵Pablo Galindo2020-04-231-0/+4
| | | | test_peg_generator (GH-19674)
* bpo-40334: Suppress all output in test_peg_generator (GH-19675)Lysandros Nikolaou2020-04-232-5/+1
|
* bpo-40334: PEP 617 implementation: New PEG parser for CPython (GH-19503)Pablo Galindo2020-04-226-0/+1359
Co-authored-by: Guido van Rossum <guido@python.org> Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>