Represents a stream of characters fed to the lexer from that can be rewound via mark()/rewind() methods.

A dynamic array is used to buffer up all the input characters. Normally, "k" characters are stored in the buffer. More characters may be stored during guess mode (testing syntactic predicate), or when LT(i>k) is referenced. Consumption of characters is deferred. In other words, reading the next character is not done by conume(), but deferred until needed by LA or LT.

예제 #1
0
 public virtual void resetInput(TextReader tr)
 {
     reset();
     input = new CharBuffer(tr);
 }
예제 #2
0
 public virtual void resetInput(InputBuffer ib)
 {
     reset();
     input = ib;
 }
예제 #3
0
 public virtual void resetInput(Stream s)
 {
     reset();
     input = new ByteBuffer(s);
 }
		public virtual void resetInput(TextReader tr)
		{
			reset();
			input = new CharBuffer(tr);
		}
예제 #5
0
 public LexerSharedInputState(InputBuffer inbuf)
 {
     initialize();
     input = inbuf;
 }
		public virtual void resetInput(InputBuffer ib)
		{
			reset();
			input = ib;
		}
		public virtual void resetInput(Stream s)
		{
			reset();
			input = new ByteBuffer(s);
		}
		public LexerSharedInputState(InputBuffer inbuf)
		{
			initialize();
			input = inbuf;
		}
예제 #9
0
		public CharScanner(InputBuffer cb) : this()
		{
			inputState = new LexerSharedInputState(cb);
			cached_LA2 = inputState.input.LA(2);
			cached_LA1 = inputState.input.LA(1);
		}
예제 #10
0
		public virtual void resetState(InputBuffer ib)
		{
			text.Length = 0;
			traceDepth = 0;
			inputState.resetInput(ib);
			refresh();
		}
예제 #11
0
 public CharScanner(InputBuffer cb) : this()
 {
     inputState = new LexerSharedInputState(cb);
     cached_LA2 = inputState.input.LA(2);
     cached_LA1 = inputState.input.LA(1);
 }
예제 #12
0
		public ExpressionLexer(InputBuffer ib)		 : this(new LexerSharedInputState(ib))
		{
		}