From: Baptiste L. <gai...@fr...> - 2004-08-14 14:34:26
|
To you the python script, you need to: - copy boost_python_debug.dll dll to src/pyrfta - copy rfta_cppparser_vc7_mdd.dll to src/pyrfta - copy src/cppparser/cpp_grammar.txt to src/pyrfta You must use python 2.3.x (which I used to compile boost.python, or recompile boost.python for your specific version). There is two usable script: - dumpnodetree.py source_file Dump the output from cppparser (the 'raw' node tree) - dumpast.py source_file Dump a typed ast tree (using python wrapper around node, see ast.py for the hierarchy). It's much more readable than dumpnodetree.py, but not all wrapping have been implemented yet (it will fail with classes for example). I've added a small set of sources that works with this tools in the samples subdir. Baptiste. ----- Original Message ----- From: "Andre Baresel" <and...@gm...> To: "CppTool Mailing List" <Cpp...@li...> Sent: Friday, August 13, 2004 9:55 PM Subject: [Cpptool-develop] python startup ok, but nothing happens with "dumpast.py" > Hello Baptiste, > > do you know what's going wrong - I got the first .py files running (dlls > of extension modules are loaded). > however nothing happens after startup: > > F:\Projects\Cpptool\CppParser\src>c:\programme\python23\python -v -u > pyrfta\dump > ast.py F:\Projects\Cpptool\CppParser\src\cppparser\commandstream.cpp > # installing zipimport hook > import zipimport # builtin > # installed zipimport hook > # c:\programme\python23\lib\site.pyc matches > c:\programme\python23\lib\site.py > import site # precompiled from c:\programme\python23\lib\site.pyc > # c:\programme\python23\lib\os.pyc matches c:\programme\python23\lib\os.py > import os # precompiled from c:\programme\python23\lib\os.pyc > import nt # builtin > # c:\programme\python23\lib\ntpath.pyc matches > c:\programme\python23\lib\ntpath.py > import ntpath # precompiled from c:\programme\python23\lib\ntpath.pyc > # c:\programme\python23\lib\stat.pyc matches > c:\programme\python23\lib\stat.py > import stat # precompiled from c:\programme\python23\lib\stat.pyc > # c:\programme\python23\lib\UserDict.pyc matches > c:\programme\python23\lib\UserDict.py > import UserDict # precompiled from c:\programme\python23\lib\UserDict.pyc > # c:\programme\python23\lib\copy_reg.pyc matches > c:\programme\python23\lib\copy_reg.py > import copy_reg # precompiled from c:\programme\python23\lib\copy_reg.pyc > # c:\programme\python23\lib\types.pyc matches > c:\programme\python23\lib\types.py > > import types # precompiled from c:\programme\python23\lib\types.pyc > # c:\programme\python23\lib\locale.pyc matches > c:\programme\python23\lib\locale.py > import locale # precompiled from c:\programme\python23\lib\locale.pyc > import _locale # builtin > # c:\programme\python23\lib\codecs.pyc matches > c:\programme\python23\lib\codecs.py > import codecs # precompiled from c:\programme\python23\lib\codecs.pyc > import _codecs # builtin > import encodings # directory c:\programme\python23\lib\encodings > # c:\programme\python23\lib\encodings\__init__.pyc matches > c:\programme\python23\lib\encodings\__init__.py > import encodings # precompiled from > c:\programme\python23\lib\encodings\__init__.pyc > # c:\programme\python23\lib\encodings\cp1252.pyc matches > c:\programme\python23\lib\encodings\cp1252.py > import encodings.cp1252 # precompiled from > c:\programme\python23\lib\encodings\cp1252.pyc > # c:\programme\python23\lib\warnings.pyc matches > c:\programme\python23\lib\warnings.py > import warnings # precompiled from c:\programme\python23\lib\warnings.pyc > # c:\programme\python23\lib\linecache.pyc matches > c:\programme\python23\lib\linecache.py > import linecache # precompiled from c:\programme\python23\lib\linecache.pyc > Python 2.3.4 (#53, May 25 2004, 21:17:02) [MSC v.1200 32 bit (Intel)] on > win32 > Type "help", "copyright", "credits" or "license" for more information. > # F:\Projects\Cpptool\CppParser\src\pyrfta\pycppparser.pyc matches > F:\Projects\Cpptool\CppParser\src\pyrfta\pycppparser.py > import pycppparser # precompiled from > F:\Projects\Cpptool\CppParser\src\pyrfta\pycppparser.pyc > import pycppparser_ # dynamically loaded from > F:\Projects\Cpptool\CppParser\src\pyrfta\pycppparser_.pyd > # F:\Projects\Cpptool\CppParser\src\pyrfta\ast.pyc matches > F:\Projects\Cpptool\CppParser\src\pyrfta\ast.py > import ast # precompiled from > F:\Projects\Cpptool\CppParser\src\pyrfta\ast.pyc > # F:\Projects\Cpptool\CppParser\src\pyrfta\nodetools.pyc matches > F:\Projects\Cpptool\CppParser\src\pyrfta\nodetools.py > import nodetools # precompiled from > F:\Projects\Cpptool\CppParser\src\pyrfta\nodetools.pyc > ---- > nothing after this point ... |