diff options
author | Eli Bendersky <eliben@gmail.com> | 2017-01-31 07:01:16 -0800 |
---|---|---|
committer | Eli Bendersky <eliben@gmail.com> | 2017-01-31 07:01:16 -0800 |
commit | c36e7fb36d34ef32cf2b8f9c338f032cb6c63c30 (patch) | |
tree | 28809b9a921dba5c6ca7f0e7850c0983978c967a | |
parent | dfeac9e1c7da0dc5260bd39b775ff889f749f1d0 (diff) | |
download | pycparser-c36e7fb36d34ef32cf2b8f9c338f032cb6c63c30.tar.gz |
A bit of internal cleanup
-rw-r--r-- | pycparser/c_parser.py | 12 | ||||
-rw-r--r-- | utils/internal/zz_parse.py | 2 |
2 files changed, 5 insertions, 9 deletions
diff --git a/pycparser/c_parser.py b/pycparser/c_parser.py index a6aaa4b..532f619 100644 --- a/pycparser/c_parser.py +++ b/pycparser/c_parser.py @@ -43,11 +43,11 @@ class CParser(PLYParser): When releasing with a stable lexer, set to True to save the re-generation of the lexer table on each run. - + lexer: Set this parameter to define the lexer to use if you're not using the default CLexer. - + lextab: Points to the lex table that's used for optimized mode. Only if you're modifying the lexer and want @@ -1103,7 +1103,7 @@ class CParser(PLYParser): # # Means "pointer to const pointer to char" # - # While: + # While: # # char ** const p; # @@ -1247,12 +1247,6 @@ class CParser(PLYParser): def p_type_name(self, p): """ type_name : specifier_qualifier_list abstract_declarator_opt """ - #~ print '==========' - #~ print p[1] - #~ print p[2] - #~ print p[2].children() - #~ print '==========' - typename = c_ast.Typename( name='', quals=p[1]['qual'], diff --git a/utils/internal/zz_parse.py b/utils/internal/zz_parse.py index 0a62040..9c73978 100644 --- a/utils/internal/zz_parse.py +++ b/utils/internal/zz_parse.py @@ -19,3 +19,5 @@ if __name__ == "__main__": print(code) ast = parser.parse(code) ast.show(attrnames=True, nodenames=True) + print(ast.ext[0].__slots__) + print(dir(ast.ext[0])) |