openpinescript 0.1.1__py3-none-any.whl

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 (332) hide show
  1. openpinescript/__init__.py +129 -0
  2. openpinescript/__main__.py +5 -0
  3. openpinescript/_cli.py +24 -0
  4. openpinescript/_engine/LICENSE +674 -0
  5. openpinescript/_engine/VERSION +1 -0
  6. openpinescript/_engine/dist/cli.mjs +108691 -0
  7. openpinescript/_engine/node_modules/antlr4ng/LICENSE.txt +29 -0
  8. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATN.cjs +3159 -0
  9. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATN.js +3159 -0
  10. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATN.mjs +3139 -0
  11. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNConfig.cjs +911 -0
  12. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNConfig.js +911 -0
  13. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNConfig.mjs +891 -0
  14. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNConfigSet.cjs +3781 -0
  15. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNConfigSet.js +3781 -0
  16. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNConfigSet.mjs +3761 -0
  17. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNDeserializationOptions.cjs +17 -0
  18. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNDeserializationOptions.js +17 -0
  19. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNDeserializationOptions.mjs +0 -0
  20. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNDeserializer.cjs +4300 -0
  21. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNDeserializer.js +4300 -0
  22. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNDeserializer.mjs +4280 -0
  23. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNSerializer.cjs +4798 -0
  24. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNSerializer.js +4798 -0
  25. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNSerializer.mjs +4778 -0
  26. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNSimulator.cjs +982 -0
  27. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNSimulator.js +982 -0
  28. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNSimulator.mjs +962 -0
  29. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNState.cjs +85 -0
  30. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNState.js +85 -0
  31. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ATNState.mjs +67 -0
  32. openpinescript/_engine/node_modules/antlr4ng/dist/atn/AbstractPredicateTransition.cjs +78 -0
  33. openpinescript/_engine/node_modules/antlr4ng/dist/atn/AbstractPredicateTransition.js +78 -0
  34. openpinescript/_engine/node_modules/antlr4ng/dist/atn/AbstractPredicateTransition.mjs +58 -0
  35. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ActionTransition.cjs +96 -0
  36. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ActionTransition.js +96 -0
  37. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ActionTransition.mjs +76 -0
  38. openpinescript/_engine/node_modules/antlr4ng/dist/atn/AmbiguityInfo.cjs +17 -0
  39. openpinescript/_engine/node_modules/antlr4ng/dist/atn/AmbiguityInfo.js +17 -0
  40. openpinescript/_engine/node_modules/antlr4ng/dist/atn/AmbiguityInfo.mjs +0 -0
  41. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ArrayPredictionContext.cjs +243 -0
  42. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ArrayPredictionContext.js +243 -0
  43. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ArrayPredictionContext.mjs +223 -0
  44. openpinescript/_engine/node_modules/antlr4ng/dist/atn/AtomTransition.cjs +904 -0
  45. openpinescript/_engine/node_modules/antlr4ng/dist/atn/AtomTransition.js +904 -0
  46. openpinescript/_engine/node_modules/antlr4ng/dist/atn/AtomTransition.mjs +884 -0
  47. openpinescript/_engine/node_modules/antlr4ng/dist/atn/BasicBlockStartState.cjs +112 -0
  48. openpinescript/_engine/node_modules/antlr4ng/dist/atn/BasicBlockStartState.js +112 -0
  49. openpinescript/_engine/node_modules/antlr4ng/dist/atn/BasicBlockStartState.mjs +92 -0
  50. openpinescript/_engine/node_modules/antlr4ng/dist/atn/BasicState.cjs +95 -0
  51. openpinescript/_engine/node_modules/antlr4ng/dist/atn/BasicState.js +95 -0
  52. openpinescript/_engine/node_modules/antlr4ng/dist/atn/BasicState.mjs +75 -0
  53. openpinescript/_engine/node_modules/antlr4ng/dist/atn/BlockEndState.cjs +96 -0
  54. openpinescript/_engine/node_modules/antlr4ng/dist/atn/BlockEndState.js +96 -0
  55. openpinescript/_engine/node_modules/antlr4ng/dist/atn/BlockEndState.mjs +76 -0
  56. openpinescript/_engine/node_modules/antlr4ng/dist/atn/BlockStartState.cjs +104 -0
  57. openpinescript/_engine/node_modules/antlr4ng/dist/atn/BlockStartState.js +104 -0
  58. openpinescript/_engine/node_modules/antlr4ng/dist/atn/BlockStartState.mjs +84 -0
  59. openpinescript/_engine/node_modules/antlr4ng/dist/atn/CodePointTransitions.cjs +947 -0
  60. openpinescript/_engine/node_modules/antlr4ng/dist/atn/CodePointTransitions.js +947 -0
  61. openpinescript/_engine/node_modules/antlr4ng/dist/atn/CodePointTransitions.mjs +927 -0
  62. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ContextSensitivityInfo.cjs +17 -0
  63. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ContextSensitivityInfo.js +17 -0
  64. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ContextSensitivityInfo.mjs +0 -0
  65. openpinescript/_engine/node_modules/antlr4ng/dist/atn/DecisionEventInfo.cjs +17 -0
  66. openpinescript/_engine/node_modules/antlr4ng/dist/atn/DecisionEventInfo.js +17 -0
  67. openpinescript/_engine/node_modules/antlr4ng/dist/atn/DecisionEventInfo.mjs +0 -0
  68. openpinescript/_engine/node_modules/antlr4ng/dist/atn/DecisionInfo.cjs +206 -0
  69. openpinescript/_engine/node_modules/antlr4ng/dist/atn/DecisionInfo.js +206 -0
  70. openpinescript/_engine/node_modules/antlr4ng/dist/atn/DecisionInfo.mjs +188 -0
  71. openpinescript/_engine/node_modules/antlr4ng/dist/atn/DecisionState.cjs +96 -0
  72. openpinescript/_engine/node_modules/antlr4ng/dist/atn/DecisionState.js +96 -0
  73. openpinescript/_engine/node_modules/antlr4ng/dist/atn/DecisionState.mjs +76 -0
  74. openpinescript/_engine/node_modules/antlr4ng/dist/atn/EmptyPredictionContext.cjs +237 -0
  75. openpinescript/_engine/node_modules/antlr4ng/dist/atn/EmptyPredictionContext.js +237 -0
  76. openpinescript/_engine/node_modules/antlr4ng/dist/atn/EmptyPredictionContext.mjs +217 -0
  77. openpinescript/_engine/node_modules/antlr4ng/dist/atn/EpsilonTransition.cjs +103 -0
  78. openpinescript/_engine/node_modules/antlr4ng/dist/atn/EpsilonTransition.js +103 -0
  79. openpinescript/_engine/node_modules/antlr4ng/dist/atn/EpsilonTransition.mjs +83 -0
  80. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LL1Analyzer.cjs +3159 -0
  81. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LL1Analyzer.js +3159 -0
  82. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LL1Analyzer.mjs +3139 -0
  83. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerATNConfig.cjs +961 -0
  84. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerATNConfig.js +961 -0
  85. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerATNConfig.mjs +941 -0
  86. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerATNSimulator.cjs +5604 -0
  87. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerATNSimulator.js +5604 -0
  88. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerATNSimulator.mjs +5584 -0
  89. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerAction.cjs +17 -0
  90. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerAction.js +17 -0
  91. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerAction.mjs +0 -0
  92. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerActionExecutor.cjs +305 -0
  93. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerActionExecutor.js +305 -0
  94. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerActionExecutor.mjs +285 -0
  95. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerActionType.cjs +42 -0
  96. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerActionType.js +42 -0
  97. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerActionType.mjs +22 -0
  98. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerChannelAction.cjs +163 -0
  99. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerChannelAction.js +163 -0
  100. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerChannelAction.mjs +143 -0
  101. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerCustomAction.cjs +169 -0
  102. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerCustomAction.js +169 -0
  103. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerCustomAction.mjs +149 -0
  104. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerIndexedCustomAction.cjs +142 -0
  105. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerIndexedCustomAction.js +142 -0
  106. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerIndexedCustomAction.mjs +122 -0
  107. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerModeAction.cjs +163 -0
  108. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerModeAction.js +163 -0
  109. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerModeAction.mjs +143 -0
  110. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerMoreAction.cjs +73 -0
  111. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerMoreAction.js +73 -0
  112. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerMoreAction.mjs +53 -0
  113. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerPopModeAction.cjs +73 -0
  114. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerPopModeAction.js +73 -0
  115. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerPopModeAction.mjs +53 -0
  116. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerPushModeAction.cjs +163 -0
  117. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerPushModeAction.js +163 -0
  118. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerPushModeAction.mjs +143 -0
  119. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerSkipAction.cjs +71 -0
  120. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerSkipAction.js +71 -0
  121. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerSkipAction.mjs +51 -0
  122. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerTypeAction.cjs +159 -0
  123. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerTypeAction.js +159 -0
  124. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LexerTypeAction.mjs +139 -0
  125. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LookaheadEventInfo.cjs +17 -0
  126. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LookaheadEventInfo.js +17 -0
  127. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LookaheadEventInfo.mjs +0 -0
  128. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LoopEndState.cjs +96 -0
  129. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LoopEndState.js +96 -0
  130. openpinescript/_engine/node_modules/antlr4ng/dist/atn/LoopEndState.mjs +76 -0
  131. openpinescript/_engine/node_modules/antlr4ng/dist/atn/NotSetTransition.cjs +921 -0
  132. openpinescript/_engine/node_modules/antlr4ng/dist/atn/NotSetTransition.js +921 -0
  133. openpinescript/_engine/node_modules/antlr4ng/dist/atn/NotSetTransition.mjs +901 -0
  134. openpinescript/_engine/node_modules/antlr4ng/dist/atn/OrderedATNConfigSet.cjs +3824 -0
  135. openpinescript/_engine/node_modules/antlr4ng/dist/atn/OrderedATNConfigSet.js +3824 -0
  136. openpinescript/_engine/node_modules/antlr4ng/dist/atn/OrderedATNConfigSet.mjs +3804 -0
  137. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ParseInfo.cjs +156 -0
  138. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ParseInfo.js +156 -0
  139. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ParseInfo.mjs +138 -0
  140. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ParserATNSimulator.cjs +6082 -0
  141. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ParserATNSimulator.js +6082 -0
  142. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ParserATNSimulator.mjs +6062 -0
  143. openpinescript/_engine/node_modules/antlr4ng/dist/atn/PlusBlockStartState.cjs +113 -0
  144. openpinescript/_engine/node_modules/antlr4ng/dist/atn/PlusBlockStartState.js +113 -0
  145. openpinescript/_engine/node_modules/antlr4ng/dist/atn/PlusBlockStartState.mjs +93 -0
  146. openpinescript/_engine/node_modules/antlr4ng/dist/atn/PlusLoopbackState.cjs +104 -0
  147. openpinescript/_engine/node_modules/antlr4ng/dist/atn/PlusLoopbackState.js +104 -0
  148. openpinescript/_engine/node_modules/antlr4ng/dist/atn/PlusLoopbackState.mjs +84 -0
  149. openpinescript/_engine/node_modules/antlr4ng/dist/atn/PrecedencePredicateTransition.cjs +887 -0
  150. openpinescript/_engine/node_modules/antlr4ng/dist/atn/PrecedencePredicateTransition.js +887 -0
  151. openpinescript/_engine/node_modules/antlr4ng/dist/atn/PrecedencePredicateTransition.mjs +867 -0
  152. openpinescript/_engine/node_modules/antlr4ng/dist/atn/PredicateEvalInfo.cjs +17 -0
  153. openpinescript/_engine/node_modules/antlr4ng/dist/atn/PredicateEvalInfo.js +17 -0
  154. openpinescript/_engine/node_modules/antlr4ng/dist/atn/PredicateEvalInfo.mjs +0 -0
  155. openpinescript/_engine/node_modules/antlr4ng/dist/atn/PredicateTransition.cjs +892 -0
  156. openpinescript/_engine/node_modules/antlr4ng/dist/atn/PredicateTransition.js +892 -0
  157. openpinescript/_engine/node_modules/antlr4ng/dist/atn/PredicateTransition.mjs +872 -0
  158. openpinescript/_engine/node_modules/antlr4ng/dist/atn/PredictionContext.cjs +153 -0
  159. openpinescript/_engine/node_modules/antlr4ng/dist/atn/PredictionContext.js +153 -0
  160. openpinescript/_engine/node_modules/antlr4ng/dist/atn/PredictionContext.mjs +133 -0
  161. openpinescript/_engine/node_modules/antlr4ng/dist/atn/PredictionContextCache.cjs +715 -0
  162. openpinescript/_engine/node_modules/antlr4ng/dist/atn/PredictionContextCache.js +715 -0
  163. openpinescript/_engine/node_modules/antlr4ng/dist/atn/PredictionContextCache.mjs +695 -0
  164. openpinescript/_engine/node_modules/antlr4ng/dist/atn/PredictionContextUtils.cjs +3604 -0
  165. openpinescript/_engine/node_modules/antlr4ng/dist/atn/PredictionContextUtils.js +3604 -0
  166. openpinescript/_engine/node_modules/antlr4ng/dist/atn/PredictionContextUtils.mjs +3584 -0
  167. openpinescript/_engine/node_modules/antlr4ng/dist/atn/PredictionMode.cjs +4284 -0
  168. openpinescript/_engine/node_modules/antlr4ng/dist/atn/PredictionMode.js +4284 -0
  169. openpinescript/_engine/node_modules/antlr4ng/dist/atn/PredictionMode.mjs +4264 -0
  170. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ProfilingATNSimulator.cjs +6467 -0
  171. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ProfilingATNSimulator.js +6467 -0
  172. openpinescript/_engine/node_modules/antlr4ng/dist/atn/ProfilingATNSimulator.mjs +6447 -0
  173. openpinescript/_engine/node_modules/antlr4ng/dist/atn/RangeTransition.cjs +905 -0
  174. openpinescript/_engine/node_modules/antlr4ng/dist/atn/RangeTransition.js +905 -0
  175. openpinescript/_engine/node_modules/antlr4ng/dist/atn/RangeTransition.mjs +885 -0
  176. openpinescript/_engine/node_modules/antlr4ng/dist/atn/RuleStartState.cjs +97 -0
  177. openpinescript/_engine/node_modules/antlr4ng/dist/atn/RuleStartState.js +97 -0
  178. openpinescript/_engine/node_modules/antlr4ng/dist/atn/RuleStartState.mjs +77 -0
  179. openpinescript/_engine/node_modules/antlr4ng/dist/atn/RuleStopState.cjs +95 -0
  180. openpinescript/_engine/node_modules/antlr4ng/dist/atn/RuleStopState.js +95 -0
  181. openpinescript/_engine/node_modules/antlr4ng/dist/atn/RuleStopState.mjs +75 -0
  182. openpinescript/_engine/node_modules/antlr4ng/dist/atn/RuleTransition.cjs +93 -0
  183. openpinescript/_engine/node_modules/antlr4ng/dist/atn/RuleTransition.js +93 -0
  184. openpinescript/_engine/node_modules/antlr4ng/dist/atn/RuleTransition.mjs +73 -0
  185. openpinescript/_engine/node_modules/antlr4ng/dist/atn/SemanticContext.cjs +807 -0
  186. openpinescript/_engine/node_modules/antlr4ng/dist/atn/SemanticContext.js +807 -0
  187. openpinescript/_engine/node_modules/antlr4ng/dist/atn/SemanticContext.mjs +787 -0
  188. openpinescript/_engine/node_modules/antlr4ng/dist/atn/SetTransition.cjs +905 -0
  189. openpinescript/_engine/node_modules/antlr4ng/dist/atn/SetTransition.js +905 -0
  190. openpinescript/_engine/node_modules/antlr4ng/dist/atn/SetTransition.mjs +885 -0
  191. openpinescript/_engine/node_modules/antlr4ng/dist/atn/SingletonPredictionContext.cjs +207 -0
  192. openpinescript/_engine/node_modules/antlr4ng/dist/atn/SingletonPredictionContext.js +207 -0
  193. openpinescript/_engine/node_modules/antlr4ng/dist/atn/SingletonPredictionContext.mjs +187 -0
  194. openpinescript/_engine/node_modules/antlr4ng/dist/atn/StarBlockStartState.cjs +112 -0
  195. openpinescript/_engine/node_modules/antlr4ng/dist/atn/StarBlockStartState.js +112 -0
  196. openpinescript/_engine/node_modules/antlr4ng/dist/atn/StarBlockStartState.mjs +92 -0
  197. openpinescript/_engine/node_modules/antlr4ng/dist/atn/StarLoopEntryState.cjs +117 -0
  198. openpinescript/_engine/node_modules/antlr4ng/dist/atn/StarLoopEntryState.js +117 -0
  199. openpinescript/_engine/node_modules/antlr4ng/dist/atn/StarLoopEntryState.mjs +97 -0
  200. openpinescript/_engine/node_modules/antlr4ng/dist/atn/StarLoopbackState.cjs +95 -0
  201. openpinescript/_engine/node_modules/antlr4ng/dist/atn/StarLoopbackState.js +95 -0
  202. openpinescript/_engine/node_modules/antlr4ng/dist/atn/StarLoopbackState.mjs +75 -0
  203. openpinescript/_engine/node_modules/antlr4ng/dist/atn/TokensStartState.cjs +104 -0
  204. openpinescript/_engine/node_modules/antlr4ng/dist/atn/TokensStartState.js +104 -0
  205. openpinescript/_engine/node_modules/antlr4ng/dist/atn/TokensStartState.mjs +84 -0
  206. openpinescript/_engine/node_modules/antlr4ng/dist/atn/Transition.cjs +66 -0
  207. openpinescript/_engine/node_modules/antlr4ng/dist/atn/Transition.js +66 -0
  208. openpinescript/_engine/node_modules/antlr4ng/dist/atn/Transition.mjs +48 -0
  209. openpinescript/_engine/node_modules/antlr4ng/dist/atn/WildcardTransition.cjs +84 -0
  210. openpinescript/_engine/node_modules/antlr4ng/dist/atn/WildcardTransition.js +84 -0
  211. openpinescript/_engine/node_modules/antlr4ng/dist/atn/WildcardTransition.mjs +64 -0
  212. openpinescript/_engine/node_modules/antlr4ng/dist/atn/helpers.cjs +246 -0
  213. openpinescript/_engine/node_modules/antlr4ng/dist/atn/helpers.js +246 -0
  214. openpinescript/_engine/node_modules/antlr4ng/dist/atn/helpers.mjs +226 -0
  215. openpinescript/_engine/node_modules/antlr4ng/dist/atn/index.cjs +9485 -0
  216. openpinescript/_engine/node_modules/antlr4ng/dist/atn/index.js +9485 -0
  217. openpinescript/_engine/node_modules/antlr4ng/dist/atn/index.mjs +9465 -0
  218. openpinescript/_engine/node_modules/antlr4ng/dist/dfa/DFA.cjs +559 -0
  219. openpinescript/_engine/node_modules/antlr4ng/dist/dfa/DFA.js +559 -0
  220. openpinescript/_engine/node_modules/antlr4ng/dist/dfa/DFA.mjs +539 -0
  221. openpinescript/_engine/node_modules/antlr4ng/dist/dfa/DFASerializer.cjs +76 -0
  222. openpinescript/_engine/node_modules/antlr4ng/dist/dfa/DFASerializer.js +76 -0
  223. openpinescript/_engine/node_modules/antlr4ng/dist/dfa/DFASerializer.mjs +58 -0
  224. openpinescript/_engine/node_modules/antlr4ng/dist/dfa/DFAState.cjs +136 -0
  225. openpinescript/_engine/node_modules/antlr4ng/dist/dfa/DFAState.js +136 -0
  226. openpinescript/_engine/node_modules/antlr4ng/dist/dfa/DFAState.mjs +116 -0
  227. openpinescript/_engine/node_modules/antlr4ng/dist/dfa/DFAStateEqualityComparator.cjs +150 -0
  228. openpinescript/_engine/node_modules/antlr4ng/dist/dfa/DFAStateEqualityComparator.js +150 -0
  229. openpinescript/_engine/node_modules/antlr4ng/dist/dfa/DFAStateEqualityComparator.mjs +130 -0
  230. openpinescript/_engine/node_modules/antlr4ng/dist/dfa/LexerDFASerializer.cjs +237 -0
  231. openpinescript/_engine/node_modules/antlr4ng/dist/dfa/LexerDFASerializer.js +237 -0
  232. openpinescript/_engine/node_modules/antlr4ng/dist/dfa/LexerDFASerializer.mjs +217 -0
  233. openpinescript/_engine/node_modules/antlr4ng/dist/dfa/PredPrediction.cjs +31 -0
  234. openpinescript/_engine/node_modules/antlr4ng/dist/dfa/PredPrediction.js +31 -0
  235. openpinescript/_engine/node_modules/antlr4ng/dist/dfa/PredPrediction.mjs +13 -0
  236. openpinescript/_engine/node_modules/antlr4ng/dist/dfa/index.cjs +571 -0
  237. openpinescript/_engine/node_modules/antlr4ng/dist/dfa/index.js +571 -0
  238. openpinescript/_engine/node_modules/antlr4ng/dist/dfa/index.mjs +551 -0
  239. openpinescript/_engine/node_modules/antlr4ng/dist/index.cjs +17501 -0
  240. openpinescript/_engine/node_modules/antlr4ng/dist/index.mjs +17481 -0
  241. openpinescript/_engine/node_modules/antlr4ng/dist/misc/BitSet.cjs +208 -0
  242. openpinescript/_engine/node_modules/antlr4ng/dist/misc/BitSet.js +208 -0
  243. openpinescript/_engine/node_modules/antlr4ng/dist/misc/BitSet.mjs +190 -0
  244. openpinescript/_engine/node_modules/antlr4ng/dist/misc/DefaultEqualityComparator.cjs +68 -0
  245. openpinescript/_engine/node_modules/antlr4ng/dist/misc/DefaultEqualityComparator.js +68 -0
  246. openpinescript/_engine/node_modules/antlr4ng/dist/misc/DefaultEqualityComparator.mjs +48 -0
  247. openpinescript/_engine/node_modules/antlr4ng/dist/misc/EqualityComparator.cjs +17 -0
  248. openpinescript/_engine/node_modules/antlr4ng/dist/misc/EqualityComparator.js +17 -0
  249. openpinescript/_engine/node_modules/antlr4ng/dist/misc/EqualityComparator.mjs +0 -0
  250. openpinescript/_engine/node_modules/antlr4ng/dist/misc/HashMap.cjs +545 -0
  251. openpinescript/_engine/node_modules/antlr4ng/dist/misc/HashMap.js +545 -0
  252. openpinescript/_engine/node_modules/antlr4ng/dist/misc/HashMap.mjs +525 -0
  253. openpinescript/_engine/node_modules/antlr4ng/dist/misc/HashSet.cjs +438 -0
  254. openpinescript/_engine/node_modules/antlr4ng/dist/misc/HashSet.js +438 -0
  255. openpinescript/_engine/node_modules/antlr4ng/dist/misc/HashSet.mjs +418 -0
  256. openpinescript/_engine/node_modules/antlr4ng/dist/misc/InterpreterDataReader.cjs +4420 -0
  257. openpinescript/_engine/node_modules/antlr4ng/dist/misc/InterpreterDataReader.js +4420 -0
  258. openpinescript/_engine/node_modules/antlr4ng/dist/misc/InterpreterDataReader.mjs +4400 -0
  259. openpinescript/_engine/node_modules/antlr4ng/dist/misc/Interval.cjs +133 -0
  260. openpinescript/_engine/node_modules/antlr4ng/dist/misc/Interval.js +133 -0
  261. openpinescript/_engine/node_modules/antlr4ng/dist/misc/Interval.mjs +115 -0
  262. openpinescript/_engine/node_modules/antlr4ng/dist/misc/IntervalSet.cjs +834 -0
  263. openpinescript/_engine/node_modules/antlr4ng/dist/misc/IntervalSet.js +834 -0
  264. openpinescript/_engine/node_modules/antlr4ng/dist/misc/IntervalSet.mjs +814 -0
  265. openpinescript/_engine/node_modules/antlr4ng/dist/misc/MapKeyEqualityOperator.cjs +40 -0
  266. openpinescript/_engine/node_modules/antlr4ng/dist/misc/MapKeyEqualityOperator.js +40 -0
  267. openpinescript/_engine/node_modules/antlr4ng/dist/misc/MapKeyEqualityOperator.mjs +22 -0
  268. openpinescript/_engine/node_modules/antlr4ng/dist/misc/MultiMap.cjs +55 -0
  269. openpinescript/_engine/node_modules/antlr4ng/dist/misc/MultiMap.js +55 -0
  270. openpinescript/_engine/node_modules/antlr4ng/dist/misc/MultiMap.mjs +37 -0
  271. openpinescript/_engine/node_modules/antlr4ng/dist/misc/ObjectEqualityComparator.cjs +43 -0
  272. openpinescript/_engine/node_modules/antlr4ng/dist/misc/ObjectEqualityComparator.js +43 -0
  273. openpinescript/_engine/node_modules/antlr4ng/dist/misc/ObjectEqualityComparator.mjs +25 -0
  274. openpinescript/_engine/node_modules/antlr4ng/dist/misc/OrderedHashMap.cjs +610 -0
  275. openpinescript/_engine/node_modules/antlr4ng/dist/misc/OrderedHashMap.js +610 -0
  276. openpinescript/_engine/node_modules/antlr4ng/dist/misc/OrderedHashMap.mjs +590 -0
  277. openpinescript/_engine/node_modules/antlr4ng/dist/misc/OrderedHashSet.cjs +470 -0
  278. openpinescript/_engine/node_modules/antlr4ng/dist/misc/OrderedHashSet.js +470 -0
  279. openpinescript/_engine/node_modules/antlr4ng/dist/misc/OrderedHashSet.mjs +450 -0
  280. openpinescript/_engine/node_modules/antlr4ng/dist/misc/ParseCancellationException.cjs +34 -0
  281. openpinescript/_engine/node_modules/antlr4ng/dist/misc/ParseCancellationException.js +34 -0
  282. openpinescript/_engine/node_modules/antlr4ng/dist/misc/ParseCancellationException.mjs +16 -0
  283. openpinescript/_engine/node_modules/antlr4ng/dist/misc/index.cjs +4643 -0
  284. openpinescript/_engine/node_modules/antlr4ng/dist/misc/index.js +4643 -0
  285. openpinescript/_engine/node_modules/antlr4ng/dist/misc/index.mjs +4623 -0
  286. openpinescript/_engine/node_modules/antlr4ng/dist/tree/AbstractParseTreeVisitor.cjs +63 -0
  287. openpinescript/_engine/node_modules/antlr4ng/dist/tree/AbstractParseTreeVisitor.js +63 -0
  288. openpinescript/_engine/node_modules/antlr4ng/dist/tree/AbstractParseTreeVisitor.mjs +45 -0
  289. openpinescript/_engine/node_modules/antlr4ng/dist/tree/ErrorNode.cjs +211 -0
  290. openpinescript/_engine/node_modules/antlr4ng/dist/tree/ErrorNode.js +211 -0
  291. openpinescript/_engine/node_modules/antlr4ng/dist/tree/ErrorNode.mjs +191 -0
  292. openpinescript/_engine/node_modules/antlr4ng/dist/tree/ParseTree.cjs +17 -0
  293. openpinescript/_engine/node_modules/antlr4ng/dist/tree/ParseTree.js +17 -0
  294. openpinescript/_engine/node_modules/antlr4ng/dist/tree/ParseTree.mjs +0 -0
  295. openpinescript/_engine/node_modules/antlr4ng/dist/tree/ParseTreeListener.cjs +17 -0
  296. openpinescript/_engine/node_modules/antlr4ng/dist/tree/ParseTreeListener.js +17 -0
  297. openpinescript/_engine/node_modules/antlr4ng/dist/tree/ParseTreeListener.mjs +0 -0
  298. openpinescript/_engine/node_modules/antlr4ng/dist/tree/ParseTreeVisitor.cjs +17 -0
  299. openpinescript/_engine/node_modules/antlr4ng/dist/tree/ParseTreeVisitor.js +17 -0
  300. openpinescript/_engine/node_modules/antlr4ng/dist/tree/ParseTreeVisitor.mjs +0 -0
  301. openpinescript/_engine/node_modules/antlr4ng/dist/tree/ParseTreeWalker.cjs +267 -0
  302. openpinescript/_engine/node_modules/antlr4ng/dist/tree/ParseTreeWalker.js +267 -0
  303. openpinescript/_engine/node_modules/antlr4ng/dist/tree/ParseTreeWalker.mjs +247 -0
  304. openpinescript/_engine/node_modules/antlr4ng/dist/tree/TerminalNode.cjs +201 -0
  305. openpinescript/_engine/node_modules/antlr4ng/dist/tree/TerminalNode.js +201 -0
  306. openpinescript/_engine/node_modules/antlr4ng/dist/tree/TerminalNode.mjs +181 -0
  307. openpinescript/_engine/node_modules/antlr4ng/dist/tree/Trees.cjs +3159 -0
  308. openpinescript/_engine/node_modules/antlr4ng/dist/tree/Trees.js +3159 -0
  309. openpinescript/_engine/node_modules/antlr4ng/dist/tree/Trees.mjs +3139 -0
  310. openpinescript/_engine/node_modules/antlr4ng/dist/tree/index.cjs +16018 -0
  311. openpinescript/_engine/node_modules/antlr4ng/dist/tree/index.js +16018 -0
  312. openpinescript/_engine/node_modules/antlr4ng/dist/tree/index.mjs +15998 -0
  313. openpinescript/_engine/node_modules/antlr4ng/dist/utils/DoubleDict.cjs +568 -0
  314. openpinescript/_engine/node_modules/antlr4ng/dist/utils/DoubleDict.js +568 -0
  315. openpinescript/_engine/node_modules/antlr4ng/dist/utils/DoubleDict.mjs +548 -0
  316. openpinescript/_engine/node_modules/antlr4ng/dist/utils/MurmurHash.cjs +98 -0
  317. openpinescript/_engine/node_modules/antlr4ng/dist/utils/MurmurHash.js +98 -0
  318. openpinescript/_engine/node_modules/antlr4ng/dist/utils/MurmurHash.mjs +80 -0
  319. openpinescript/_engine/node_modules/antlr4ng/dist/utils/helpers.cjs +78 -0
  320. openpinescript/_engine/node_modules/antlr4ng/dist/utils/helpers.js +78 -0
  321. openpinescript/_engine/node_modules/antlr4ng/dist/utils/helpers.mjs +60 -0
  322. openpinescript/_engine/node_modules/antlr4ng/dist/utils/index.cjs +625 -0
  323. openpinescript/_engine/node_modules/antlr4ng/dist/utils/index.js +625 -0
  324. openpinescript/_engine/node_modules/antlr4ng/dist/utils/index.mjs +605 -0
  325. openpinescript/_engine/node_modules/antlr4ng/package.json +72 -0
  326. openpinescript/_engine/package.json +94 -0
  327. openpinescript/_runtime.py +29 -0
  328. openpinescript-0.1.1.dist-info/METADATA +140 -0
  329. openpinescript-0.1.1.dist-info/RECORD +332 -0
  330. openpinescript-0.1.1.dist-info/WHEEL +4 -0
  331. openpinescript-0.1.1.dist-info/entry_points.txt +2 -0
  332. openpinescript-0.1.1.dist-info/licenses/LICENSE +674 -0
@@ -0,0 +1,941 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+
4
+ // src/utils/MurmurHash.ts
5
+ var c1 = 3432918353;
6
+ var c2 = 461845907;
7
+ var r1 = 15;
8
+ var r2 = 13;
9
+ var m = 5;
10
+ var n = 3864292196;
11
+ var MurmurHash = class _MurmurHash {
12
+ static {
13
+ __name(this, "MurmurHash");
14
+ }
15
+ static defaultSeed = 701;
16
+ constructor() {
17
+ }
18
+ /**
19
+ * Initialize the hash using the specified {@code seed}.
20
+ *
21
+ * @param seed the seed
22
+ *
23
+ * @returns the intermediate hash value
24
+ */
25
+ static initialize(seed = _MurmurHash.defaultSeed) {
26
+ return seed;
27
+ }
28
+ static updateFromComparable(hash, value) {
29
+ return this.update(hash, value?.hashCode() ?? 0);
30
+ }
31
+ /**
32
+ * Update the intermediate hash value for the next input {@code value}.
33
+ *
34
+ * @param hash The intermediate hash value.
35
+ * @param value the value to add to the current hash.
36
+ *
37
+ * @returns the updated intermediate hash value
38
+ */
39
+ static update(hash, value) {
40
+ value = Math.imul(value, c1);
41
+ value = value << r1 | value >>> 32 - r1;
42
+ value = Math.imul(value, c2);
43
+ hash = hash ^ value;
44
+ hash = hash << r2 | hash >>> 32 - r2;
45
+ hash = Math.imul(hash, m) + n;
46
+ return hash;
47
+ }
48
+ /**
49
+ * Apply the final computation steps to the intermediate value {@code hash}
50
+ * to form the final result of the MurmurHash 3 hash function.
51
+ *
52
+ * @param hash The intermediate hash value.
53
+ * @param entryCount The number of values added to the hash.
54
+ *
55
+ * @returns the final hash result
56
+ */
57
+ static finish(hash, entryCount) {
58
+ hash ^= entryCount * 4;
59
+ hash ^= hash >>> 16;
60
+ hash = Math.imul(hash, 2246822507);
61
+ hash ^= hash >>> 13;
62
+ hash = Math.imul(hash, 3266489909);
63
+ hash ^= hash >>> 16;
64
+ return hash;
65
+ }
66
+ /**
67
+ * An all-in-one convenience method to compute a hash for a single value.
68
+ *
69
+ * @param value The value to hash.
70
+ * @param seed The seed for the hash value.
71
+ *
72
+ * @returns The computed hash.
73
+ */
74
+ static hashCode(value, seed) {
75
+ return _MurmurHash.finish(_MurmurHash.update(seed ?? _MurmurHash.defaultSeed, value), 1);
76
+ }
77
+ };
78
+
79
+ // src/misc/ObjectEqualityComparator.ts
80
+ var ObjectEqualityComparator = class _ObjectEqualityComparator {
81
+ static {
82
+ __name(this, "ObjectEqualityComparator");
83
+ }
84
+ static instance = new _ObjectEqualityComparator();
85
+ hashCode(obj) {
86
+ if (obj == null) {
87
+ return 0;
88
+ }
89
+ return obj.hashCode();
90
+ }
91
+ equals(a, b) {
92
+ if (a == null) {
93
+ return b == null;
94
+ }
95
+ return a.equals(b);
96
+ }
97
+ };
98
+
99
+ // src/misc/DefaultEqualityComparator.ts
100
+ var DefaultEqualityComparator = class _DefaultEqualityComparator {
101
+ static {
102
+ __name(this, "DefaultEqualityComparator");
103
+ }
104
+ static instance = new _DefaultEqualityComparator();
105
+ hashCode(obj) {
106
+ if (obj == null) {
107
+ return 0;
108
+ }
109
+ return ObjectEqualityComparator.instance.hashCode(obj);
110
+ }
111
+ equals(a, b) {
112
+ if (a == null) {
113
+ return b == null;
114
+ }
115
+ if (typeof a === "string" || typeof a === "number") {
116
+ return a === b;
117
+ }
118
+ return ObjectEqualityComparator.instance.equals(a, b);
119
+ }
120
+ };
121
+
122
+ // src/misc/HashSet.ts
123
+ var HashSet = class _HashSet {
124
+ static {
125
+ __name(this, "HashSet");
126
+ }
127
+ static defaultLoadFactor = 0.75;
128
+ static initialCapacity = 16;
129
+ // must be power of 2
130
+ comparator;
131
+ buckets;
132
+ threshold;
133
+ /** How many elements in set */
134
+ itemCount = 0;
135
+ constructor(comparatorOrSet, initialCapacity = _HashSet.initialCapacity) {
136
+ if (comparatorOrSet instanceof _HashSet) {
137
+ this.comparator = comparatorOrSet.comparator;
138
+ this.buckets = comparatorOrSet.buckets.slice(0);
139
+ for (let i = 0; i < this.buckets.length; i++) {
140
+ const bucket = this.buckets[i];
141
+ if (bucket) {
142
+ this.buckets[i] = bucket.slice(0);
143
+ }
144
+ }
145
+ this.itemCount = comparatorOrSet.itemCount;
146
+ this.threshold = comparatorOrSet.threshold;
147
+ } else {
148
+ this.comparator = comparatorOrSet ?? DefaultEqualityComparator.instance;
149
+ this.buckets = this.createBuckets(initialCapacity);
150
+ this.threshold = Math.floor(_HashSet.initialCapacity * _HashSet.defaultLoadFactor);
151
+ }
152
+ }
153
+ /**
154
+ * Add `o` to set if not there; return existing value if already
155
+ * there. This method performs the same operation as {@link #add} aside from
156
+ * the return value.
157
+ *
158
+ * @param o the object to add to the set.
159
+ *
160
+ * @returns An existing element that equals to `o` if already in set, otherwise `o`.
161
+ */
162
+ getOrAdd(o) {
163
+ if (this.itemCount > this.threshold) {
164
+ this.expand();
165
+ }
166
+ const b = this.getBucket(o);
167
+ let bucket = this.buckets[b];
168
+ if (!bucket) {
169
+ bucket = [o];
170
+ this.buckets[b] = bucket;
171
+ ++this.itemCount;
172
+ return o;
173
+ }
174
+ for (const existing of bucket) {
175
+ if (this.comparator.equals(existing, o)) {
176
+ return existing;
177
+ }
178
+ }
179
+ bucket.push(o);
180
+ ++this.itemCount;
181
+ return o;
182
+ }
183
+ get(o) {
184
+ if (o == null) {
185
+ return o;
186
+ }
187
+ const b = this.getBucket(o);
188
+ const bucket = this.buckets[b];
189
+ if (!bucket) {
190
+ return void 0;
191
+ }
192
+ for (const e of bucket) {
193
+ if (this.comparator.equals(e, o)) {
194
+ return e;
195
+ }
196
+ }
197
+ return void 0;
198
+ }
199
+ /**
200
+ * Removes the specified element from this set if it is present.
201
+ *
202
+ * @param o object to be removed from this set, if present.
203
+ *
204
+ * @returns `true` if the set contained the specified element.
205
+ */
206
+ remove(o) {
207
+ if (o == null) {
208
+ return false;
209
+ }
210
+ const b = this.getBucket(o);
211
+ const bucket = this.buckets[b];
212
+ if (!bucket) {
213
+ return false;
214
+ }
215
+ for (let i = 0; i < bucket.length; i++) {
216
+ const existing = bucket[i];
217
+ if (this.comparator.equals(existing, o)) {
218
+ bucket.splice(i, 1);
219
+ --this.itemCount;
220
+ return true;
221
+ }
222
+ }
223
+ return false;
224
+ }
225
+ hashCode() {
226
+ let hash = MurmurHash.initialize();
227
+ for (const bucket of this.buckets) {
228
+ if (bucket == null) {
229
+ continue;
230
+ }
231
+ for (const o of bucket) {
232
+ if (o == null) {
233
+ break;
234
+ }
235
+ hash = MurmurHash.update(hash, this.comparator.hashCode(o));
236
+ }
237
+ }
238
+ hash = MurmurHash.finish(hash, this.size);
239
+ return hash;
240
+ }
241
+ equals(o) {
242
+ if (o === this) {
243
+ return true;
244
+ }
245
+ if (!(o instanceof _HashSet)) {
246
+ return false;
247
+ }
248
+ if (o.size !== this.size) {
249
+ return false;
250
+ }
251
+ return this.containsAll(o);
252
+ }
253
+ add(t) {
254
+ const existing = this.getOrAdd(t);
255
+ return existing === t;
256
+ }
257
+ contains(o) {
258
+ return this.containsFast(o);
259
+ }
260
+ containsFast(obj) {
261
+ if (obj == null) {
262
+ return false;
263
+ }
264
+ return this.get(obj) !== void 0;
265
+ }
266
+ *[Symbol.iterator]() {
267
+ yield* this.toArray();
268
+ }
269
+ toArray() {
270
+ const a = new Array(this.size);
271
+ let i = 0;
272
+ for (const bucket of this.buckets) {
273
+ if (bucket == null) {
274
+ continue;
275
+ }
276
+ for (const o of bucket) {
277
+ if (o == null) {
278
+ break;
279
+ }
280
+ a[i++] = o;
281
+ }
282
+ }
283
+ return a;
284
+ }
285
+ containsAll(collection) {
286
+ if (collection instanceof _HashSet) {
287
+ for (const bucket of collection.buckets) {
288
+ if (bucket == null) {
289
+ continue;
290
+ }
291
+ for (const o of bucket) {
292
+ if (o == null) {
293
+ break;
294
+ }
295
+ if (!this.containsFast(o)) {
296
+ return false;
297
+ }
298
+ }
299
+ }
300
+ } else {
301
+ for (const o of collection) {
302
+ if (!this.containsFast(o)) {
303
+ return false;
304
+ }
305
+ }
306
+ }
307
+ return true;
308
+ }
309
+ addAll(c) {
310
+ let changed = false;
311
+ for (const o of c) {
312
+ const existing = this.getOrAdd(o);
313
+ if (existing !== o) {
314
+ changed = true;
315
+ }
316
+ }
317
+ return changed;
318
+ }
319
+ clear() {
320
+ this.buckets = this.createBuckets(_HashSet.initialCapacity);
321
+ this.itemCount = 0;
322
+ this.threshold = Math.floor(_HashSet.initialCapacity * _HashSet.defaultLoadFactor);
323
+ }
324
+ toString() {
325
+ if (this.size === 0) {
326
+ return "{}";
327
+ }
328
+ let buf = "{";
329
+ let first = true;
330
+ for (const bucket of this.buckets) {
331
+ if (bucket == null) {
332
+ continue;
333
+ }
334
+ for (const o of bucket) {
335
+ if (o == null) {
336
+ break;
337
+ }
338
+ if (first) {
339
+ first = false;
340
+ } else {
341
+ buf += ", ";
342
+ }
343
+ buf += o.toString();
344
+ }
345
+ }
346
+ buf += "}";
347
+ return buf;
348
+ }
349
+ toTableString() {
350
+ let buf = "";
351
+ for (const bucket of this.buckets) {
352
+ if (bucket == null) {
353
+ buf += "null\n";
354
+ continue;
355
+ }
356
+ buf += "[";
357
+ let first = true;
358
+ for (const o of bucket) {
359
+ if (first) {
360
+ first = false;
361
+ } else {
362
+ buf += " ";
363
+ }
364
+ if (o == null) {
365
+ buf += "_";
366
+ } else {
367
+ buf += o.toString();
368
+ }
369
+ }
370
+ buf += "]\n";
371
+ }
372
+ return buf;
373
+ }
374
+ getBucket(o) {
375
+ const hash = this.comparator.hashCode(o);
376
+ const b = hash & this.buckets.length - 1;
377
+ return b;
378
+ }
379
+ expand() {
380
+ const old = this.buckets;
381
+ const newCapacity = this.buckets.length * 2;
382
+ const newTable = this.createBuckets(newCapacity);
383
+ this.buckets = newTable;
384
+ this.threshold = Math.floor(newCapacity * _HashSet.defaultLoadFactor);
385
+ for (const bucket of old) {
386
+ if (!bucket) {
387
+ continue;
388
+ }
389
+ for (const o of bucket) {
390
+ const b = this.getBucket(o);
391
+ let newBucket = this.buckets[b];
392
+ if (!newBucket) {
393
+ newBucket = [];
394
+ this.buckets[b] = newBucket;
395
+ }
396
+ newBucket.push(o);
397
+ }
398
+ }
399
+ }
400
+ get size() {
401
+ return this.itemCount;
402
+ }
403
+ get isEmpty() {
404
+ return this.itemCount === 0;
405
+ }
406
+ /**
407
+ * Return an array of `T[]` with length `capacity`.
408
+ *
409
+ * @param capacity the length of the array to return
410
+ * @returns the newly constructed array
411
+ */
412
+ createBuckets(capacity) {
413
+ return new Array(capacity);
414
+ }
415
+ };
416
+
417
+ // src/utils/helpers.ts
418
+ var equalArrays = /* @__PURE__ */ __name((a, b) => {
419
+ if (a === b) {
420
+ return true;
421
+ }
422
+ if (a.length !== b.length) {
423
+ return false;
424
+ }
425
+ for (let i = 0; i < a.length; i++) {
426
+ const left = a[i];
427
+ const right = b[i];
428
+ if (left === right) {
429
+ continue;
430
+ }
431
+ if (!left || !left.equals(right)) {
432
+ return false;
433
+ }
434
+ }
435
+ return true;
436
+ }, "equalArrays");
437
+
438
+ // src/atn/SemanticContext.ts
439
+ var SemanticContext = class _SemanticContext {
440
+ static {
441
+ __name(this, "SemanticContext");
442
+ }
443
+ cachedHashCode;
444
+ static andContext(a, b) {
445
+ if (a === null || a === _SemanticContext.NONE) {
446
+ return b;
447
+ }
448
+ if (b === null || b === _SemanticContext.NONE) {
449
+ return a;
450
+ }
451
+ const result = new AND(a, b);
452
+ if (result.operands.length === 1) {
453
+ return result.operands[0];
454
+ }
455
+ return result;
456
+ }
457
+ static orContext(a, b) {
458
+ if (a === null) {
459
+ return b;
460
+ }
461
+ if (b === null) {
462
+ return a;
463
+ }
464
+ if (a === _SemanticContext.NONE || b === _SemanticContext.NONE) {
465
+ return _SemanticContext.NONE;
466
+ }
467
+ const result = new OR(a, b);
468
+ if (result.operands.length === 1) {
469
+ return result.operands[0];
470
+ } else {
471
+ return result;
472
+ }
473
+ }
474
+ static filterPrecedencePredicates(set) {
475
+ const result = [];
476
+ for (const context of set) {
477
+ if (context instanceof _SemanticContext.PrecedencePredicate) {
478
+ result.push(context);
479
+ }
480
+ }
481
+ return result;
482
+ }
483
+ /**
484
+ * Evaluate the precedence predicates for the context and reduce the result.
485
+ *
486
+ * @param _parser The parser instance.
487
+ * @param _parserCallStack The current parser context object.
488
+ * @returns The simplified semantic context after precedence predicates are
489
+ * evaluated, which will be one of the following values.
490
+ * - {@link NONE}: if the predicate simplifies to `true` after
491
+ * precedence predicates are evaluated.
492
+ * - `null`: if the predicate simplifies to `false` after
493
+ * precedence predicates are evaluated.
494
+ * - `this`: if the semantic context is not changed as a result of
495
+ * precedence predicate evaluation.
496
+ * - A non-`null` {@link SemanticContext}: the new simplified
497
+ * semantic context after precedence predicates are evaluated.
498
+ */
499
+ evalPrecedence(_parser, _parserCallStack) {
500
+ return this;
501
+ }
502
+ };
503
+ var AND = class _AND extends SemanticContext {
504
+ static {
505
+ __name(this, "AND");
506
+ }
507
+ operands;
508
+ /**
509
+ * A semantic context which is true whenever none of the contained contexts
510
+ * is false
511
+ */
512
+ constructor(a, b) {
513
+ super();
514
+ const operands = new HashSet();
515
+ if (a instanceof _AND) {
516
+ a.operands.forEach((o) => {
517
+ operands.add(o);
518
+ });
519
+ } else {
520
+ operands.add(a);
521
+ }
522
+ if (b instanceof _AND) {
523
+ b.operands.forEach((o) => {
524
+ operands.add(o);
525
+ });
526
+ } else {
527
+ operands.add(b);
528
+ }
529
+ const precedencePredicates = SemanticContext.filterPrecedencePredicates(operands);
530
+ if (precedencePredicates.length > 0) {
531
+ let reduced = null;
532
+ precedencePredicates.forEach((p) => {
533
+ if (reduced === null || p.precedence < reduced.precedence) {
534
+ reduced = p;
535
+ }
536
+ });
537
+ if (reduced) {
538
+ operands.add(reduced);
539
+ }
540
+ }
541
+ this.operands = operands.toArray();
542
+ }
543
+ equals(other) {
544
+ if (this === other) {
545
+ return true;
546
+ }
547
+ if (!(other instanceof _AND)) {
548
+ return false;
549
+ }
550
+ return equalArrays(this.operands, other.operands);
551
+ }
552
+ hashCode() {
553
+ if (this.cachedHashCode === void 0) {
554
+ let hash = MurmurHash.initialize();
555
+ for (const operand of this.operands) {
556
+ hash = MurmurHash.updateFromComparable(hash, operand);
557
+ }
558
+ hash = MurmurHash.update(hash, 3813686060);
559
+ this.cachedHashCode = MurmurHash.finish(hash, this.operands.length + 1);
560
+ }
561
+ return this.cachedHashCode;
562
+ }
563
+ /**
564
+ * {@inheritDoc}
565
+ *
566
+ *
567
+ * The evaluation of predicates by this context is short-circuiting, but
568
+ * unordered.
569
+ */
570
+ evaluate(parser, parserCallStack) {
571
+ for (const operand of this.operands) {
572
+ if (!operand.evaluate(parser, parserCallStack)) {
573
+ return false;
574
+ }
575
+ }
576
+ return true;
577
+ }
578
+ evalPrecedence(parser, parserCallStack) {
579
+ let differs = false;
580
+ const operands = [];
581
+ for (const context of this.operands) {
582
+ const evaluated = context.evalPrecedence(parser, parserCallStack);
583
+ differs ||= evaluated !== context;
584
+ if (evaluated === null) {
585
+ return null;
586
+ } else if (evaluated !== SemanticContext.NONE) {
587
+ operands.push(evaluated);
588
+ }
589
+ }
590
+ if (!differs) {
591
+ return this;
592
+ }
593
+ if (operands.length === 0) {
594
+ return SemanticContext.NONE;
595
+ }
596
+ let result = null;
597
+ operands.forEach((o) => {
598
+ result = result === null ? o : SemanticContext.andContext(result, o);
599
+ });
600
+ return result;
601
+ }
602
+ toString() {
603
+ const s = this.operands.map((o) => {
604
+ return o.toString();
605
+ });
606
+ return (s.length > 3 ? s.slice(3) : s).join("&&");
607
+ }
608
+ };
609
+ var OR = class _OR extends SemanticContext {
610
+ static {
611
+ __name(this, "OR");
612
+ }
613
+ operands;
614
+ /**
615
+ * A semantic context which is true whenever at least one of the contained
616
+ * contexts is true
617
+ */
618
+ constructor(a, b) {
619
+ super();
620
+ const operands = new HashSet();
621
+ if (a instanceof _OR) {
622
+ a.operands.forEach((o) => {
623
+ operands.add(o);
624
+ });
625
+ } else {
626
+ operands.add(a);
627
+ }
628
+ if (b instanceof _OR) {
629
+ b.operands.forEach((o) => {
630
+ operands.add(o);
631
+ });
632
+ } else {
633
+ operands.add(b);
634
+ }
635
+ const precedencePredicates = SemanticContext.filterPrecedencePredicates(operands);
636
+ if (precedencePredicates.length > 0) {
637
+ const s = precedencePredicates.sort((a2, b2) => {
638
+ return a2.compareTo(b2);
639
+ });
640
+ const reduced = s[s.length - 1];
641
+ operands.add(reduced);
642
+ }
643
+ this.operands = operands.toArray();
644
+ }
645
+ equals(other) {
646
+ if (this === other) {
647
+ return true;
648
+ } else if (!(other instanceof _OR)) {
649
+ return false;
650
+ } else {
651
+ return equalArrays(this.operands, other.operands);
652
+ }
653
+ }
654
+ hashCode() {
655
+ if (this.cachedHashCode === void 0) {
656
+ let hash = MurmurHash.initialize();
657
+ for (const operand of this.operands) {
658
+ hash = MurmurHash.updateFromComparable(hash, operand);
659
+ }
660
+ hash = MurmurHash.update(hash, 3383313031);
661
+ this.cachedHashCode = MurmurHash.finish(hash, this.operands.length + 1);
662
+ }
663
+ return this.cachedHashCode;
664
+ }
665
+ /**
666
+ * The evaluation of predicates by this context is short-circuiting, but unordered.
667
+ */
668
+ evaluate(parser, parserCallStack) {
669
+ for (const operand of this.operands) {
670
+ if (operand.evaluate(parser, parserCallStack)) {
671
+ return true;
672
+ }
673
+ }
674
+ return false;
675
+ }
676
+ evalPrecedence(parser, parserCallStack) {
677
+ let differs = false;
678
+ const operands = [];
679
+ for (const context of this.operands) {
680
+ const evaluated = context.evalPrecedence(parser, parserCallStack);
681
+ differs ||= evaluated !== context;
682
+ if (evaluated === SemanticContext.NONE) {
683
+ return SemanticContext.NONE;
684
+ } else if (evaluated !== null) {
685
+ operands.push(evaluated);
686
+ }
687
+ }
688
+ if (!differs) {
689
+ return this;
690
+ }
691
+ if (operands.length === 0) {
692
+ return null;
693
+ }
694
+ let result = null;
695
+ operands.forEach((o) => {
696
+ result = result === null ? o : SemanticContext.orContext(result, o);
697
+ });
698
+ return result;
699
+ }
700
+ toString() {
701
+ const s = this.operands.map((o) => {
702
+ return o.toString();
703
+ });
704
+ return (s.length > 3 ? s.slice(3) : s).join("||");
705
+ }
706
+ };
707
+ ((SemanticContext2) => {
708
+ class Predicate extends SemanticContext2 {
709
+ static {
710
+ __name(this, "Predicate");
711
+ }
712
+ ruleIndex;
713
+ predIndex;
714
+ isCtxDependent;
715
+ // e.g., $i ref in pred
716
+ constructor(ruleIndex, predIndex, isCtxDependent) {
717
+ super();
718
+ this.ruleIndex = ruleIndex ?? -1;
719
+ this.predIndex = predIndex ?? -1;
720
+ this.isCtxDependent = isCtxDependent ?? false;
721
+ }
722
+ evaluate(parser, outerContext) {
723
+ const localctx = this.isCtxDependent ? outerContext : null;
724
+ return parser.sempred(localctx, this.ruleIndex, this.predIndex);
725
+ }
726
+ hashCode() {
727
+ if (this.cachedHashCode === void 0) {
728
+ let hashCode = MurmurHash.initialize();
729
+ hashCode = MurmurHash.update(hashCode, this.ruleIndex);
730
+ hashCode = MurmurHash.update(hashCode, this.predIndex);
731
+ hashCode = MurmurHash.update(hashCode, this.isCtxDependent ? 1 : 0);
732
+ hashCode = MurmurHash.finish(hashCode, 3);
733
+ this.cachedHashCode = hashCode;
734
+ }
735
+ return this.cachedHashCode;
736
+ }
737
+ equals(other) {
738
+ if (this === other) {
739
+ return true;
740
+ }
741
+ return this.ruleIndex === other.ruleIndex && this.predIndex === other.predIndex && this.isCtxDependent === other.isCtxDependent;
742
+ }
743
+ toString() {
744
+ return "{" + this.ruleIndex + ":" + this.predIndex + "}?";
745
+ }
746
+ }
747
+ SemanticContext2.Predicate = Predicate;
748
+ class PrecedencePredicate extends SemanticContext2 {
749
+ static {
750
+ __name(this, "PrecedencePredicate");
751
+ }
752
+ precedence;
753
+ constructor(precedence) {
754
+ super();
755
+ this.precedence = precedence ?? 0;
756
+ }
757
+ evaluate(parser, outerContext) {
758
+ return parser.precpred(outerContext, this.precedence);
759
+ }
760
+ evalPrecedence(parser, outerContext) {
761
+ if (parser.precpred(outerContext ?? null, this.precedence)) {
762
+ return SemanticContext2.NONE;
763
+ }
764
+ return null;
765
+ }
766
+ compareTo(other) {
767
+ return this.precedence - other.precedence;
768
+ }
769
+ hashCode() {
770
+ return 31 + this.precedence;
771
+ }
772
+ equals(other) {
773
+ if (this === other) {
774
+ return true;
775
+ }
776
+ return this.precedence === other.precedence;
777
+ }
778
+ toString() {
779
+ return "{" + this.precedence + ">=prec}?";
780
+ }
781
+ }
782
+ SemanticContext2.PrecedencePredicate = PrecedencePredicate;
783
+ SemanticContext2.NONE = new Predicate();
784
+ })(SemanticContext || (SemanticContext = {}));
785
+
786
+ // src/atn/ATNConfig.ts
787
+ var ATNConfig = class _ATNConfig {
788
+ static {
789
+ __name(this, "ATNConfig");
790
+ }
791
+ /** The ATN state associated with this configuration */
792
+ state;
793
+ /** What alt (or lexer rule) is predicted by this configuration */
794
+ alt;
795
+ /**
796
+ * We cannot execute predicates dependent upon local context unless
797
+ * we know for sure we are in the correct context. Because there is
798
+ * no way to do this efficiently, we simply cannot evaluate
799
+ * dependent predicates unless we are in the rule that initially
800
+ * invokes the ATN simulator.
801
+ *
802
+ * closure() tracks the depth of how far we dip into the outer context:
803
+ * depth > 0.
804
+ */
805
+ reachesIntoOuterContext = false;
806
+ // Not used in hash code.
807
+ precedenceFilterSuppressed = false;
808
+ // Not used in hash code.
809
+ get semanticContext() {
810
+ return this.#semanticContext;
811
+ }
812
+ cachedHashCode;
813
+ // Shared with LexerATNConfig.
814
+ /**
815
+ * The syntactic context is a graph-structured stack node whose
816
+ * path(s) to the root is the rule invocation(s)
817
+ * chain used to arrive at the state. The semantic context is
818
+ * the tree of semantic predicates encountered before reaching
819
+ * an ATN state
820
+ */
821
+ #context = null;
822
+ #semanticContext;
823
+ /** Never create config classes directly. Use the factory methods below. */
824
+ constructor(c, state, context, semanticContext) {
825
+ this.state = state;
826
+ this.alt = c.alt;
827
+ this.context = context;
828
+ this.#semanticContext = semanticContext ?? SemanticContext.NONE;
829
+ this.reachesIntoOuterContext = c.reachesIntoOuterContext;
830
+ if (c.precedenceFilterSuppressed !== void 0) {
831
+ this.precedenceFilterSuppressed = c.precedenceFilterSuppressed;
832
+ }
833
+ }
834
+ static duplicate(old, semanticContext) {
835
+ return new _ATNConfig(old, old.state, old.context, semanticContext ?? old.semanticContext);
836
+ }
837
+ static createWithContext(state, alt, context, semanticContext) {
838
+ return new _ATNConfig({ alt }, state, context, semanticContext);
839
+ }
840
+ static createWithConfig(state, config, context) {
841
+ return new _ATNConfig(config, state, context ?? config.context, config.semanticContext);
842
+ }
843
+ static createWithSemanticContext(state, c, semanticContext) {
844
+ return new _ATNConfig(c, state ?? c.state, c.context, semanticContext);
845
+ }
846
+ hashCode() {
847
+ if (this.cachedHashCode === void 0) {
848
+ let hashCode = MurmurHash.initialize(7);
849
+ hashCode = MurmurHash.update(hashCode, this.state.stateNumber);
850
+ hashCode = MurmurHash.update(hashCode, this.alt);
851
+ hashCode = MurmurHash.updateFromComparable(hashCode, this.#context);
852
+ hashCode = MurmurHash.updateFromComparable(hashCode, this.semanticContext);
853
+ hashCode = MurmurHash.finish(hashCode, 4);
854
+ this.cachedHashCode = hashCode;
855
+ }
856
+ return this.cachedHashCode;
857
+ }
858
+ /**
859
+ * The stack of invoking states leading to the rule/states associated
860
+ * with this config. We track only those contexts pushed during
861
+ * execution of the ATN simulator.
862
+ */
863
+ get context() {
864
+ return this.#context;
865
+ }
866
+ set context(context) {
867
+ this.#context = context;
868
+ this.cachedHashCode = void 0;
869
+ }
870
+ /**
871
+ * An ATN configuration is equal to another if both have
872
+ * the same state, they predict the same alternative, and
873
+ * syntactic/semantic contexts are the same.
874
+ */
875
+ equals(other) {
876
+ if (this === other) {
877
+ return true;
878
+ }
879
+ return this.state.stateNumber === other.state.stateNumber && this.alt === other.alt && (this.context === null ? other.context === null : this.context.equals(other.context)) && this.semanticContext.equals(other.semanticContext) && this.precedenceFilterSuppressed === other.precedenceFilterSuppressed;
880
+ }
881
+ toString(_recog, showAlt = true) {
882
+ let alt = "";
883
+ if (showAlt) {
884
+ alt = "," + this.alt;
885
+ }
886
+ return "(" + this.state + alt + (this.context !== null ? ",[" + this.context.toString() + "]" : "") + (this.semanticContext !== SemanticContext.NONE ? "," + this.semanticContext.toString() : "") + (this.reachesIntoOuterContext ? ",up=" + this.reachesIntoOuterContext : "") + ")";
887
+ }
888
+ };
889
+
890
+ // src/atn/LexerATNConfig.ts
891
+ var LexerATNConfig = class _LexerATNConfig extends ATNConfig {
892
+ static {
893
+ __name(this, "LexerATNConfig");
894
+ }
895
+ /**
896
+ * This is the backing field for {@link #getLexerActionExecutor}.
897
+ */
898
+ lexerActionExecutor;
899
+ passedThroughNonGreedyDecision;
900
+ constructor(config, state, context, lexerActionExecutor) {
901
+ super(config, state, context ?? config.context, context ? SemanticContext.NONE : config.semanticContext);
902
+ this.lexerActionExecutor = context ? lexerActionExecutor : config.lexerActionExecutor ?? null;
903
+ this.passedThroughNonGreedyDecision = _LexerATNConfig.checkNonGreedyDecision(config, this.state);
904
+ return this;
905
+ }
906
+ static createWithExecutor(config, state, lexerActionExecutor) {
907
+ return new _LexerATNConfig(config, state, config.context, lexerActionExecutor);
908
+ }
909
+ static createWithConfig(state, config, context) {
910
+ return new _LexerATNConfig(config, state, context ?? null, config.lexerActionExecutor);
911
+ }
912
+ static createWithContext(state, alt, context) {
913
+ return new _LexerATNConfig({ alt }, state, context, null);
914
+ }
915
+ static checkNonGreedyDecision(source, target) {
916
+ return source.passedThroughNonGreedyDecision || "nonGreedy" in target && target.nonGreedy;
917
+ }
918
+ hashCode() {
919
+ if (this.cachedHashCode === void 0) {
920
+ let hashCode = MurmurHash.initialize(7);
921
+ hashCode = MurmurHash.update(hashCode, this.state.stateNumber);
922
+ hashCode = MurmurHash.update(hashCode, this.alt);
923
+ hashCode = MurmurHash.updateFromComparable(hashCode, this.context);
924
+ hashCode = MurmurHash.updateFromComparable(hashCode, this.semanticContext);
925
+ hashCode = MurmurHash.update(hashCode, this.passedThroughNonGreedyDecision ? 1 : 0);
926
+ hashCode = MurmurHash.updateFromComparable(hashCode, this.lexerActionExecutor);
927
+ hashCode = MurmurHash.finish(hashCode, 6);
928
+ this.cachedHashCode = hashCode;
929
+ }
930
+ return this.cachedHashCode;
931
+ }
932
+ equals(other) {
933
+ if (this === other) {
934
+ return true;
935
+ }
936
+ return this.passedThroughNonGreedyDecision === other.passedThroughNonGreedyDecision && (this.lexerActionExecutor && other.lexerActionExecutor ? this.lexerActionExecutor.equals(other.lexerActionExecutor) : !other.lexerActionExecutor) && super.equals(other);
937
+ }
938
+ };
939
+ export {
940
+ LexerATNConfig
941
+ };