Package ats3 :: Module parsers :: Class CppParser
[hide private]
[frames] | no frames]

Class CppParser

source code

object --+
         |
        CppParser

Parser for CPP tool output. Returns cleaned output from the execution of CPP with or without parent paths included in the output.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
get_cpp_output(self, bld_path=None, output_parameter="n", imacros=None)
To clean out conditionals from the compilation it is necessary to use C preprocessing to clean out those.
source code
 
create_dependency_dictionary(self, _pipe_, path_to_bld)
The output from CPP is cleaned in a fashion that the output is a dictionary (or nested dictionary) of paths and their dependencies.
source code
 
clean_cpp_output(self, bld_path, path_list)
The output from CPP needs to be "cleaned" so that extra chars needs to be removed and also hierarchy which cpp is following is preserved and returned as an output.
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

get_cpp_output(self, bld_path=None, output_parameter="n", imacros=None)

source code 

To clean out conditionals from the compilation it is necessary to 
use C preprocessing to clean out those.

If ('n' - normal) output is chosen, parser returns list of paths
If ('e' - extended) output is chosen parser returns list of (path, parent_path) tuples
If ('d' - dependency) output is chosen parser returns a dicitionary (can be a nested dictionary) 
          of paths dependency (-ies). 
          
'imacros' can also be given as parameters for CPP options.

if bld file is not given, the function will try to find the file(s) on the given location with extension ".inf"