Xmipp
v3.23.11-Nereus
|
#include <argsparser.h>
Public Member Functions | |
ASTNode (ArgLexer *lexer=NULL, ASTNode *parent=NULL) | |
virtual | ~ASTNode () |
virtual bool | parse ()=0 |
virtual void | check (std::stringstream &errors)=0 |
virtual bool | consume (ArgTokenType type) |
ArgTokenType | lookahead () const |
bool | lookahead (ArgTokenType type) const |
ArgToken * | currentToken () const |
void | nextToken () |
bool | parseCommentList (CommentList &comments) |
void | error (String msg) |
void | unexpectedToken (String msg="") |
Public Attributes | |
ASTNode * | parent |
ArgLexer * | pLexer |
ArgToken | token |
String | name |
int | visible |
Following classes represent the Abstract Syntax Tree for the language of definition of a program. Class representing the nodes of the tree. All nodes will have the parse method, which need a ArgLexer to ask for tokens. Also a 'consume' method to use the terminal symbols
Definition at line 140 of file argsparser.h.
Definition at line 349 of file argsparser.cpp.
|
inlinevirtual |
Definition at line 144 of file argsparser.h.
|
pure virtual |
Implemented in ProgramDef, SectionDef, ParamDef, and ArgumentDef.
|
virtual |
Definition at line 376 of file argsparser.cpp.
ArgToken * ASTNode::currentToken | ( | ) | const |
Definition at line 366 of file argsparser.cpp.
void ASTNode::error | ( | String | msg | ) |
Definition at line 406 of file argsparser.cpp.
ArgTokenType ASTNode::lookahead | ( | ) | const |
Definition at line 356 of file argsparser.cpp.
bool ASTNode::lookahead | ( | ArgTokenType | type | ) | const |
Definition at line 361 of file argsparser.cpp.
void ASTNode::nextToken | ( | ) |
Definition at line 371 of file argsparser.cpp.
|
pure virtual |
Implemented in ProgramDef, SectionDef, ParamDef, and ArgumentDef.
bool ASTNode::parseCommentList | ( | CommentList & | comments | ) |
Definition at line 392 of file argsparser.cpp.
void ASTNode::unexpectedToken | ( | String | msg = "" | ) |
Definition at line 413 of file argsparser.cpp.
String ASTNode::name |
Definition at line 152 of file argsparser.h.
ASTNode* ASTNode::parent |
Definition at line 147 of file argsparser.h.
ArgLexer* ASTNode::pLexer |
Definition at line 150 of file argsparser.h.
ArgToken ASTNode::token |
Definition at line 151 of file argsparser.h.
int ASTNode::visible |
Definition at line 153 of file argsparser.h.