summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Add instructions on running _build_tablesEli Bendersky2021-08-281-1/+2
|
* c_parser: support parenthesized compounds (#423)Jordan Yates2021-07-072-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c_parser: support parenthesized compounds Support parenthesized compound statements as described here: https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au> * test_c_parser: support additional initializers Add support to `expand_init` for additional `c_ast` types. If a type is not explicitly handled, return the type name instead of `None`. Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au> * test_c_parser: test parenthesized compounds Add parsing tests for various situations of parenthesized compound statements. The complete tree generated by the test string is: ``` FileAST: FuncDef: Decl: foo, [], [], [] FuncDecl: TypeDecl: foo, [] IdentifierType: ['void'] Compound: Decl: a, [], [], [] TypeDecl: a, [] IdentifierType: ['int'] Compound: Compound: Constant: int, 1 Compound: Constant: int, 1 Constant: int, 2 Decl: b, [], [], [] TypeDecl: b, [] IdentifierType: ['int'] Compound: Constant: int, 1 Decl: c, [], [], [] TypeDecl: c, [] IdentifierType: ['int'] Decl: d, [], [], [] TypeDecl: d, [] IdentifierType: ['int'] Compound: Decl: x, [], [], [] TypeDecl: x, [] IdentifierType: ['int'] Constant: int, 1 BinaryOp: + ID: x Constant: int, 2 Assignment: = ID: a Compound: Decl: x, [], [], [] TypeDecl: x, [] IdentifierType: ['int'] Constant: int, 1 BinaryOp: * Constant: int, 2 ID: x ``` Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
* Add example file for ast dumpingEli Bendersky2021-05-271-0/+15
|
* fixing limits in fake includes (#409)Burkhard2021-03-161-1/+9
|
* Extra line breaks when c_ast.If are chained (#401)Patricio Inzaghi2020-12-092-0/+18
|
* Simplify test execution (#400)Jon Dufresne2020-12-084-23/+2
| | | | | | | | | | | | Use the stdlib standard entry point for running tests through the command: python -m unittest discover Docs: https://docs.python.org/3/library/unittest.html#unittest-test-discovery This automatically looks for files with the test_ prefix and runs them as tests. This removes the need for the custom test entry point script, all_tests.py.
* Add testing and support for modern Pythons (#398)Jon Dufresne2020-12-082-1/+4
| | | Python 3.9 was released on October 5th, 2020.
* Remove tox.ini for nowEli Bendersky2020-12-081-6/+0
| | | | | | It's not currently required and adds all kinds of complexity for managing and keeping up to date. GitHub actions do this well for pending PRs. May reconsider and bring it back in the future.
* Delete Travis configuration (#399)Jon Dufresne2020-12-071-7/+0
| | | The project now uses GitHub actions and Travis does not run.
* Update LICENSE copyright yearEli Bendersky2020-11-021-1/+1
|
* Rename test and add lower-level testingEli Bendersky2020-10-051-1/+7
|
* Clean up commentsEli Bendersky2020-10-052-7/+2
|
* Added flattening of abundant parenthesis in CGenerator (#394)Julian2020-10-053-10/+78
|
* Remove confusing/stale reference in commentEli Bendersky2020-09-301-1/+1
|
* Add test for https://github.com/eliben/pycparser/issues/392Eli Bendersky2020-09-301-0/+10
| | | | [no fix yet]
* Remove AppVeyor integrationEli Bendersky2020-09-231-12/+0
| | | | We run Windows tests through GitHub actions now
* Update README.rstEli Bendersky2020-09-221-0/+2
|
* Update README.rstEli Bendersky2020-09-221-6/+2
|
* Rename workflow to pycparser-testsEli Bendersky2020-09-221-1/+1
|
* Add multi-OS setup for github actions (#391)Eli Bendersky2020-09-221-1/+3
| | | | | * Test change * Add OS
* Merge branch 'master' of github.com:eliben/pycparserEli Bendersky2020-09-221-2/+2
|\
| * Fix #349: convert to raw strings in lexer tests (#389)hodbn2020-08-181-2/+2
| |
* | Add initial github workflow file for actionsEli Bendersky2020-09-221-0/+26
|/
* Fix issues #378, #379, #385 (#387)Zecong Hu2020-07-184-12/+61
| | | | | | | | | | | | * Fix #385: generate code with nested sizeofs * Fix #378: replace assertion with check Only the assertion inside `_build_function_definition` is replaced. The assertion is not appropriate because there are possible inputs that would trigger the assertion, they're just grammatically incorrect. Thus, it is replaced with a check that raises `ParseError` on failure. * Fix #379: parse struct with nested enum
* Add example of modifying an AST and printing out modified codeEli Bendersky2020-04-151-0/+58
|
* Move code to __main__ blockEli Bendersky2020-04-151-9/+10
|