From 653a5a6575f322fcf3ec04991ae338b96bbacd56 Mon Sep 17 00:00:00 2001 From: "melonhead@grimace" Date: Thu, 12 Nov 2009 18:20:21 -0500 Subject: [PATCH] Moved the ply module around --- plugins/pycparser/cdecl.py | 17 ++++++----------- .../pycparser/{ => pycparser}/ply/__init__.py | 0 plugins/pycparser/{ => pycparser}/ply/cpp.py | 0 .../pycparser/{ => pycparser}/ply/ctokens.py | 0 plugins/pycparser/{ => pycparser}/ply/lex.py | 0 plugins/pycparser/{ => pycparser}/ply/yacc.py | 0 6 files changed, 6 insertions(+), 11 deletions(-) rename plugins/pycparser/{ => pycparser}/ply/__init__.py (100%) rename plugins/pycparser/{ => pycparser}/ply/cpp.py (100%) rename plugins/pycparser/{ => pycparser}/ply/ctokens.py (100%) rename plugins/pycparser/{ => pycparser}/ply/lex.py (100%) rename plugins/pycparser/{ => pycparser}/ply/yacc.py (100%) diff --git a/plugins/pycparser/cdecl.py b/plugins/pycparser/cdecl.py index 8816cfa..a7aea70 100644 --- a/plugins/pycparser/cdecl.py +++ b/plugins/pycparser/cdecl.py @@ -22,20 +22,15 @@ #----------------------------------------------------------------- import sys -# This is not required if you've installed pycparser into -# your site-packages/ with setup.py -# -sys.path.insert(0, '..') - from pycparser import c_parser, c_ast -def explain_c_declaration(c_decl): +def explain_c_declaration(c_decl): """ Parses the declaration in c_decl and returns a text explanation as a string. The last external node of the string is used, to allow - earlier typedefs for used types. + earlier typedefs for used types. """ parser = c_parser.CParser() @@ -51,9 +46,9 @@ def explain_c_declaration(c_decl): return _explain_decl_node(node.ext[-1]) -def _explain_decl_node(decl_node): +def _explain_decl_node(decl_node): """ Receives a c_ast.Decl note and returns its explanation in - English. + English. """ #~ print decl_node.show() storage = ' '.join(decl_node.storage) + ' ' if decl_node.storage else '' @@ -64,8 +59,8 @@ def _explain_decl_node(decl_node): _explain_type(decl_node.type)) -def _explain_type(decl): - """ Recursively explains a type decl node +def _explain_type(decl): + """ Recursively explains a type decl node """ typ = type(decl) diff --git a/plugins/pycparser/ply/__init__.py b/plugins/pycparser/pycparser/ply/__init__.py similarity index 100% rename from plugins/pycparser/ply/__init__.py rename to plugins/pycparser/pycparser/ply/__init__.py diff --git a/plugins/pycparser/ply/cpp.py b/plugins/pycparser/pycparser/ply/cpp.py similarity index 100% rename from plugins/pycparser/ply/cpp.py rename to plugins/pycparser/pycparser/ply/cpp.py diff --git a/plugins/pycparser/ply/ctokens.py b/plugins/pycparser/pycparser/ply/ctokens.py similarity index 100% rename from plugins/pycparser/ply/ctokens.py rename to plugins/pycparser/pycparser/ply/ctokens.py diff --git a/plugins/pycparser/ply/lex.py b/plugins/pycparser/pycparser/ply/lex.py similarity index 100% rename from plugins/pycparser/ply/lex.py rename to plugins/pycparser/pycparser/ply/lex.py diff --git a/plugins/pycparser/ply/yacc.py b/plugins/pycparser/pycparser/ply/yacc.py similarity index 100% rename from plugins/pycparser/ply/yacc.py rename to plugins/pycparser/pycparser/ply/yacc.py