Package jay.yydebug

Class yyDebugAdapter

  • All Implemented Interfaces:
    yyDebug

    public class yyDebugAdapter
    extends java.lang.Object
    implements yyDebug
    writes one-line messages to standard output or a stream.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.io.PrintStream out
      message stream.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void accept​(java.lang.Object value)
      parse is successful.
      void discard​(int state, int token, java.lang.String name, java.lang.Object value)
      discarding token during error recovery.
      void error​(java.lang.String message)
      syntax error.
      void lex​(int state, int token, java.lang.String name, java.lang.Object value)
      just called the scanner.
      void pop​(int state)
      discarding a state during error recovery.
      void push​(int state, java.lang.Object value)
      just pushed the state/value stack.
      void reduce​(int from, int to, int rule, java.lang.String text, int len)
      rule completed, calling action.
      void reject()
      error recovery failed, about to throw yyException.
      void shift​(int from, int to)
      moving to a new state following an action.
      void shift​(int from, int to, int errorFlag)
      moving to a new state because of input or error.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • out

        protected final java.io.PrintStream out
        message stream.
    • Constructor Detail

      • yyDebugAdapter

        public yyDebugAdapter​(java.io.PrintStream out)
      • yyDebugAdapter

        public yyDebugAdapter()
    • Method Detail

      • push

        public void push​(int state,
                         java.lang.Object value)
        Description copied from interface: yyDebug
        just pushed the state/value stack.
        Specified by:
        push in interface yyDebug
        Parameters:
        state - current state.
        value - current value.
      • lex

        public void lex​(int state,
                        int token,
                        java.lang.String name,
                        java.lang.Object value)
        Description copied from interface: yyDebug
        just called the scanner.
        Specified by:
        lex in interface yyDebug
        Parameters:
        state - current state.
        token - just obtained from scanner.
        name - of token in grammar.
        value - will be obtained from scanner.
      • shift

        public void shift​(int from,
                          int to,
                          int errorFlag)
        Description copied from interface: yyDebug
        moving to a new state because of input or error.
        Specified by:
        shift in interface yyDebug
        Parameters:
        from - current state.
        to - next state.
        errorFlag - value in next state.
      • pop

        public void pop​(int state)
        Description copied from interface: yyDebug
        discarding a state during error recovery.
        Specified by:
        pop in interface yyDebug
        Parameters:
        state - discarded.
      • discard

        public void discard​(int state,
                            int token,
                            java.lang.String name,
                            java.lang.Object value)
        Description copied from interface: yyDebug
        discarding token during error recovery.
        Specified by:
        discard in interface yyDebug
        Parameters:
        state - current state.
        token - discarded.
        name - of token in grammar.
        value - will be obtained from scanner.
      • reduce

        public void reduce​(int from,
                           int to,
                           int rule,
                           java.lang.String text,
                           int len)
        Description copied from interface: yyDebug
        rule completed, calling action.
        Specified by:
        reduce in interface yyDebug
        Parameters:
        from - current state.
        to - state to be uncovered.
        rule - number of completed right-hand side.
        text - text of rule.
        len - number of symbols in rule.
      • shift

        public void shift​(int from,
                          int to)
        Description copied from interface: yyDebug
        moving to a new state following an action.
        Specified by:
        shift in interface yyDebug
        Parameters:
        from - current state.
        to - next state.
      • accept

        public void accept​(java.lang.Object value)
        Description copied from interface: yyDebug
        parse is successful.
        Specified by:
        accept in interface yyDebug
        Parameters:
        value - to be returned by yyparse().
      • error

        public void error​(java.lang.String message)
        Description copied from interface: yyDebug
        syntax error.
        Specified by:
        error in interface yyDebug
      • reject

        public void reject()
        Description copied from interface: yyDebug
        error recovery failed, about to throw yyException.
        Specified by:
        reject in interface yyDebug