DynGenPar
Dynamic Generalized Parser
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
DynGenPar::FlexLexerTokenSource Class Reference
Inheritance diagram for DynGenPar::FlexLexerTokenSource:
Inheritance graph

Public Member Functions

 FlexLexerTokenSource (FlexLexer *lexer)
 
virtual ~FlexLexerTokenSource ()
 
- Public Member Functions inherited from DynGenPar::TokenSource
 TokenSource ()
 
virtual ~TokenSource ()
 
Cat nextToken ()
 get the next token from the input, increment current position, save parse tree More...
 
Node parseTree ()
 get the parse tree for the last shifted token More...
 
virtual bool matchParseTree (const Node &treeToMatch)
 match the parse tree for the last shifted token against the given tree More...
 
int currentPosition ()
 get the current input position More...
 
virtual bool rewindTo (int pos, const LexerState &=LexerState())
 rewind to an older position (requires buffering) More...
 
bool rewindTo (int pos, const Node &parseTree, const LexerState &lexerState=LexerState())
 rewind to an older position (requires buffering) and restore the parse tree (needed for lookahead) More...
 
virtual LexerState saveState ()
 saves the current lexer state, by default a null LexerState More...
 

Protected Member Functions

virtual Cat readToken ()
 get the next token from the input, to be implemented by subclasses More...
 
- Protected Member Functions inherited from DynGenPar::TokenSource
bool simpleRewind (int pos, bool rewindOnly=false)
 basic implementation of rewindTo for subclasses which support it More...
 

Protected Attributes

FlexLexer * flexLexer
 
- Protected Attributes inherited from DynGenPar::TokenSource
int currPos
 
Node tree
 sub-parse-tree for hierarchical parsing More...
 

Detailed Description

Definition at line 31 of file flexlexertokensource.h.

Constructor & Destructor Documentation

◆ FlexLexerTokenSource()

DynGenPar::FlexLexerTokenSource::FlexLexerTokenSource ( FlexLexer *  lexer)
inline

Definition at line 33 of file flexlexertokensource.h.

◆ ~FlexLexerTokenSource()

virtual DynGenPar::FlexLexerTokenSource::~FlexLexerTokenSource ( )
inlinevirtual

Definition at line 34 of file flexlexertokensource.h.

Member Function Documentation

◆ readToken()

virtual Cat DynGenPar::FlexLexerTokenSource::readToken ( )
inlineprotectedvirtual

get the next token from the input, to be implemented by subclasses

Implements DynGenPar::TokenSource.

Definition at line 36 of file flexlexertokensource.h.

Member Data Documentation

◆ flexLexer

FlexLexer* DynGenPar::FlexLexerTokenSource::flexLexer
protected

Definition at line 39 of file flexlexertokensource.h.


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