CompileUnit Class Reference

#include <CompileUnit.h>

List of all members.

Public Types

 CSTATE_NEW
 CSTATE_FAIL
 CSTATE_WORKING
 CSTATE_FINISHED
 CSTATE_WARNED
enum  CState {
  CSTATE_NEW, CSTATE_FAIL, CSTATE_WORKING, CSTATE_FINISHED,
  CSTATE_WARNED
}

Public Member Functions

 CompileUnit (FileSystem *filesystem)
 ~CompileUnit ()
bool parse ()
bool parse_openblock ()
bool parse_closeblock ()
void debugPrint (std::ostream &o, CompileNode *n) const
void debugPrint (std::ostream &o) const
CState state () const
bool setState (const CState cs)
LLCToken expect () const
bool warned () const
bool compileComplete () const

Private Member Functions

void debugPrintHead (std::ostream &o, CompileNode *n=0) const
void debugPrintBody (std::ostream &o) const
bool found (const LLCToken &tok) const
bool consume (const LLCToken &tok)

Private Attributes

std::list< CompileNode * > nodes
ClassNodecurrclass
std::list< ClassNode * > tailclasses
std::ifstream * ifile
IDataSourceidatasource
llcFlexLexer * parser
FileSystem *const filesys
CState _state
bool _ccomplete
FileSystem::FileList filelist
LLCToken _expect
bool _warned
uint32 testidx


Detailed Description

Definition at line 33 of file CompileUnit.h.


Member Enumeration Documentation

enum CompileUnit::CState

Enumerator:
CSTATE_NEW 
CSTATE_FAIL 
CSTATE_WORKING 
CSTATE_FINISHED 
CSTATE_WARNED 

Definition at line 36 of file CompileUnit.h.


Constructor & Destructor Documentation

CompileUnit::CompileUnit ( FileSystem filesystem  ) 

Definition at line 81 of file Compile.cpp.

References CSTATE_NEW, filelist, filesys, FileSystem::ListFiles(), pout, and setState().

CompileUnit::~CompileUnit (  )  [inline]

Definition at line 40 of file CompileUnit.h.


Member Function Documentation

bool CompileUnit::compileComplete (  )  const [inline]

Definition at line 56 of file CompileUnit.h.

References CSTATE_FINISHED, filelist, and state().

Referenced by CompileProcess::run().

bool CompileUnit::consume ( const LLCToken tok  )  [private]

Definition at line 148 of file Compile.cpp.

References found(), and nodes.

Referenced by parse_closeblock(), and parse_openblock().

void CompileUnit::debugPrint ( std::ostream &  o  )  const

Definition at line 110 of file Compile.cpp.

References debugPrintBody(), and debugPrintHead().

void CompileUnit::debugPrint ( std::ostream &  o,
CompileNode n 
) const

Definition at line 103 of file Compile.cpp.

References debugPrintHead(), and n.

Referenced by msg(), and parse_openblock().

void CompileUnit::debugPrintBody ( std::ostream &  o  )  const [private]

Definition at line 126 of file Compile.cpp.

References nodes.

Referenced by debugPrint().

void CompileUnit::debugPrintHead ( std::ostream &  o,
CompileNode n = 0 
) const [private]

Definition at line 116 of file Compile.cpp.

References n, and nodes.

Referenced by debugPrint().

LLCToken CompileUnit::expect (  )  const [inline]

Definition at line 54 of file CompileUnit.h.

References _expect.

Referenced by CompileProcess::run().

bool CompileUnit::found ( const LLCToken tok  )  const [inline, private]

Definition at line 64 of file CompileUnit.h.

References nodes.

Referenced by consume(), parse_closeblock(), and parse_openblock().

bool CompileUnit::parse (  ) 

Definition at line 158 of file Compile.cpp.

References _expect, con, CSTATE_FINISHED, currclass, filelist, filesys, IDataSource::GetRawIfstream(), idatasource, ifile, LLC_CLASS, LLC_CLOSE_BRACE, LLC_EOF, LLC_IDENT, LLC_OPEN_BRACE, LLC_XFAIL, LLC_XPASS, LLC_XWARN, msg(), MT_WARN, nodes, parse_closeblock(), parse_openblock(), parser, pout, Console::Printf(), FileSystem::ReadFile(), setState(), and state().

Referenced by CompileProcess::run().

bool CompileUnit::parse_closeblock (  ) 

Definition at line 315 of file Compile.cpp.

References consume(), found(), LLC_CLOSE_BRACE, and nodes.

Referenced by parse().

bool CompileUnit::parse_openblock (  ) 

Definition at line 236 of file Compile.cpp.

References consume(), currclass, debugPrint(), found(), LLC_CLASS, LLC_IDENT, LLC_INHERITS, LLC_OPEN_BRACE, msg(), MT_ERR, ClassNode::name, nodes, and pout.

Referenced by parse().

bool CompileUnit::setState ( const CState  cs  ) 

Definition at line 337 of file Compile.cpp.

References _expect, _state, _warned, CSTATE_FAIL, CSTATE_FINISHED, CSTATE_NEW, CSTATE_WARNED, CSTATE_WORKING, currclass, idatasource, ifile, LLC_NONE, nodes, parser, and tailclasses.

Referenced by CompileUnit(), msg(), and parse().

CState CompileUnit::state (  )  const [inline]

Definition at line 51 of file CompileUnit.h.

References _state.

Referenced by compileComplete(), parse(), and CompileProcess::run().

bool CompileUnit::warned (  )  const [inline]

Definition at line 55 of file CompileUnit.h.

References _warned.


Member Data Documentation

bool CompileUnit::_ccomplete [private]

Definition at line 94 of file CompileUnit.h.

LLCToken CompileUnit::_expect [private]

Definition at line 98 of file CompileUnit.h.

Referenced by expect(), parse(), and setState().

CState CompileUnit::_state [private]

Definition at line 93 of file CompileUnit.h.

Referenced by setState(), and state().

bool CompileUnit::_warned [private]

Definition at line 99 of file CompileUnit.h.

Referenced by setState(), and warned().

ClassNode* CompileUnit::currclass [private]

Definition at line 72 of file CompileUnit.h.

Referenced by parse(), parse_openblock(), and setState().

FileSystem::FileList CompileUnit::filelist [private]

Definition at line 96 of file CompileUnit.h.

Referenced by compileComplete(), CompileUnit(), and parse().

FileSystem* const CompileUnit::filesys [private]

Definition at line 91 of file CompileUnit.h.

Referenced by CompileUnit(), and parse().

IDataSource* CompileUnit::idatasource [private]

Definition at line 87 of file CompileUnit.h.

Referenced by parse(), and setState().

std::ifstream* CompileUnit::ifile [private]

Definition at line 86 of file CompileUnit.h.

Referenced by parse(), and setState().

std::list<CompileNode *> CompileUnit::nodes [private]

Definition at line 67 of file CompileUnit.h.

Referenced by consume(), debugPrintBody(), debugPrintHead(), found(), parse(), parse_closeblock(), parse_openblock(), and setState().

llcFlexLexer* CompileUnit::parser [private]

Definition at line 89 of file CompileUnit.h.

Referenced by parse(), and setState().

std::list<ClassNode *> CompileUnit::tailclasses [private]

Definition at line 73 of file CompileUnit.h.

Referenced by setState().

uint32 CompileUnit::testidx [private]

Definition at line 101 of file CompileUnit.h.


The documentation for this class was generated from the following files:
Generated on Fri Jul 27 22:28:49 2007 for pentagram by  doxygen 1.4.7