Class VmParser

    • Field Detail

      • currentTemplateName

        public String currentTemplateName
        Deprecated.
        Name of current template we are parsing. Passed to us in parse()
      • strictEscape

        public boolean strictEscape
        Deprecated.
        Set to true if the property RuntimeConstants.RUNTIME_REFERENCES_STRICT_ESCAPE is set to true
      • token

        public Token token
        Deprecated.
        Current token.
      • jj_nt

        public Token jj_nt
        Deprecated.
        Next token.
    • Constructor Detail

      • VmParser

        public VmParser​(CharStream stream)
        Deprecated.
        Constructor with user supplied CharStream.
      • VmParser

        public VmParser​(VmParserTokenManager tm)
        Deprecated.
        Constructor with generated Token Manager.
    • Method Detail

      • getDirective

        public Directive getDirective​(String directive)
        Deprecated.
        This method gets a Directive from the directives Hashtable
      • isDirective

        public boolean isDirective​(String directive)
        Deprecated.
        This method finds out of the directive exists in the directives Map.
      • process

        public final ASTprocess process()
                                 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 int 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.
      • getNextToken

        public final Token getNextToken()
        Deprecated.
        Get the next Token.
      • getToken

        public final Token getToken​(int index)
        Deprecated.
        Get the specific Token.
      • generateParseException

        public ParseException generateParseException()
        Deprecated.
        Generate ParseException.
      • enable_tracing

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

        public final void disable_tracing()
        Deprecated.
        Disable tracing.