Class CharStreamState


  • public class CharStreamState
    extends java.lang.Object
    When walking ahead with cyclic DFA or for syntactic predicates, we need to record the state of the input stream (char index, line, etc...) so that we can rewind the state after scanning ahead. This is the complete state of a stream.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) int charPositionInLine
      What char position 0..n-1 in line is scanner before processing buffer[p]?
      (package private) int line
      What line number is the scanner at before processing buffer[p]?
      (package private) int p
      Index into the char stream of next lookahead char
    • Constructor Summary

      Constructors 
      Constructor Description
      CharStreamState()  
    • Method Summary

      • Methods inherited from class java.lang.Object

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

      • p

        int p
        Index into the char stream of next lookahead char
      • line

        int line
        What line number is the scanner at before processing buffer[p]?
      • charPositionInLine

        int charPositionInLine
        What char position 0..n-1 in line is scanner before processing buffer[p]?
    • Constructor Detail

      • CharStreamState

        public CharStreamState()