Class VtlParserImpl


  • @Deprecated
    public class VtlParserImpl
    extends Object
    Deprecated.
    Since 7.5.0. VtlParserImpl should have been package private because this is an implementation class that should not be used directly.
    This class is responsible for parsing a Velocity template. This class was generated by JavaCC using the JJTree extension to produce an Abstract Syntax Tree (AST) of the template. Please look at the Parser.jjt file which is what controls the generation of this class.
    Author:
    Jason van Zyl, Geir Magnusson Jr., Henning P. Schmiedehausen
    Version:
    $Id$
    • Constructor Detail

      • VtlParserImpl

        public VtlParserImpl​(CharStream stream)
        Deprecated.
        Constructor with user supplied net.sourceforge.pmd.lang.ast.impl.javacc.CharStream.
      • VtlParserImpl

        public VtlParserImpl​(net.sourceforge.pmd.lang.velocity.ast.VtlParserImplTokenManager tm)
        Deprecated.
        Constructor with generated net.sourceforge.pmd.lang.ast.impl.javacc.JavaccToken Manager.
    • Method Detail

      • Template

        public final ASTTemplate Template()
                                   throws ParseException
        Deprecated.
        This method is what starts the whole parsing process. After the parsing is complete and the template has been turned into an AST, this method returns the root of AST which can subsequently be traversed by a visitor which implements the ParserVisitor interface which is generated automatically by JavaCC
        Throws:
        ParseException
      • Statement

        public final void Statement()
                             throws ParseException
        Deprecated.
        These are the types of statements that are acceptable in Velocity templates.
        Throws:
        ParseException
      • EscapedDirective

        public final void EscapedDirective()
                                    throws ParseException
        Deprecated.
        used to separate the notion of a valid directive that has been escaped, versus something that looks like a directive and is just schmoo. This is important to do as a separate production that creates a node, because we want this, in either case, to stop the further parsing of the Directive() tree.
        Throws:
        ParseException
      • Escape

        public final void Escape()
                          throws ParseException
        Deprecated.
        Used to catch and process escape sequences in grammatical constructs as escapes outside of VTL are just characters. Right now we have both this and the EscapeDirective() construction because in the EscapeDirective() case, we want to suck in the #<directive> and here we don't. We just want the escapes to render correctly
        Throws:
        ParseException
      • Identifier

        public final void Identifier()
                              throws ParseException
        Deprecated.
        This method corresponds to variable references in Velocity templates. The following are examples of variable references that may be found in a template: $foo $bar
        Throws:
        ParseException
      • DirectiveArg

        public final void DirectiveArg()
                                throws ParseException
        Deprecated.
        Supports the arguments for the Pluggable Directives
        Throws:
        ParseException
      • Map

        public final void Map()
                       throws ParseException
        Deprecated.
        for creating a map in a #set #set($foo = {$foo : $bar, $blargh : $thingy})
        Throws:
        ParseException
      • IntegerRange

        public final void IntegerRange()
                                throws ParseException
        Deprecated.
        supports the [n..m] vector generator for use in the #foreach() to generate measured ranges w/o needing explicit support from the app/servlet
        Throws:
        ParseException
      • IndexParameter

        public final void IndexParameter()
                                  throws ParseException
        Deprecated.
        A Simplified parameter more suitable for an index position: $foo[$index]
        Throws:
        ParseException
      • Parameter

        public final void Parameter()
                             throws ParseException
        Deprecated.
        This method has yet to be fully implemented but will allow arbitrarily nested method calls
        Throws:
        ParseException
      • Method

        public final void Method()
                          throws ParseException
        Deprecated.
        This method has yet to be fully implemented but will allow arbitrarily nested method calls
        Throws:
        ParseException
      • Text

        public final void Text()
                        throws ParseException
        Deprecated.
        This method is responsible for allowing all non-grammar text to pass through unscathed.
        Throws:
        ParseException
      • SetDirective

        public final void SetDirective()
                                throws ParseException
        Deprecated.
        Currently support both types of set : #set( expr ) #set expr
        Throws:
        ParseException
      • ReInit

        public void ReInit​(CharStream stream)
        Deprecated.
        Reinitialise.
      • ReInit

        public void ReInit​(net.sourceforge.pmd.lang.velocity.ast.VtlParserImplTokenManager tm)
        Deprecated.
        Reinitialise.
      • getNextToken

        public final JavaccToken getNextToken()
        Deprecated.
        Get the next net.sourceforge.pmd.lang.ast.impl.javacc.JavaccToken.
      • getToken

        public final JavaccToken getToken​(int index)
        Deprecated.
        Get the specific net.sourceforge.pmd.lang.ast.impl.javacc.JavaccToken.
      • generateParseException

        public ParseException generateParseException()
        Deprecated.
        Generate net.sourceforge.pmd.lang.ast.ParseException.
      • enable_tracing

        public final void enable_tracing()
        Deprecated.
        Enable tracing.
      • disable_tracing

        public final void disable_tracing()
        Deprecated.
        Disable tracing.