umbrello 2.34.70-5524f40e1
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
|
Public Member Functions | |
DebugLanguageParserHelper (const bool printAst, const bool printTokens) | |
bool | parseFile (const QString &fileName) |
parse contents of a file More... | |
bool | parseCode (const QString &code) |
parse code directly More... | |
Php::TokenStream * | tokenStream () |
QString | contents () const |
QStringList | dependencies () const |
StartAstT * | ast () const |
void | setFed (bool state) |
bool | wasFed () |
Private Member Functions | |
bool | runSession (const QString &fileName=QString()) |
void | printToken (int token, const LexerT &lexer) const |
Private Attributes | |
SessionT | m_session |
const bool | m_printAst |
const bool | m_printTokens |
StartAstT * | m_ast |
QStringList | m_dependencies |
bool | m_isFed |
This class is a pure helper to use for binaries that you can run on short snippets of test code or whole files and let it print the generated tokens or AST.
It should work fine for any KDevelop-PG-Qt based parser.
SessionT | the parse session for your language. |
TokenStreamT | the token stream for your language, based on KDevPG::TokenStreamBase. |
TokenT | the token class for your language, based on KDevPG::Token. |
LexerT | the Lexer for your language. |
StartAstT | the AST node that is returned from SessionT::parse() . |
DebugVisitorT | the debug visitor for your language. |
TokenToTextT | function pointer to the function that returns a string representation for an integral token. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
parse code directly
|
inline |
parse contents of a file
|
inlineprivate |
|
inlineprivate |
actually run the parse session
|
inline |
|
inline |
|
inline |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |