Lines Matching refs:inputStream
78 ANTLRInputStream inputStream = new ANTLRInputStream(grammarStream, Encoding.Unicode); in TestSizeOnEmptyANTLRInputStream()
79 Assert.AreEqual(0, inputStream.Count); in TestSizeOnEmptyANTLRInputStream()
89 ANTLRInputStream inputStream = new ANTLRInputStream(grammarStream, Encoding.Unicode); in TestSizeOnANTLRInputStream()
90 Assert.AreEqual(grammarStr.Length, inputStream.Count); in TestSizeOnANTLRInputStream()
100 ANTLRInputStream inputStream = new ANTLRInputStream(grammarStream, Encoding.Unicode); in TestConsumeAndIndexOnANTLRInputStream()
101 Assert.AreEqual(0, inputStream.Index); in TestConsumeAndIndexOnANTLRInputStream()
103 inputStream.Consume(); in TestConsumeAndIndexOnANTLRInputStream()
104 Assert.AreEqual(1, inputStream.Index); in TestConsumeAndIndexOnANTLRInputStream()
106 inputStream.Consume(); in TestConsumeAndIndexOnANTLRInputStream()
107 Assert.AreEqual(2, inputStream.Index); in TestConsumeAndIndexOnANTLRInputStream()
109 while (inputStream.Index < inputStream.Count) in TestConsumeAndIndexOnANTLRInputStream()
111 inputStream.Consume(); in TestConsumeAndIndexOnANTLRInputStream()
113 Assert.AreEqual(inputStream.Index, inputStream.Count); in TestConsumeAndIndexOnANTLRInputStream()
123 ANTLRInputStream inputStream = new ANTLRInputStream(grammarStream, Encoding.Unicode); in TestConsumeAllCharactersInAnANTLRInputStream()
124 while (inputStream.Index < inputStream.Count) in TestConsumeAllCharactersInAnANTLRInputStream()
126 Console.Out.Write((char)inputStream.LA(1)); in TestConsumeAllCharactersInAnANTLRInputStream()
127 inputStream.Consume(); in TestConsumeAllCharactersInAnANTLRInputStream()
129 Assert.AreEqual(inputStream.Index, inputStream.Count); in TestConsumeAllCharactersInAnANTLRInputStream()
139 ANTLRInputStream inputStream = new ANTLRInputStream(grammarStream, Encoding.Unicode); in TestConsumeOnANTLRInputStream()
140 Assert.AreEqual(0, inputStream.Index); in TestConsumeOnANTLRInputStream()
141 Assert.AreEqual(0, inputStream.CharPositionInLine); in TestConsumeOnANTLRInputStream()
142 Assert.AreEqual(1, inputStream.Line); in TestConsumeOnANTLRInputStream()
144 inputStream.Consume(); // O in TestConsumeOnANTLRInputStream()
145 Assert.AreEqual(1, inputStream.Index); in TestConsumeOnANTLRInputStream()
146 Assert.AreEqual(1, inputStream.CharPositionInLine); in TestConsumeOnANTLRInputStream()
147 Assert.AreEqual(1, inputStream.Line); in TestConsumeOnANTLRInputStream()
149 inputStream.Consume(); // n in TestConsumeOnANTLRInputStream()
150 Assert.AreEqual(2, inputStream.Index); in TestConsumeOnANTLRInputStream()
151 Assert.AreEqual(2, inputStream.CharPositionInLine); in TestConsumeOnANTLRInputStream()
152 Assert.AreEqual(1, inputStream.Line); in TestConsumeOnANTLRInputStream()
154 inputStream.Consume(); // e in TestConsumeOnANTLRInputStream()
155 Assert.AreEqual(3, inputStream.Index); in TestConsumeOnANTLRInputStream()
156 Assert.AreEqual(3, inputStream.CharPositionInLine); in TestConsumeOnANTLRInputStream()
157 Assert.AreEqual(1, inputStream.Line); in TestConsumeOnANTLRInputStream()
159 inputStream.Consume(); // \r in TestConsumeOnANTLRInputStream()
160 Assert.AreEqual(4, inputStream.Index); in TestConsumeOnANTLRInputStream()
161 Assert.AreEqual(4, inputStream.CharPositionInLine); in TestConsumeOnANTLRInputStream()
162 Assert.AreEqual(1, inputStream.Line); in TestConsumeOnANTLRInputStream()
164 inputStream.Consume(); // \n in TestConsumeOnANTLRInputStream()
165 Assert.AreEqual(5, inputStream.Index); in TestConsumeOnANTLRInputStream()
166 Assert.AreEqual(0, inputStream.CharPositionInLine); in TestConsumeOnANTLRInputStream()
167 Assert.AreEqual(2, inputStream.Line); in TestConsumeOnANTLRInputStream()
169 inputStream.Consume(); // T in TestConsumeOnANTLRInputStream()
170 Assert.AreEqual(6, inputStream.Index); in TestConsumeOnANTLRInputStream()
171 Assert.AreEqual(1, inputStream.CharPositionInLine); in TestConsumeOnANTLRInputStream()
172 Assert.AreEqual(2, inputStream.Line); in TestConsumeOnANTLRInputStream()
174 inputStream.Consume(); // w in TestConsumeOnANTLRInputStream()
175 Assert.AreEqual(7, inputStream.Index); in TestConsumeOnANTLRInputStream()
176 Assert.AreEqual(2, inputStream.CharPositionInLine); in TestConsumeOnANTLRInputStream()
177 Assert.AreEqual(2, inputStream.Line); in TestConsumeOnANTLRInputStream()
179 inputStream.Consume(); // o in TestConsumeOnANTLRInputStream()
180 Assert.AreEqual(8, inputStream.Index); in TestConsumeOnANTLRInputStream()
181 Assert.AreEqual(3, inputStream.CharPositionInLine); in TestConsumeOnANTLRInputStream()
182 Assert.AreEqual(2, inputStream.Line); in TestConsumeOnANTLRInputStream()
184 inputStream.Consume(); // EOF in TestConsumeOnANTLRInputStream()
185 Assert.AreEqual(8, inputStream.Index); in TestConsumeOnANTLRInputStream()
186 Assert.AreEqual(3, inputStream.CharPositionInLine); in TestConsumeOnANTLRInputStream()
187 Assert.AreEqual(2, inputStream.Line); in TestConsumeOnANTLRInputStream()
189 inputStream.Consume(); // EOF in TestConsumeOnANTLRInputStream()
190 Assert.AreEqual(8, inputStream.Index); in TestConsumeOnANTLRInputStream()
191 Assert.AreEqual(3, inputStream.CharPositionInLine); in TestConsumeOnANTLRInputStream()
192 Assert.AreEqual(2, inputStream.Line); in TestConsumeOnANTLRInputStream()
202 ANTLRInputStream inputStream = new ANTLRInputStream(grammarStream, encoding); in TestResetOnANTLRInputStream()
203 Assert.AreEqual(0, inputStream.Index); in TestResetOnANTLRInputStream()
204 Assert.AreEqual(0, inputStream.CharPositionInLine); in TestResetOnANTLRInputStream()
205 Assert.AreEqual(1, inputStream.Line); in TestResetOnANTLRInputStream()
207 inputStream.Consume(); // O in TestResetOnANTLRInputStream()
208 inputStream.Consume(); // n in TestResetOnANTLRInputStream()
210 Assert.AreEqual('e', inputStream.LA(1)); in TestResetOnANTLRInputStream()
211 Assert.AreEqual(2, inputStream.Index); in TestResetOnANTLRInputStream()
213 inputStream.Reset(); in TestResetOnANTLRInputStream()
214 Assert.AreEqual('O', inputStream.LA(1)); in TestResetOnANTLRInputStream()
215 Assert.AreEqual(0, inputStream.Index); in TestResetOnANTLRInputStream()
216 Assert.AreEqual(0, inputStream.CharPositionInLine); in TestResetOnANTLRInputStream()
217 Assert.AreEqual(1, inputStream.Line); in TestResetOnANTLRInputStream()
218 inputStream.Consume(); // O in TestResetOnANTLRInputStream()
220 Assert.AreEqual('n', inputStream.LA(1)); in TestResetOnANTLRInputStream()
221 Assert.AreEqual(1, inputStream.Index); in TestResetOnANTLRInputStream()
222 Assert.AreEqual(1, inputStream.CharPositionInLine); in TestResetOnANTLRInputStream()
223 Assert.AreEqual(1, inputStream.Line); in TestResetOnANTLRInputStream()
224 inputStream.Consume(); // n in TestResetOnANTLRInputStream()
226 Assert.AreEqual('e', inputStream.LA(1)); in TestResetOnANTLRInputStream()
227 Assert.AreEqual(2, inputStream.Index); in TestResetOnANTLRInputStream()
228 Assert.AreEqual(2, inputStream.CharPositionInLine); in TestResetOnANTLRInputStream()
229 Assert.AreEqual(1, inputStream.Line); in TestResetOnANTLRInputStream()
230 inputStream.Consume(); // e in TestResetOnANTLRInputStream()