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

Public Member Functions

 ListTokenSource ()
 
virtual ~ListTokenSource ()
 
virtual bool rewindTo (int pos, const LexerState &=LexerState())
 overridden because lists can be rewound More...
 
- 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...
 
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...
 

Public Attributes

QList< CatinputTokens
 

Protected Member Functions

virtual Cat readToken ()
 just fetch the next token from the list 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...
 

Additional Inherited Members

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

Detailed Description

Definition at line 906 of file dyngenpar.h.

Constructor & Destructor Documentation

◆ ListTokenSource()

DynGenPar::ListTokenSource::ListTokenSource ( )
inline

Definition at line 908 of file dyngenpar.h.

◆ ~ListTokenSource()

virtual DynGenPar::ListTokenSource::~ListTokenSource ( )
inlinevirtual

Definition at line 909 of file dyngenpar.h.

Member Function Documentation

◆ readToken()

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

just fetch the next token from the list

Implements DynGenPar::TokenSource.

Definition at line 917 of file dyngenpar.h.

◆ rewindTo()

virtual bool DynGenPar::ListTokenSource::rewindTo ( int  pos,
const LexerState = LexerState() 
)
inlinevirtual

overridden because lists can be rewound

Reimplemented from DynGenPar::TokenSource.

Definition at line 912 of file dyngenpar.h.

Member Data Documentation

◆ inputTokens

QList<Cat> DynGenPar::ListTokenSource::inputTokens

Definition at line 910 of file dyngenpar.h.


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