This module creates abstract syntax trees using external tools (GCC-XML, pycparser) of C/C++ code.
author: | Anthony Scopatz <scopatz@gmail.com> |
---|
This is a base plugin for tools that wish to wrap parsing. It should not be used directly.
The __init__() method may take no arguments or keyword arguments.
This plugin requires ‘xdress.base’.
Use clang to parse a file.
Parameters : | filename : str
includes: list of str, optional :
defines: list of str, optional :
undefines: list of str, optional :
extra_parser_args : list of str, optional
verbose : bool, optional
debug : bool, optional
builddir : str, optional
language : str
clang_includes : list of str, optional
|
---|---|
Returns : | tu : libclang TranslationUnit object |
Prints an abstract syntax tree to stdout.
Use GCC-XML to parse a file. This function is automatically memoized.
Parameters : | filename : str
includes : list of str, optional
defines : list of str, optional
undefines : list of str, optional
extra_parser_args : list of str, optional
verbose : bool, optional
debug : bool, optional
builddir : str, optional
clang_includes : ignored |
---|---|
Returns : | root : XML etree
|
Determines the parse to use for a file.
Parameters : | file_or_lang : str
parsers : str, list, or dict, optional
|
---|---|
Returns : | parser : str
|
Use pycparser to parse a file. This functions is automatically memoized.
Parameters : | filename : str
includes : list of str, optional
defines : list of str, optional
undefines : list of str, optional
extra_parser_args : list of str, optional
verbose : bool, optional
debug : bool, optional
builddir : str, optional
clang_includes : ignored |
---|---|
Returns : | root : AST
|