summaryrefslogtreecommitdiff
path: root/pycparser/c_parser.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix parsing order of nested PtrDeclsEli Bendersky2015-04-201-12/+28
| | | | Closes #68
* Fix parsing of array declsEli Bendersky2015-04-201-3/+4
| | | | | After qualifiers were added, some problems seeped in assigning dimensions properly.
* Allow binary constants (e.g.: 0b01010)Konstanty Bialkowski2015-04-201-0/+1
| | | - Add lexer and parser tests.
* Decrease memory usage of pycparser by using __slots__ in AST nodes.Eli Bendersky2015-04-181-0/+2
| | | | | | | | | In general, there's no need to dynamically adjust the attributes of AST nodes. So __slots__ seems suitable. This reduces the memory usage of the test case reported in issue #72 from 21MB to 17.5MB and should reduce the amount of space consumed by AST nodes in general.
* Align array dimension grammar with the C standard.necase2015-01-111-23/+33
| | | | | | | | | | | | | | | | The pycparser grammar for direct-declarators diverged with the C standard, which permits const, volatile, restrict, and static to be modifiers in the array dimension. The relevant grammar can be found in section 6.7.5. The old p_direct_declarator_3 was split into two rules, and the remaining p_direct_declarator rules were renumbered, preserving precedence. So p_direct_declarator_3 now matches array declarations with optional type qualifiers or assignment expressions; p_direct_declarator_4 matches declarations with the static keyword; p_direct_declarator_5 matches the variable-length array declarations; and p_direct_declarator_6 matches declarations with parentheses.
* Fix issue #27: handle unified wstring literals properlyEli Bendersky2014-03-151-1/+1
|
* Fix issue #28: coord for 'for' loopsEli Bendersky2014-03-151-1/+2
|
* Fuller support for qualifiers in array dimensions.Eli Bendersky2014-01-251-4/+19
| | | | Added a field to the ArrayDecl node and modified tests
* Add support for arr[const 10] in function declarations too;Eli Bendersky2014-01-251-0/+1
| | | | and move tests around.
* allow "static" in array parameters (GH issue #21)Robin Martinjak2014-01-221-1/+2
|
* Fix sys.path inclusion order in _build_tables.py (GH issue #12),Eli Bendersky2013-07-241-3/+2
| | | | and some comment fixes.
* Remember last_token in the lexer, instead of using tokenfuncEli Bendersky2013-07-131-9/+4
|
* Cosmetic changes & commentsEli Bendersky2013-07-131-7/+13
|
* Support typedef names redeclared to identifiers in inner scopesSye van der Veen2013-07-111-136/+311
|
* Some cleanupsEli Bendersky2013-06-121-1/+0
|
* Cleanup after pull request #2Eli Bendersky2013-06-121-3/+6
|
* Functions that don't have explicit return types are assumed to return intSye van der Veen2013-06-101-6/+19
|
* Fix comment and trim trailing whitespaceEli Bendersky2013-01-161-255/+255
|
* Issue #83: Distinguish initializer lists from expression listsEli Bendersky2012-12-251-1/+1
|
* Googlecode issue #87: improve error reporting for parse errors to containEli Bendersky2012-12-251-1/+2
| | | | columns.
* Added ply 3.4 to be redistributed with pycparser. This aids withEli Bendersky2012-12-241-2/+2
| | | | distribution and with tests.
* Issue 68Eli Bendersky2012-07-071-11/+19
|
* Make sure the parser remembers the coordinates of simple string typesEli Bendersky2012-07-061-11/+20
| | | | | | | | (such as 'int' or typedef_name) by always keeping them in an IdentifierType node. This allows to correctly report some errors, which fixes issue 60. Also cleanup some whitespace & formatting issues, and replace deprecated unittest methods for python3.
* Issue 57: support for C99 hexadecimal float constantsEli Bendersky2012-06-151-1/+3
|
* Issue 62: correct coord for Ellipsis nodesEli Bendersky2012-06-151-1/+1
|
* Transform the AST to create a correct representation of the cases inside a ↵Eli Bendersky2012-02-031-3/+5
| | | | switch statement
* typo & cosmetic changesEli Bendersky2012-02-031-10/+12
|
* fix the case where the first statement in a file is empty (just a ↵Eli Bendersky2012-01-241-1/+3
| | | | semicolon). Fix provided by Andreas Kloeckner
* moving CGenerator from examples/c-to-c.py into its own class in pycparser/. ↵Eli Bendersky2012-01-241-3/+3
| | | | c-to-c remains as a shell example over it
* fix reversal of specifiers & qualifiers in C generationEli Bendersky2012-01-191-1/+1
|
* Support for C99 _Complex type. Patch by Andreas KloecknerEli Bendersky2012-01-191-0/+1
|
* fixing previous fix:eli.bendersky2011-10-191-6/+4
| | | | - that rule created many conflicts. change it to having a check in the parse method instead
* fix issue 48: handling of empty fileseli.bendersky2011-10-191-0/+5
|
* * Added EmptyStatement node to represent an empty statement (sole ';'), with ↵eli.bendersky2011-10-161-1/+4
| | | | | | tests and c-to-c support * Added sys.path update in _build_tables.py to enable it to run correctly from the pycparser folder
* Added support for C99 _Bool type.Even2011-09-181-0/+1
| | | | | Also added stdbool.h to fake_libc_includes, and its defines and typedefs to _fake_defines.h and _fake_typedefs.h.
* fix a problem with previous commit:eli.bendersky2011-06-221-1/+7
| | | | - wrap anonymous type decls in structs in IdentifierType
* Fix for Issue #39: allow anonymous struct fields not only of union/struct ↵eli.bendersky2011-06-221-16/+16
| | | | | | | types. Although the C1X standard doesn't really allow it, some compilers (MSVC) do, and Windows headers have typedefs there. Since pycparser shouldn't semantically follow typedefs, and it isn't about rejecting all invalid code, there's no harm in allowing this
* Basic scoping of typedefs implementedeli.bendersky2011-05-201-23/+47
|
* changed license notices to BSD in all fileseli.bendersky2011-04-291-1/+1
|
* Issue 29: some typos in CParser methodseli.bendersky2011-03-311-3/+3
|
* fixing issue 23: coords of castseli.bendersky2011-03-041-3/+5
|
* Removed portability.py, using from __future__ import print_function instead. ↵eli.bendersky2011-02-181-4/+3
| | | | This means only Python 2.6 and later is supported in 2.x
* some fixes to previous commit + testeli.bendersky2011-02-101-1/+4
|
* Issue 19: Anonymous unions within struct cause parser erroreli.bendersky2011-02-101-17/+33
|
* Handle empty ';' statements inside functionseli.bendersky2011-02-041-2/+3
|
* Fix parsing of empty declarations on the file-level (issue 17)eli.bendersky2011-02-041-1/+7
|
* releasing version 2.01 - removed yaml dependency, fix installation problemseli.bendersky2010-12-041-1341/+1340
|
* compound literals now work - a couple of tests addedeli.bendersky2010-10-301-1/+2
|
* initial implementation of C99 named initializers and compound literals. The ↵eli.bendersky2010-10-301-12/+36
| | | | latter still doesn't work because of a shift/reduce conflict
* Implemented 'long long' type support for C99eli.bendersky2010-10-301-1/+4
|