Falcon::SrcLexer Class Reference

#include <src_lexer.h>

Inheritance diagram for Falcon::SrcLexer:

Inheritance graph
[legend]

List of all members.

Classes

class  Context

Public Types


Public Member Functions

void appendStream (Stream *s)
int character () const
 Return current character position in current line (starting from 1).
int contextStart ()
 Gets the line at which the current context started.
t_contextType currentContext ()
 Reads the current context type.
int doLex (void *param)
 Hook for bison.
bool hasOpenContexts ()
void incremental (bool b)
bool incremental () const
bool inParCtx ()
 Determines if the current context is a parentetic context.
Streaminput () const
void input (Stream *i)
int lex ()
void line (int val)
int line () const
 Return current line in file (starting from 1).
void parseMacro ()
void parseMacroCall ()
void parsingFtd (bool b)
bool parsingFtd () const
bool popContext ()
 Pops a compilation lexer context.
int previousLine () const
void pushContext (t_contextType ct, int startLine)
 Add a compilation lexer context.
bool readAhead (uint32 &chr)
 Specialized version of ReadAhead, killing unneeded \r.
void reset ()
 Resets the lexer, preparing it for another compilation.
void resetContexts ()
 SrcLexer (Compiler *comp)
void * value () const
 ~SrcLexer ()


Member Enumeration Documentation

Type of context.

Enumerator:
ct_top  Topmost context.
ct_round  Inside round parenthesis.
ct_square  Inside square parenthesis.
ct_string  Inside a string (of any kind; the kind is determined by the status).
ct_graph  Inside function declaration.
ct_inner  Inside an inner function.


Constructor & Destructor Documentation

Falcon::SrcLexer::SrcLexer ( Compiler comp  ) 

Falcon::SrcLexer::~SrcLexer (  ) 


Member Function Documentation

void Falcon::SrcLexer::appendStream ( Stream s  ) 

int Falcon::SrcLexer::character (  )  const [inline]

Return current character position in current line (starting from 1).

int Falcon::SrcLexer::contextStart (  ) 

Gets the line at which the current context started.

Returns:
0 if no context is open, a valid line otherwise.

t_contextType Falcon::SrcLexer::currentContext (  ) 

Reads the current context type.

Returns:
ct_top if outside any context.

int Falcon::SrcLexer::doLex ( void *  param  )  [inline]

Hook for bison.

Bison will call this with his "parameter", which is the value of the various expression. The type for lexed values is the lex_value_t union, declared in the bison files.

bool Falcon::SrcLexer::hasOpenContexts (  )  [inline]

void Falcon::SrcLexer::incremental ( bool  b  )  [inline]

bool Falcon::SrcLexer::incremental (  )  const [inline]

bool Falcon::SrcLexer::inParCtx (  ) 

Determines if the current context is a parentetic context.

Returns:
true if in parenthesis.

Stream* Falcon::SrcLexer::input (  )  const [inline]

void Falcon::SrcLexer::input ( Stream i  ) 

int Falcon::SrcLexer::lex (  ) 

void Falcon::SrcLexer::line ( int  val  )  [inline]

int Falcon::SrcLexer::line (  )  const [inline]

Return current line in file (starting from 1).

void Falcon::SrcLexer::parseMacro (  ) 

void Falcon::SrcLexer::parseMacroCall (  ) 

void Falcon::SrcLexer::parsingFtd ( bool  b  ) 

bool Falcon::SrcLexer::parsingFtd (  )  const [inline]

bool Falcon::SrcLexer::popContext (  ) 

Pops a compilation lexer context.

Returns:
true if the contest was popped, false if we had no context.

int Falcon::SrcLexer::previousLine (  )  const [inline]

void Falcon::SrcLexer::pushContext ( t_contextType  ct,
int  startLine 
)

Add a compilation lexer context.

bool Falcon::SrcLexer::readAhead ( uint32 chr  ) 

Specialized version of ReadAhead, killing unneeded \r.

Returns:
true if the character could be read ahead
Parameters:
chr Where to place the read character

void Falcon::SrcLexer::reset (  ) 

Resets the lexer, preparing it for another compilation.

void Falcon::SrcLexer::resetContexts (  ) 

void* Falcon::SrcLexer::value (  )  const [inline]


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

Generated on Mon Oct 19 10:11:44 2009 for Falcon_Core by  doxygen 1.5.8