-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAntlr3.Runtime.xml
More file actions
3734 lines (3734 loc) · 188 KB
/
Antlr3.Runtime.xml
File metadata and controls
3734 lines (3734 loc) · 188 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0"?>
<doc>
<assembly>
<name>/home/verequus/Arbeit/ANTLR/code/antlr/main/runtime/CSharp/Sources/Antlr3.Runtime/bin/Release/net-2.0/Antlr3.Runtime</name>
</assembly>
<members>
<member name="T:Antlr.Runtime.ANTLRFileStream">
<summary>
A character stream - an <see cref="T:Antlr.Runtime.ICharStream" /> - that loads
and caches the contents of it's underlying file fully during
object construction
</summary>
<remarks>
This looks very much like an ANTLReaderStream or an ANTLRInputStream
but, it is a special case. Since we know the exact size of the file to
load, we can avoid lots of data copying and buffer resizing.
</remarks>
</member>
<member name="M:Antlr.Runtime.ANTLRFileStream.#ctor">
<summary>
Initializes a new instance of the ANTLRFileStream class
</summary>
</member>
<member name="M:Antlr.Runtime.ANTLRFileStream.#ctor(System.String)">
<summary>
Initializes a new instance of the ANTLRFileStream class for the
specified file name
</summary>
</member>
<member name="M:Antlr.Runtime.ANTLRFileStream.#ctor(System.String,System.Text.Encoding)">
<summary>
Initializes a new instance of the ANTLRFileStream class for the
specified file name and encoding
</summary>
</member>
<member name="F:Antlr.Runtime.ANTLRFileStream.fileName">
<summary>Fully qualified name of the stream's underlying file</summary>
</member>
<member name="P:Antlr.Runtime.ANTLRFileStream.SourceName">
<summary>
Gets the file name of this ANTLRFileStream underlying file
</summary>
</member>
<member name="M:Antlr.Runtime.ANTLRFileStream.Load(System.String,System.Text.Encoding)">
<summary>
Loads and buffers the specified file to be used as this
ANTLRFileStream's source
</summary>
<param name="fileName">File to load</param>
<param name="encoding">Encoding to apply to file</param>
</member>
<member name="T:Antlr.Runtime.ANTLRStringStream">
<summary>
A pretty quick <see cref="T:Antlr.Runtime.ICharStream" /> that uses a character array
directly as it's underlying source.
</summary>
</member>
<member name="M:Antlr.Runtime.ANTLRStringStream.#ctor">
<summary>
Initializes a new instance of the ANTLRStringStream class
</summary>
</member>
<member name="M:Antlr.Runtime.ANTLRStringStream.#ctor(System.String)">
<summary>
Initializes a new instance of the ANTLRStringStream class for the
specified string. This copies data from the string to a local
character array
</summary>
</member>
<member name="M:Antlr.Runtime.ANTLRStringStream.#ctor(System.Char[],System.Int32)">
<summary>
Initializes a new instance of the ANTLRStringStream class for the
specified character array. This is the preferred constructor as
no data is copied
</summary>
</member>
<member name="F:Antlr.Runtime.ANTLRStringStream.data">
<summary>The data for the stream</summary>
</member>
<member name="F:Antlr.Runtime.ANTLRStringStream.n">
<summary>How many characters are actually in the buffer?</summary>
</member>
<member name="F:Antlr.Runtime.ANTLRStringStream.p">
<summary>Index in our array for the next char (0..n-1)</summary>
</member>
<member name="F:Antlr.Runtime.ANTLRStringStream.line">
<summary>Current line number within the input (1..n )</summary>
</member>
<member name="F:Antlr.Runtime.ANTLRStringStream.charPositionInLine">
<summary>
The index of the character relative to the beginning of the
line (0..n-1)
</summary>
</member>
<member name="F:Antlr.Runtime.ANTLRStringStream.markDepth">
<summary>
Tracks the depth of nested <see cref="M:Antlr.Runtime.IIntStream.Mark" /> calls
</summary>
</member>
<member name="F:Antlr.Runtime.ANTLRStringStream.markers">
<summary>
A list of CharStreamState objects that tracks the stream state
(i.e. line, charPositionInLine, and p) that can change as you
move through the input stream. Indexed from 1..markDepth.
A null is kept @ index 0. Create upon first call to Mark().
</summary>
</member>
<member name="F:Antlr.Runtime.ANTLRStringStream.lastMarker">
<summary>
Track the last Mark() call result value for use in Rewind().
</summary>
</member>
<member name="F:Antlr.Runtime.ANTLRStringStream.name">
<summary>
What is name or source of this char stream?
</summary>
</member>
<member name="P:Antlr.Runtime.ANTLRStringStream.Line">
<summary>
Current line position in stream.
</summary>
</member>
<member name="P:Antlr.Runtime.ANTLRStringStream.CharPositionInLine">
<summary>
Current character position on the current line stream
(i.e. columnn position)
</summary>
</member>
<member name="M:Antlr.Runtime.ANTLRStringStream.Reset">
<summary>
Resets the stream so that it is in the same state it was
when the object was created *except* the data array is not
touched.
</summary>
</member>
<member name="M:Antlr.Runtime.ANTLRStringStream.Consume">
<summary>
Advances the read position of the stream. Updates line and column state
</summary>
</member>
<member name="M:Antlr.Runtime.ANTLRStringStream.LA(System.Int32)">
<summary>
Return lookahead characters at the specified offset from the current read position.
The lookahead offset can be negative.
</summary>
</member>
<member name="M:Antlr.Runtime.ANTLRStringStream.Index">
<summary>
Return the current input symbol index 0..n where n indicates the
last symbol has been read. The index is the index of char to
be returned from LA(1).
</summary>
</member>
<member name="M:Antlr.Runtime.ANTLRStringStream.Size">
<summary>
Returns the size of the stream
</summary>
</member>
<member name="M:Antlr.Runtime.ANTLRStringStream.Seek(System.Int32)">
<summary>Seeks to the specified position.</summary>
<remarks>
Consume ahead until p==index; can't just set p=index as we must
update line and charPositionInLine.
</remarks>
</member>
<member name="T:Antlr.Runtime.BitSet">
<summary>
A stripped-down version of org.antlr.misc.BitSet that is just
good enough to handle runtime requirements such as FOLLOW sets
for automatic error recovery.
</summary>
</member>
<member name="M:Antlr.Runtime.BitSet.#ctor">
<summary>Construct a bitset of size one word (64 bits) </summary>
</member>
<member name="M:Antlr.Runtime.BitSet.#ctor(System.UInt64[])">
<summary>Construction from a static array of ulongs </summary>
</member>
<member name="M:Antlr.Runtime.BitSet.#ctor(System.Collections.IList)">
<summary>Construction from a list of integers </summary>
</member>
<member name="M:Antlr.Runtime.BitSet.#ctor(System.Int32)">
<summary>Construct a bitset given the size</summary>
<param name="nbits">The size of the bitset in bits</param>
</member>
<member name="F:Antlr.Runtime.BitSet.MOD_MASK">
<summary> We will often need to do a mod operator (i mod nbits).
Its turns out that, for powers of two, this mod operation is
same as <![CDATA[(i & (nbits-1))]]>. Since mod is slow, we use a precomputed
mod mask to do the mod instead.
</summary>
</member>
<member name="F:Antlr.Runtime.BitSet.bits">
<summary>The actual data bits </summary>
</member>
<member name="M:Antlr.Runtime.BitSet.Or(Antlr.Runtime.BitSet)">
<summary>return "this | a" in a new set </summary>
</member>
<member name="M:Antlr.Runtime.BitSet.Add(System.Int32)">
<summary>Or this element into this set (grow as necessary to accommodate)</summary>
</member>
<member name="M:Antlr.Runtime.BitSet.GrowToInclude(System.Int32)">
<summary> Grows the set to a larger number of bits.</summary>
<param name="bit">element that must fit in set
</param>
</member>
<member name="M:Antlr.Runtime.BitSet.LengthInLongWords">
<summary>return how much space is being used by the bits array not
how many actually have member bits on.
</summary>
</member>
<member name="M:Antlr.Runtime.BitSet.SetSize(System.Int32)">
<summary> Sets the size of a set.</summary>
<param name="nwords">how many words the new set should be
</param>
</member>
<member name="T:Antlr.Runtime.ICharStream">
<summary>A source of characters for an ANTLR lexer </summary>
</member>
<member name="P:Antlr.Runtime.ICharStream.Line">
<summary>
The current line in the character stream (ANTLR tracks the
line information automatically. To support rewinding character
streams, we are able to [re-]set the line.
</summary>
</member>
<member name="P:Antlr.Runtime.ICharStream.CharPositionInLine">
<summary>
The index of the character relative to the beginning of the
line (0..n-1). To support rewinding character streams, we are
able to [re-]set the character position.
</summary>
</member>
<member name="M:Antlr.Runtime.ICharStream.LT(System.Int32)">
<summary>
Get the ith character of lookahead. This is usually the same as
LA(i). This will be used for labels in the generated lexer code.
I'd prefer to return a char here type-wise, but it's probably
better to be 32-bit clean and be consistent with LA.
</summary>
</member>
<member name="M:Antlr.Runtime.ICharStream.Substring(System.Int32,System.Int32)">
<summary>
This primarily a useful interface for action code (just make sure
actions don't use this on streams that don't support it).
For infinite streams, you don't need this.
</summary>
</member>
<member name="T:Antlr.Runtime.CharStreamState">
<summary>
This is the complete state of a stream.
When walking ahead with cyclic DFA 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.
</summary>
</member>
<member name="F:Antlr.Runtime.CharStreamState.p">
<summary>Index into the char stream of next lookahead char </summary>
</member>
<member name="F:Antlr.Runtime.CharStreamState.line">
<summary>What line number is the scanner at before processing buffer[p]? </summary>
</member>
<member name="F:Antlr.Runtime.CharStreamState.charPositionInLine">
<summary>What char position 0..n-1 in line is scanner before processing buffer[p]? </summary>
</member>
<member name="T:Antlr.Runtime.ClassicToken">
<summary>
A Token object like we'd use in ANTLR 2.x; has an actual string created
and associated with this object. These objects are needed for imaginary
tree nodes that have payload objects. We need to create a Token object
that has a string; the tree node will point at this token. CommonToken
has indexes into a char stream and hence cannot be used to introduce
new strings.
</summary>
</member>
<member name="F:Antlr.Runtime.ClassicToken.index">
<summary>What token number is this from 0..n-1 tokens </summary>
</member>
<member name="F:Antlr.Runtime.CommonToken.text">
<summary>We need to be able to change the text once in a while. If
this is non-null, then getText should return this. Note that
start/stop are not affected by changing this.
</summary>
</member>
<member name="F:Antlr.Runtime.CommonToken.index">
<summary>What token number is this from 0..n-1 tokens; < 0 implies invalid index </summary>
</member>
<member name="F:Antlr.Runtime.CommonToken.start">
<summary>The char position into the input buffer where this token starts </summary>
</member>
<member name="F:Antlr.Runtime.CommonToken.stop">
<summary>The char position into the input buffer where this token stops </summary>
</member>
<member name="T:Antlr.Runtime.DFA">
<summary>
A DFA implemented as a set of transition tables.
</summary>
<remarks>
<para>
Any state that has a semantic predicate edge is special; those states are
generated with if-then-else structures in a SpecialStateTransition()
which is generated by cyclicDFA template.
</para>
<para>
There are at most 32767 states (16-bit signed short). Could get away with byte
sometimes but would have to generate different types and the simulation code too.
</para>
<para>
As a point of reference, the Tokens rule DFA for the lexer in the Java grammar
sample has approximately 326 states.
</para>
</remarks>
</member>
<member name="F:Antlr.Runtime.DFA.recognizer">
<summary>
Which recognizer encloses this DFA? Needed to check backtracking
</summary>
</member>
<member name="M:Antlr.Runtime.DFA.Predict(Antlr.Runtime.IIntStream)">
<summary>
From the input stream, predict what alternative will succeed using this
DFA (representing the covering regular approximation to the underlying CFL).
</summary>
<param name="input">Input stream</param>
<returns>Return an alternative number 1..n. Throw an exception upon error.</returns>
</member>
<member name="M:Antlr.Runtime.DFA.Error(Antlr.Runtime.NoViableAltException)">
<summary>
A hook for debugging interface
</summary>
<param name="nvae">
</param>
</member>
<member name="T:Antlr.Runtime.EarlyExitException">
<summary>
The recognizer did not match anything for a (..)+ loop.
</summary>
</member>
<member name="M:Antlr.Runtime.EarlyExitException.#ctor">
<summary>Used for remote debugger deserialization </summary>
</member>
<member name="T:Antlr.Runtime.FailedPredicateException">
<summary>
A semantic predicate failed during validation. Validation of predicates
occurs when normally parsing the alternative just like matching a token.
Disambiguating predicate evaluation occurs when we hoist a predicate into
a prediction decision.
</summary>
</member>
<member name="M:Antlr.Runtime.FailedPredicateException.#ctor">
<summary>Used for remote debugger deserialization </summary>
</member>
<member name="T:Antlr.Runtime.IIntStream">
<summary>
A simple stream of integers. This is useful when all we care about is the char
or token type sequence (such as for interpretation).
</summary>
</member>
<member name="P:Antlr.Runtime.IIntStream.SourceName">
<summary>
Where are you getting symbols from? Normally, implementations will
pass the buck all the way to the lexer who can ask its input stream
for the file name or whatever.
</summary>
</member>
<member name="M:Antlr.Runtime.IIntStream.LA(System.Int32)">
<summary>
Get int at current input pointer + i ahead (where i=1 is next int)
Negative indexes are allowed. LA(-1) is previous token (token just matched).
LA(-i) where i is before first token should yield -1, invalid char or EOF.
</summary>
</member>
<member name="M:Antlr.Runtime.IIntStream.Mark">
<summary>Tell the stream to start buffering if it hasn't already.</summary>
<remarks>
Executing Rewind(Mark()) on a stream should not affect the input position.
The Lexer tracks line/col info as well as input index so its markers are
not pure input indexes. Same for tree node streams. */
</remarks>
<returns>Return a marker that can be passed to
<see cref="M:Antlr.Runtime.IIntStream.Rewind(System.Int32)" /> to return to the current position.
This could be the current input position, a value return from
<see cref="M:Antlr.Runtime.IIntStream.Index" />, or some other marker.</returns>
</member>
<member name="M:Antlr.Runtime.IIntStream.Index">
<summary>
Return the current input symbol index 0..n where n indicates the
last symbol has been read. The index is the symbol about to be
read not the most recently read symbol.
</summary>
</member>
<member name="M:Antlr.Runtime.IIntStream.Rewind(System.Int32)">
<summary>
Resets the stream so that the next call to
<see cref="M:Antlr.Runtime.IIntStream.Index" /> would return marker.
</summary>
<remarks>
The marker will usually be <see cref="M:Antlr.Runtime.IIntStream.Index" /> but
it doesn't have to be. It's just a marker to indicate what
state the stream was in. This is essentially calling
<see cref="M:Antlr.Runtime.IIntStream.Release(System.Int32)" /> and <see cref="M:Antlr.Runtime.IIntStream.Seek(System.Int32)" />.
If there are other markers created after the specified marker,
this routine must unroll them like a stack. Assumes the state the
stream was in when this marker was created.
</remarks>
</member>
<member name="M:Antlr.Runtime.IIntStream.Rewind">
<summary>
Rewind to the input position of the last marker.
</summary>
<remarks>
Used currently only after a cyclic DFA and just before starting
a sem/syn predicate to get the input position back to the start
of the decision. Do not "pop" the marker off the state. Mark(i)
and Rewind(i) should balance still. It is like invoking
Rewind(last marker) but it should not "pop" the marker off.
It's like Seek(last marker's input position).
</remarks>
</member>
<member name="M:Antlr.Runtime.IIntStream.Release(System.Int32)">
<summary>
You may want to commit to a backtrack but don't want to force the
stream to keep bookkeeping objects around for a marker that is
no longer necessary. This will have the same behavior as
<see cref="M:Antlr.Runtime.IIntStream.Rewind(System.Int32)" /> except it releases resources without
the backward seek.
</summary>
<remarks>
This must throw away resources for all markers back to the marker
argument. So if you're nested 5 levels of Mark(), and then Release(2)
you have to release resources for depths 2..5.
</remarks>
</member>
<member name="M:Antlr.Runtime.IIntStream.Seek(System.Int32)">
<summary>
Set the input cursor to the position indicated by index. This is
normally used to seek ahead in the input stream.
</summary>
<remarks>
No buffering is required to do this unless you know your stream
will use seek to move backwards such as when backtracking.
This is different from rewind in its multi-directional requirement
and in that its argument is strictly an input cursor (index).
For char streams, seeking forward must update the stream state such
as line number. For seeking backwards, you will be presumably
backtracking using the
<see cref="M:Antlr.Runtime.IIntStream.Mark" />/<see cref="M:Antlr.Runtime.IIntStream.Rewind(System.Int32)" />
mechanism that restores state and so this method does not need to
update state when seeking backwards.
Currently, this method is only used for efficient backtracking using
memoization, but in the future it may be used for incremental parsing.
The index is 0..n-1. A seek to position i means that LA(1) will return
the ith symbol. So, seeking to 0 means LA(1) will return the first
element in the stream.
</remarks>
</member>
<member name="M:Antlr.Runtime.IIntStream.Size">
<summary>Returns the size of the entire stream.</summary>
<remarks>
Only makes sense for streams that buffer everything up probably,
but might be useful to display the entire stream or for testing.
This value includes a single EOF.
</remarks>
</member>
<member name="M:Antlr.Runtime.MismatchedNotSetException.#ctor">
<summary>Used for remote debugger deserialization </summary>
</member>
<member name="M:Antlr.Runtime.MismatchedRangeException.#ctor">
<summary>
Used for remote debugger deserialization
</summary>
</member>
<member name="M:Antlr.Runtime.MismatchedSetException.#ctor">
<summary>Used for remote debugger deserialization </summary>
</member>
<member name="T:Antlr.Runtime.MismatchedTokenException">
<summary>
A mismatched char or Token or tree node.
</summary>
</member>
<member name="M:Antlr.Runtime.MismatchedTokenException.#ctor">
<summary>
Used for remote debugger deserialization
</summary>
</member>
<member name="M:Antlr.Runtime.NoViableAltException.#ctor">
<summary>Used for remote debugger deserialization</summary>
</member>
<member name="T:Antlr.Runtime.Parser">
<summary>A parser for TokenStreams. Parser grammars result in a subclass
of this.
</summary>
</member>
<member name="P:Antlr.Runtime.Parser.TokenStream">
<summary>Set the token stream and reset the parser </summary>
</member>
<member name="T:Antlr.Runtime.ParserRuleReturnScope">
<summary>
Rules that return more than a single value must return an object
containing all the values. Besides the properties defined in
RuleLabelScope.PredefinedRulePropertiesScope there may be user-defined
return values. This class simply defines the minimum properties that
are always defined and methods to access the others that might be
available depending on output option such as template and tree.
Note text is not an actual property of the return value, it is computed
from start and stop using the input stream's ToString() method. I
could add a ctor to this so that we can pass in and store the input
stream, but I'm not sure we want to do that. It would seem to be undefined
to get the .text property anyway if the rule matches tokens from multiple
input streams.
I do not use getters for fields of objects that are used simply to
group values such as this aggregate.
</summary>
</member>
<member name="P:Antlr.Runtime.ParserRuleReturnScope.Start">
<summary>Return the start token or tree </summary>
</member>
<member name="P:Antlr.Runtime.ParserRuleReturnScope.Stop">
<summary>Return the stop token or tree </summary>
</member>
<member name="T:Antlr.Runtime.RecognitionException">
<summary>The root of the ANTLR exception hierarchy.</summary>
<remarks>
To avoid English-only error messages and to generally make things
as flexible as possible, these exceptions are not created with strings,
but rather the information necessary to generate an error. Then
the various reporting methods in Parser and Lexer can be overridden
to generate a localized error message. For example, MismatchedToken
exceptions are built with the expected token type.
So, don't expect getMessage() to return anything.
You can access the stack trace, which means that you can compute the
complete trace of rules from the start symbol. This gives you considerable
context information with which to generate useful error messages.
ANTLR generates code that throws exceptions upon recognition error and
also generates code to catch these exceptions in each rule. If you
want to quit upon first error, you can turn off the automatic error
handling mechanism using rulecatch action, but you still need to
override methods mismatch and recoverFromMismatchSet.
In general, the recognition exceptions can track where in a grammar a
problem occurred and/or what was the expected input. While the parser
knows its state (such as current input symbol and line info) that
state can change before the exception is reported so current token index
is computed and stored at exception time. From this info, you can
perhaps print an entire line of input not just a single token, for example.
Better to just say the recognizer had a problem and then let the parser
figure out a fancy report.
</remarks>
</member>
<member name="M:Antlr.Runtime.RecognitionException.#ctor">
<summary>Used for remote debugger deserialization </summary>
</member>
<member name="F:Antlr.Runtime.RecognitionException.input">
<summary>What input stream did the error occur in? </summary>
</member>
<member name="F:Antlr.Runtime.RecognitionException.index">
<summary>
What is index of token/char were we looking at when the error occurred?
</summary>
</member>
<member name="F:Antlr.Runtime.RecognitionException.token">
<summary>
The current Token when an error occurred. Since not all streams
can retrieve the ith Token, we have to track the Token object.
</summary>
</member>
<member name="F:Antlr.Runtime.RecognitionException.node">
<summary>[Tree parser] Node with the problem.</summary>
</member>
<member name="F:Antlr.Runtime.RecognitionException.c">
<summary>The current char when an error occurred. For lexers. </summary>
</member>
<member name="F:Antlr.Runtime.RecognitionException.line">
<summary>Track the line at which the error occurred in case this is
generated from a lexer. We need to track this since the
unexpected char doesn't carry the line info.
</summary>
</member>
<member name="F:Antlr.Runtime.RecognitionException.approximateLineInfo">
<summary>
If you are parsing a tree node stream, you will encounter some
imaginary nodes w/o line/col info. We now search backwards looking
for most recent token with line/col info, but notify getErrorHeader()
that info is approximate.
</summary>
</member>
<member name="P:Antlr.Runtime.RecognitionException.Input">
<summary>Returns the input stream in which the error occurred</summary>
</member>
<member name="P:Antlr.Runtime.RecognitionException.Index">
<summary>
Returns the token/char index in the stream when the error occurred
</summary>
</member>
<member name="P:Antlr.Runtime.RecognitionException.Token">
<summary>
Returns the current Token when the error occurred (for parsers
although a tree parser might also set the token)
</summary>
</member>
<member name="P:Antlr.Runtime.RecognitionException.Node">
<summary>
Returns the [tree parser] node where the error occured (for tree parsers).
</summary>
</member>
<member name="P:Antlr.Runtime.RecognitionException.Char">
<summary>
Returns the current char when the error occurred (for lexers)
</summary>
</member>
<member name="P:Antlr.Runtime.RecognitionException.CharPositionInLine">
<summary>
Returns the character position in the line when the error
occurred (for lexers)
</summary>
</member>
<member name="P:Antlr.Runtime.RecognitionException.Line">
<summary>
Returns the line at which the error occurred (for lexers)
</summary>
</member>
<member name="P:Antlr.Runtime.RecognitionException.UnexpectedType">
<summary>
Returns the token type or char of the unexpected input element
</summary>
</member>
<member name="T:Antlr.Runtime.RuleReturnScope">
<summary>
Rules can return start/stop info as well as possible trees and templates
</summary>
</member>
<member name="P:Antlr.Runtime.RuleReturnScope.Start">
<summary>Return the start token or tree </summary>
</member>
<member name="P:Antlr.Runtime.RuleReturnScope.Stop">
<summary>Return the stop token or tree </summary>
</member>
<member name="P:Antlr.Runtime.RuleReturnScope.Tree">
<summary>Has a value potentially if output=AST; </summary>
</member>
<member name="P:Antlr.Runtime.RuleReturnScope.Template">
<summary>
Has a value potentially if output=template;
Don't use StringTemplate type to avoid dependency on ST assembly
</summary>
</member>
<member name="F:Antlr.Runtime.Token.DOWN">
<summary>imaginary tree navigation type; traverse "get child" link </summary>
</member>
<member name="F:Antlr.Runtime.Token.UP">
<summary>imaginary tree navigation type; finish with a child list </summary>
</member>
<member name="F:Antlr.Runtime.Token.DEFAULT_CHANNEL">
<summary>
All tokens go to the parser (unless skip() is called in that rule)
on a particular "channel". The parser tunes to a particular channel
so that whitespace etc... can go to the parser on a "hidden" channel.
</summary>
</member>
<member name="F:Antlr.Runtime.Token.HIDDEN_CHANNEL">
<summary>
Anything on different channel than DEFAULT_CHANNEL is not parsed by parser.
</summary>
</member>
<member name="F:Antlr.Runtime.Token.SKIP_TOKEN">
<summary>
In an action, a lexer rule can set token to this SKIP_TOKEN and ANTLR
will avoid creating a token for this symbol and try to fetch another.
</summary>
</member>
<member name="T:Antlr.Runtime.ITokenSource">
<summary>
A source of tokens must provide a sequence of tokens via NextToken()
and also must reveal it's source of characters; CommonToken's text is
computed from a CharStream; it only store indices into the char stream.
Errors from the lexer are never passed to the parser. Either you want
to keep going or you do not upon token recognition error. If you do not
want to continue lexing then you do not want to continue parsing. Just
throw an exception not under RecognitionException and Java will naturally
toss you all the way out of the recognizers. If you want to continue
lexing then you should not throw an exception to the parser--it has already
requested a token. Keep lexing until you get a valid one. Just report
errors and keep going, looking for a valid token.
</summary>
</member>
<member name="P:Antlr.Runtime.ITokenSource.SourceName">
<summary>
Where are you getting tokens from? normally the implication will simply
ask lexers input stream.
</summary>
</member>
<member name="M:Antlr.Runtime.ITokenSource.NextToken">
<summary>
Returns a Token object from the input stream (usually a CharStream).
Does not fail/return upon lexing error; just keeps chewing on the
characters until it gets a good one; errors are not passed through
to the parser.
</summary>
</member>
<member name="T:Antlr.Runtime.MissingTokenException">
<summary>
We were expecting a token but it's not found. The current token
is actually what we wanted next. Used for tree node errors too.
</summary>
</member>
<member name="M:Antlr.Runtime.MissingTokenException.#ctor">
<summary>
Used for remote debugger deserialization
</summary>
</member>
<member name="T:Antlr.Runtime.CommonErrorNode">
A node representing erroneous token range in token stream</member>
<member name="T:Antlr.Runtime.UnwantedTokenException">
<summary>
An extra token while parsing a TokenStream.
</summary>
</member>
<member name="M:Antlr.Runtime.UnwantedTokenException.#ctor">
<summary>
Used for remote debugger deserialization
</summary>
</member>
<member name="M:Antlr.Runtime.Collections.CollectionUtils.ListToString(System.Collections.IList)">
<summary>
Returns a string representation of this IList.
</summary>
<remarks>
The string representation is a list of the collection's elements in the order
they are returned by its IEnumerator, enclosed in square brackets ("[]").
The separator is a comma followed by a space i.e. ", ".
</remarks>
<param name="coll">Collection whose string representation will be returned</param>
<returns>A string representation of the specified collection or "null"</returns>
</member>
<member name="M:Antlr.Runtime.Collections.CollectionUtils.DictionaryToString(System.Collections.IDictionary)">
<summary>
Returns a string representation of this IDictionary.
</summary>
<remarks>
The string representation is a list of the collection's elements in the order
they are returned by its IEnumerator, enclosed in curly brackets ("{}").
The separator is a comma followed by a space i.e. ", ".
</remarks>
<param name="dict">Dictionary whose string representation will be returned</param>
<returns>A string representation of the specified dictionary or "null"</returns>
</member>
<member name="T:Antlr.Runtime.Collections.HashList">
<summary>
An Hashtable-backed dictionary that enumerates Keys and Values in
insertion order.
</summary>
</member>
<member name="T:Antlr.Runtime.Collections.StackList">
<summary>
Stack abstraction that also supports the IList interface
</summary>
</member>
<member name="M:Antlr.Runtime.Collections.StackList.Push(System.Object)">
<summary>
Adds an element to the top of the stack list.
</summary>
</member>
<member name="M:Antlr.Runtime.Collections.StackList.Pop">
<summary>
Removes the element at the top of the stack list and returns it.
</summary>
<returns>The element at the top of the stack.</returns>
</member>
<member name="M:Antlr.Runtime.Collections.StackList.Peek">
<summary>
Removes the element at the top of the stack list without removing it.
</summary>
<returns>The element at the top of the stack.</returns>
</member>
<member name="T:Antlr.Runtime.Tree.BaseTree">
<summary>
A generic tree implementation with no payload. You must subclass to
actually have any user data. ANTLR v3 uses a list of children approach
instead of the child-sibling approach in v2. A flat tree (a list) is
an empty node whose children represent the list. An empty, but
non-null node is called "nil".
</summary>
</member>
<member name="M:Antlr.Runtime.Tree.BaseTree.#ctor(Antlr.Runtime.Tree.ITree)">
<summary>Create a new node from an existing node does nothing for BaseTree
as there are no fields other than the children list, which cannot
be copied as the children are not considered part of this node.
</summary>
</member>
<member name="P:Antlr.Runtime.Tree.BaseTree.Children">
<summary>
Get the children internal list of children. Manipulating the list
directly is not a supported operation (i.e. you do so at your own risk)
</summary>
</member>
<member name="P:Antlr.Runtime.Tree.BaseTree.ChildIndex">
<summary>BaseTree doesn't track child indexes.</summary>
</member>
<member name="P:Antlr.Runtime.Tree.BaseTree.Parent">
<summary>BaseTree doesn't track parent pointers.</summary>
</member>
<member name="M:Antlr.Runtime.Tree.BaseTree.AddChild(Antlr.Runtime.Tree.ITree)">
<summary>
Add t as child of this node.
</summary>
<remarks>
Warning: if t has no children, but child does and child isNil then
this routine moves children to t via t.children = child.children;
i.e., without copying the array.
</remarks>
<param name="t">
</param>
</member>
<member name="M:Antlr.Runtime.Tree.BaseTree.AddChildren(System.Collections.IList)">
<summary>
Add all elements of kids list as children of this node
</summary>
<param name="kids">
</param>
</member>
<member name="M:Antlr.Runtime.Tree.BaseTree.ReplaceChildren(System.Int32,System.Int32,System.Object)">
<summary>
Delete children from start to stop and replace with t even if t is
a list (nil-root tree).
</summary>
<remarks>
Number of children can increase or decrease.
For huge child lists, inserting children can force walking rest of
children to set their childindex; could be slow.
</remarks>
</member>
<member name="M:Antlr.Runtime.Tree.BaseTree.CreateChildrenList">
<summary>Override in a subclass to change the impl of children list </summary>
</member>
<member name="M:Antlr.Runtime.Tree.BaseTree.FreshenParentAndChildIndexes">
<summary>Set the parent and child index values for all child of t</summary>
</member>
<member name="M:Antlr.Runtime.Tree.BaseTree.ToStringTree">
<summary>
Print out a whole tree not just a node
</summary>
</member>
<member name="M:Antlr.Runtime.Tree.BaseTree.ToString">
<summary>
Force base classes override and say how a node (not a tree)
should look as text
</summary>
</member>
<member name="T:Antlr.Runtime.Tree.BaseTreeAdaptor">
<summary>
A TreeAdaptor that works with any Tree implementation
</summary>
</member>
<member name="F:Antlr.Runtime.Tree.BaseTreeAdaptor.treeToUniqueIDMap">
<summary>A map of tree node to unique IDs.</summary>
</member>
<member name="F:Antlr.Runtime.Tree.BaseTreeAdaptor.uniqueNodeID">
<summary>Next available unique ID.</summary>
</member>
<member name="M:Antlr.Runtime.Tree.BaseTreeAdaptor.ErrorNode(Antlr.Runtime.ITokenStream,Antlr.Runtime.IToken,Antlr.Runtime.IToken,Antlr.Runtime.RecognitionException)">
<summary>
Create tree node that holds the start and stop tokens associated
with an error.
</summary>
<remarks>
<para>If you specify your own kind of tree nodes, you will likely have to
override this method. CommonTree returns Token.INVALID_TOKEN_TYPE
if no token payload but you might have to set token type for diff
node type.</para>
<para>You don't have to subclass CommonErrorNode; you will likely need to
subclass your own tree node class to avoid class cast exception.</para>
</remarks>
</member>
<member name="M:Antlr.Runtime.Tree.BaseTreeAdaptor.DupTree(System.Object,System.Object)">
<summary>
This is generic in the sense that it will work with any kind of
tree (not just the ITree interface). It invokes the adaptor routines
not the tree node routines to do the construction.
</summary>
</member>
<member name="M:Antlr.Runtime.Tree.BaseTreeAdaptor.AddChild(System.Object,System.Object)">
<summary>
Add a child to the tree t. If child is a flat tree (a list), make all
in list children of t.
</summary>
<remarks>
<para>
Warning: if t has no children, but child does and child isNil
then you can decide it is ok to move children to t via
t.children = child.children; i.e., without copying the array.
Just make sure that this is consistent with how the user will build
ASTs.
</para>
</remarks>
</member>
<member name="M:Antlr.Runtime.Tree.BaseTreeAdaptor.BecomeRoot(System.Object,System.Object)">
<summary>
If oldRoot is a nil root, just copy or move the children to newRoot.
If not a nil root, make oldRoot a child of newRoot.
</summary>
<remarks>
old=^(nil a b c), new=r yields ^(r a b c)
old=^(a b c), new=r yields ^(r ^(a b c))
If newRoot is a nil-rooted single child tree, use the single
child as the new root node.
old=^(nil a b c), new=^(nil r) yields ^(r a b c)
old=^(a b c), new=^(nil r) yields ^(r ^(a b c))
If oldRoot was null, it's ok, just return newRoot (even if isNil).
old=null, new=r yields r
old=null, new=^(nil r) yields ^(nil r)
Return newRoot. Throw an exception if newRoot is not a
simple node or nil root with a single child node--it must be a root
node. If newRoot is ^(nil x) return x as newRoot.
Be advised that it's ok for newRoot to point at oldRoot's
children; i.e., you don't have to copy the list. We are
constructing these nodes so we should have this control for
efficiency.
</remarks>
</member>
<member name="M:Antlr.Runtime.Tree.BaseTreeAdaptor.RulePostProcessing(System.Object)">
<summary>Transform ^(nil x) to x and nil to null</summary>
</member>
<member name="M:Antlr.Runtime.Tree.BaseTreeAdaptor.GetUniqueID(System.Object)">
<summary>
For identifying trees. How to identify nodes so we can say "add node
to a prior node"?
</summary>
<remarks>
<para>
System.Runtime.CompilerServices.RuntimeHelpers.GetHashCode() is
not available in .NET 1.0. It is "broken/buggy" in .NET 1.1
(for multi-appdomain scenarios).
</para>
<para>
We are tracking uniqueness of IDs ourselves manually since ANTLR
v3.1 release using hashtables. We will be tracking . Even though
it is expensive, we will create a hashtable with all tree nodes
in it as this is only for debugging.
</para>
</remarks>
</member>
<member name="M:Antlr.Runtime.Tree.BaseTreeAdaptor.CreateToken(System.Int32,System.String)">
<summary>
Tell me how to create a token for use with imaginary token nodes.
For example, there is probably no input symbol associated with imaginary
token DECL, but you need to create it as a payload or whatever for
the DECL node as in ^(DECL type ID).
If you care what the token payload objects' type is, you should
override this method and any other createToken variant.
</summary>
</member>
<member name="M:Antlr.Runtime.Tree.BaseTreeAdaptor.CreateToken(Antlr.Runtime.IToken)">
<summary>
Tell me how to create a token for use with imaginary token nodes.
For example, there is probably no input symbol associated with imaginary
token DECL, but you need to create it as a payload or whatever for
the DECL node as in ^(DECL type ID).
This is a variant of createToken where the new token is derived from
an actual real input token. Typically this is for converting '{'
tokens to BLOCK etc... You'll see
r : lc='{' ID+ '}' -> ^(BLOCK[$lc] ID+) ;
If you care what the token payload objects' type is, you should
override this method and any other createToken variant.
</summary>
</member>
<member name="M:Antlr.Runtime.Tree.BaseTreeAdaptor.GetParent(System.Object)">
<summary>
Who is the parent node of this node; if null, implies node is root.
</summary>
<remarks>
If your node type doesn't handle this, it's ok but the tree rewrites
in tree parsers need this functionality.
</remarks>
</member>
<member name="M:Antlr.Runtime.Tree.BaseTreeAdaptor.GetChildIndex(System.Object)">
<summary>
What index is this node in the child list? Range: 0..n-1
</summary>
<remarks>
If your node type doesn't handle this, it's ok but the tree rewrites
in tree parsers need this functionality.
</remarks>
</member>
<member name="M:Antlr.Runtime.Tree.BaseTreeAdaptor.ReplaceChildren(System.Object,System.Int32,System.Int32,System.Object)">
<summary>
Replace from start to stop child index of parent with t, which might
be a list. Number of children may be different after this call.
</summary>
<remarks>
If parent is null, don't do anything; must be at root of overall tree.
Can't replace whatever points to the parent externally. Do nothing.
</remarks>
</member>
<member name="T:Antlr.Runtime.Tree.CommonTree">
<summary>A tree node that is wrapper for a Token object. </summary>
<remarks>
After 3.0 release while building tree rewrite stuff, it became clear
that computing parent and child index is very difficult and cumbersome.
Better to spend the space in every tree node. If you don't want these
extra fields, it's easy to cut them out in your own BaseTree subclass.
</remarks>