1 |
|
2 |
|
3 |
|
4 |
|
5 | import { CharStream } from "./CharStream";
|
6 | import { Interval } from "./misc/Interval";
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 | export declare class ANTLRInputStream implements CharStream {
|
17 |
|
18 | protected data: string;
|
19 |
|
20 | protected n: number;
|
21 |
|
22 | protected p: number;
|
23 |
|
24 | name?: string;
|
25 |
|
26 | constructor(input: string);
|
27 | /** Reset the stream so that it's in the same state it was
|
28 | * when the object was created *except* the data array is not
|
29 | * touched.
|
30 | */
|
31 | reset(): void;
|
32 | consume(): void;
|
33 | LA(i: number): number;
|
34 | LT(i: number): number;
|
35 | /** Return the current input symbol index 0..n where n indicates the
|
36 | * last symbol has been read. The index is the index of char to
|
37 | * be returned from LA(1).
|
38 | */
|
39 | get index(): number;
|
40 | get size(): number;
|
41 | /** mark/release do nothing; we have entire buffer */
|
42 | mark(): number;
|
43 | release(marker: number): void;
|
44 | /** consume() ahead until p==index; can't just set p=index as we must
|
45 | * update line and charPositionInLine. If we seek backwards, just set p
|
46 | */
|
47 | seek(index: number): void;
|
48 | getText(interval: Interval): string;
|
49 | get sourceName(): string;
|
50 | toString(): string;
|
51 | }
|