Logo Search packages:      
Sourcecode: ccbuild version File versions

bneijt::SourceScanner Class Reference

#include <SourceScanner.hh>

List of all members.


Detailed Description

Parse the given source.

The SourceScanner parses the source and stores a few features of it in memory:

Definition at line 39 of file SourceScanner.hh.


Public Types

enum  Error { invalidInclude }
 An enumeration of possible error codes.

Public Member Functions

bool const & hasDefine () const
 Returns true when the scanned source contained a #define directive.
bool const & hasMainFunction () const
 Returns true when the scanned source contained a main function.
void includes (std::vector< std::string > *local, std::vector< std::string > *global, std::vector< std::string > *ignore=0)
 Put the known local and global includes into these vectors.
 SourceScanner (std::istream *yyin)
 Initialize the SourceScanner on the given stream.
virtual int yylex ()
 The yylex function, to run the parser.

Private Member Functions

SourceScanneroperator= (SourceScanner const &other)
 Not implemented.
 SourceScanner (SourceScanner const &other)
 Not implemented.
void storeGlobal ()
 Push d_ginclude to the d_gobals vector.
void storeIgnore ()
 Push d_ginclude to the d_gobals vector.
void storeLocal ()
 Push d_linclude to the d_locals vector.

Private Attributes

std::string d_ginclude
 global include collecting string
std::vector< std::string > d_globals
 Global dependencies.
bool d_hasDefine
 Has #define state bit.
bool d_hasMainFunction
 Has main function state bit.
std::vector< std::string > d_ignore
 Ignored dependencies.
std::string d_iinclude
 local include collecting string
std::string d_linclude
 local include collecting string
std::vector< std::string > d_locals
 Local dependencies.

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index