it.haefelinger.flaka.el
Class EL.MyParser
java.lang.Object
de.odysseus.el.tree.impl.Parser
it.haefelinger.flaka.el.EL.MyParser
- Enclosing class:
- EL
public static class EL.MyParser
- extends Parser
| Methods inherited from class de.odysseus.el.tree.impl.Parser |
add, and, cmp, consumeToken, consumeToken, createAstBinary, createAstBracket, createAstChoice, createAstComposite, createAstDot, createAstFunction, createAstIdentifier, createAstMethod, createAstUnary, eq, eval, eval, expr, fail, fail, function, getExtensionHandler, getFunctions, getIdentifiers, getToken, identifier, list, literal, lookahead, mul, nonliteral, or, parseFloat, parseInteger, putExtensionHandler, text, tree, unary, value |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
list
protected List<AstNode> list
errors
protected List<Exception> errors
EL.MyParser
public EL.MyParser(Builder builder,
String expression)
createScanner
protected Scanner createScanner(String expression)
- Overrides:
createScanner in class Parser
sym
protected boolean sym(Scanner.Symbol s)
exprref
protected void exprref()
recover
protected void recover()
- Recover from a syntax error while inside a EL reference.
To recover from a syntatical error switch scanner into ignoring mode. In
this mode, the scanner will simply move forward until character '}' is
seen.
q
protected String q(String s)
syntaxerror
protected void syntaxerror(String expected,
int start)
maketree
protected Tree maketree(AstNode node,
boolean deferred)
trytext
protected void trytext()
- Try to read a TEXT node.
This method is similar to super.text() except that any exceptions thrown
will end up in the list of errors.
If current token is TEXT, then appropirate node is created and added to
the internal node list. In addition, the next token will be consumed from
the stream.
trytoken
protected void trytoken()
- A method to consume a plain token.
This method is similar to
consumeToken. The main difference
is that all exceptions thrown are treated as errors (end up in internal
error list). This is not the case for ScanExceptions, cause the scanner
is not supposed to throw any exceptions at all. Instead the scanner is
supposed to create a EOF token in case of problems.
handleEx
protected void handleEx(Exception e)
maketree
public Tree maketree()