Class VmParserTokenManager

  • All Implemented Interfaces:
    VmParserConstants

    public class VmParserTokenManager
    extends net.sourceforge.pmd.lang.ast.AbstractTokenManager
    implements VmParserConstants
    Token Manager.
    • Field Detail

      • debugPrint

        public boolean debugPrint
      • inDirective

        public boolean inDirective
      • inSet

        public boolean inSet
      • debugStream

        public java.io.PrintStream debugStream
        Debug output.
      • jjstrLiteralImages

        public static final java.lang.String[] jjstrLiteralImages
        Token literal values.
      • lexStateNames

        public static final java.lang.String[] lexStateNames
        Lexer state names.
      • jjnewLexState

        public static final int[] jjnewLexState
        Lex State array.
      • input_stream

        protected net.sourceforge.pmd.lang.ast.CharStream input_stream
      • curChar

        protected char curChar
    • Constructor Detail

      • VmParserTokenManager

        public VmParserTokenManager​(net.sourceforge.pmd.lang.ast.CharStream stream)
        Constructor.
      • VmParserTokenManager

        public VmParserTokenManager​(net.sourceforge.pmd.lang.ast.CharStream stream,
                                    int lexState)
        Constructor.
    • Method Detail

      • stateStackPop

        public boolean stateStackPop()
        pushes the current state onto the 'state stack', and maintains the parens counts public because we need it in PD & VM handling
        Returns:
        boolean : success. It can fail if the state machine gets messed up (do don't mess it up :)
      • stateStackPush

        public boolean stateStackPush()
        pops a state off the stack, and restores paren counts
        Returns:
        boolean : success of operation
      • clearStateVars

        public void clearStateVars()
        Clears all state variables, resets to start values, clears stateStack. Call before parsing.
      • setDebugStream

        public void setDebugStream​(java.io.PrintStream ds)
        Set debug output.
      • ReInit

        public void ReInit​(net.sourceforge.pmd.lang.ast.CharStream stream)
        Reinitialise parser.
      • ReInit

        public void ReInit​(net.sourceforge.pmd.lang.ast.CharStream stream,
                           int lexState)
        Reinitialise parser.
      • SwitchTo

        public void SwitchTo​(int lexState)
        Switch to specified lex state.
      • jjFillToken

        protected Token jjFillToken()
      • getNextToken

        public Token getNextToken()
        Get the next Token.