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,605 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+
4
+ // src/utils/helpers.ts
5
+ var isComparable = /* @__PURE__ */ __name((candidate) => {
6
+ return typeof candidate.equals === "function";
7
+ }, "isComparable");
8
+ var valueToString = /* @__PURE__ */ __name((v) => {
9
+ return v === null ? "null" : v;
10
+ }, "valueToString");
11
+ var arrayToString = /* @__PURE__ */ __name((value) => {
12
+ return Array.isArray(value) ? "[" + value.map(valueToString).join(", ") + "]" : "null";
13
+ }, "arrayToString");
14
+ var equalArrays = /* @__PURE__ */ __name((a, b) => {
15
+ if (a === b) {
16
+ return true;
17
+ }
18
+ if (a.length !== b.length) {
19
+ return false;
20
+ }
21
+ for (let i = 0; i < a.length; i++) {
22
+ const left = a[i];
23
+ const right = b[i];
24
+ if (left === right) {
25
+ continue;
26
+ }
27
+ if (!left || !left.equals(right)) {
28
+ return false;
29
+ }
30
+ }
31
+ return true;
32
+ }, "equalArrays");
33
+ var equalNumberArrays = /* @__PURE__ */ __name((a, b) => {
34
+ if (a === b) {
35
+ return true;
36
+ }
37
+ if (a.length !== b.length) {
38
+ return false;
39
+ }
40
+ for (let i = 0; i < a.length; i++) {
41
+ if (a[i] !== b[i]) {
42
+ return false;
43
+ }
44
+ }
45
+ return true;
46
+ }, "equalNumberArrays");
47
+ var escapeWhitespace = /* @__PURE__ */ __name((s, escapeSpaces = false) => {
48
+ s = s.replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r");
49
+ if (escapeSpaces) {
50
+ s = s.replace(/ /g, "\xB7");
51
+ }
52
+ return s;
53
+ }, "escapeWhitespace");
54
+
55
+ // src/utils/MurmurHash.ts
56
+ var c1 = 3432918353;
57
+ var c2 = 461845907;
58
+ var r1 = 15;
59
+ var r2 = 13;
60
+ var m = 5;
61
+ var n = 3864292196;
62
+ var MurmurHash = class _MurmurHash {
63
+ static {
64
+ __name(this, "MurmurHash");
65
+ }
66
+ static defaultSeed = 701;
67
+ constructor() {
68
+ }
69
+ /**
70
+ * Initialize the hash using the specified {@code seed}.
71
+ *
72
+ * @param seed the seed
73
+ *
74
+ * @returns the intermediate hash value
75
+ */
76
+ static initialize(seed = _MurmurHash.defaultSeed) {
77
+ return seed;
78
+ }
79
+ static updateFromComparable(hash, value) {
80
+ return this.update(hash, value?.hashCode() ?? 0);
81
+ }
82
+ /**
83
+ * Update the intermediate hash value for the next input {@code value}.
84
+ *
85
+ * @param hash The intermediate hash value.
86
+ * @param value the value to add to the current hash.
87
+ *
88
+ * @returns the updated intermediate hash value
89
+ */
90
+ static update(hash, value) {
91
+ value = Math.imul(value, c1);
92
+ value = value << r1 | value >>> 32 - r1;
93
+ value = Math.imul(value, c2);
94
+ hash = hash ^ value;
95
+ hash = hash << r2 | hash >>> 32 - r2;
96
+ hash = Math.imul(hash, m) + n;
97
+ return hash;
98
+ }
99
+ /**
100
+ * Apply the final computation steps to the intermediate value {@code hash}
101
+ * to form the final result of the MurmurHash 3 hash function.
102
+ *
103
+ * @param hash The intermediate hash value.
104
+ * @param entryCount The number of values added to the hash.
105
+ *
106
+ * @returns the final hash result
107
+ */
108
+ static finish(hash, entryCount) {
109
+ hash ^= entryCount * 4;
110
+ hash ^= hash >>> 16;
111
+ hash = Math.imul(hash, 2246822507);
112
+ hash ^= hash >>> 13;
113
+ hash = Math.imul(hash, 3266489909);
114
+ hash ^= hash >>> 16;
115
+ return hash;
116
+ }
117
+ /**
118
+ * An all-in-one convenience method to compute a hash for a single value.
119
+ *
120
+ * @param value The value to hash.
121
+ * @param seed The seed for the hash value.
122
+ *
123
+ * @returns The computed hash.
124
+ */
125
+ static hashCode(value, seed) {
126
+ return _MurmurHash.finish(_MurmurHash.update(seed ?? _MurmurHash.defaultSeed, value), 1);
127
+ }
128
+ };
129
+
130
+ // src/misc/ObjectEqualityComparator.ts
131
+ var ObjectEqualityComparator = class _ObjectEqualityComparator {
132
+ static {
133
+ __name(this, "ObjectEqualityComparator");
134
+ }
135
+ static instance = new _ObjectEqualityComparator();
136
+ hashCode(obj) {
137
+ if (obj == null) {
138
+ return 0;
139
+ }
140
+ return obj.hashCode();
141
+ }
142
+ equals(a, b) {
143
+ if (a == null) {
144
+ return b == null;
145
+ }
146
+ return a.equals(b);
147
+ }
148
+ };
149
+
150
+ // src/misc/DefaultEqualityComparator.ts
151
+ var DefaultEqualityComparator = class _DefaultEqualityComparator {
152
+ static {
153
+ __name(this, "DefaultEqualityComparator");
154
+ }
155
+ static instance = new _DefaultEqualityComparator();
156
+ hashCode(obj) {
157
+ if (obj == null) {
158
+ return 0;
159
+ }
160
+ return ObjectEqualityComparator.instance.hashCode(obj);
161
+ }
162
+ equals(a, b) {
163
+ if (a == null) {
164
+ return b == null;
165
+ }
166
+ if (typeof a === "string" || typeof a === "number") {
167
+ return a === b;
168
+ }
169
+ return ObjectEqualityComparator.instance.equals(a, b);
170
+ }
171
+ };
172
+
173
+ // src/misc/HashSet.ts
174
+ var HashSet = class _HashSet {
175
+ static {
176
+ __name(this, "HashSet");
177
+ }
178
+ static defaultLoadFactor = 0.75;
179
+ static initialCapacity = 16;
180
+ // must be power of 2
181
+ comparator;
182
+ buckets;
183
+ threshold;
184
+ /** How many elements in set */
185
+ itemCount = 0;
186
+ constructor(comparatorOrSet, initialCapacity = _HashSet.initialCapacity) {
187
+ if (comparatorOrSet instanceof _HashSet) {
188
+ this.comparator = comparatorOrSet.comparator;
189
+ this.buckets = comparatorOrSet.buckets.slice(0);
190
+ for (let i = 0; i < this.buckets.length; i++) {
191
+ const bucket = this.buckets[i];
192
+ if (bucket) {
193
+ this.buckets[i] = bucket.slice(0);
194
+ }
195
+ }
196
+ this.itemCount = comparatorOrSet.itemCount;
197
+ this.threshold = comparatorOrSet.threshold;
198
+ } else {
199
+ this.comparator = comparatorOrSet ?? DefaultEqualityComparator.instance;
200
+ this.buckets = this.createBuckets(initialCapacity);
201
+ this.threshold = Math.floor(_HashSet.initialCapacity * _HashSet.defaultLoadFactor);
202
+ }
203
+ }
204
+ /**
205
+ * Add `o` to set if not there; return existing value if already
206
+ * there. This method performs the same operation as {@link #add} aside from
207
+ * the return value.
208
+ *
209
+ * @param o the object to add to the set.
210
+ *
211
+ * @returns An existing element that equals to `o` if already in set, otherwise `o`.
212
+ */
213
+ getOrAdd(o) {
214
+ if (this.itemCount > this.threshold) {
215
+ this.expand();
216
+ }
217
+ const b = this.getBucket(o);
218
+ let bucket = this.buckets[b];
219
+ if (!bucket) {
220
+ bucket = [o];
221
+ this.buckets[b] = bucket;
222
+ ++this.itemCount;
223
+ return o;
224
+ }
225
+ for (const existing of bucket) {
226
+ if (this.comparator.equals(existing, o)) {
227
+ return existing;
228
+ }
229
+ }
230
+ bucket.push(o);
231
+ ++this.itemCount;
232
+ return o;
233
+ }
234
+ get(o) {
235
+ if (o == null) {
236
+ return o;
237
+ }
238
+ const b = this.getBucket(o);
239
+ const bucket = this.buckets[b];
240
+ if (!bucket) {
241
+ return void 0;
242
+ }
243
+ for (const e of bucket) {
244
+ if (this.comparator.equals(e, o)) {
245
+ return e;
246
+ }
247
+ }
248
+ return void 0;
249
+ }
250
+ /**
251
+ * Removes the specified element from this set if it is present.
252
+ *
253
+ * @param o object to be removed from this set, if present.
254
+ *
255
+ * @returns `true` if the set contained the specified element.
256
+ */
257
+ remove(o) {
258
+ if (o == null) {
259
+ return false;
260
+ }
261
+ const b = this.getBucket(o);
262
+ const bucket = this.buckets[b];
263
+ if (!bucket) {
264
+ return false;
265
+ }
266
+ for (let i = 0; i < bucket.length; i++) {
267
+ const existing = bucket[i];
268
+ if (this.comparator.equals(existing, o)) {
269
+ bucket.splice(i, 1);
270
+ --this.itemCount;
271
+ return true;
272
+ }
273
+ }
274
+ return false;
275
+ }
276
+ hashCode() {
277
+ let hash = MurmurHash.initialize();
278
+ for (const bucket of this.buckets) {
279
+ if (bucket == null) {
280
+ continue;
281
+ }
282
+ for (const o of bucket) {
283
+ if (o == null) {
284
+ break;
285
+ }
286
+ hash = MurmurHash.update(hash, this.comparator.hashCode(o));
287
+ }
288
+ }
289
+ hash = MurmurHash.finish(hash, this.size);
290
+ return hash;
291
+ }
292
+ equals(o) {
293
+ if (o === this) {
294
+ return true;
295
+ }
296
+ if (!(o instanceof _HashSet)) {
297
+ return false;
298
+ }
299
+ if (o.size !== this.size) {
300
+ return false;
301
+ }
302
+ return this.containsAll(o);
303
+ }
304
+ add(t) {
305
+ const existing = this.getOrAdd(t);
306
+ return existing === t;
307
+ }
308
+ contains(o) {
309
+ return this.containsFast(o);
310
+ }
311
+ containsFast(obj) {
312
+ if (obj == null) {
313
+ return false;
314
+ }
315
+ return this.get(obj) !== void 0;
316
+ }
317
+ *[Symbol.iterator]() {
318
+ yield* this.toArray();
319
+ }
320
+ toArray() {
321
+ const a = new Array(this.size);
322
+ let i = 0;
323
+ for (const bucket of this.buckets) {
324
+ if (bucket == null) {
325
+ continue;
326
+ }
327
+ for (const o of bucket) {
328
+ if (o == null) {
329
+ break;
330
+ }
331
+ a[i++] = o;
332
+ }
333
+ }
334
+ return a;
335
+ }
336
+ containsAll(collection) {
337
+ if (collection instanceof _HashSet) {
338
+ for (const bucket of collection.buckets) {
339
+ if (bucket == null) {
340
+ continue;
341
+ }
342
+ for (const o of bucket) {
343
+ if (o == null) {
344
+ break;
345
+ }
346
+ if (!this.containsFast(o)) {
347
+ return false;
348
+ }
349
+ }
350
+ }
351
+ } else {
352
+ for (const o of collection) {
353
+ if (!this.containsFast(o)) {
354
+ return false;
355
+ }
356
+ }
357
+ }
358
+ return true;
359
+ }
360
+ addAll(c) {
361
+ let changed = false;
362
+ for (const o of c) {
363
+ const existing = this.getOrAdd(o);
364
+ if (existing !== o) {
365
+ changed = true;
366
+ }
367
+ }
368
+ return changed;
369
+ }
370
+ clear() {
371
+ this.buckets = this.createBuckets(_HashSet.initialCapacity);
372
+ this.itemCount = 0;
373
+ this.threshold = Math.floor(_HashSet.initialCapacity * _HashSet.defaultLoadFactor);
374
+ }
375
+ toString() {
376
+ if (this.size === 0) {
377
+ return "{}";
378
+ }
379
+ let buf = "{";
380
+ let first = true;
381
+ for (const bucket of this.buckets) {
382
+ if (bucket == null) {
383
+ continue;
384
+ }
385
+ for (const o of bucket) {
386
+ if (o == null) {
387
+ break;
388
+ }
389
+ if (first) {
390
+ first = false;
391
+ } else {
392
+ buf += ", ";
393
+ }
394
+ buf += o.toString();
395
+ }
396
+ }
397
+ buf += "}";
398
+ return buf;
399
+ }
400
+ toTableString() {
401
+ let buf = "";
402
+ for (const bucket of this.buckets) {
403
+ if (bucket == null) {
404
+ buf += "null\n";
405
+ continue;
406
+ }
407
+ buf += "[";
408
+ let first = true;
409
+ for (const o of bucket) {
410
+ if (first) {
411
+ first = false;
412
+ } else {
413
+ buf += " ";
414
+ }
415
+ if (o == null) {
416
+ buf += "_";
417
+ } else {
418
+ buf += o.toString();
419
+ }
420
+ }
421
+ buf += "]\n";
422
+ }
423
+ return buf;
424
+ }
425
+ getBucket(o) {
426
+ const hash = this.comparator.hashCode(o);
427
+ const b = hash & this.buckets.length - 1;
428
+ return b;
429
+ }
430
+ expand() {
431
+ const old = this.buckets;
432
+ const newCapacity = this.buckets.length * 2;
433
+ const newTable = this.createBuckets(newCapacity);
434
+ this.buckets = newTable;
435
+ this.threshold = Math.floor(newCapacity * _HashSet.defaultLoadFactor);
436
+ for (const bucket of old) {
437
+ if (!bucket) {
438
+ continue;
439
+ }
440
+ for (const o of bucket) {
441
+ const b = this.getBucket(o);
442
+ let newBucket = this.buckets[b];
443
+ if (!newBucket) {
444
+ newBucket = [];
445
+ this.buckets[b] = newBucket;
446
+ }
447
+ newBucket.push(o);
448
+ }
449
+ }
450
+ }
451
+ get size() {
452
+ return this.itemCount;
453
+ }
454
+ get isEmpty() {
455
+ return this.itemCount === 0;
456
+ }
457
+ /**
458
+ * Return an array of `T[]` with length `capacity`.
459
+ *
460
+ * @param capacity the length of the array to return
461
+ * @returns the newly constructed array
462
+ */
463
+ createBuckets(capacity) {
464
+ return new Array(capacity);
465
+ }
466
+ };
467
+
468
+ // src/misc/MapKeyEqualityOperator.ts
469
+ var MapKeyEqualityComparator = class {
470
+ static {
471
+ __name(this, "MapKeyEqualityComparator");
472
+ }
473
+ keyComparator;
474
+ constructor(keyComparator) {
475
+ this.keyComparator = keyComparator;
476
+ }
477
+ hashCode(obj) {
478
+ return this.keyComparator.hashCode(obj.key);
479
+ }
480
+ equals(a, b) {
481
+ return this.keyComparator.equals(a.key, b.key);
482
+ }
483
+ };
484
+
485
+ // src/misc/HashMap.ts
486
+ var HashMap = class _HashMap {
487
+ static {
488
+ __name(this, "HashMap");
489
+ }
490
+ backingStore;
491
+ constructor(keyComparer) {
492
+ if (keyComparer instanceof _HashMap) {
493
+ this.backingStore = new HashSet(keyComparer.backingStore);
494
+ } else {
495
+ keyComparer = keyComparer ?? DefaultEqualityComparator.instance;
496
+ this.backingStore = new HashSet(new MapKeyEqualityComparator(keyComparer));
497
+ }
498
+ }
499
+ clear() {
500
+ this.backingStore.clear();
501
+ }
502
+ containsKey(key) {
503
+ return this.backingStore.contains({ key });
504
+ }
505
+ get(key) {
506
+ const bucket = this.backingStore.get({ key });
507
+ if (!bucket) {
508
+ return void 0;
509
+ }
510
+ return bucket.value;
511
+ }
512
+ get isEmpty() {
513
+ return this.backingStore.isEmpty;
514
+ }
515
+ /**
516
+ * Sets the value for a key in the map. If the key is not present in the map, it is added.
517
+ * If the key is present, the value is updated and the old value is returned.
518
+ *
519
+ * @param key The key to set.
520
+ * @param value The value to set.
521
+ *
522
+ * @returns The old value for the key, if present.
523
+ */
524
+ set(key, value) {
525
+ const element = this.backingStore.get({ key, value });
526
+ let result;
527
+ if (!element) {
528
+ this.backingStore.add({ key, value });
529
+ } else {
530
+ result = element.value;
531
+ element.value = value;
532
+ }
533
+ return result;
534
+ }
535
+ /**
536
+ * Sets the value for a key in the map if the key is not already present. Otherwise the value is not changed and
537
+ * the old value is returned.
538
+ *
539
+ * @param key The key to set.
540
+ * @param value The value to set.
541
+ *
542
+ * @returns The current value for the key, if present.
543
+ */
544
+ setIfAbsent(key, value) {
545
+ const element = this.backingStore.get({ key, value });
546
+ let result;
547
+ if (!element) {
548
+ this.backingStore.add({ key, value });
549
+ } else {
550
+ result = element.value;
551
+ }
552
+ return result;
553
+ }
554
+ keys() {
555
+ return this.backingStore.toArray().map((bucket) => {
556
+ return bucket.key;
557
+ });
558
+ }
559
+ values() {
560
+ return this.backingStore.toArray().map((bucket) => {
561
+ return bucket.value;
562
+ });
563
+ }
564
+ get size() {
565
+ return this.backingStore.size;
566
+ }
567
+ hashCode() {
568
+ return this.backingStore.hashCode();
569
+ }
570
+ equals(o) {
571
+ return this.backingStore.equals(o.backingStore);
572
+ }
573
+ };
574
+
575
+ // src/utils/DoubleDict.ts
576
+ var DoubleDict = class {
577
+ static {
578
+ __name(this, "DoubleDict");
579
+ }
580
+ cacheMap;
581
+ constructor() {
582
+ this.cacheMap = new HashMap();
583
+ }
584
+ get(a, b) {
585
+ const d = this.cacheMap.get(a) ?? null;
586
+ return d === null ? null : d.get(b) ?? null;
587
+ }
588
+ set(a, b, o) {
589
+ let d = this.cacheMap.get(a);
590
+ if (!d) {
591
+ d = new HashMap();
592
+ this.cacheMap.set(a, d);
593
+ }
594
+ d.set(b, o);
595
+ }
596
+ };
597
+ export {
598
+ DoubleDict,
599
+ MurmurHash,
600
+ arrayToString,
601
+ equalArrays,
602
+ equalNumberArrays,
603
+ escapeWhitespace,
604
+ isComparable
605
+ };
@@ -0,0 +1,72 @@
1
+ {
2
+ "name": "antlr4ng",
3
+ "version": "3.0.16",
4
+ "type": "module",
5
+ "description": "Alternative JavaScript/TypeScript runtime for ANTLR4",
6
+ "main": "dist/index.cjs",
7
+ "module": "dist/index.mjs",
8
+ "types": "dist/index.d.ts",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/mike-lischke/antlr4ng.git"
12
+ },
13
+ "keywords": [
14
+ "lexer",
15
+ "parser",
16
+ "antlr",
17
+ "antlr4",
18
+ "grammar",
19
+ "TypeScript"
20
+ ],
21
+ "license": "BSD-3-Clause",
22
+ "bugs": {
23
+ "url": "https://github.com/mike-lischke/antlr4ng/issues"
24
+ },
25
+ "homepage": "https://github.com/mike-lischke/antlr4ng",
26
+ "sideEffects": false,
27
+ "devDependencies": {
28
+ "@mike-lischke/antlr-tgen": "1.0.8",
29
+ "@types/node": "20.14.9",
30
+ "@types/unicode-properties": "1.3.2",
31
+ "@typescript-eslint/eslint-plugin": "7.18.0",
32
+ "@typescript-eslint/parser": "7.18.0",
33
+ "@vitest/coverage-v8": "3.0.6",
34
+ "antlr-ng": "1.0.4",
35
+ "esbuild": "0.23.0",
36
+ "eslint": "8.57.0",
37
+ "eslint-plugin-import": "2.29.1",
38
+ "eslint-plugin-jsdoc": "48.10.2",
39
+ "eslint-plugin-prefer-arrow": "1.2.3",
40
+ "ts-node": "10.9.2",
41
+ "typescript": "5.7.3",
42
+ "unicode-properties": "1.4.1",
43
+ "vitest": "3.0.6"
44
+ },
45
+ "scripts": {
46
+ "prepublishOnly": "npm run build && npm run test",
47
+ "build": "tsc && npm run build-cjs && npm run build-mjs",
48
+ "build-with-maps": "tsc && npm run build-mjs -- --sourcemap",
49
+ "build-and-test": "npm run build && npm run test",
50
+ "test": "vitest run --no-watch --no-coverage",
51
+ "full-test": "npm run test && npm run run-benchmarks && npm run time-lexer-speed",
52
+ "run-benchmarks": "node --no-warnings --experimental-vm-modules --loader ts-node/esm tests/benchmarks/run-benchmarks.ts",
53
+ "time-lexer-speed": "node --no-warnings --experimental-vm-modules --loader ts-node/esm tests/api/perf/TimeLexerSpeed.ts",
54
+ "generate-test-parsers": "./build/generate-test-parsers.sh",
55
+ "generate-runtime-tests": "antlr-tgen --config tests/fixtures/config.json",
56
+ "build-bundle": "esbuild ./src/index.js --main-fields=module,main --bundle --target=esnext --keep-names",
57
+ "build-mjs": "npm run build-bundle -- --outfile=dist/index.mjs --format=esm",
58
+ "build-cjs": "npm run build-bundle -- --outfile=dist/index.cjs --format=cjs",
59
+ "generate-xpath-lexer": "antlr-ng -Dlanguage=TypeScript --exact-output-dir -o src/tree/xpath/generated src/tree/xpath/XPathLexer.g4",
60
+ "profile benchmarks": "node --no-warnings --experimental-vm-modules --prof --loader ts-node/esm tests/benchmarks/run-benchmarks.ts",
61
+ "process profile tick file": " node --prof-process isolate-0x140008000-94064-v8.log > processed.txt"
62
+ },
63
+ "exports": {
64
+ "types": "./dist/index.d.ts",
65
+ "require": "./dist/index.cjs",
66
+ "import": "./dist/index.mjs"
67
+ },
68
+ "browserslist": [
69
+ "defaults and fully supports es6-module",
70
+ "maintained node versions"
71
+ ]
72
+ }