@opra/client 0.8.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) hide show
  1. package/cjs/714.min.cjs +1 -1
  2. package/cjs/antlr4ts.min.cjs +1 -1
  3. package/cjs/main.min.cjs +1 -1
  4. package/cjs/opra-common.min.cjs +1 -1
  5. package/cjs/vendors.min.cjs +1 -1
  6. package/esm/714.min.mjs +1 -1
  7. package/esm/antlr4ts.min.mjs +1 -1
  8. package/esm/main.min.mjs +1 -1
  9. package/esm/opra-common.min.mjs +1 -1
  10. package/esm/vendors.min.mjs +1 -1
  11. package/package.json +23 -15
  12. package/typings/antlr4ts/ANTLRErrorListener.d.ts +43 -0
  13. package/typings/antlr4ts/ANTLRErrorStrategy.d.ts +109 -0
  14. package/typings/antlr4ts/ANTLRInputStream.d.ts +51 -0
  15. package/typings/antlr4ts/BailErrorStrategy.d.ts +48 -0
  16. package/typings/antlr4ts/BufferedTokenStream.d.ts +143 -0
  17. package/typings/antlr4ts/CharStream.d.ts +26 -0
  18. package/typings/antlr4ts/CharStreams.d.ts +54 -0
  19. package/typings/antlr4ts/CodePointBuffer.d.ts +40 -0
  20. package/typings/antlr4ts/CodePointCharStream.d.ts +45 -0
  21. package/typings/antlr4ts/CommonToken.d.ts +116 -0
  22. package/typings/antlr4ts/CommonTokenFactory.d.ts +53 -0
  23. package/typings/antlr4ts/CommonTokenStream.d.ts +52 -0
  24. package/typings/antlr4ts/ConsoleErrorListener.d.ts +29 -0
  25. package/typings/antlr4ts/Decorators.d.ts +8 -0
  26. package/typings/antlr4ts/DefaultErrorStrategy.d.ts +347 -0
  27. package/typings/antlr4ts/Dependents.d.ts +69 -0
  28. package/typings/antlr4ts/DiagnosticErrorListener.d.ts +60 -0
  29. package/typings/antlr4ts/FailedPredicateException.d.ts +21 -0
  30. package/typings/antlr4ts/InputMismatchException.d.ts +14 -0
  31. package/typings/antlr4ts/IntStream.d.ts +197 -0
  32. package/typings/antlr4ts/InterpreterRuleContext.d.ts +33 -0
  33. package/typings/antlr4ts/Lexer.d.ts +141 -0
  34. package/typings/antlr4ts/LexerInterpreter.d.ts +23 -0
  35. package/typings/antlr4ts/LexerNoViableAltException.d.ts +19 -0
  36. package/typings/antlr4ts/ListTokenSource.d.ts +86 -0
  37. package/typings/antlr4ts/NoViableAltException.d.ts +30 -0
  38. package/typings/antlr4ts/Parser.d.ts +372 -0
  39. package/typings/antlr4ts/ParserErrorListener.d.ts +112 -0
  40. package/typings/antlr4ts/ParserInterpreter.d.ts +151 -0
  41. package/typings/antlr4ts/ParserRuleContext.d.ts +169 -0
  42. package/typings/antlr4ts/ProxyErrorListener.d.ts +20 -0
  43. package/typings/antlr4ts/ProxyParserErrorListener.d.ts +21 -0
  44. package/typings/antlr4ts/RecognitionException.d.ts +87 -0
  45. package/typings/antlr4ts/Recognizer.d.ts +101 -0
  46. package/typings/antlr4ts/RuleContext.d.ts +124 -0
  47. package/typings/antlr4ts/RuleContextWithAltNum.d.ts +22 -0
  48. package/typings/antlr4ts/RuleDependency.d.ts +32 -0
  49. package/typings/antlr4ts/RuleVersion.d.ts +11 -0
  50. package/typings/antlr4ts/Token.d.ts +83 -0
  51. package/typings/antlr4ts/TokenFactory.d.ts +23 -0
  52. package/typings/antlr4ts/TokenSource.d.ts +67 -0
  53. package/typings/antlr4ts/TokenStream.d.ts +145 -0
  54. package/typings/antlr4ts/TokenStreamRewriter.d.ts +216 -0
  55. package/typings/antlr4ts/Vocabulary.d.ts +117 -0
  56. package/typings/antlr4ts/VocabularyImpl.d.ts +47 -0
  57. package/typings/antlr4ts/WritableToken.d.ts +13 -0
  58. package/typings/antlr4ts/atn/ATN.d.ts +123 -0
  59. package/typings/antlr4ts/atn/ATNConfig.d.ts +140 -0
  60. package/typings/antlr4ts/atn/ATNConfigSet.d.ts +113 -0
  61. package/typings/antlr4ts/atn/ATNDeserializationOptions.d.ts +26 -0
  62. package/typings/antlr4ts/atn/ATNDeserializer.d.ts +86 -0
  63. package/typings/antlr4ts/atn/ATNSimulator.d.ts +28 -0
  64. package/typings/antlr4ts/atn/ATNState.d.ts +111 -0
  65. package/typings/antlr4ts/atn/ATNStateType.d.ts +19 -0
  66. package/typings/antlr4ts/atn/ATNType.d.ts +19 -0
  67. package/typings/antlr4ts/atn/AbstractPredicateTransition.d.ts +13 -0
  68. package/typings/antlr4ts/atn/ActionTransition.d.ts +17 -0
  69. package/typings/antlr4ts/atn/AmbiguityInfo.d.ts +60 -0
  70. package/typings/antlr4ts/atn/AtomTransition.d.ts +18 -0
  71. package/typings/antlr4ts/atn/BasicBlockStartState.d.ts +13 -0
  72. package/typings/antlr4ts/atn/BasicState.d.ts +13 -0
  73. package/typings/antlr4ts/atn/BlockEndState.d.ts +12 -0
  74. package/typings/antlr4ts/atn/BlockStartState.d.ts +10 -0
  75. package/typings/antlr4ts/atn/CodePointTransitions.d.ts +27 -0
  76. package/typings/antlr4ts/atn/ConflictInfo.d.ts +35 -0
  77. package/typings/antlr4ts/atn/ContextSensitivityInfo.d.ts +39 -0
  78. package/typings/antlr4ts/atn/DecisionEventInfo.d.ts +54 -0
  79. package/typings/antlr4ts/atn/DecisionInfo.d.ts +201 -0
  80. package/typings/antlr4ts/atn/DecisionState.d.ts +10 -0
  81. package/typings/antlr4ts/atn/EpsilonTransition.d.ts +24 -0
  82. package/typings/antlr4ts/atn/ErrorInfo.d.ts +32 -0
  83. package/typings/antlr4ts/atn/InvalidState.d.ts +13 -0
  84. package/typings/antlr4ts/atn/LL1Analyzer.d.ts +98 -0
  85. package/typings/antlr4ts/atn/LexerATNSimulator.d.ts +153 -0
  86. package/typings/antlr4ts/atn/LexerAction.d.ts +47 -0
  87. package/typings/antlr4ts/atn/LexerActionExecutor.d.ts +104 -0
  88. package/typings/antlr4ts/atn/LexerActionType.d.ts +44 -0
  89. package/typings/antlr4ts/atn/LexerChannelAction.d.ts +48 -0
  90. package/typings/antlr4ts/atn/LexerCustomAction.d.ts +73 -0
  91. package/typings/antlr4ts/atn/LexerIndexedCustomAction.d.ts +74 -0
  92. package/typings/antlr4ts/atn/LexerModeAction.d.ts +48 -0
  93. package/typings/antlr4ts/atn/LexerMoreAction.d.ts +47 -0
  94. package/typings/antlr4ts/atn/LexerPopModeAction.d.ts +47 -0
  95. package/typings/antlr4ts/atn/LexerPushModeAction.d.ts +48 -0
  96. package/typings/antlr4ts/atn/LexerSkipAction.d.ts +47 -0
  97. package/typings/antlr4ts/atn/LexerTypeAction.d.ts +47 -0
  98. package/typings/antlr4ts/atn/LookaheadEventInfo.d.ts +37 -0
  99. package/typings/antlr4ts/atn/LoopEndState.d.ts +11 -0
  100. package/typings/antlr4ts/atn/NotSetTransition.d.ts +14 -0
  101. package/typings/antlr4ts/atn/OrderedATNConfigSet.d.ts +23 -0
  102. package/typings/antlr4ts/atn/ParseInfo.d.ts +79 -0
  103. package/typings/antlr4ts/atn/ParserATNSimulator.d.ts +567 -0
  104. package/typings/antlr4ts/atn/PlusBlockStartState.d.ts +16 -0
  105. package/typings/antlr4ts/atn/PlusLoopbackState.d.ts +12 -0
  106. package/typings/antlr4ts/atn/PrecedencePredicateTransition.d.ts +21 -0
  107. package/typings/antlr4ts/atn/PredicateEvalInfo.d.ts +54 -0
  108. package/typings/antlr4ts/atn/PredicateTransition.d.ts +25 -0
  109. package/typings/antlr4ts/atn/PredictionContext.d.ts +89 -0
  110. package/typings/antlr4ts/atn/PredictionContextCache.d.ts +40 -0
  111. package/typings/antlr4ts/atn/PredictionMode.d.ts +89 -0
  112. package/typings/antlr4ts/atn/ProfilingATNSimulator.d.ts +55 -0
  113. package/typings/antlr4ts/atn/RangeTransition.d.ts +17 -0
  114. package/typings/antlr4ts/atn/RuleStartState.d.ts +13 -0
  115. package/typings/antlr4ts/atn/RuleStopState.d.ts +15 -0
  116. package/typings/antlr4ts/atn/RuleTransition.d.ts +22 -0
  117. package/typings/antlr4ts/atn/SemanticContext.d.ts +143 -0
  118. package/typings/antlr4ts/atn/SetTransition.d.ts +17 -0
  119. package/typings/antlr4ts/atn/SimulatorState.d.ts +17 -0
  120. package/typings/antlr4ts/atn/StarBlockStartState.d.ts +10 -0
  121. package/typings/antlr4ts/atn/StarLoopEntryState.d.ts +37 -0
  122. package/typings/antlr4ts/atn/StarLoopbackState.d.ts +11 -0
  123. package/typings/antlr4ts/atn/TokensStartState.d.ts +10 -0
  124. package/typings/antlr4ts/atn/Transition.d.ts +38 -0
  125. package/typings/antlr4ts/atn/TransitionType.d.ts +16 -0
  126. package/typings/antlr4ts/atn/WildcardTransition.d.ts +13 -0
  127. package/typings/antlr4ts/atn/index.d.ts +73 -0
  128. package/typings/antlr4ts/dfa/AcceptStateInfo.d.ts +33 -0
  129. package/typings/antlr4ts/dfa/DFA.d.ts +94 -0
  130. package/typings/antlr4ts/dfa/DFASerializer.d.ts +23 -0
  131. package/typings/antlr4ts/dfa/DFAState.d.ts +95 -0
  132. package/typings/antlr4ts/dfa/LexerDFASerializer.d.ts +10 -0
  133. package/typings/antlr4ts/dfa/index.d.ts +9 -0
  134. package/typings/antlr4ts/index.d.ts +49 -0
  135. package/typings/antlr4ts/misc/Args.d.ts +13 -0
  136. package/typings/antlr4ts/misc/Array2DHashMap.d.ts +20 -0
  137. package/typings/antlr4ts/misc/Array2DHashSet.d.ts +62 -0
  138. package/typings/antlr4ts/misc/ArrayEqualityComparator.d.ts +32 -0
  139. package/typings/antlr4ts/misc/Arrays.d.ts +18 -0
  140. package/typings/antlr4ts/misc/BitSet.d.ts +268 -0
  141. package/typings/antlr4ts/misc/Character.d.ts +7 -0
  142. package/typings/antlr4ts/misc/DefaultEqualityComparator.d.ts +31 -0
  143. package/typings/antlr4ts/misc/EqualityComparator.d.ts +29 -0
  144. package/typings/antlr4ts/misc/IntSet.d.ts +129 -0
  145. package/typings/antlr4ts/misc/IntegerList.d.ts +69 -0
  146. package/typings/antlr4ts/misc/IntegerStack.d.ts +15 -0
  147. package/typings/antlr4ts/misc/InterpreterDataReader.d.ts +39 -0
  148. package/typings/antlr4ts/misc/Interval.d.ts +57 -0
  149. package/typings/antlr4ts/misc/IntervalSet.d.ts +96 -0
  150. package/typings/antlr4ts/misc/MultiMap.d.ts +9 -0
  151. package/typings/antlr4ts/misc/MurmurHash.d.ts +45 -0
  152. package/typings/antlr4ts/misc/ObjectEqualityComparator.d.ts +32 -0
  153. package/typings/antlr4ts/misc/ParseCancellationException.d.ts +18 -0
  154. package/typings/antlr4ts/misc/Stubs.d.ts +31 -0
  155. package/typings/antlr4ts/misc/UUID.d.ts +13 -0
  156. package/typings/antlr4ts/misc/Utils.d.ts +15 -0
  157. package/typings/antlr4ts/misc/index.d.ts +25 -0
  158. package/typings/antlr4ts/tree/AbstractParseTreeVisitor.d.ts +103 -0
  159. package/typings/antlr4ts/tree/ErrorNode.d.ts +17 -0
  160. package/typings/antlr4ts/tree/ParseTree.d.ts +36 -0
  161. package/typings/antlr4ts/tree/ParseTreeListener.d.ts +26 -0
  162. package/typings/antlr4ts/tree/ParseTreeProperty.d.ts +28 -0
  163. package/typings/antlr4ts/tree/ParseTreeVisitor.d.ts +48 -0
  164. package/typings/antlr4ts/tree/ParseTreeWalker.d.ts +35 -0
  165. package/typings/antlr4ts/tree/RuleNode.d.ts +21 -0
  166. package/typings/antlr4ts/tree/SyntaxTree.d.ts +29 -0
  167. package/typings/antlr4ts/tree/TerminalNode.d.ts +27 -0
  168. package/typings/antlr4ts/tree/Tree.d.ts +36 -0
  169. package/typings/antlr4ts/tree/Trees.d.ts +75 -0
  170. package/typings/antlr4ts/tree/index.d.ts +16 -0
  171. package/typings/antlr4ts/tree/pattern/Chunk.d.ts +17 -0
  172. package/typings/antlr4ts/tree/pattern/ParseTreeMatch.d.ts +124 -0
  173. package/typings/antlr4ts/tree/pattern/ParseTreePattern.d.ts +98 -0
  174. package/typings/antlr4ts/tree/pattern/ParseTreePatternMatcher.d.ts +166 -0
  175. package/typings/antlr4ts/tree/pattern/RuleTagToken.d.ts +122 -0
  176. package/typings/antlr4ts/tree/pattern/TagChunk.d.ts +59 -0
  177. package/typings/antlr4ts/tree/pattern/TextChunk.d.ts +35 -0
  178. package/typings/antlr4ts/tree/pattern/TokenTagToken.d.ts +56 -0
  179. package/typings/antlr4ts/tree/pattern/index.d.ts +9 -0
  180. package/typings/antlr4ts/tree/xpath/XPath.d.ts +66 -0
  181. package/typings/antlr4ts/tree/xpath/XPathElement.d.ts +19 -0
  182. package/typings/antlr4ts/tree/xpath/XPathLexer.d.ts +36 -0
  183. package/typings/antlr4ts/tree/xpath/XPathLexerErrorListener.d.ts +10 -0
  184. package/typings/antlr4ts/tree/xpath/XPathRuleAnywhereElement.d.ts +14 -0
  185. package/typings/antlr4ts/tree/xpath/XPathRuleElement.d.ts +11 -0
  186. package/typings/antlr4ts/tree/xpath/XPathTokenAnywhereElement.d.ts +11 -0
  187. package/typings/antlr4ts/tree/xpath/XPathTokenElement.d.ts +11 -0
  188. package/typings/antlr4ts/tree/xpath/XPathWildcardAnywhereElement.d.ts +10 -0
  189. package/typings/antlr4ts/tree/xpath/XPathWildcardElement.d.ts +10 -0
  190. package/typings/antlr4ts/tree/xpath/index.d.ts +14 -0
  191. package/typings/common/filter/antlr/OpraFilterLexer.d.ts +4 -4
  192. package/typings/common/filter/antlr/OpraFilterParser.d.ts +8 -8
  193. package/typings/common/filter/antlr/OpraFilterVisitor.d.ts +1 -1
  194. package/typings/common/filter/error-listener.d.ts +2 -2
  195. package/typings/common/filter/errors.d.ts +2 -2
  196. package/typings/common/filter/filter-tree-visitor.d.ts +1 -1
  197. package/typings/common/filter/parse.d.ts +1 -1
  198. package/umd/714.min.cjs +1 -1
  199. package/umd/antlr4ts.min.cjs +1 -1
  200. package/umd/main.min.cjs +1 -1
  201. package/umd/opra-common.min.cjs +1 -1
  202. package/umd/vendors.min.cjs +1 -1
@@ -0,0 +1,268 @@
1
+ /*!
2
+ * Copyright 2016 The ANTLR Project. All rights reserved.
3
+ * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
4
+ */
5
+ export declare class BitSet implements Iterable<number> {
6
+ private data;
7
+ /**
8
+ * Creates a new bit set. All bits are initially `false`.
9
+ */
10
+ constructor();
11
+ /**
12
+ * Creates a bit set whose initial size is large enough to explicitly represent bits with indices in the range `0`
13
+ * through `nbits-1`. All bits are initially `false`.
14
+ */
15
+ constructor(nbits: number);
16
+ /**
17
+ * Creates a bit set from a iterable list of numbers (including another BitSet);
18
+ */
19
+ constructor(numbers: Iterable<number>);
20
+ /**
21
+ * Performs a logical **AND** of this target bit set with the argument bit set. This bit set is modified so that
22
+ * each bit in it has the value `true` if and only if it both initially had the value `true` and the corresponding
23
+ * bit in the bit set argument also had the value `true`.
24
+ */
25
+ and(set: BitSet): void;
26
+ /**
27
+ * Clears all of the bits in this `BitSet` whose corresponding bit is set in the specified `BitSet`.
28
+ */
29
+ andNot(set: BitSet): void;
30
+ /**
31
+ * Returns the number of bits set to `true` in this `BitSet`.
32
+ */
33
+ cardinality(): number;
34
+ /**
35
+ * Sets all of the bits in this `BitSet` to `false`.
36
+ */
37
+ clear(): void;
38
+ /**
39
+ * Sets the bit specified by the index to `false`.
40
+ *
41
+ * @param bitIndex the index of the bit to be cleared
42
+ *
43
+ * @throws RangeError if the specified index is negative
44
+ */
45
+ clear(bitIndex: number): void;
46
+ /**
47
+ * Sets the bits from the specified `fromIndex` (inclusive) to the specified `toIndex` (exclusive) to `false`.
48
+ *
49
+ * @param fromIndex index of the first bit to be cleared
50
+ * @param toIndex index after the last bit to be cleared
51
+ *
52
+ * @throws RangeError if `fromIndex` is negative, or `toIndex` is negative, or `fromIndex` is larger than `toIndex`
53
+ */
54
+ clear(fromIndex: number, toIndex: number): void;
55
+ /**
56
+ * Sets the bit at the specified index to the complement of its current value.
57
+ *
58
+ * @param bitIndex the index of the bit to flip
59
+ *
60
+ * @throws RangeError if the specified index is negative
61
+ */
62
+ flip(bitIndex: number): void;
63
+ /**
64
+ * Sets each bit from the specified `fromIndex` (inclusive) to the specified `toIndex` (exclusive) to the complement
65
+ * of its current value.
66
+ *
67
+ * @param fromIndex index of the first bit to flip
68
+ * @param toIndex index after the last bit to flip
69
+ *
70
+ * @throws RangeError if `fromIndex` is negative, or `toIndex` is negative, or `fromIndex` is larger than `toIndex`
71
+ */
72
+ flip(fromIndex: number, toIndex: number): void;
73
+ /**
74
+ * Returns the value of the bit with the specified index. The value is `true` if the bit with the index `bitIndex`
75
+ * is currently set in this `BitSet`; otherwise, the result is `false`.
76
+ *
77
+ * @param bitIndex the bit index
78
+ *
79
+ * @throws RangeError if the specified index is negative
80
+ */
81
+ get(bitIndex: number): boolean;
82
+ /**
83
+ * Returns a new `BitSet` composed of bits from this `BitSet` from `fromIndex` (inclusive) to `toIndex` (exclusive).
84
+ *
85
+ * @param fromIndex index of the first bit to include
86
+ * @param toIndex index after the last bit to include
87
+ *
88
+ * @throws RangeError if `fromIndex` is negative, or `toIndex` is negative, or `fromIndex` is larger than `toIndex`
89
+ */
90
+ get(fromIndex: number, toIndex: number): BitSet;
91
+ /**
92
+ * Returns true if the specified `BitSet` has any bits set to `true` that are also set to `true` in this `BitSet`.
93
+ *
94
+ * @param set `BitSet` to intersect with
95
+ */
96
+ intersects(set: BitSet): boolean;
97
+ /**
98
+ * Returns true if this `BitSet` contains no bits that are set to `true`.
99
+ */
100
+ get isEmpty(): boolean;
101
+ /**
102
+ * Returns the "logical size" of this `BitSet`: the index of the highest set bit in the `BitSet` plus one. Returns
103
+ * zero if the `BitSet` contains no set bits.
104
+ */
105
+ length(): number;
106
+ /**
107
+ * Returns the index of the first bit that is set to `false` that occurs on or after the specified starting index,
108
+ * If no such bit exists then `-1` is returned.
109
+ *
110
+ * @param fromIndex the index to start checking from (inclusive)
111
+ *
112
+ * @throws RangeError if the specified index is negative
113
+ */
114
+ nextClearBit(fromIndex: number): number;
115
+ /**
116
+ * Returns the index of the first bit that is set to `true` that occurs on or after the specified starting index.
117
+ * If no such bit exists then `-1` is returned.
118
+ *
119
+ * To iterate over the `true` bits in a `BitSet`, use the following loop:
120
+ *
121
+ * ```
122
+ * for (let i = bs.nextSetBit(0); i >= 0; i = bs.nextSetBit(i + 1)) {
123
+ * // operate on index i here
124
+ * }
125
+ * ```
126
+ *
127
+ * @param fromIndex the index to start checking from (inclusive)
128
+ *
129
+ * @throws RangeError if the specified index is negative
130
+ */
131
+ nextSetBit(fromIndex: number): number;
132
+ /**
133
+ * Performs a logical **OR** of this bit set with the bit set argument. This bit set is modified so that a bit in it
134
+ * has the value `true` if and only if it either already had the value `true` or the corresponding bit in the bit
135
+ * set argument has the value `true`.
136
+ */
137
+ or(set: BitSet): void;
138
+ /**
139
+ * Returns the index of the nearest bit that is set to `false` that occurs on or before the specified starting
140
+ * index. If no such bit exists, or if `-1` is given as the starting index, then `-1` is returned.
141
+ *
142
+ * @param fromIndex the index to start checking from (inclusive)
143
+ *
144
+ * @throws RangeError if the specified index is less than `-1`
145
+ */
146
+ previousClearBit(fromIndex: number): number;
147
+ /**
148
+ * Returns the index of the nearest bit that is set to `true` that occurs on or before the specified starting index.
149
+ * If no such bit exists, or if `-1` is given as the starting index, then `-1` is returned.
150
+ *
151
+ * To iterate over the `true` bits in a `BitSet`, use the following loop:
152
+ *
153
+ * ```
154
+ * for (let i = bs.length(); (i = bs.previousSetBit(i-1)) >= 0; ) {
155
+ * // operate on index i here
156
+ * }
157
+ * ```
158
+ *
159
+ * @param fromIndex the index to start checking from (inclusive)
160
+ *
161
+ * @throws RangeError if the specified index is less than `-1`
162
+ */
163
+ previousSetBit(fromIndex: number): number;
164
+ /**
165
+ * Sets the bit at the specified index to `true`.
166
+ *
167
+ * @param bitIndex a bit index
168
+ *
169
+ * @throws RangeError if the specified index is negative
170
+ */
171
+ set(bitIndex: number): void;
172
+ /**
173
+ * Sets the bit at the specified index to the specified value.
174
+ *
175
+ * @param bitIndex a bit index
176
+ * @param value a boolean value to set
177
+ *
178
+ * @throws RangeError if the specified index is negative
179
+ */
180
+ set(bitIndex: number, value: boolean): void;
181
+ /**
182
+ * Sets the bits from the specified `fromIndex` (inclusive) to the specified `toIndex` (exclusive) to `true`.
183
+ *
184
+ * @param fromIndex index of the first bit to be set
185
+ * @param toIndex index after the last bit to be set
186
+ *
187
+ * @throws RangeError if `fromIndex` is negative, or `toIndex` is negative, or `fromIndex` is larger than `toIndex`
188
+ */
189
+ set(fromIndex: number, toIndex: number): void;
190
+ /**
191
+ * Sets the bits from the specified `fromIndex` (inclusive) to the specified `toIndex` (exclusive) to the specified
192
+ * value.
193
+ *
194
+ * @param fromIndex index of the first bit to be set
195
+ * @param toIndex index after the last bit to be set
196
+ * @param value value to set the selected bits to
197
+ *
198
+ * @throws RangeError if `fromIndex` is negative, or `toIndex` is negative, or `fromIndex` is larger than `toIndex`
199
+ */
200
+ set(fromIndex: number, toIndex: number, value: boolean): void;
201
+ private _setBits;
202
+ /**
203
+ * Returns the number of bits of space actually in use by this `BitSet` to represent bit values. The maximum element
204
+ * in the set is the size - 1st element.
205
+ */
206
+ get size(): number;
207
+ /**
208
+ * Returns a new byte array containing all the bits in this bit set.
209
+ *
210
+ * More precisely, if
211
+ * `let bytes = s.toByteArray();`
212
+ * then `bytes.length === (s.length()+7)/8` and `s.get(n) === ((bytes[n/8] & (1<<(n%8))) != 0)` for all
213
+ * `n < 8 * bytes.length`.
214
+ */
215
+ /**
216
+ * Returns a new integer array containing all the bits in this bit set.
217
+ *
218
+ * More precisely, if
219
+ * `let integers = s.toIntegerArray();`
220
+ * then `integers.length === (s.length()+31)/32` and `s.get(n) === ((integers[n/32] & (1<<(n%32))) != 0)` for all
221
+ * `n < 32 * integers.length`.
222
+ */
223
+ hashCode(): number;
224
+ /**
225
+ * Compares this object against the specified object. The result is `true` if and only if the argument is not
226
+ * `undefined` and is a `Bitset` object that has exactly the same set of bits set to `true` as this bit set. That
227
+ * is, for every nonnegative index `k`,
228
+ *
229
+ * ```
230
+ * ((BitSet)obj).get(k) == this.get(k)
231
+ * ```
232
+ *
233
+ * must be true. The current sizes of the two bit sets are not compared.
234
+ */
235
+ equals(obj: any): boolean;
236
+ /**
237
+ * Returns a string representation of this bit set. For every index for which this `BitSet` contains a bit in the
238
+ * set state, the decimal representation of that index is included in the result. Such indices are listed in order
239
+ * from lowest to highest, separated by ", " (a comma and a space) and surrounded by braces, resulting in the usual
240
+ * mathematical notation for a set of integers.
241
+ *
242
+ * Example:
243
+ *
244
+ * BitSet drPepper = new BitSet();
245
+ *
246
+ * Now `drPepper.toString()` returns `"{}"`.
247
+ *
248
+ * drPepper.set(2);
249
+ *
250
+ * Now `drPepper.toString()` returns `"{2}"`.
251
+ *
252
+ * drPepper.set(4);
253
+ * drPepper.set(10);
254
+ *
255
+ * Now `drPepper.toString()` returns `"{2, 4, 10}"`.
256
+ */
257
+ toString(): string;
258
+ /**
259
+ * Performs a logical **XOR** of this bit set with the bit set argument. This bit set is modified so that a bit in
260
+ * it has the value `true` if and only if one of the following statements holds:
261
+ *
262
+ * * The bit initially has the value `true`, and the corresponding bit in the argument has the value `false`.
263
+ * * The bit initially has the value `false`, and the corresponding bit in the argument has the value `true`.
264
+ */
265
+ xor(set: BitSet): void;
266
+ clone(): BitSet;
267
+ [Symbol.iterator](): IterableIterator<number>;
268
+ }
@@ -0,0 +1,7 @@
1
+ /*!
2
+ * Copyright 2016 The ANTLR Project. All rights reserved.
3
+ * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
4
+ */
5
+ export declare function isHighSurrogate(ch: number): boolean;
6
+ export declare function isLowSurrogate(ch: number): boolean;
7
+ export declare function isSupplementaryCodePoint(ch: number): boolean;
@@ -0,0 +1,31 @@
1
+ /*!
2
+ * Copyright 2016 The ANTLR Project. All rights reserved.
3
+ * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
4
+ */
5
+ import { EqualityComparator } from "./EqualityComparator";
6
+ /**
7
+ * This default implementation of {@link EqualityComparator} uses object equality
8
+ * for comparisons by calling {@link Object#hashCode} and {@link Object#equals}.
9
+ *
10
+ * @author Sam Harwell
11
+ */
12
+ export declare class DefaultEqualityComparator implements EqualityComparator<any> {
13
+ static readonly INSTANCE: DefaultEqualityComparator;
14
+ /**
15
+ * {@inheritDoc}
16
+ *
17
+ * This implementation returns
18
+ * `obj.`{@link Object#hashCode hashCode()}.
19
+ */
20
+ hashCode(obj: any): number;
21
+ /**
22
+ * {@inheritDoc}
23
+ *
24
+ * This implementation relies on object equality. If both objects are
25
+ * `undefined` or `null`, this method returns `true`. Otherwise if only
26
+ * `a` is `undefined` or `null`, this method returns `false`. Otherwise,
27
+ * this method returns the result of
28
+ * `a.`{@link Object#equals equals}`(b)`.
29
+ */
30
+ equals(a: any, b: any): boolean;
31
+ }
@@ -0,0 +1,29 @@
1
+ /*!
2
+ * Copyright 2016 The ANTLR Project. All rights reserved.
3
+ * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
4
+ */
5
+ /**
6
+ * This interface provides an abstract concept of object equality independent of
7
+ * {@link Object#equals} (object equality) and the `==` operator
8
+ * (reference equality). It can be used to provide algorithm-specific unordered
9
+ * comparisons without requiring changes to the object itself.
10
+ *
11
+ * @author Sam Harwell
12
+ */
13
+ export interface EqualityComparator<T> {
14
+ /**
15
+ * This method returns a hash code for the specified object.
16
+ *
17
+ * @param obj The object.
18
+ * @returns The hash code for `obj`.
19
+ */
20
+ hashCode(obj: T): number;
21
+ /**
22
+ * This method tests if two objects are equal.
23
+ *
24
+ * @param a The first object to compare.
25
+ * @param b The second object to compare.
26
+ * @returns `true` if `a` equals `b`, otherwise `false`.
27
+ */
28
+ equals(a: T, b: T): boolean;
29
+ }
@@ -0,0 +1,129 @@
1
+ /*!
2
+ * Copyright 2016 The ANTLR Project. All rights reserved.
3
+ * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
4
+ */
5
+ /**
6
+ * A generic set of integers.
7
+ *
8
+ * @see IntervalSet
9
+ */
10
+ export interface IntSet {
11
+ /**
12
+ * Adds the specified value to the current set.
13
+ *
14
+ * @param el the value to add
15
+ *
16
+ * @exception IllegalStateException if the current set is read-only
17
+ */
18
+ add(el: number): void;
19
+ /**
20
+ * Modify the current {@link IntSet} object to contain all elements that are
21
+ * present in itself, the specified `set`, or both.
22
+ *
23
+ * @param set The set to add to the current set. An `undefined` argument is
24
+ * treated as though it were an empty set.
25
+ * @returns `this` (to support chained calls)
26
+ *
27
+ * @exception IllegalStateException if the current set is read-only
28
+ */
29
+ addAll(/*@Nullable*/ set: IntSet): IntSet;
30
+ /**
31
+ * Return a new {@link IntSet} object containing all elements that are
32
+ * present in both the current set and the specified set `a`.
33
+ *
34
+ * @param a The set to intersect with the current set.
35
+ * @returns A new {@link IntSet} instance containing the intersection of the
36
+ * current set and `a`.
37
+ */
38
+ and(a: IntSet): IntSet;
39
+ /**
40
+ * Return a new {@link IntSet} object containing all elements that are
41
+ * present in `elements` but not present in the current set. The
42
+ * following expressions are equivalent for input non-`undefined` {@link IntSet}
43
+ * instances `x` and `y`.
44
+ *
45
+ * * `x.complement(y)`
46
+ * * `y.subtract(x)`
47
+ *
48
+ * @param elements The set to compare with the current set.
49
+ * @returns A new {@link IntSet} instance containing the elements present in
50
+ * `elements` but not present in the current set.
51
+ */
52
+ complement(elements: IntSet): IntSet;
53
+ /**
54
+ * Return a new {@link IntSet} object containing all elements that are
55
+ * present in the current set, the specified set `a`, or both.
56
+ *
57
+ * This method is similar to {@link #addAll(IntSet)}, but returns a new
58
+ * {@link IntSet} instance instead of modifying the current set.
59
+ *
60
+ * @param a The set to union with the current set. An `undefined` argument
61
+ * is treated as though it were an empty set.
62
+ * @returns A new {@link IntSet} instance containing the union of the current
63
+ * set and `a`. The value `undefined` may be returned in place of an
64
+ * empty result set.
65
+ */
66
+ or(/*@Nullable*/ a: IntSet): IntSet;
67
+ /**
68
+ * Return a new {@link IntSet} object containing all elements that are
69
+ * present in the current set but not present in the input set `a`.
70
+ * The following expressions are equivalent for input non-`undefined`
71
+ * {@link IntSet} instances `x` and `y`.
72
+ *
73
+ * * `y.subtract(x)`
74
+ * * `x.complement(y)`
75
+ *
76
+ * @param a The set to compare with the current set. A `undefined`
77
+ * argument is treated as though it were an empty set.
78
+ * @returns A new {@link IntSet} instance containing the elements present in
79
+ * `elements` but not present in the current set. The value
80
+ * `undefined` may be returned in place of an empty result set.
81
+ */
82
+ subtract(/*@Nullable*/ a: IntSet): IntSet;
83
+ /**
84
+ * Return the total number of elements represented by the current set.
85
+ *
86
+ * @returns the total number of elements represented by the current set,
87
+ * regardless of the manner in which the elements are stored.
88
+ */
89
+ readonly size: number;
90
+ /**
91
+ * Returns `true` if this set contains no elements.
92
+ *
93
+ * @returns `true` if the current set contains no elements; otherwise,
94
+ * `false`.
95
+ */
96
+ readonly isNil: boolean;
97
+ /**
98
+ * {@inheritDoc}
99
+ */
100
+ equals(obj: any): boolean;
101
+ /**
102
+ * Returns `true` if the set contains the specified element.
103
+ *
104
+ * @param el The element to check for.
105
+ * @returns `true` if the set contains `el`; otherwise `false`.
106
+ */
107
+ contains(el: number): boolean;
108
+ /**
109
+ * Removes the specified value from the current set. If the current set does
110
+ * not contain the element, no changes are made.
111
+ *
112
+ * @param el the value to remove
113
+ *
114
+ * @exception IllegalStateException if the current set is read-only
115
+ */
116
+ remove(el: number): void;
117
+ /**
118
+ * Return an array containing the elements represented by the current set. The
119
+ * array is returned in ascending numerical order.
120
+ *
121
+ * @returns An array containing all element present in the current set, sorted
122
+ * in ascending numerical order.
123
+ */
124
+ toArray(): number[];
125
+ /**
126
+ * {@inheritDoc}
127
+ */
128
+ toString(): string;
129
+ }
@@ -0,0 +1,69 @@
1
+ /*!
2
+ * Copyright 2016 The ANTLR Project. All rights reserved.
3
+ * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
4
+ */
5
+ import { JavaCollection } from "./Stubs";
6
+ /**
7
+ *
8
+ * @author Sam Harwell
9
+ */
10
+ export declare class IntegerList {
11
+ private _data;
12
+ private _size;
13
+ constructor(arg?: number | IntegerList | Iterable<number>);
14
+ add(value: number): void;
15
+ addAll(list: number[] | IntegerList | JavaCollection<number>): void;
16
+ get(index: number): number;
17
+ contains(value: number): boolean;
18
+ set(index: number, value: number): number;
19
+ removeAt(index: number): number;
20
+ removeRange(fromIndex: number, toIndex: number): void;
21
+ get isEmpty(): boolean;
22
+ get size(): number;
23
+ trimToSize(): void;
24
+ clear(): void;
25
+ toArray(): number[];
26
+ sort(): void;
27
+ /**
28
+ * Compares the specified object with this list for equality. Returns
29
+ * `true` if and only if the specified object is also an {@link IntegerList},
30
+ * both lists have the same size, and all corresponding pairs of elements in
31
+ * the two lists are equal. In other words, two lists are defined to be
32
+ * equal if they contain the same elements in the same order.
33
+ *
34
+ * This implementation first checks if the specified object is this
35
+ * list. If so, it returns `true`; if not, it checks if the
36
+ * specified object is an {@link IntegerList}. If not, it returns `false`;
37
+ * if so, it checks the size of both lists. If the lists are not the same size,
38
+ * it returns `false`; otherwise it iterates over both lists, comparing
39
+ * corresponding pairs of elements. If any comparison returns `false`,
40
+ * this method returns `false`.
41
+ *
42
+ * @param o the object to be compared for equality with this list
43
+ * @returns `true` if the specified object is equal to this list
44
+ */
45
+ equals(o: any): boolean;
46
+ /**
47
+ * Returns the hash code value for this list.
48
+ *
49
+ * This implementation uses exactly the code that is used to define the
50
+ * list hash function in the documentation for the {@link List#hashCode}
51
+ * method.
52
+ *
53
+ * @returns the hash code value for this list
54
+ */
55
+ hashCode(): number;
56
+ /**
57
+ * Returns a string representation of this list.
58
+ */
59
+ toString(): string;
60
+ binarySearch(key: number, fromIndex?: number, toIndex?: number): number;
61
+ private ensureCapacity;
62
+ /** Convert the list to a UTF-16 encoded char array. If all values are less
63
+ * than the 0xFFFF 16-bit code point limit then this is just a char array
64
+ * of 16-bit char as usual. For values in the supplementary range, encode
65
+ * them as two UTF-16 code units.
66
+ */
67
+ toCharArray(): Uint16Array;
68
+ private charArraySize;
69
+ }
@@ -0,0 +1,15 @@
1
+ /*!
2
+ * Copyright 2016 The ANTLR Project. All rights reserved.
3
+ * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
4
+ */
5
+ import { IntegerList } from "./IntegerList";
6
+ /**
7
+ *
8
+ * @author Sam Harwell
9
+ */
10
+ export declare class IntegerStack extends IntegerList {
11
+ constructor(arg?: number | IntegerStack);
12
+ push(value: number): void;
13
+ pop(): number;
14
+ peek(): number;
15
+ }
@@ -0,0 +1,39 @@
1
+ /*!
2
+ * Copyright 2016 The ANTLR Project. All rights reserved.
3
+ * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
4
+ */
5
+ import { ATN } from "../atn/ATN";
6
+ import { Vocabulary } from "../Vocabulary";
7
+ export declare namespace InterpreterDataReader {
8
+ /**
9
+ * The structure of the data file is very simple. Everything is line based with empty lines
10
+ * separating the different parts. For lexers the layout is:
11
+ * token literal names:
12
+ * ...
13
+ *
14
+ * token symbolic names:
15
+ * ...
16
+ *
17
+ * rule names:
18
+ * ...
19
+ *
20
+ * channel names:
21
+ * ...
22
+ *
23
+ * mode names:
24
+ * ...
25
+ *
26
+ * atn:
27
+ * <a single line with comma separated int values> enclosed in a pair of squared brackets.
28
+ *
29
+ * Data for a parser does not contain channel and mode names.
30
+ */
31
+ function parseFile(fileName: string): Promise<InterpreterDataReader.InterpreterData>;
32
+ class InterpreterData {
33
+ atn?: ATN;
34
+ vocabulary: Vocabulary;
35
+ ruleNames: string[];
36
+ channels?: string[];
37
+ modes?: string[];
38
+ }
39
+ }
@@ -0,0 +1,57 @@
1
+ /*!
2
+ * Copyright 2016 The ANTLR Project. All rights reserved.
3
+ * Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
4
+ */
5
+ import { Equatable } from "./Stubs";
6
+ /** An immutable inclusive interval a..b */
7
+ export declare class Interval implements Equatable {
8
+ a: number;
9
+ b: number;
10
+ private static _INVALID;
11
+ static get INVALID(): Interval;
12
+ private static readonly cache;
13
+ /**
14
+ * @param a The start of the interval
15
+ * @param b The end of the interval (inclusive)
16
+ */
17
+ constructor(a: number, b: number);
18
+ /** Interval objects are used readonly so share all with the
19
+ * same single value a==b up to some max size. Use an array as a perfect hash.
20
+ * Return shared object for 0..INTERVAL_POOL_MAX_VALUE or a new
21
+ * Interval object with a..a in it. On Java.g4, 218623 IntervalSets
22
+ * have a..a (set with 1 element).
23
+ */
24
+ static of(a: number, b: number): Interval;
25
+ /** return number of elements between a and b inclusively. x..x is length 1.
26
+ * if b &lt; a, then length is 0. 9..10 has length 2.
27
+ */
28
+ get length(): number;
29
+ equals(o: any): boolean;
30
+ hashCode(): number;
31
+ /** Does this start completely before other? Disjoint */
32
+ startsBeforeDisjoint(other: Interval): boolean;
33
+ /** Does this start at or before other? Nondisjoint */
34
+ startsBeforeNonDisjoint(other: Interval): boolean;
35
+ /** Does this.a start after other.b? May or may not be disjoint */
36
+ startsAfter(other: Interval): boolean;
37
+ /** Does this start completely after other? Disjoint */
38
+ startsAfterDisjoint(other: Interval): boolean;
39
+ /** Does this start after other? NonDisjoint */
40
+ startsAfterNonDisjoint(other: Interval): boolean;
41
+ /** Are both ranges disjoint? I.e., no overlap? */
42
+ disjoint(other: Interval): boolean;
43
+ /** Are two intervals adjacent such as 0..41 and 42..42? */
44
+ adjacent(other: Interval): boolean;
45
+ properlyContains(other: Interval): boolean;
46
+ /** Return the interval computed from combining this and other */
47
+ union(other: Interval): Interval;
48
+ /** Return the interval in common between this and o */
49
+ intersection(other: Interval): Interval;
50
+ /** Return the interval with elements from `this` not in `other`;
51
+ * `other` must not be totally enclosed (properly contained)
52
+ * within `this`, which would result in two disjoint intervals
53
+ * instead of the single one returned by this method.
54
+ */
55
+ differenceNotProperlyContained(other: Interval): Interval | undefined;
56
+ toString(): string;
57
+ }