it.haefelinger.flaka.el
Class EL.MyParser

java.lang.Object
  extended by de.odysseus.el.tree.impl.Parser
      extended by it.haefelinger.flaka.el.EL.MyParser
Enclosing class:
EL

public static class EL.MyParser
extends Parser


Nested Class Summary
 
Nested classes/interfaces inherited from class de.odysseus.el.tree.impl.Parser
Parser.ExtensionHandler, Parser.ExtensionPoint, Parser.ParseException
 
Field Summary
protected  List<Exception> errors
           
protected  List<AstNode> list
           
 
Fields inherited from class de.odysseus.el.tree.impl.Parser
context, extensions, scanner
 
Constructor Summary
EL.MyParser(Builder builder, String expression)
           
 
Method Summary
protected  Scanner createScanner(String expression)
           
protected  void exprref()
           
protected  void handleEx(Exception e)
           
 Tree maketree()
           
protected  Tree maketree(AstNode node, boolean deferred)
           
protected  String q(String s)
           
protected  void recover()
          Recover from a syntax error while inside a EL reference.
protected  boolean sym(Scanner.Symbol s)
           
protected  void syntaxerror(String expected, int start)
           
protected  void trytext()
          Try to read a TEXT node.
protected  void trytoken()
          A method to consume a plain token.
 
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
 

Field Detail

list

protected List<AstNode> list

errors

protected List<Exception> errors
Constructor Detail

EL.MyParser

public EL.MyParser(Builder builder,
                   String expression)
Method Detail

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()