Package SCons :: Module cpp :: Class DumbPreProcessor
[show private | hide private]
[frames | no frames]

Class DumbPreProcessor

PreProcessor --+
               |
              DumbPreProcessor


A preprocessor that ignores all #if/#elif/#else/#endif directives and just reports back all of the #include files (like the classic SCons scanner did).

This is functionally equivalent to using a regular expression to find all of the #include lines, only slower. It exists mainly as an example of how the main PreProcessor class can be sub-classed to tailor its behavior.


Method Summary
  __init__(self, *args, **kw)
    Inherited from PreProcessor
  __call__(self, contents)
Pre-processes a file contents.
  all_include(self, t)
  do_define(self, t)
Default handling of a #define line.
  do_elif(self, t)
Default handling of a #elif line.
  do_else(self, t)
Default handling of a #else line.
  do_endif(self, t)
Default handling of a #endif line.
  do_if(self, t)
Default handling of a #if line.
  do_ifdef(self, t)
Default handling of a #ifdef line.
  do_ifndef(self, t)
Default handling of a #ifndef line.
  do_import(self, t)
Default handling of a #import line.
  do_include(self, t)
Default handling of a #include line.
  do_include_next(self, t)
Default handling of a #include line.
  do_nothing(self, t)
Null method for when we explicitly want the action for a specific preprocessor directive to do nothing.
  do_undef(self, t)
Default handling of a #undef line.
  eval_expression(self, t)
Evaluates a C preprocessor expression.
  find_include_file(self, t)
Finds the #include file for a given preprocessor tuple.
  resolve_include(self, t)
Resolve a tuple-ized #include line.
  restore(self)
Pops the previous dispatch table off the stack and makes it the current one.
  save(self)
Pushes the current dispatch table on the stack and re-initializes the current dispatch table to the default.
  start_handling_includes(self, t)
Causes the PreProcessor object to start processing #import, #include and #include_next lines.
  stop_handling_includes(self, t)
Causes the PreProcessor object to stop processing #import, #include and #include_next lines.
  tupleize(self, contents)
Turns the contents of a file into a list of easily-processed tuples describing the CPP lines in the file.

Generated by Epydoc 2.1 on Wed Dec 12 09:39:32 2007 http://epydoc.sf.net