summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Update SECURITY.mdHEADmasterEli Bendersky2023-04-171-0/+8
|
* Create a Security Policy (#499)Joyce2023-03-201-0/+5
|
* Upgrade GitHub Actions (#500)Christian Clauss2023-03-181-2/+2
| | | | * https://github.com/actions/checkout/releases * https://github.com/actions/setup-python/releases
* _build_tables: Invalidate cache before importing generated modules (#494)Michał Górny2023-02-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure to invalidate finder caches before trying to import generated modules. This is necessary according to the Python documentation: https://docs.python.org/3/library/importlib.html#importlib.invalidate_caches This fixes a hard-to-reproduce bug that Python would be unable to find just-generated `lextab.py` if mtime of the current directory did not change from the moment the script was started. This could e.g. be the case if one has second-precision timestamps and removes the generated file just before starting the build, e.g.: $ rm pycparser/lextab.py; python -m build -nw It could also be reproduced easier by doing something like: $ cd pycparser $ touch .; python -B _build_tables.py Traceback (most recent call last): File "/var/tmp/pycparser/pycparser/_build_tables.py", line 38, in <module> import lextab ModuleNotFoundError: No module named 'lextab' This is because the first command (`rm` or `touch`) updates the mtime of the directory to the current time. If the script is run fast enough, it manages to scan the directory and then write the new `lextab.py` within the same second. As a result, mtime of the directory after writing the new file is the same as when the script was started, finder does not invalidate the cache and assumes that `lextab.py` does not exist since it did not exist when the directory was scanned earlier. This potentially fixes #493. It was originally reported on https://bugs.gentoo.org/701878. Thanks to Gary E. Miller for patience in reproducing the problem and proxy-debugging it for me, as well as testing the final patch before submission.
* feat: set permissions to ci.yml (#492)Joyce2023-02-231-0/+3
| | | Signed-off-by: Joyce <joycebrum@google.com>
* Update file name in serialize_ast and make sure it's in .gitignoreEli Bendersky2023-01-092-2/+4
|
* Clean up serialize_ast example to use HIGHEST_PROTOCOL for picklingEli Bendersky2023-01-091-6/+1
|
* Feature/add pragma support (#487)Jordy Ruiz2023-01-084-4/+29
| | | | | | | | | * Support _Pragma, a C99 alternative to #pragma See https://gcc.gnu.org/onlinedocs/cpp/Pragmas.html * Test cases for _Pragma * Add explanatory comment for _PRAGMA and PPPRAGMA
* Add encoding param to parse_file (#486)Jordy Ruiz2023-01-071-2/+5
|
* Remove some legacy stuff from the READMEEli Bendersky2023-01-071-20/+2
|
* Update test_examples.py to use subTest now that we have modern PythonsEli Bendersky2023-01-071-15/+5
| | | | simplify it to use f-strings while we're at it
* More removal of code specific for Python 2Eli Bendersky2023-01-073-7/+6
|
* Start removing support for Python 2.x for pycparserEli Bendersky2023-01-072-7/+2
|
* Fix #479 (multi-pragma/single statement blocks) (#480)ldore2022-11-103-5/+20
|
* Add Python 3.11 as a supported version (#469)Erlend E. Aasland2022-10-282-1/+2
| | | | | | | * Add Python 3.11 as a supported version Fixes #468 * Address review: add Python 3.11 to CI test matrix
* Slightly tweak the LICENSE file to be more canonicalEli Bendersky2022-09-161-2/+2
|
* Use proper SPDX identifier (#474)Maximilian2022-09-161-1/+1
|
* Improve error reporting from test_examplesEli Bendersky2022-01-252-5/+5
| | | | Emit stderr as well as stdout from the example in case of failure
* Add missing limit defines for signed chars (#449)Matthias Tamegger2021-12-101-0/+2
|
* Update TODO to mention bdist_wheelrelease_v2.21Eli Bendersky2021-11-061-1/+1
|
* Update TODO with distribution testing instructionsEli Bendersky2021-11-061-2/+5
|
* Preparation for releasing 2.21Eli Bendersky2021-11-065-4/+11
| | | | updates #438
* Don't run cpp/gcc-needing tests on Darwin: not all Macs have the toolsEli Bendersky2021-10-291-1/+1
|
* Only run example tests on Linux, since many require cppEli Bendersky2021-10-292-6/+2
|
* Try to make func_calls example pass on all platforms with no argumentsEli Bendersky2021-10-292-2/+10
|
* Add test that runs all examples and makes sure they don't crashEli Bendersky2021-10-297-13/+83
|
* Merge branch 'master' of github.com:eliben/pycparserEli Bendersky2021-10-2010-21/+21
|\
| * Fix typos (#443)Kian Meng Ang2021-10-1810-21/+21
| | | | | | | | | | * Fix typos * Revert changes in vendor module
* | Clarify README w.r.t. C11 support in fake headersEli Bendersky2021-10-201-4/+6
|/
* Fix examples/func_defs_add_param.py: add missing `align` parameter (#441)Eisuke Kawashima2021-10-151-0/+1
|
* Fix Flake8 Errors (#442)Eisuke Kawashima2021-10-1518-29/+16
| | | | | | | | | * Fix PEP8 [E101](https://github.com/PyCQA/pycodestyle/blob/2.8.0/docs/intro.rst#error-codes) * Fix PEP8 [E711](https://github.com/PyCQA/pycodestyle/blob/2.8.0/docs/intro.rst#error-codes) * Fix E999 (python2) * Fix PEP8 [F401](https://flake8.pycqa.org/en/4.0.1/user/error-codes.html)
* Add support for Python 3.10 (#436)Hugo van Kemenade2021-10-052-1/+2
| | | | | * Add support for Python 3.10 * Test on 3.10 final
* Implement C23 _Static_assert without message (#440)Vitaly Cheptsov2021-10-055-4/+16
| | | Co-authored-by: vit9696 <vit9696@users.noreply.github.com>
* Implement u8, u, and U strings from C11 (#439)Vitaly Cheptsov2021-10-055-0/+64
| | | | | | | * Implement u8, u, and U strings from C11 * Also add u8, u, and U chars from C11 and C23 Co-authored-by: vit9696 <vit9696@users.noreply.github.com>
* Improve recursive comparison of ASTs in test_c_generator and enable testsEli Bendersky2021-10-041-31/+48
| | | | This lets us re-enable that were commented out in #435
* Implement _Alignas and _Alignof support with tests (#435)Vitaly Cheptsov2021-10-0413-26/+152
| | | | | | | | | | | | | | | * Implement _Alignas and _Alignof support with tests * Improve testing and avoid unnecessary alignas for typedef * Add more tests * Drop legacy artifact * Remove extra _add_declaration_specifier call * Drop custom equality comparators for now Co-authored-by: vit9696 <vit9696@users.noreply.github.com>
* Simplify usage of _add_declaration_specifierEli Bendersky2021-09-251-2/+1
|
* Clean up trailing whitespaceEli Bendersky2021-09-212-2/+3
|
* Clean up some commentsEli Bendersky2021-09-202-7/+3
|
* Improve _Atomic support and add more tests (#431)Vitaly Cheptsov2021-09-207-34/+150
| | | | | | | | | * Improve _Atomic support with more tests and fix typedef handling * Remove duplicated tests and check the generated code for typedefs * Add typedef testing to parser as well Co-authored-by: vit9696 <vit9696@users.noreply.github.com>
* Rename debuglevel->debug flag to the parserEli Bendersky2021-09-161-4/+4
| | | | Now it matches the yacc flag name
* Fix declname for _Atomic specifiers, and add c-to-c testsEli Bendersky2021-09-142-2/+30
| | | | Updates #430
* A different, more robust appoach to fix _Atomic specifiers.Eli Bendersky2021-09-134-42/+90
| | | | | Now the ASTs produced are more correct, and more complex cases work like nested _Atomic(...) specifiers.
* Implement atomic specifiers like _Atomic(int*).Eli Bendersky2021-09-132-6/+46
| | | | | Based on #431 by vit9696 Updates #430
* Support _Atomic as a qualifierEli Bendersky2021-09-135-3/+20
| | | | | | | This adds initial implementation for the _Atomic keyword in C11, only focusing on the use as qualifier (spec section 6.7.3) Based on #431 by vit9696. Updates #430
* Add comments and clean up whitespaceEli Bendersky2021-08-312-1/+16
|
* Introduce partial C11 support (#429)Vitaly Cheptsov2021-08-3114-27/+176
| | | | | | | | | | * Introduce partial C11 support Implemented _Noreturn, _Static_assert, _Thread_local. Also fixed tests with preprocessor on macOS. * Add more tests Co-authored-by: vit9696 <vit9696@users.noreply.github.com>
* Add a tricky test, and reformat some commentsEli Bendersky2021-08-282-19/+24
|
* Add thornier tests for nested pointers with qualifiers in declarationsEli Bendersky2021-08-281-0/+18
|
* Clean whitespaceEli Bendersky2021-08-282-2/+2
|