Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Add OSp1 | Eli Bendersky | 2020-09-22 | 1 | -1/+2 |
| | |||||
* | Test change | Eli Bendersky | 2020-09-22 | 1 | -0/+1 |
| | |||||
* | Merge branch 'master' of github.com:eliben/pycparser | Eli Bendersky | 2020-09-22 | 1 | -2/+2 |
|\ | |||||
| * | Fix #349: convert to raw strings in lexer tests (#389) | hodbn | 2020-08-18 | 1 | -2/+2 |
| | | |||||
* | | Add initial github workflow file for actions | Eli Bendersky | 2020-09-22 | 1 | -0/+26 |
|/ | |||||
* | Fix issues #378, #379, #385 (#387) | Zecong Hu | 2020-07-18 | 4 | -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 code | Eli Bendersky | 2020-04-15 | 1 | -0/+58 |
| | |||||
* | Move code to __main__ block | Eli Bendersky | 2020-04-15 | 1 | -9/+10 |
| | |||||
* | Clean up whitespace in generated AST code | Eli Bendersky | 2020-04-15 | 2 | -10/+10 |
| | |||||
* | Move internal testing stuff from c-to-c example into utils/internal | Eli Bendersky | 2020-04-15 | 2 | -31/+28 |
| | |||||
* | Replace define by typedef for type | Eli Bendersky | 2020-03-11 | 1 | -1/+1 |
| | |||||
* | Add some "types" to zlib.h (#368) | Thomas Nilefalk | 2020-03-11 | 1 | -0/+31 |
| | |||||
* | Update instructions to release. Release 2.20 was pushedrelease_v2.20 | Eli Bendersky | 2020-03-04 | 2 | -3/+3 |
| | |||||
* | Merge branch 'master' of github.com:eliben/pycparser | Eli Bendersky | 2020-03-04 | 1 | -17/+8 |
|\ | |||||
| * | Update README.rst | Eli Bendersky | 2020-03-03 | 1 | -3/+0 |
| | | |||||
| * | Move CI indicators | Eli Bendersky | 2020-03-03 | 1 | -15/+9 |
| | | |||||
* | | Update version 2.19 --> 2.20 | Eli Bendersky | 2020-03-04 | 4 | -3/+17 |
|/ | |||||
* | Add travis testing for python 3.7 and 3.8 and remove workaround | Eli Bendersky | 2020-03-03 | 1 | -8/+2 |
| | |||||
* | Trim whitespace | Eli Bendersky | 2020-03-03 | 1 | -12/+12 |
| | |||||
* | Fix #363 incorrect AST when parsing offsetof (#364) | Zecong Hu | 2020-03-03 | 2 | -2/+25 |
| | |||||
* | Update README to mention non-installation of fake headers | Eli Bendersky | 2020-03-03 | 1 | -0/+3 |
| | | | | | | Based on #358 by @WasabiFan Fixes #358 | ||||
* | Add unaligned versions of intel vector types (#357) | Thom Wiggers | 2019-12-07 | 1 | -9/+18 |
| | |||||
* | Recognize integer multicharacter constants like 'ABCD' (#350) | yaroslav-o | 2019-09-25 | 3 | -5/+15 |
| | | | | | | | | | | | | | Recognize integer multicharacter constants like 'ABCD' The feature I am adding is defined here - 5th case. https://en.cppreference.com/w/c/language/character_constant Also here: 6.4.4.4.10 of C99. Put simply, pycparser thought a statement like this is an error: int a = 'ABCD'; However it is not. It is likely possible to just modify char_const regular expression in c_lexer.py:240 to allow longer characters, but the way it is done in this PR - multicharacter constants are clearly separated. I am also limiting the length of multicharacter const integers to 4 characters - this matches VS compiler behavior (gcc allows any length with a warning) and lets pycparser NOT consider lengthy single-quoted strings as integers - these would be nonsensical anyway. | ||||
* | Fix slow backtracking when parsing strings (no external deps) (#347) | Tyson Andre | 2019-08-26 | 2 | -8/+62 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix slow backtracking when parsing strings (no external deps) Fixes #61 This uses negative lookaheads to avoid ambiguity in how string should be parsed by the regex. - https://docs.python.org/2/library/re.html#regular-expression-syntax - Previously, if it didn't immediately succeed at parsing an escape sequence such as `\123`, it would have to try `\1`+`23`, `\12` + `3`, and `\123`, which multiplied the time taken by 3 per additional escape sequence. This solves that by only allowing `\123` - The same fix was added for hex escapes. Also fix a test that relied on the incorrect handling of regexes. The implementation documentation says that it intends to allow **decimal** escapes permissively. * WIP debug * Fix ambiguity caused by allowing #path directives Solve this by allowing "\x" when not followed by hex, in the regular string literal. In the previous commits, `\x12` could be parsed both as `\x`+`12` and `\x12`, which caused exponential options for backtracking. * Document changes to lexer, remove debug code * Optimize this for strings | ||||
* | Move .gitattributes to project root dir | Eli Bendersky | 2019-08-26 | 2 | -0/+7 |
| | |||||
* | Add .gitattributes file per https://github.com/github/linguist#overrides | Eli Bendersky | 2019-08-24 | 1 | -0/+2 |
| | | | | | Label .ppout files as vendored so Github doesn't count them as pycparser's source | ||||
* | Rename files to prevent Github from thinking this is a Pascal project | Eli Bendersky | 2019-08-23 | 4 | -1/+1 |
| | |||||
* | Move benchmarking stuff to its own dir | Eli Bendersky | 2019-08-23 | 5 | -2/+26050 |
| | |||||
* | Enhance measurement script | Eli Bendersky | 2019-08-23 | 1 | -7/+28 |
| | |||||
* | Add local .vimrc | Eli Bendersky | 2019-08-23 | 1 | -0/+8 |
| | |||||
* | Add internal utility for benchmarking parsing time | Eli Bendersky | 2019-08-23 | 1 | -0/+15 |
| | |||||
* | Fix error transforming an empty switch (#346) | Tyson Andre | 2019-08-21 | 2 | -1/+16 |
| | | | | | | | | | | | | | * Fix error transforming an empty switch The parser would crash on that line for `switch(1) {}` because NoneType is not iterable. Fixes #345 * Add a test of empty switch statements * Address review comments | ||||
* | Add more intrinsics (#343) | Thom Wiggers | 2019-08-20 | 2 | -0/+10 |
| | |||||
* | Headers for Vectors (#339) | sachet-mittal | 2019-07-29 | 3 | -0/+7 |
| | |||||
* | Clean up extra whitespace | Eli Bendersky | 2019-06-27 | 1 | -1/+0 |
| | |||||
* | Fix issue #99: parser for FuncDecl incorrectly sets declname attribute on ↵ | Saullo Carvalho Castelo Branco | 2019-06-27 | 2 | -8/+46 |
| | | | | return type (#329) | ||||
* | Fix issue #314: Failed parsing unnamed function parameters with array dim ↵ | Saullo Carvalho Castelo Branco | 2019-06-01 | 2 | -3/+29 |
| | | | | | qualifiers (#327) Fixes #314 | ||||
* | Bump Python version fo AppVeyor | Eli Bendersky | 2019-05-09 | 1 | -1/+1 |
| | |||||
* | Followup on #326 - simplify building up type string | Eli Bendersky | 2019-05-09 | 1 | -9/+2 |
| | |||||
* | Fix issue #324: u/l constant integer suffix (#326) | Kevin | 2019-05-09 | 2 | -2/+38 |
| | |||||
* | Insert '.' and '..' to sys.path before import statements (#321) | Thomas Krennwallner | 2019-04-13 | 1 | -2/+6 |
| | | | | Restricted environments like embeddable python do not include the current working directory on startup. | ||||
* | Generate pointer types correctly (#315) | Amir Gonnen | 2019-03-27 | 2 | -23/+37 |
| | | | | | | | | | | | | * Add visit_PtrDecl to generate ptr types correctly Also removed code duplication from visit_ArrayDecl and visit_TypeDecl by calling _generate_type instead, without emitting the declname. Added tests for ptr type generation * Truncate lines longer than 80 characters per https://github.com/eliben/pycparser/pull/315/files#r269553083 | ||||
* | Fix array type generation (#312) (#313) | Amir Gonnen | 2019-03-26 | 3 | -2/+24 |
| | | | | | | | | | | | | | | | * Fix array type generation (#312) Also added dim_quals handling to _generate_type Exmaple: >>> ast = parser.parse('int g(const int a[const 20]){}') >>> gen.visit(ast.ext[0].decl.type.args.params[0]) 'const int a[const 20]' >>> gen.visit(ast.ext[0].decl.type.args.params[0].type) 'int[const 20]' * Added TypeDecl generation. Added tests | ||||
* | Fix crash when file starts with a semicolon (#310) | Simon Lindholm | 2019-03-06 | 2 | -3/+24 |
| | |||||
* | Remove non-qualified 3.7 build | Eli Bendersky | 2019-02-15 | 1 | -1/+0 |
| | |||||
* | Attempt to fix travis 3.7 build | Eli Bendersky | 2019-02-15 | 1 | -0/+8 |
| | |||||
* | Bump travis Python 3 versions to 3.6&7 | Eli Bendersky | 2019-02-15 | 1 | -2/+1 |
| | |||||
* | Protect visiting recursion against empty argument lists | Eli Bendersky | 2019-02-15 | 1 | -1/+2 |
| | | | | Fixes #308 | ||||
* | extended and cleaned up #pragma testcases (#297) | Julian | 2018-12-07 | 1 | -5/+15 |
| | |||||
* | Revert "Fix encoding problem by adding `encoding` parameter to parse_file ↵ | Eli Bendersky | 2018-12-06 | 1 | -10/+4 |
| | | | | | | | | | | function. (#295)" This reverts commit 1083b55c64d6235b00f40070e452b9b2605b23da. encoding is not portable across the list of supported Python versions See #296 |