summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_peg_generator
Commit message (Collapse)AuthorAgeFilesLines
* bpo-43425: Update test_c_parser not to use TempdirManager (GH-26693)Dong-hee Na2021-06-121-5/+8
|
* bpo-41282: (PEP 632) Deprecate distutils.sysconfig (partial implementation ↵Lumír 'Frenzy' Balhar2021-04-231-0/+3
| | | | | | | | | | of the PEP) (GH-23142) This change: * merges `distutils.sysconfig` into `sysconfig` while keeping the original functionality and * marks `distutils.sysconfig` as deprecated https://bugs.python.org/issue41282
* bpo-43798: Add source location attributes to alias (GH-25324)Matthew Suozzo2021-04-101-1/+1
| | | | | | | * Add source location attributes to alias. * Move alias star construction to pegen helper. Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-43244: Rename pycore_ast.h functions to _PyAST_xxx() (GH-25252)Victor Stinner2021-04-071-27/+27
| | | | | | Rename AST functions of pycore_ast.h to use the "_PyAST_" prefix. Remove macros creating aliases without prefix. For example, Module() becomes _PyAST_Module(). Update Grammar/python.gram to use _PyAST_xxx() functions.
* Add small validator utility for PEG grammars (GH-23519)Pablo Galindo2020-12-261-0/+51
|
* Disable peg generator tests when building with PGO (GH-23141)serge-sans-paille2020-11-041-0/+6
| | | | | Otherwise, when running the testsuite, test_peg_generator tries to compile C code using the optimized flags and fails because it cannot find the profile data.
* bpo-41826: Fix compiler warnings in test_peg_generator (GH-22455)Pablo Galindo2020-10-031-16/+17
| | | Co-authored-by: Skip Montanaro
* Fix 'gather' rules in the python parser generator (GH-22021)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.
* bpo-40275: Use new test.support helper submodules in tests (GH-21448)Hai Shi2020-08-031-1/+2
|
* bpo-41112: Fix test_peg_generator on non-UTF-8 locales. (GH-21138)Serhiy Storchaka2020-06-251-2/+2
|
* bpo-41044: Generate valid PEG python parsers for opt+seq rules (GH-20995)Batuhan Taskaya2020-06-201-0/+8
| | | Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* Fix lookahead of soft keywords in the PEG parser (GH-20436)Pablo Galindo2020-05-261-0/+12
| | | Automerge-Triggered-By: @gvanrossum
* Add soft keywords (GH-20370)Guido van Rossum2020-05-261-0/+30
| | | | | | | These are like keywords but they only work in context; they are not reserved except when there is an exact match. This would enable things like match statements without reserving `match` (which would be bad for the `re.match()` function and probably lots of other places). Automerge-Triggered-By: @gvanrossum
* 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>