@loopstack/loopstack-studio 0.25.0 → 0.25.2
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.
- package/dist/components/ai-elements/message.js +2 -2
- package/dist/components/ai-elements/reasoning.js +9 -9
- package/dist/loopstack-studio.css +1 -1
- package/dist/node_modules/@chevrotain/gast/lib/src/helpers.js +2 -5
- package/dist/node_modules/@chevrotain/gast/lib/src/model.js +69 -72
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{architecture-7HQA4BMR.js → architecture-YZFGNWBL.js} +2 -2
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-TQ3KTPDO.js → chunk-2KRD3SAO.js} +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-4F5CHEZ2.js → chunk-67CJDMHE.js} +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-UMXZTB3W.js → chunk-7N4EOEYR.js} +5 -2
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-PL6DKKU2.js → chunk-AA7GKIK3.js} +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-CIAEETIT.js +23 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-SJTYNZTY.js → chunk-FOC6F5B3.js} +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-K5T4RW27.js +1197 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-FRFDVMJY.js → chunk-KGLVRYIC.js} +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-B2363JML.js → chunk-LIHQZDEY.js} +1 -1
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-ORNJ4GCN.js +29 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{gitGraph-G5XIXVHT.js → gitGraph-7Q5UKJZL.js} +2 -2
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-OMHHGYJF.js +3 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-4T2RLAQJ.js +3 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-ZZUOXDRM.js +3 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-PYXPWWZC.js +3 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treeView-SZITEDCU.js +3 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-W4RFUUIX.js +3 -0
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/wardley-RL74JXVD.js +3 -0
- package/dist/node_modules/@mermaid-js/parser/dist/mermaid-parser.core.js +27 -17
- package/dist/node_modules/@upsetjs/venn.js/build/venn.esm.js +903 -0
- package/dist/node_modules/@xyflow/react/dist/esm/index.js +76 -75
- package/dist/node_modules/@xyflow/system/dist/esm/index.js +30 -28
- package/dist/node_modules/chevrotain/lib/src/parse/cst/cst_visitor.js +31 -40
- package/dist/node_modules/chevrotain/lib/src/parse/errors_public.js +23 -26
- package/dist/node_modules/chevrotain/lib/src/parse/exceptions_public.js +12 -13
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/checks.js +181 -205
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/first.js +11 -13
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/follow.js +12 -13
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/gast/gast_resolver_public.js +8 -9
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/interpreter.js +176 -183
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/llk_lookahead.js +17 -19
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/lookahead.js +153 -160
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/resolver.js +10 -12
- package/dist/node_modules/chevrotain/lib/src/parse/grammar/rest.js +36 -38
- package/dist/node_modules/chevrotain/lib/src/parse/parser/parser.js +37 -45
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/error_handler.js +12 -14
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/gast_recorder.js +80 -86
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/lexer_adapter.js +6 -2
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/looksahead.js +39 -41
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/perf_tracer.js +7 -8
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_api.js +69 -70
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_engine.js +215 -205
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/recoverable.js +76 -76
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/tree_builder.js +29 -39
- package/dist/node_modules/chevrotain/lib/src/scan/lexer.js +252 -274
- package/dist/node_modules/chevrotain/lib/src/scan/lexer_public.js +93 -106
- package/dist/node_modules/chevrotain/lib/src/scan/reg_exp.js +61 -61
- package/dist/node_modules/chevrotain/lib/src/scan/tokens.js +31 -41
- package/dist/node_modules/chevrotain/lib/src/scan/tokens_public.js +15 -18
- package/dist/node_modules/chevrotain-allstar/lib/all-star-lookahead.js +226 -226
- package/dist/node_modules/chevrotain-allstar/lib/atn.js +17 -17
- package/dist/node_modules/cytoscape/dist/cytoscape.esm.js +17 -14
- package/dist/node_modules/dagre-d3-es/src/dagre/greedy-fas.js +19 -19
- package/dist/node_modules/dagre-d3-es/src/dagre/layout.js +48 -48
- package/dist/node_modules/dagre-d3-es/src/dagre/nesting-graph.js +9 -9
- package/dist/node_modules/dagre-d3-es/src/dagre/order/cross-count.js +3 -3
- package/dist/node_modules/dagre-d3-es/src/dagre/order/index.js +11 -11
- package/dist/node_modules/dagre-d3-es/src/dagre/order/init-order.js +4 -4
- package/dist/node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js +4 -4
- package/dist/node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js +8 -8
- package/dist/node_modules/dagre-d3-es/src/dagre/order/sort.js +5 -5
- package/dist/node_modules/dagre-d3-es/src/dagre/position/bk.js +61 -61
- package/dist/node_modules/dagre-d3-es/src/dagre/position/index.js +1 -1
- package/dist/node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js +25 -25
- package/dist/node_modules/dagre-d3-es/src/dagre/rank/util.js +8 -8
- package/dist/node_modules/dagre-d3-es/src/dagre/util.js +48 -48
- package/dist/node_modules/dagre-d3-es/src/graphlib/graph.js +109 -109
- package/dist/node_modules/dagre-d3-es/src/graphlib/json.js +17 -17
- package/dist/node_modules/dompurify/dist/purify.es.js +67 -67
- package/dist/node_modules/katex/dist/katex.js +1256 -1209
- package/dist/node_modules/khroma/dist/methods/transparentize.js +3 -0
- package/dist/node_modules/lodash-es/_baseClone.js +2 -2
- package/dist/node_modules/lodash-es/_baseMatchesProperty.js +6 -6
- package/dist/node_modules/lodash-es/_baseToString.js +1 -1
- package/dist/node_modules/lodash-es/_baseUniq.js +1 -1
- package/dist/node_modules/lodash-es/_createSet.js +1 -1
- package/dist/node_modules/lodash-es/_getAllKeys.js +2 -2
- package/dist/node_modules/lodash-es/_getAllKeysIn.js +1 -1
- package/dist/node_modules/lodash-es/findIndex.js +2 -2
- package/dist/node_modules/lodash-es/flatMap.js +1 -1
- package/dist/node_modules/lodash-es/forEach.js +1 -1
- package/dist/node_modules/lodash-es/max.js +1 -1
- package/dist/node_modules/lodash-es/min.js +1 -1
- package/dist/node_modules/lodash-es/minBy.js +1 -1
- package/dist/node_modules/lodash-es/reduce.js +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/architectureDiagram-Q4EWVU46.js +691 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{blockDiagram-VD42YOAC.js → blockDiagram-DXYQGD6D.js} +183 -157
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{c4Diagram-YG6GDRKO.js → c4Diagram-AHTNJAMY.js} +65 -63
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-336JU56O.js +47 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-EXTU4WIE.js → chunk-426QAEUC.js} +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-B4BG7PRW.js → chunk-4TB4RGXK.js} +533 -393
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-5FUZZQ4R.js +3638 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-S3R3BYOJ.js → chunk-5PVQY5BW.js} +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-HN2XXSSU.js → chunk-BSJP7CBP.js} +20 -14
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-QN33PNHL.js → chunk-EDXVE4YY.js} +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ENJZ2VHE.js +568 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ICPOFSXX.js +2320 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-DI55MBZ5.js → chunk-OYMX7WX6.js} +35 -21
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-U2HBQHQK.js +272 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-ATLVNIR6.js → chunk-X2U36JSP.js} +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{chunk-MI3HLSF2.js → chunk-XPW4576I.js} +11 -7
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-YZCP3GAM.js +60 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ZZ45TVLE.js +30 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{classDiagram-2ON5EDUG.js → classDiagram-6PBFFD2Q.js} +12 -11
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{classDiagram-v2-WZHVMYZB.js → classDiagram-v2-HSJHXN6E.js} +12 -11
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{dagre-6UL2VRFP.js → dagre-KV5264BT.js} +8 -8
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-5BDNPKRD.js +99 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{diagram-PSM6KHXK.js → diagram-G4DWMVQ6.js} +20 -23
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-MMDJMWI5.js +211 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{diagram-S2PKOQOG.js → diagram-TYMM5635.js} +4 -4
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{erDiagram-Q2GNP2WA.js → erDiagram-SMLLAGMA.js} +486 -386
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{flowDiagram-NV44I4VS.js → flowDiagram-DWJPFMVM.js} +915 -898
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{ganttDiagram-JELNMOA3.js → ganttDiagram-T4ZO3ILL.js} +59 -29
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-UUTBAWPF.js +728 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/infoDiagram-42DDH7IO.js +17 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/ishikawaDiagram-UXIWVN3A.js +714 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{journeyDiagram-XKPGCS4Q.js → journeyDiagram-VCZTEJTY.js} +32 -32
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{kanban-definition-3W4ZIXB7.js → kanban-definition-6JOO6SKY.js} +13 -9
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{mindmap-definition-VGOIOE7T.js → mindmap-definition-QFDTVHPH.js} +105 -59
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-DEJITSTG.js +117 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{quadrantDiagram-AYHSOK5B.js → quadrantDiagram-34T5L4WZ.js} +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{requirementDiagram-UZGBJVZJ.js → requirementDiagram-MS252O5E.js} +49 -19
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{sankeyDiagram-TZEHDZUN.js → sankeyDiagram-XADWPNL6.js} +1 -1
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-FGHM5R23.js +4155 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{stateDiagram-FKZM4ZOC.js → stateDiagram-FHFEXIEX.js} +12 -12
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{stateDiagram-v2-4FDKWEC3.js → stateDiagram-v2-QKLJ7IA2.js} +11 -11
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-GMOUNBTQ.js +1071 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/vennDiagram-DHZGUBPP.js +959 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/wardleyDiagram-NUSXRM2D.js +574 -0
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/{xychartDiagram-PRI3JC2R.js → xychartDiagram-5P7HB3ND.js} +38 -35
- package/dist/node_modules/mermaid/dist/mermaid.core.js +235 -192
- package/dist/node_modules/nanoid/url-alphabet/index.js +1 -1
- package/dist/node_modules/remend/dist/index.js +333 -264
- package/dist/node_modules/streamdown/dist/chunk-BO2N2NFS.js +2498 -0
- package/dist/node_modules/streamdown/dist/highlighted-body-OFNGDK62.js +35 -0
- package/dist/node_modules/streamdown/dist/index.js +1 -1
- package/dist/node_modules/streamdown/dist/mermaid-GHXKKRXX.js +3 -0
- package/dist/node_modules/streamdown/node_modules/marked/lib/marked.esm.js +672 -667
- package/dist/pages/DashboardPage.js +3 -3
- package/package.json +2 -2
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-TCCFYFTB.js +0 -787
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-VBDWY6EO.js +0 -3
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-DYOGHKS2.js +0 -3
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-VRWISCQL.js +0 -3
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-ZZBFDIW7.js +0 -3
- package/dist/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-GDKQZRPO.js +0 -3
- package/dist/node_modules/chevrotain/lib/src/parse/parser/traits/context_assist.js +0 -16
- package/dist/node_modules/lodash-es/_arrayAggregator.js +0 -9
- package/dist/node_modules/lodash-es/_arrayEvery.js +0 -6
- package/dist/node_modules/lodash-es/_baseAggregator.js +0 -8
- package/dist/node_modules/lodash-es/_baseDifference.js +0 -22
- package/dist/node_modules/lodash-es/_baseEvery.js +0 -9
- package/dist/node_modules/lodash-es/_baseIsRegExp.js +0 -8
- package/dist/node_modules/lodash-es/_baseSlice.js +0 -8
- package/dist/node_modules/lodash-es/_baseSome.js +0 -9
- package/dist/node_modules/lodash-es/_createAggregator.js +0 -12
- package/dist/node_modules/lodash-es/assign.js +0 -14
- package/dist/node_modules/lodash-es/compact.js +0 -9
- package/dist/node_modules/lodash-es/difference.js +0 -8
- package/dist/node_modules/lodash-es/drop.js +0 -8
- package/dist/node_modules/lodash-es/dropRight.js +0 -8
- package/dist/node_modules/lodash-es/every.js +0 -11
- package/dist/node_modules/lodash-es/groupBy.js +0 -6
- package/dist/node_modules/lodash-es/head.js +0 -5
- package/dist/node_modules/lodash-es/includes.js +0 -13
- package/dist/node_modules/lodash-es/indexOf.js +0 -11
- package/dist/node_modules/lodash-es/isRegExp.js +0 -5
- package/dist/node_modules/lodash-es/negate.js +0 -16
- package/dist/node_modules/lodash-es/pickBy.js +0 -15
- package/dist/node_modules/lodash-es/reject.js +0 -10
- package/dist/node_modules/lodash-es/some.js +0 -11
- package/dist/node_modules/lodash-es/uniq.js +0 -6
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/architectureDiagram-VXUJARFQ.js +0 -673
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ABZYJK2D.js +0 -1547
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-CVBHYZKI.js +0 -10
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-DR5Q36YT.js +0 -135
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-JA3XYJ7Z.js +0 -247
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-JZLCHNYA.js +0 -3516
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-N4CR4FBY.js +0 -39
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-QXUST7PY.js +0 -497
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-TZMSLE5B.js +0 -55
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-QEK2KX5R.js +0 -211
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-V2S2FVAM.js +0 -621
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/infoDiagram-HS3SLOUP.js +0 -18
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-ADFJNKIX.js +0 -117
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-WL72ISMW.js +0 -3560
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-IT6M3QCI.js +0 -833
- package/dist/node_modules/streamdown/dist/chunk-RLXIAIE6.js +0 -2189
- package/dist/node_modules/streamdown/dist/highlighted-body-B3W2YXNL.js +0 -33
- package/dist/node_modules/streamdown/dist/mermaid-3ZIDBTTL.js +0 -3
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
import isObject_default from "../../../../../../lodash-es/isObject.js";
|
|
2
|
-
import isArray_default from "../../../../../../lodash-es/isArray.js";
|
|
3
|
-
import isEmpty_default from "../../../../../../lodash-es/isEmpty.js";
|
|
4
|
-
import flatten_default from "../../../../../../lodash-es/flatten.js";
|
|
5
|
-
import clone_default from "../../../../../../lodash-es/clone.js";
|
|
6
|
-
import every_default from "../../../../../../lodash-es/every.js";
|
|
7
|
-
import has_default from "../../../../../../lodash-es/has.js";
|
|
8
|
-
import values_default from "../../../../../../lodash-es/values.js";
|
|
9
|
-
import reduce_default from "../../../../../../lodash-es/reduce.js";
|
|
10
|
-
import uniq_default from "../../../../../../lodash-es/uniq.js";
|
|
11
1
|
import { augmentTokenTypes, isTokenType, tokenStructuredMatcher, tokenStructuredMatcherNoCategories } from "../../../scan/tokens.js";
|
|
12
2
|
import { EOF } from "../../../scan/tokens_public.js";
|
|
13
3
|
import { NextTerminalAfterAtLeastOneSepWalker, NextTerminalAfterAtLeastOneWalker, NextTerminalAfterManySepWalker, NextTerminalAfterManyWalker } from "../../grammar/interpreter.js";
|
|
@@ -15,261 +5,281 @@ import { PROD_TYPE } from "../../grammar/lookahead.js";
|
|
|
15
5
|
import { MismatchedTokenException, NotAllInputParsedException, isRecognitionException } from "../../exceptions_public.js";
|
|
16
6
|
import { IN_RULE_RECOVERY_EXCEPTION } from "./recoverable.js";
|
|
17
7
|
import { AT_LEAST_ONE_IDX, AT_LEAST_ONE_SEP_IDX, BITS_FOR_METHOD_TYPE, BITS_FOR_OCCURRENCE_IDX, MANY_IDX, MANY_SEP_IDX, OPTION_IDX, OR_IDX } from "../../grammar/keys.js";
|
|
18
|
-
import { DEFAULT_RULE_CONFIG } from "../parser.js";
|
|
8
|
+
import { DEFAULT_RULE_CONFIG, END_OF_FILE } from "../parser.js";
|
|
19
9
|
var RecognizerEngine = class {
|
|
20
|
-
initRecognizerEngine(
|
|
21
|
-
if (this.className = this.constructor.name, this.shortRuleNameToFull = {}, this.fullRuleNameToShort = {}, this.ruleShortNameIdx = 256, this.tokenMatcher = tokenStructuredMatcherNoCategories, this.subruleIdx = 0, this.definedRulesNames = [], this.tokensMap = {}, this.isBackTrackingStack = [], this.RULE_STACK = [], this.RULE_OCCURRENCE_STACK = [], this.gastProductionsCache = {},
|
|
22
|
-
if (
|
|
23
|
-
if (
|
|
24
|
-
if (typeof
|
|
10
|
+
initRecognizerEngine(C, w) {
|
|
11
|
+
if (this.className = this.constructor.name, this.shortRuleNameToFull = {}, this.fullRuleNameToShort = {}, this.ruleShortNameIdx = 256, this.tokenMatcher = tokenStructuredMatcherNoCategories, this.subruleIdx = 0, this.currRuleShortName = 0, this.definedRulesNames = [], this.tokensMap = {}, this.isBackTrackingStack = [], this.RULE_STACK = [], this.RULE_STACK_IDX = -1, this.RULE_OCCURRENCE_STACK = [], this.RULE_OCCURRENCE_STACK_IDX = -1, this.gastProductionsCache = {}, Object.hasOwn(w, "serializedGrammar")) throw Error("The Parser's configuration can no longer contain a <serializedGrammar> property.\n See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0\n For Further details.");
|
|
12
|
+
if (Array.isArray(C)) {
|
|
13
|
+
if (C.length === 0) throw Error("A Token Vocabulary cannot be empty.\n Note that the first argument for the parser constructor\n is no longer a Token vector (since v4.0).");
|
|
14
|
+
if (typeof C[0].startOffset == "number") throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0\n For Further details.");
|
|
25
15
|
}
|
|
26
|
-
if (
|
|
27
|
-
else if (
|
|
28
|
-
|
|
16
|
+
if (Array.isArray(C)) this.tokensMap = C.reduce((e, y) => (e[y.name] = y, e), {});
|
|
17
|
+
else if (Object.hasOwn(C, "modes") && Object.values(C.modes).flat().every(isTokenType)) {
|
|
18
|
+
let e = Object.values(C.modes).flat();
|
|
19
|
+
this.tokensMap = [...new Set(e)].reduce((e, y) => (e[y.name] = y, e), {});
|
|
20
|
+
} else if (typeof C == "object" && C) this.tokensMap = Object.assign({}, C);
|
|
29
21
|
else throw Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");
|
|
30
|
-
this.tokensMap.EOF = EOF, this.tokenMatcher =
|
|
31
|
-
}
|
|
32
|
-
defineRule(
|
|
33
|
-
if (this.selfAnalysisDone) throw Error(`Grammar rule <${
|
|
34
|
-
let
|
|
35
|
-
this.ruleShortNameIdx++, this.shortRuleNameToFull[
|
|
36
|
-
let
|
|
37
|
-
return
|
|
22
|
+
this.tokensMap.EOF = EOF, this.tokenMatcher = (Object.hasOwn(C, "modes") ? Object.values(C.modes).flat() : Object.values(C)).every((e) => e.categoryMatches?.length == 0) ? tokenStructuredMatcherNoCategories : tokenStructuredMatcher, augmentTokenTypes(Object.values(this.tokensMap));
|
|
23
|
+
}
|
|
24
|
+
defineRule(e, y, b) {
|
|
25
|
+
if (this.selfAnalysisDone) throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);
|
|
26
|
+
let x = Object.hasOwn(b, "resyncEnabled") ? b.resyncEnabled : DEFAULT_RULE_CONFIG.resyncEnabled, S = Object.hasOwn(b, "recoveryValueFunc") ? b.recoveryValueFunc : DEFAULT_RULE_CONFIG.recoveryValueFunc, C = this.ruleShortNameIdx << 12;
|
|
27
|
+
this.ruleShortNameIdx++, this.shortRuleNameToFull[C] = e, this.fullRuleNameToShort[e] = C;
|
|
28
|
+
let w;
|
|
29
|
+
return w = this.outputCst === !0 ? function(...b) {
|
|
38
30
|
try {
|
|
39
|
-
this.ruleInvocationStateUpdate(
|
|
40
|
-
let
|
|
41
|
-
return this.cstPostRule(
|
|
42
|
-
} catch (
|
|
43
|
-
return this.invokeRuleCatch(
|
|
31
|
+
this.ruleInvocationStateUpdate(C, e, this.subruleIdx), y.apply(this, b);
|
|
32
|
+
let x = this.CST_STACK[this.CST_STACK.length - 1];
|
|
33
|
+
return this.cstPostRule(x), x;
|
|
34
|
+
} catch (e) {
|
|
35
|
+
return this.invokeRuleCatch(e, x, S);
|
|
44
36
|
} finally {
|
|
45
37
|
this.ruleFinallyStateUpdate();
|
|
46
38
|
}
|
|
47
|
-
} : function(...
|
|
39
|
+
} : function(...b) {
|
|
48
40
|
try {
|
|
49
|
-
return this.ruleInvocationStateUpdate(
|
|
50
|
-
} catch (
|
|
51
|
-
return this.invokeRuleCatch(
|
|
41
|
+
return this.ruleInvocationStateUpdate(C, e, this.subruleIdx), y.apply(this, b);
|
|
42
|
+
} catch (e) {
|
|
43
|
+
return this.invokeRuleCatch(e, x, S);
|
|
52
44
|
} finally {
|
|
53
45
|
this.ruleFinallyStateUpdate();
|
|
54
46
|
}
|
|
55
|
-
}, Object.assign(
|
|
56
|
-
|
|
57
|
-
|
|
47
|
+
}, Object.assign(function(...y) {
|
|
48
|
+
this.onBeforeParse(e);
|
|
49
|
+
try {
|
|
50
|
+
return w.apply(this, y);
|
|
51
|
+
} finally {
|
|
52
|
+
this.onAfterParse(e);
|
|
53
|
+
}
|
|
54
|
+
}, {
|
|
55
|
+
ruleName: e,
|
|
56
|
+
originalGrammarAction: y,
|
|
57
|
+
coreRule: w
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
|
-
invokeRuleCatch(
|
|
61
|
-
let
|
|
62
|
-
if (isRecognitionException(
|
|
63
|
-
let
|
|
64
|
-
if (
|
|
65
|
-
let
|
|
66
|
-
if (this.isInCurrentRuleReSyncSet(
|
|
67
|
-
let
|
|
68
|
-
return
|
|
69
|
-
} else return
|
|
60
|
+
invokeRuleCatch(e, y, b) {
|
|
61
|
+
let x = this.RULE_STACK_IDX === 0, S = y && !this.isBackTracking() && this.recoveryEnabled;
|
|
62
|
+
if (isRecognitionException(e)) {
|
|
63
|
+
let y = e;
|
|
64
|
+
if (S) {
|
|
65
|
+
let x = this.findReSyncTokenType();
|
|
66
|
+
if (this.isInCurrentRuleReSyncSet(x)) if (y.resyncedTokens = this.reSyncTo(x), this.outputCst) {
|
|
67
|
+
let e = this.CST_STACK[this.CST_STACK.length - 1];
|
|
68
|
+
return e.recoveredNode = !0, e;
|
|
69
|
+
} else return b(e);
|
|
70
70
|
else {
|
|
71
71
|
if (this.outputCst) {
|
|
72
|
-
let
|
|
73
|
-
|
|
72
|
+
let e = this.CST_STACK[this.CST_STACK.length - 1];
|
|
73
|
+
e.recoveredNode = !0, y.partialCstResult = e;
|
|
74
74
|
}
|
|
75
|
-
throw
|
|
75
|
+
throw y;
|
|
76
76
|
}
|
|
77
|
-
} else if (
|
|
78
|
-
else throw
|
|
79
|
-
} else throw
|
|
80
|
-
}
|
|
81
|
-
optionInternal(
|
|
82
|
-
let
|
|
83
|
-
return this.optionInternalLogic(
|
|
84
|
-
}
|
|
85
|
-
optionInternalLogic(
|
|
86
|
-
let
|
|
87
|
-
if (typeof
|
|
88
|
-
|
|
89
|
-
let
|
|
90
|
-
if (
|
|
91
|
-
let
|
|
92
|
-
|
|
77
|
+
} else if (x) return this.moveToTerminatedState(), b(e);
|
|
78
|
+
else throw y;
|
|
79
|
+
} else throw e;
|
|
80
|
+
}
|
|
81
|
+
optionInternal(e, y) {
|
|
82
|
+
let b = this.getKeyForAutomaticLookahead(512, y);
|
|
83
|
+
return this.optionInternalLogic(e, y, b);
|
|
84
|
+
}
|
|
85
|
+
optionInternalLogic(e, y, b) {
|
|
86
|
+
let x = this.getLaFuncFromCache(b), S;
|
|
87
|
+
if (typeof e != "function") {
|
|
88
|
+
S = e.DEF;
|
|
89
|
+
let y = e.GATE;
|
|
90
|
+
if (y !== void 0) {
|
|
91
|
+
let e = x;
|
|
92
|
+
x = () => y.call(this) && e.call(this);
|
|
93
93
|
}
|
|
94
|
-
} else
|
|
95
|
-
if (
|
|
96
|
-
}
|
|
97
|
-
atLeastOneInternal(
|
|
98
|
-
let
|
|
99
|
-
return this.atLeastOneInternalLogic(
|
|
100
|
-
}
|
|
101
|
-
atLeastOneInternalLogic(
|
|
102
|
-
let
|
|
103
|
-
if (typeof
|
|
104
|
-
|
|
105
|
-
let
|
|
106
|
-
if (
|
|
107
|
-
let
|
|
108
|
-
|
|
94
|
+
} else S = e;
|
|
95
|
+
if (x.call(this) === !0) return S.call(this);
|
|
96
|
+
}
|
|
97
|
+
atLeastOneInternal(e, y) {
|
|
98
|
+
let b = this.getKeyForAutomaticLookahead(AT_LEAST_ONE_IDX, e);
|
|
99
|
+
return this.atLeastOneInternalLogic(e, y, b);
|
|
100
|
+
}
|
|
101
|
+
atLeastOneInternalLogic(e, y, b) {
|
|
102
|
+
let x = this.getLaFuncFromCache(b), S;
|
|
103
|
+
if (typeof y != "function") {
|
|
104
|
+
S = y.DEF;
|
|
105
|
+
let e = y.GATE;
|
|
106
|
+
if (e !== void 0) {
|
|
107
|
+
let y = x;
|
|
108
|
+
x = () => e.call(this) && y.call(this);
|
|
109
109
|
}
|
|
110
|
-
} else
|
|
111
|
-
if (
|
|
112
|
-
let
|
|
113
|
-
for (;
|
|
114
|
-
} else throw this.raiseEarlyExitException(
|
|
115
|
-
this.attemptInRepetitionRecovery(this.atLeastOneInternal, [
|
|
116
|
-
}
|
|
117
|
-
atLeastOneSepFirstInternal(
|
|
118
|
-
let
|
|
119
|
-
this.atLeastOneSepFirstInternalLogic(
|
|
120
|
-
}
|
|
121
|
-
atLeastOneSepFirstInternalLogic(
|
|
122
|
-
let
|
|
123
|
-
if (this.getLaFuncFromCache(
|
|
124
|
-
|
|
125
|
-
let
|
|
126
|
-
for (; this.tokenMatcher(this.
|
|
110
|
+
} else S = y;
|
|
111
|
+
if (x.call(this) === !0) {
|
|
112
|
+
let e = this.doSingleRepetition(S);
|
|
113
|
+
for (; x.call(this) === !0 && e === !0;) e = this.doSingleRepetition(S);
|
|
114
|
+
} else throw this.raiseEarlyExitException(e, PROD_TYPE.REPETITION_MANDATORY, y.ERR_MSG);
|
|
115
|
+
this.attemptInRepetitionRecovery(this.atLeastOneInternal, [e, y], x, AT_LEAST_ONE_IDX, e, NextTerminalAfterAtLeastOneWalker);
|
|
116
|
+
}
|
|
117
|
+
atLeastOneSepFirstInternal(e, y) {
|
|
118
|
+
let b = this.getKeyForAutomaticLookahead(AT_LEAST_ONE_SEP_IDX, e);
|
|
119
|
+
this.atLeastOneSepFirstInternalLogic(e, y, b);
|
|
120
|
+
}
|
|
121
|
+
atLeastOneSepFirstInternalLogic(e, y, b) {
|
|
122
|
+
let x = y.DEF, S = y.SEP;
|
|
123
|
+
if (this.getLaFuncFromCache(b).call(this) === !0) {
|
|
124
|
+
x.call(this);
|
|
125
|
+
let y = () => this.tokenMatcher(this.LA_FAST(1), S);
|
|
126
|
+
for (; this.tokenMatcher(this.LA_FAST(1), S) === !0;) this.CONSUME(S), x.call(this);
|
|
127
127
|
this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal, [
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
128
|
+
e,
|
|
129
|
+
S,
|
|
130
|
+
y,
|
|
131
|
+
x,
|
|
132
132
|
NextTerminalAfterAtLeastOneSepWalker
|
|
133
|
-
],
|
|
134
|
-
} else throw this.raiseEarlyExitException(
|
|
135
|
-
}
|
|
136
|
-
manyInternal(
|
|
137
|
-
let
|
|
138
|
-
return this.manyInternalLogic(
|
|
139
|
-
}
|
|
140
|
-
manyInternalLogic(
|
|
141
|
-
let
|
|
142
|
-
if (typeof
|
|
143
|
-
|
|
144
|
-
let
|
|
145
|
-
if (
|
|
146
|
-
let
|
|
147
|
-
|
|
133
|
+
], y, AT_LEAST_ONE_SEP_IDX, e, NextTerminalAfterAtLeastOneSepWalker);
|
|
134
|
+
} else throw this.raiseEarlyExitException(e, PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR, y.ERR_MSG);
|
|
135
|
+
}
|
|
136
|
+
manyInternal(e, y) {
|
|
137
|
+
let b = this.getKeyForAutomaticLookahead(768, e);
|
|
138
|
+
return this.manyInternalLogic(e, y, b);
|
|
139
|
+
}
|
|
140
|
+
manyInternalLogic(e, y, b) {
|
|
141
|
+
let x = this.getLaFuncFromCache(b), S;
|
|
142
|
+
if (typeof y != "function") {
|
|
143
|
+
S = y.DEF;
|
|
144
|
+
let e = y.GATE;
|
|
145
|
+
if (e !== void 0) {
|
|
146
|
+
let y = x;
|
|
147
|
+
x = () => e.call(this) && y.call(this);
|
|
148
148
|
}
|
|
149
|
-
} else
|
|
150
|
-
let
|
|
151
|
-
for (;
|
|
152
|
-
this.attemptInRepetitionRecovery(this.manyInternal, [
|
|
153
|
-
}
|
|
154
|
-
manySepFirstInternal(
|
|
155
|
-
let
|
|
156
|
-
this.manySepFirstInternalLogic(
|
|
157
|
-
}
|
|
158
|
-
manySepFirstInternalLogic(
|
|
159
|
-
let
|
|
160
|
-
if (this.getLaFuncFromCache(
|
|
161
|
-
|
|
162
|
-
let
|
|
163
|
-
for (; this.tokenMatcher(this.
|
|
149
|
+
} else S = y;
|
|
150
|
+
let C = !0;
|
|
151
|
+
for (; x.call(this) === !0 && C === !0;) C = this.doSingleRepetition(S);
|
|
152
|
+
this.attemptInRepetitionRecovery(this.manyInternal, [e, y], x, 768, e, NextTerminalAfterManyWalker, C);
|
|
153
|
+
}
|
|
154
|
+
manySepFirstInternal(e, y) {
|
|
155
|
+
let b = this.getKeyForAutomaticLookahead(MANY_SEP_IDX, e);
|
|
156
|
+
this.manySepFirstInternalLogic(e, y, b);
|
|
157
|
+
}
|
|
158
|
+
manySepFirstInternalLogic(e, y, b) {
|
|
159
|
+
let x = y.DEF, S = y.SEP;
|
|
160
|
+
if (this.getLaFuncFromCache(b).call(this) === !0) {
|
|
161
|
+
x.call(this);
|
|
162
|
+
let y = () => this.tokenMatcher(this.LA_FAST(1), S);
|
|
163
|
+
for (; this.tokenMatcher(this.LA_FAST(1), S) === !0;) this.CONSUME(S), x.call(this);
|
|
164
164
|
this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal, [
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
165
|
+
e,
|
|
166
|
+
S,
|
|
167
|
+
y,
|
|
168
|
+
x,
|
|
169
169
|
NextTerminalAfterManySepWalker
|
|
170
|
-
],
|
|
170
|
+
], y, MANY_SEP_IDX, e, NextTerminalAfterManySepWalker);
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
|
-
repetitionSepSecondInternal(
|
|
174
|
-
for (;
|
|
173
|
+
repetitionSepSecondInternal(e, y, b, x, S) {
|
|
174
|
+
for (; b();) this.CONSUME(y), x.call(this);
|
|
175
175
|
/* istanbul ignore else */
|
|
176
176
|
this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal, [
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
],
|
|
183
|
-
}
|
|
184
|
-
doSingleRepetition(
|
|
185
|
-
let
|
|
186
|
-
return
|
|
187
|
-
}
|
|
188
|
-
orInternal(
|
|
189
|
-
let
|
|
190
|
-
if (
|
|
191
|
-
this.raiseNoAltException(
|
|
177
|
+
e,
|
|
178
|
+
y,
|
|
179
|
+
b,
|
|
180
|
+
x,
|
|
181
|
+
S
|
|
182
|
+
], b, AT_LEAST_ONE_SEP_IDX, e, S);
|
|
183
|
+
}
|
|
184
|
+
doSingleRepetition(e) {
|
|
185
|
+
let y = this.getLexerPosition();
|
|
186
|
+
return e.call(this), this.getLexerPosition() > y;
|
|
187
|
+
}
|
|
188
|
+
orInternal(e, y) {
|
|
189
|
+
let b = this.getKeyForAutomaticLookahead(256, y), x = Array.isArray(e) ? e : e.DEF, S = this.getLaFuncFromCache(b).call(this, x);
|
|
190
|
+
if (S !== void 0) return x[S].ALT.call(this);
|
|
191
|
+
this.raiseNoAltException(y, e.ERR_MSG);
|
|
192
192
|
}
|
|
193
193
|
ruleFinallyStateUpdate() {
|
|
194
|
-
|
|
195
|
-
let l = this.LA(1), E = this.errorMessageProvider.buildNotAllInputParsedMessage({
|
|
196
|
-
firstRedundant: l,
|
|
197
|
-
ruleName: this.getCurrRuleFullName()
|
|
198
|
-
});
|
|
199
|
-
this.SAVE_ERROR(new NotAllInputParsedException(E, l));
|
|
200
|
-
}
|
|
194
|
+
this.RULE_STACK_IDX--, this.RULE_OCCURRENCE_STACK_IDX--, this.RULE_STACK_IDX >= 0 && (this.currRuleShortName = this.RULE_STACK[this.RULE_STACK_IDX]), this.cstFinallyStateUpdate();
|
|
201
195
|
}
|
|
202
|
-
subruleInternal(
|
|
203
|
-
let
|
|
196
|
+
subruleInternal(e, y, b) {
|
|
197
|
+
let x;
|
|
204
198
|
try {
|
|
205
|
-
let
|
|
206
|
-
return this.subruleIdx =
|
|
207
|
-
} catch (
|
|
208
|
-
throw this.subruleInternalError(
|
|
199
|
+
let S = b === void 0 ? void 0 : b.ARGS;
|
|
200
|
+
return this.subruleIdx = y, x = e.coreRule.apply(this, S), this.cstPostNonTerminal(x, b !== void 0 && b.LABEL !== void 0 ? b.LABEL : e.ruleName), x;
|
|
201
|
+
} catch (y) {
|
|
202
|
+
throw this.subruleInternalError(y, b, e.ruleName);
|
|
209
203
|
}
|
|
210
204
|
}
|
|
211
|
-
subruleInternalError(
|
|
212
|
-
throw isRecognitionException(
|
|
205
|
+
subruleInternalError(e, y, b) {
|
|
206
|
+
throw isRecognitionException(e) && e.partialCstResult !== void 0 && (this.cstPostNonTerminal(e.partialCstResult, y !== void 0 && y.LABEL !== void 0 ? y.LABEL : b), delete e.partialCstResult), e;
|
|
213
207
|
}
|
|
214
|
-
consumeInternal(
|
|
215
|
-
let
|
|
208
|
+
consumeInternal(e, y, b) {
|
|
209
|
+
let x;
|
|
216
210
|
try {
|
|
217
|
-
let
|
|
218
|
-
this.tokenMatcher(
|
|
219
|
-
} catch (
|
|
220
|
-
|
|
211
|
+
let y = this.LA_FAST(1);
|
|
212
|
+
this.tokenMatcher(y, e) === !0 ? (this.consumeToken(), x = y) : this.consumeInternalError(e, y, b);
|
|
213
|
+
} catch (b) {
|
|
214
|
+
x = this.consumeInternalRecovery(e, y, b);
|
|
221
215
|
}
|
|
222
|
-
return this.cstPostTerminal(
|
|
223
|
-
}
|
|
224
|
-
consumeInternalError(
|
|
225
|
-
let
|
|
226
|
-
throw
|
|
227
|
-
expected:
|
|
228
|
-
actual:
|
|
229
|
-
previous:
|
|
216
|
+
return this.cstPostTerminal(b !== void 0 && b.LABEL !== void 0 ? b.LABEL : e.name, x), x;
|
|
217
|
+
}
|
|
218
|
+
consumeInternalError(e, y, b) {
|
|
219
|
+
let x, S = this.LA(0);
|
|
220
|
+
throw x = b !== void 0 && b.ERR_MSG ? b.ERR_MSG : this.errorMessageProvider.buildMismatchTokenMessage({
|
|
221
|
+
expected: e,
|
|
222
|
+
actual: y,
|
|
223
|
+
previous: S,
|
|
230
224
|
ruleName: this.getCurrRuleFullName()
|
|
231
|
-
}), this.SAVE_ERROR(new MismatchedTokenException(
|
|
225
|
+
}), this.SAVE_ERROR(new MismatchedTokenException(x, y, S));
|
|
232
226
|
}
|
|
233
|
-
consumeInternalRecovery(
|
|
234
|
-
if (this.recoveryEnabled &&
|
|
235
|
-
let
|
|
227
|
+
consumeInternalRecovery(e, y, b) {
|
|
228
|
+
if (this.recoveryEnabled && b.name === "MismatchedTokenException" && !this.isBackTracking()) {
|
|
229
|
+
let x = this.getFollowsForInRuleRecovery(e, y);
|
|
236
230
|
try {
|
|
237
|
-
return this.tryInRuleRecovery(
|
|
238
|
-
} catch (
|
|
239
|
-
throw
|
|
231
|
+
return this.tryInRuleRecovery(e, x);
|
|
232
|
+
} catch (e) {
|
|
233
|
+
throw e.name === "InRuleRecoveryException" ? b : e;
|
|
240
234
|
}
|
|
241
|
-
} else throw
|
|
235
|
+
} else throw b;
|
|
242
236
|
}
|
|
243
237
|
saveRecogState() {
|
|
244
|
-
let
|
|
238
|
+
let e = this.errors, y = this.RULE_STACK.slice(0, this.RULE_STACK_IDX + 1);
|
|
245
239
|
return {
|
|
246
|
-
errors:
|
|
240
|
+
errors: e,
|
|
247
241
|
lexerState: this.exportLexerState(),
|
|
248
|
-
RULE_STACK:
|
|
242
|
+
RULE_STACK: y,
|
|
249
243
|
CST_STACK: this.CST_STACK
|
|
250
244
|
};
|
|
251
245
|
}
|
|
252
|
-
reloadRecogState(
|
|
253
|
-
this.errors =
|
|
246
|
+
reloadRecogState(e) {
|
|
247
|
+
this.errors = e.errors, this.importLexerState(e.lexerState);
|
|
248
|
+
let y = e.RULE_STACK;
|
|
249
|
+
for (let e = 0; e < y.length; e++) this.RULE_STACK[e] = y[e];
|
|
250
|
+
this.RULE_STACK_IDX = y.length - 1, this.RULE_STACK_IDX >= 0 && (this.currRuleShortName = this.RULE_STACK[this.RULE_STACK_IDX]);
|
|
254
251
|
}
|
|
255
|
-
ruleInvocationStateUpdate(
|
|
256
|
-
this.RULE_OCCURRENCE_STACK.
|
|
252
|
+
ruleInvocationStateUpdate(e, y, b) {
|
|
253
|
+
this.RULE_OCCURRENCE_STACK[++this.RULE_OCCURRENCE_STACK_IDX] = b, this.RULE_STACK[++this.RULE_STACK_IDX] = e, this.currRuleShortName = e, this.cstInvocationStateUpdate(y);
|
|
257
254
|
}
|
|
258
255
|
isBackTracking() {
|
|
259
256
|
return this.isBackTrackingStack.length !== 0;
|
|
260
257
|
}
|
|
261
258
|
getCurrRuleFullName() {
|
|
262
|
-
let
|
|
263
|
-
return this.shortRuleNameToFull[
|
|
259
|
+
let e = this.currRuleShortName;
|
|
260
|
+
return this.shortRuleNameToFull[e];
|
|
264
261
|
}
|
|
265
|
-
shortRuleNameToFullName(
|
|
266
|
-
return this.shortRuleNameToFull[
|
|
262
|
+
shortRuleNameToFullName(e) {
|
|
263
|
+
return this.shortRuleNameToFull[e];
|
|
267
264
|
}
|
|
268
265
|
isAtEndOfInput() {
|
|
269
266
|
return this.tokenMatcher(this.LA(1), EOF);
|
|
270
267
|
}
|
|
271
268
|
reset() {
|
|
272
|
-
this.resetLexerState(), this.subruleIdx = 0, this.isBackTrackingStack = [], this.errors = [], this.
|
|
269
|
+
this.resetLexerState(), this.subruleIdx = 0, this.currRuleShortName = 0, this.isBackTrackingStack = [], this.errors = [], this.RULE_STACK_IDX = -1, this.RULE_OCCURRENCE_STACK_IDX = -1, this.CST_STACK = [];
|
|
270
|
+
}
|
|
271
|
+
onBeforeParse(e) {
|
|
272
|
+
for (let e = 0; e < this.maxLookahead + 1; e++) this.tokVector.push(END_OF_FILE);
|
|
273
|
+
}
|
|
274
|
+
onAfterParse(e) {
|
|
275
|
+
if (this.isAtEndOfInput() === !1) {
|
|
276
|
+
let e = this.LA(1), y = this.errorMessageProvider.buildNotAllInputParsedMessage({
|
|
277
|
+
firstRedundant: e,
|
|
278
|
+
ruleName: this.getCurrRuleFullName()
|
|
279
|
+
});
|
|
280
|
+
this.SAVE_ERROR(new NotAllInputParsedException(y, e));
|
|
281
|
+
}
|
|
282
|
+
for (; this.tokVector.at(-1) === END_OF_FILE;) this.tokVector.pop();
|
|
273
283
|
}
|
|
274
284
|
};
|
|
275
285
|
export { RecognizerEngine };
|