My Project
|
Recursive decent parser for Django style template expressions. More...
Classes | |
class | ExprToken |
Class representing a token within an expression. More... | |
Public Member Functions | |
ExpressionParser (const TemplateParser *parser, int line) | |
virtual | ~ExpressionParser () |
ExprAst * | parse (const char *expr) |
Private Member Functions | |
ExprAst * | parseExpression () |
ExprAst * | parseOrExpression () |
ExprAst * | parseAndExpression () |
ExprAst * | parseNotExpression () |
ExprAst * | parseCompareExpression () |
ExprAst * | parseAdditiveExpression () |
ExprAst * | parseMultiplicativeExpression () |
ExprAst * | parseUnaryExpression () |
ExprAst * | parsePrimaryExpression () |
ExprAst * | parseNumber () |
ExprAst * | parseIdentifier () |
ExprAst * | parseLiteral () |
ExprAst * | parseIdentifierOptionalArgs () |
ExprAst * | parseFilteredVariable () |
ExprAstFilter * | parseFilter () |
bool | getNextToken () |
Private Attributes | |
const TemplateParser * | m_parser |
ExprToken | m_curToken |
int | m_line |
const char * | m_tokenStream |
Recursive decent parser for Django style template expressions.
Definition at line 1748 of file template.cpp.
|
inline |
Definition at line 1751 of file template.cpp.
|
inlinevirtual |
Definition at line 1755 of file template.cpp.
|
inlineprivate |
Definition at line 2083 of file template.cpp.
References Operator::And, Operator::Colon, Operator::Comma, Operator::Divide, Operator::Equal, Operator::Filter, Operator::Greater, Operator::GreaterEqual, ExpressionParser::ExprToken::id, ExpressionParser::ExprToken::Identifier, Operator::LeftParen, Operator::Less, Operator::LessEqual, ExpressionParser::ExprToken::Literal, m_curToken, m_line, m_parser, m_tokenStream, Operator::Minus, Operator::Modulo, Operator::Multiply, Operator::Not, Operator::NotEqual, ExpressionParser::ExprToken::num, ExpressionParser::ExprToken::Number, ExpressionParser::ExprToken::op, ExpressionParser::ExprToken::Operator, Operator::Or, Operator::Plus, Operator::RightParen, TemplateParser::templateName(), ExpressionParser::ExprToken::type, ExpressionParser::ExprToken::Unknown, and warn().
Referenced by parse(), parseAdditiveExpression(), parseAndExpression(), parseCompareExpression(), parseFilter(), parseFilteredVariable(), parseIdentifier(), parseIdentifierOptionalArgs(), parseLiteral(), parseMultiplicativeExpression(), parseNotExpression(), parseNumber(), parseOrExpression(), parsePrimaryExpression(), and parseUnaryExpression().
|
inline |
Definition at line 1759 of file template.cpp.
References getNextToken(), m_tokenStream, and parseExpression().
Referenced by TemplateNodeCreate::TemplateNodeCreate(), TemplateNodeCycle::TemplateNodeCycle(), TemplateNodeEncoding::TemplateNodeEncoding(), TemplateNodeExtend::TemplateNodeExtend(), TemplateNodeFor::TemplateNodeFor(), TemplateNodeIf::TemplateNodeIf(), TemplateNodeInclude::TemplateNodeInclude(), TemplateNodeIndexEntry::TemplateNodeIndexEntry(), TemplateNodeMarkers::TemplateNodeMarkers(), TemplateNodeRange::TemplateNodeRange(), TemplateNodeRepeat::TemplateNodeRepeat(), TemplateNodeResource::TemplateNodeResource(), TemplateNodeSet::TemplateNodeSet(), TemplateNodeTree::TemplateNodeTree(), TemplateNodeVariable::TemplateNodeVariable(), and TemplateNodeWith::TemplateNodeWith().
|
inlineprivate |
Definition at line 1881 of file template.cpp.
References getNextToken(), m_curToken, m_tokenStream, Operator::Minus, ExpressionParser::ExprToken::op, ExpressionParser::ExprToken::Operator, parseMultiplicativeExpression(), Operator::Plus, TRACE, and ExpressionParser::ExprToken::type.
Referenced by parseCompareExpression().
|
inlineprivate |
Definition at line 1813 of file template.cpp.
References Operator::And, getNextToken(), m_curToken, m_tokenStream, ExpressionParser::ExprToken::op, ExpressionParser::ExprToken::Operator, parseNotExpression(), TRACE, and ExpressionParser::ExprToken::type.
Referenced by parseOrExpression().
|
inlineprivate |
Definition at line 1855 of file template.cpp.
References Operator::Equal, getNextToken(), Operator::Greater, Operator::GreaterEqual, Operator::Less, Operator::LessEqual, m_curToken, m_tokenStream, Operator::NotEqual, ExpressionParser::ExprToken::op, ExpressionParser::ExprToken::Operator, parseAdditiveExpression(), parseNotExpression(), TRACE, and ExpressionParser::ExprToken::type.
Referenced by parseNotExpression().
|
inlineprivate |
Definition at line 1787 of file template.cpp.
References m_tokenStream, parseOrExpression(), and TRACE.
Referenced by parse(), and parsePrimaryExpression().
|
inlineprivate |
Definition at line 2065 of file template.cpp.
References Operator::Colon, filter(), getNextToken(), ExpressionParser::ExprToken::id, m_curToken, ExpressionParser::ExprToken::op, ExpressionParser::ExprToken::Operator, parsePrimaryExpression(), TRACE, and ExpressionParser::ExprToken::type.
Referenced by parseFilteredVariable().
|
inlineprivate |
Definition at line 2046 of file template.cpp.
References Operator::Filter, filter(), getNextToken(), m_curToken, ExpressionParser::ExprToken::op, ExpressionParser::ExprToken::Operator, parseFilter(), parseIdentifierOptionalArgs(), TRACE, and ExpressionParser::ExprToken::type.
Referenced by parsePrimaryExpression().
|
inlineprivate |
Definition at line 2001 of file template.cpp.
References getNextToken(), ExpressionParser::ExprToken::id, m_curToken, and TRACE.
Referenced by parseIdentifierOptionalArgs().
|
inlineprivate |
Definition at line 2019 of file template.cpp.
References Operator::Colon, Operator::Comma, getNextToken(), ExpressionParser::ExprToken::id, m_curToken, ExpressionParser::ExprToken::op, ExpressionParser::ExprToken::Operator, parseIdentifier(), parsePrimaryExpression(), TRACE, and ExpressionParser::ExprToken::type.
Referenced by parseFilteredVariable().
|
inlineprivate |
Definition at line 2010 of file template.cpp.
References getNextToken(), ExpressionParser::ExprToken::id, m_curToken, and TRACE.
Referenced by parsePrimaryExpression().
|
inlineprivate |
Definition at line 1900 of file template.cpp.
References Operator::Divide, getNextToken(), m_curToken, m_tokenStream, Operator::Modulo, Operator::Multiply, ExpressionParser::ExprToken::op, ExpressionParser::ExprToken::Operator, parseUnaryExpression(), TRACE, and ExpressionParser::ExprToken::type.
Referenced by parseAdditiveExpression().
|
inlineprivate |
Definition at line 1831 of file template.cpp.
References getNextToken(), m_curToken, m_line, m_parser, m_tokenStream, Operator::Not, ExpressionParser::ExprToken::op, ExpressionParser::ExprToken::Operator, parseCompareExpression(), TemplateParser::templateName(), TRACE, ExpressionParser::ExprToken::type, and warn().
Referenced by parseAndExpression(), and parseCompareExpression().
|
inlineprivate |
Definition at line 1992 of file template.cpp.
References getNextToken(), m_curToken, ExpressionParser::ExprToken::num, and TRACE.
Referenced by parsePrimaryExpression().
|
inlineprivate |
Definition at line 1795 of file template.cpp.
References getNextToken(), m_curToken, m_tokenStream, ExpressionParser::ExprToken::op, ExpressionParser::ExprToken::Operator, Operator::Or, parseAndExpression(), TRACE, and ExpressionParser::ExprToken::type.
Referenced by parseExpression().
|
inlineprivate |
Definition at line 1949 of file template.cpp.
References getNextToken(), ExpressionParser::ExprToken::Identifier, Operator::LeftParen, ExpressionParser::ExprToken::Literal, m_curToken, m_line, m_parser, m_tokenStream, ExpressionParser::ExprToken::Number, ExpressionParser::ExprToken::op, ExpressionParser::ExprToken::Operator, parseExpression(), parseFilteredVariable(), parseLiteral(), parseNumber(), Operator::RightParen, TemplateParser::templateName(), Operator::toString(), TRACE, ExpressionParser::ExprToken::type, and warn().
Referenced by parseFilter(), parseIdentifierOptionalArgs(), and parseUnaryExpression().
|
inlineprivate |
Definition at line 1919 of file template.cpp.
References getNextToken(), m_curToken, m_tokenStream, Operator::Minus, ExpressionParser::ExprToken::op, ExpressionParser::ExprToken::Operator, parsePrimaryExpression(), Operator::Plus, TRACE, and ExpressionParser::ExprToken::type.
Referenced by parseMultiplicativeExpression().
|
private |
Definition at line 2286 of file template.cpp.
Referenced by getNextToken(), parseAdditiveExpression(), parseAndExpression(), parseCompareExpression(), parseFilter(), parseFilteredVariable(), parseIdentifier(), parseIdentifierOptionalArgs(), parseLiteral(), parseMultiplicativeExpression(), parseNotExpression(), parseNumber(), parseOrExpression(), parsePrimaryExpression(), and parseUnaryExpression().
|
private |
Definition at line 2287 of file template.cpp.
Referenced by getNextToken(), parseNotExpression(), and parsePrimaryExpression().
|
private |
Definition at line 2285 of file template.cpp.
Referenced by getNextToken(), parseNotExpression(), and parsePrimaryExpression().
|
private |
Definition at line 2288 of file template.cpp.
Referenced by getNextToken(), parse(), parseAdditiveExpression(), parseAndExpression(), parseCompareExpression(), parseExpression(), parseMultiplicativeExpression(), parseNotExpression(), parseOrExpression(), parsePrimaryExpression(), and parseUnaryExpression().