KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > antlr > ParserSharedInputState


1 package antlr;
2
3 /* ANTLR Translator Generator
4  * Project led by Terence Parr at http://www.jGuru.com
5  * Software rights: http://www.antlr.org/RIGHTS.html
6  *
7  * $Id: //depot/code/org.antlr/main/main/antlr/ParserSharedInputState.java#5 $
8  */

9
10 /** This object contains the data associated with an
11  * input stream of tokens. Multiple parsers
12  * share a single ParserSharedInputState to parse
13  * the same stream of tokens.
14  */

15 public class ParserSharedInputState {
16     /** Where to get token objects */
17     protected TokenBuffer input;
18
19     /** Are we guessing (guessing>0)? */
20     public int guessing = 0;
21
22     /** What file (if known) caused the problem? */
23     protected String JavaDoc filename;
24
25     public void reset() {
26          guessing = 0;
27          filename = null;
28          input.reset();
29      }
30 }
31
Popular Tags