@plumile/ui 0.1.113 → 0.1.114
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/lib/esm/_virtual/_rolldown/runtime.js +5 -5
- package/lib/esm/atomic/molecules/markdown/components/MarkdownLink.css.js +1 -0
- package/lib/esm/atomic/molecules/markdown/components/MarkdownTableCell.css.js +0 -1
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/architecture-7EHR7CIX.js +3 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-4EGX6M5U.js +37 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-4EGX6M5U.js.map +1 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-5DO6E6H7.js +25 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-5DO6E6H7.js.map +1 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/{chunk-LIHQZDEY.js → chunk-BR22UD5L.js} +18 -21
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-BR22UD5L.js.map +1 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FHYWG6QK.js +25 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FHYWG6QK.js.map +1 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-MPE355IW.js +25 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-MPE355IW.js.map +1 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-MZUSXYTE.js +32 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-MZUSXYTE.js.map +1 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-N66VUXT2.js +56 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-N66VUXT2.js.map +1 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-NNHCCRGN.js +20648 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-NNHCCRGN.js.map +1 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-PUPMXCY4.js +25 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-PUPMXCY4.js.map +1 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-UIBZB4QT.js +25 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-UIBZB4QT.js.map +1 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-WCWK7LTN.js +33 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-WCWK7LTN.js.map +1 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/eventmodeling-FCH6USID.js +3 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/gitGraph-WXDBUCRP.js +3 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-J43DQDTF.js +3 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-YPE3B663.js +3 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-LRSECV5Y.js +3 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-GUYGQ44K.js +3 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treeView-BLDUP644.js +3 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-LRROVOQU.js +3 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/wardley-L42UT6IY.js +3 -0
- package/lib/esm/node_modules/@mermaid-js/parser/dist/mermaid-parser.core.js +24 -19
- package/lib/esm/node_modules/@mermaid-js/parser/dist/mermaid-parser.core.js.map +1 -1
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/greedy-fas.js +8 -8
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/layout.js +105 -105
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/nesting-graph.js +12 -12
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/order/cross-count.js +8 -8
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/order/index.js +12 -12
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/order/init-order.js +6 -6
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js +7 -7
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js +9 -9
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/order/sort.js +7 -7
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/position/bk.js +53 -53
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/position/index.js +5 -5
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/rank/network-simplex.js +26 -26
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/rank/util.js +9 -9
- package/lib/esm/node_modules/dagre-d3-es/src/dagre/util.js +54 -54
- package/lib/esm/node_modules/dagre-d3-es/src/graphlib/graph.js +45 -45
- package/lib/esm/node_modules/dagre-d3-es/src/graphlib/json.js +18 -18
- package/lib/esm/node_modules/lodash-es/_arrayLikeKeys.js +8 -8
- package/lib/esm/node_modules/lodash-es/_baseAssign.js +3 -3
- package/lib/esm/node_modules/lodash-es/_baseClone.js +24 -24
- package/lib/esm/node_modules/lodash-es/_baseForOwn.js +3 -3
- package/lib/esm/node_modules/lodash-es/_baseGetAllKeys.js +3 -3
- package/lib/esm/node_modules/lodash-es/_baseIsEqualDeep.js +12 -12
- package/lib/esm/node_modules/lodash-es/_baseIteratee.js +4 -4
- package/lib/esm/node_modules/lodash-es/_baseMatchesProperty.js +9 -9
- package/lib/esm/node_modules/lodash-es/_baseMerge.js +6 -6
- package/lib/esm/node_modules/lodash-es/_baseMergeDeep.js +15 -15
- package/lib/esm/node_modules/lodash-es/_baseOrderBy.js +14 -14
- package/lib/esm/node_modules/lodash-es/_baseSet.js +8 -8
- package/lib/esm/node_modules/lodash-es/_baseSetToString.js +5 -5
- package/lib/esm/node_modules/lodash-es/_baseToString.js +11 -11
- package/lib/esm/node_modules/lodash-es/_baseUniq.js +7 -7
- package/lib/esm/node_modules/lodash-es/_copySymbols.js +3 -3
- package/lib/esm/node_modules/lodash-es/_createSet.js +6 -6
- package/lib/esm/node_modules/lodash-es/_equalByTag.js +18 -18
- package/lib/esm/node_modules/lodash-es/_flatRest.js +4 -4
- package/lib/esm/node_modules/lodash-es/_getAllKeys.js +3 -3
- package/lib/esm/node_modules/lodash-es/_getAllKeysIn.js +4 -4
- package/lib/esm/node_modules/lodash-es/_getSymbolsIn.js +3 -3
- package/lib/esm/node_modules/lodash-es/_hasPath.js +5 -5
- package/lib/esm/node_modules/lodash-es/_initCloneObject.js +4 -4
- package/lib/esm/node_modules/lodash-es/_isFlattenable.js +3 -3
- package/lib/esm/node_modules/lodash-es/_isIterateeCall.js +6 -6
- package/lib/esm/node_modules/lodash-es/_mapCacheClear.js +6 -6
- package/lib/esm/node_modules/lodash-es/findIndex.js +4 -4
- package/lib/esm/node_modules/lodash-es/forEach.js +3 -3
- package/lib/esm/node_modules/lodash-es/forIn.js +3 -3
- package/lib/esm/node_modules/lodash-es/isEmpty.js +8 -8
- package/lib/esm/node_modules/lodash-es/isPlainObject.js +4 -4
- package/lib/esm/node_modules/lodash-es/isString.js +3 -3
- package/lib/esm/node_modules/lodash-es/keys.js +4 -4
- package/lib/esm/node_modules/lodash-es/keysIn.js +3 -3
- package/lib/esm/node_modules/lodash-es/map.js +3 -3
- package/lib/esm/node_modules/lodash-es/mapValues.js +5 -5
- package/lib/esm/node_modules/lodash-es/max.js +3 -3
- package/lib/esm/node_modules/lodash-es/min.js +3 -3
- package/lib/esm/node_modules/lodash-es/minBy.js +3 -3
- package/lib/esm/node_modules/lodash-es/reduce.js +5 -5
- package/lib/esm/node_modules/lodash-es/size.js +4 -4
- package/lib/esm/node_modules/lodash-es/sortBy.js +6 -6
- package/lib/esm/node_modules/lodash-es/union.js +6 -6
- package/lib/esm/node_modules/mermaid/dist/chunks/mermaid.core/chunk-5PVQY5BW.js +146 -146
- package/lib/esm/node_modules/mermaid/dist/chunks/mermaid.core/chunk-5PVQY5BW.js.map +1 -1
- package/lib/esm/node_modules/mermaid/dist/mermaid.core.js +374 -374
- package/lib/esm/node_modules/mermaid/dist/mermaid.core.js.map +1 -1
- package/package.json +2 -2
- package/lib/esm/node_modules/@chevrotain/gast/lib/src/helpers.js +0 -27
- package/lib/esm/node_modules/@chevrotain/gast/lib/src/helpers.js.map +0 -1
- package/lib/esm/node_modules/@chevrotain/gast/lib/src/model.js +0 -155
- package/lib/esm/node_modules/@chevrotain/gast/lib/src/model.js.map +0 -1
- package/lib/esm/node_modules/@chevrotain/gast/lib/src/visitor.js +0 -45
- package/lib/esm/node_modules/@chevrotain/gast/lib/src/visitor.js.map +0 -1
- package/lib/esm/node_modules/@chevrotain/regexp-to-ast/lib/src/api.js +0 -2
- package/lib/esm/node_modules/@chevrotain/regexp-to-ast/lib/src/base-regexp-visitor.js +0 -89
- package/lib/esm/node_modules/@chevrotain/regexp-to-ast/lib/src/base-regexp-visitor.js.map +0 -1
- package/lib/esm/node_modules/@chevrotain/regexp-to-ast/lib/src/character-classes.js +0 -39
- package/lib/esm/node_modules/@chevrotain/regexp-to-ast/lib/src/character-classes.js.map +0 -1
- package/lib/esm/node_modules/@chevrotain/regexp-to-ast/lib/src/regexp-parser.js +0 -600
- package/lib/esm/node_modules/@chevrotain/regexp-to-ast/lib/src/regexp-parser.js.map +0 -1
- package/lib/esm/node_modules/@chevrotain/regexp-to-ast/lib/src/utils.js +0 -29
- package/lib/esm/node_modules/@chevrotain/regexp-to-ast/lib/src/utils.js.map +0 -1
- package/lib/esm/node_modules/@chevrotain/utils/lib/src/print.js +0 -13
- package/lib/esm/node_modules/@chevrotain/utils/lib/src/print.js.map +0 -1
- package/lib/esm/node_modules/@chevrotain/utils/lib/src/timer.js +0 -12
- package/lib/esm/node_modules/@chevrotain/utils/lib/src/timer.js.map +0 -1
- package/lib/esm/node_modules/@chevrotain/utils/lib/src/to-fast-properties.js +0 -14
- package/lib/esm/node_modules/@chevrotain/utils/lib/src/to-fast-properties.js.map +0 -1
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/architecture-YZFGNWBL.js +0 -3
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-2KRD3SAO.js +0 -28
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-2KRD3SAO.js.map +0 -1
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-67CJDMHE.js +0 -28
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-67CJDMHE.js.map +0 -1
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-7N4EOEYR.js +0 -40
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-7N4EOEYR.js.map +0 -1
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-AA7GKIK3.js +0 -35
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-AA7GKIK3.js.map +0 -1
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-CIAEETIT.js +0 -28
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-CIAEETIT.js.map +0 -1
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FOC6F5B3.js +0 -28
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-FOC6F5B3.js.map +0 -1
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-K5T4RW27.js +0 -1210
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-K5T4RW27.js.map +0 -1
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-KGLVRYIC.js +0 -28
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-KGLVRYIC.js.map +0 -1
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-LIHQZDEY.js.map +0 -1
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-ORNJ4GCN.js +0 -36
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/chunk-ORNJ4GCN.js.map +0 -1
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/gitGraph-7Q5UKJZL.js +0 -3
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/info-OMHHGYJF.js +0 -3
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/packet-4T2RLAQJ.js +0 -3
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/pie-ZZUOXDRM.js +0 -3
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/radar-PYXPWWZC.js +0 -3
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treeView-SZITEDCU.js +0 -3
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/treemap-W4RFUUIX.js +0 -3
- package/lib/esm/node_modules/@mermaid-js/parser/dist/chunks/mermaid-parser.core/wardley-RL74JXVD.js +0 -3
- package/lib/esm/node_modules/chevrotain/lib/src/api.js +0 -10
- package/lib/esm/node_modules/chevrotain/lib/src/lang/lang_extensions.js +0 -14
- package/lib/esm/node_modules/chevrotain/lib/src/lang/lang_extensions.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/constants.js +0 -6
- package/lib/esm/node_modules/chevrotain/lib/src/parse/constants.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/cst/cst.js +0 -17
- package/lib/esm/node_modules/chevrotain/lib/src/parse/cst/cst.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/cst/cst_visitor.js +0 -53
- package/lib/esm/node_modules/chevrotain/lib/src/parse/cst/cst_visitor.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/errors_public.js +0 -81
- package/lib/esm/node_modules/chevrotain/lib/src/parse/errors_public.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/exceptions_public.js +0 -37
- package/lib/esm/node_modules/chevrotain/lib/src/parse/exceptions_public.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/checks.js +0 -279
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/checks.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/first.js +0 -27
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/first.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/follow.js +0 -32
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/follow.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/gast/gast_resolver_public.js +0 -18
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/gast/gast_resolver_public.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/interpreter.js +0 -269
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/interpreter.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/keys.js +0 -8
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/keys.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/llk_lookahead.js +0 -45
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/llk_lookahead.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/lookahead.js +0 -245
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/lookahead.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/resolver.js +0 -34
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/resolver.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/rest.js +0 -60
- package/lib/esm/node_modules/chevrotain/lib/src/parse/grammar/rest.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/parser.js +0 -118
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/parser.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/error_handler.js +0 -50
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/error_handler.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/gast_recorder.js +0 -170
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/gast_recorder.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/lexer_adapter.js +0 -47
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/lexer_adapter.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/looksahead.js +0 -111
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/looksahead.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/perf_tracer.js +0 -25
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/perf_tracer.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_api.js +0 -316
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_api.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_engine.js +0 -291
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/recognizer_engine.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/recoverable.js +0 -147
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/recoverable.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/tree_builder.js +0 -96
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/traits/tree_builder.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/utils/apply_mixins.js +0 -15
- package/lib/esm/node_modules/chevrotain/lib/src/parse/parser/utils/apply_mixins.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/scan/lexer.js +0 -439
- package/lib/esm/node_modules/chevrotain/lib/src/scan/lexer.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/scan/lexer_errors_public.js +0 -13
- package/lib/esm/node_modules/chevrotain/lib/src/scan/lexer_errors_public.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/scan/lexer_public.js +0 -257
- package/lib/esm/node_modules/chevrotain/lib/src/scan/lexer_public.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/scan/reg_exp.js +0 -157
- package/lib/esm/node_modules/chevrotain/lib/src/scan/reg_exp.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/scan/reg_exp_parser.js +0 -19
- package/lib/esm/node_modules/chevrotain/lib/src/scan/reg_exp_parser.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/scan/tokens.js +0 -68
- package/lib/esm/node_modules/chevrotain/lib/src/scan/tokens.js.map +0 -1
- package/lib/esm/node_modules/chevrotain/lib/src/scan/tokens_public.js +0 -43
- package/lib/esm/node_modules/chevrotain/lib/src/scan/tokens_public.js.map +0 -1
- package/lib/esm/node_modules/chevrotain-allstar/lib/all-star-lookahead.js +0 -365
- package/lib/esm/node_modules/chevrotain-allstar/lib/all-star-lookahead.js.map +0 -1
- package/lib/esm/node_modules/chevrotain-allstar/lib/atn.js +0 -197
- package/lib/esm/node_modules/chevrotain-allstar/lib/atn.js.map +0 -1
- package/lib/esm/node_modules/chevrotain-allstar/lib/dfa.js +0 -35
- package/lib/esm/node_modules/chevrotain-allstar/lib/dfa.js.map +0 -1
- package/lib/esm/node_modules/chevrotain-allstar/lib/index.js +0 -1
- package/lib/esm/node_modules/langium/lib/default-module.js +0 -89
- package/lib/esm/node_modules/langium/lib/default-module.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/dependency-injection.js +0 -62
- package/lib/esm/node_modules/langium/lib/dependency-injection.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/documentation/comment-provider.js +0 -15
- package/lib/esm/node_modules/langium/lib/documentation/comment-provider.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/documentation/documentation-provider.js +0 -40
- package/lib/esm/node_modules/langium/lib/documentation/documentation-provider.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/documentation/jsdoc.js +0 -307
- package/lib/esm/node_modules/langium/lib/documentation/jsdoc.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/languages/generated/ast.js +0 -900
- package/lib/esm/node_modules/langium/lib/languages/generated/ast.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/languages/grammar-config.js +0 -17
- package/lib/esm/node_modules/langium/lib/languages/grammar-config.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/parser/async-parser.js +0 -13
- package/lib/esm/node_modules/langium/lib/parser/async-parser.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/parser/completion-parser-builder.js +0 -11
- package/lib/esm/node_modules/langium/lib/parser/completion-parser-builder.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/parser/cst-node-builder.js +0 -164
- package/lib/esm/node_modules/langium/lib/parser/cst-node-builder.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/parser/langium-parser-builder.js +0 -15
- package/lib/esm/node_modules/langium/lib/parser/langium-parser-builder.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/parser/langium-parser.js +0 -397
- package/lib/esm/node_modules/langium/lib/parser/langium-parser.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/parser/lexer.js +0 -54
- package/lib/esm/node_modules/langium/lib/parser/lexer.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/parser/parser-builder-base.js +0 -278
- package/lib/esm/node_modules/langium/lib/parser/parser-builder-base.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/parser/token-builder.js +0 -65
- package/lib/esm/node_modules/langium/lib/parser/token-builder.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/parser/value-converter.js +0 -82
- package/lib/esm/node_modules/langium/lib/parser/value-converter.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/references/linker.js +0 -195
- package/lib/esm/node_modules/langium/lib/references/linker.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/references/name-provider.js +0 -17
- package/lib/esm/node_modules/langium/lib/references/name-provider.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/references/references.js +0 -80
- package/lib/esm/node_modules/langium/lib/references/references.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/references/scope-computation.js +0 -39
- package/lib/esm/node_modules/langium/lib/references/scope-computation.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/references/scope-provider.js +0 -38
- package/lib/esm/node_modules/langium/lib/references/scope-provider.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/references/scope.js +0 -46
- package/lib/esm/node_modules/langium/lib/references/scope.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/serializer/hydrator.js +0 -129
- package/lib/esm/node_modules/langium/lib/serializer/hydrator.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/serializer/json-serializer.js +0 -149
- package/lib/esm/node_modules/langium/lib/serializer/json-serializer.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/service-registry.js +0 -41
- package/lib/esm/node_modules/langium/lib/service-registry.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/syntax-tree.js +0 -74
- package/lib/esm/node_modules/langium/lib/syntax-tree.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/ast-utils.js +0 -124
- package/lib/esm/node_modules/langium/lib/utils/ast-utils.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/caching.js +0 -84
- package/lib/esm/node_modules/langium/lib/utils/caching.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/cancellation.js +0 -9
- package/lib/esm/node_modules/langium/lib/utils/cancellation.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/collections.js +0 -89
- package/lib/esm/node_modules/langium/lib/utils/collections.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/cst-utils.js +0 -77
- package/lib/esm/node_modules/langium/lib/utils/cst-utils.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/disposable.js +0 -12
- package/lib/esm/node_modules/langium/lib/utils/disposable.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/errors.js +0 -13
- package/lib/esm/node_modules/langium/lib/utils/errors.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/event.js +0 -9
- package/lib/esm/node_modules/langium/lib/utils/event.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/grammar-loader.js +0 -26
- package/lib/esm/node_modules/langium/lib/utils/grammar-loader.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/grammar-utils.js +0 -221
- package/lib/esm/node_modules/langium/lib/utils/grammar-utils.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/promise-utils.js +0 -31
- package/lib/esm/node_modules/langium/lib/utils/promise-utils.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/regexp-utils.js +0 -146
- package/lib/esm/node_modules/langium/lib/utils/regexp-utils.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/stream.js +0 -331
- package/lib/esm/node_modules/langium/lib/utils/stream.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/utils/uri-utils.js +0 -111
- package/lib/esm/node_modules/langium/lib/utils/uri-utils.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/validation/document-validator.js +0 -213
- package/lib/esm/node_modules/langium/lib/validation/document-validator.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/validation/validation-registry.js +0 -90
- package/lib/esm/node_modules/langium/lib/validation/validation-registry.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/workspace/ast-descriptions.js +0 -61
- package/lib/esm/node_modules/langium/lib/workspace/ast-descriptions.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/workspace/ast-node-locator.js +0 -32
- package/lib/esm/node_modules/langium/lib/workspace/ast-node-locator.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/workspace/configuration.js +0 -55
- package/lib/esm/node_modules/langium/lib/workspace/configuration.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/workspace/document-builder.js +0 -200
- package/lib/esm/node_modules/langium/lib/workspace/document-builder.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/workspace/documents.js +0 -146
- package/lib/esm/node_modules/langium/lib/workspace/documents.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/workspace/file-system-provider.js +0 -37
- package/lib/esm/node_modules/langium/lib/workspace/file-system-provider.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/workspace/index-manager.js +0 -53
- package/lib/esm/node_modules/langium/lib/workspace/index-manager.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/workspace/workspace-lock.js +0 -46
- package/lib/esm/node_modules/langium/lib/workspace/workspace-lock.js.map +0 -1
- package/lib/esm/node_modules/langium/lib/workspace/workspace-manager.js +0 -70
- package/lib/esm/node_modules/langium/lib/workspace/workspace-manager.js.map +0 -1
- package/lib/esm/node_modules/lodash-es/flatMap.js +0 -10
- package/lib/esm/node_modules/lodash-es/flatMap.js.map +0 -1
- package/lib/esm/node_modules/lodash-es/uniqBy.js +0 -10
- package/lib/esm/node_modules/lodash-es/uniqBy.js.map +0 -1
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/cancellation.js +0 -61
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/cancellation.js.map +0 -1
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/events.js +0 -68
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/events.js.map +0 -1
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/is.js +0 -38
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/is.js.map +0 -1
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/ral.js +0 -22
- package/lib/esm/node_modules/vscode-jsonrpc/lib/common/ral.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/browser/main.js +0 -32
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/browser/main.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/api.js +0 -40
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/api.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/connection.js +0 -16
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/connection.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/messages.js +0 -35
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/messages.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js +0 -23
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js +0 -19
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js +0 -15
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js +0 -15
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js +0 -37
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js +0 -39
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js +0 -19
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js +0 -15
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js +0 -23
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js +0 -15
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js +0 -19
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.js +0 -678
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js +0 -15
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js +0 -23
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js +0 -130
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js +0 -28
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js +0 -15
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js +0 -35
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js +0 -15
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js +0 -15
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js +0 -23
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js +0 -19
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js +0 -46
- package/lib/esm/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/browser.js +0 -11
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/browser.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/main.js +0 -56
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/main.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/ril.js +0 -124
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/browser/ril.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/api.js +0 -341
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/api.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/cancellation.js +0 -61
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/cancellation.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/connection.js +0 -651
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/connection.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/disposable.js +0 -17
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/disposable.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/events.js +0 -68
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/events.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/is.js +0 -38
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/is.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/linkedMap.js +0 -239
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/linkedMap.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js +0 -97
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageReader.js +0 -133
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageReader.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageWriter.js +0 -89
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messageWriter.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messages.js +0 -165
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/messages.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/ral.js +0 -22
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/ral.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/semaphore.js +0 -48
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/semaphore.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js +0 -62
- package/lib/esm/node_modules/vscode-languageserver-protocol/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-textdocument/lib/esm/main.js +0 -142
- package/lib/esm/node_modules/vscode-languageserver-textdocument/lib/esm/main.js.map +0 -1
- package/lib/esm/node_modules/vscode-languageserver-types/lib/esm/main.js +0 -1088
- package/lib/esm/node_modules/vscode-languageserver-types/lib/esm/main.js.map +0 -1
- package/lib/esm/node_modules/vscode-uri/lib/esm/index.js +0 -377
- package/lib/esm/node_modules/vscode-uri/lib/esm/index.js.map +0 -1
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
import { Alternation as e, Alternative as t, NonTerminal as n, Option as r, Repetition as i, RepetitionMandatory as a, RepetitionMandatoryWithSeparator as o, RepetitionWithSeparator as s, Rule as c, Terminal as l } from "../../../../../@chevrotain/gast/lib/src/model.js";
|
|
2
|
-
import { RestWalker as u } from "./rest.js";
|
|
3
|
-
import { first as d } from "./first.js";
|
|
4
|
-
//#region ../../node_modules/chevrotain/lib/src/parse/grammar/interpreter.js
|
|
5
|
-
var f = class extends u {
|
|
6
|
-
constructor(e, t) {
|
|
7
|
-
super(), this.topProd = e, this.path = t, this.possibleTokTypes = [], this.nextProductionName = "", this.nextProductionOccurrence = 0, this.found = !1, this.isAtEndOfPath = !1;
|
|
8
|
-
}
|
|
9
|
-
startWalking() {
|
|
10
|
-
if (this.found = !1, this.path.ruleStack[0] !== this.topProd.name) throw Error("The path does not start with the walker's top Rule!");
|
|
11
|
-
return this.ruleStack = [...this.path.ruleStack].reverse(), this.occurrenceStack = [...this.path.occurrenceStack].reverse(), this.ruleStack.pop(), this.occurrenceStack.pop(), this.updateExpectedNext(), this.walk(this.topProd), this.possibleTokTypes;
|
|
12
|
-
}
|
|
13
|
-
walk(e, t = []) {
|
|
14
|
-
this.found || super.walk(e, t);
|
|
15
|
-
}
|
|
16
|
-
walkProdRef(e, t, n) {
|
|
17
|
-
if (e.referencedRule.name === this.nextProductionName && e.idx === this.nextProductionOccurrence) {
|
|
18
|
-
let r = t.concat(n);
|
|
19
|
-
this.updateExpectedNext(), this.walk(e.referencedRule, r);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
updateExpectedNext() {
|
|
23
|
-
this.ruleStack.length === 0 ? (this.nextProductionName = "", this.nextProductionOccurrence = 0, this.isAtEndOfPath = !0) : (this.nextProductionName = this.ruleStack.pop(), this.nextProductionOccurrence = this.occurrenceStack.pop());
|
|
24
|
-
}
|
|
25
|
-
}, p = class extends f {
|
|
26
|
-
constructor(e, t) {
|
|
27
|
-
super(e, t), this.path = t, this.nextTerminalName = "", this.nextTerminalOccurrence = 0, this.nextTerminalName = this.path.lastTok.name, this.nextTerminalOccurrence = this.path.lastTokOccurrence;
|
|
28
|
-
}
|
|
29
|
-
walkTerminal(e, n, r) {
|
|
30
|
-
if (this.isAtEndOfPath && e.terminalType.name === this.nextTerminalName && e.idx === this.nextTerminalOccurrence && !this.found) {
|
|
31
|
-
let e = new t({ definition: n.concat(r) });
|
|
32
|
-
this.possibleTokTypes = d(e), this.found = !0;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}, m = class extends u {
|
|
36
|
-
constructor(e, t) {
|
|
37
|
-
super(), this.topRule = e, this.occurrence = t, this.result = {
|
|
38
|
-
token: void 0,
|
|
39
|
-
occurrence: void 0,
|
|
40
|
-
isEndOfRule: void 0
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
startWalking() {
|
|
44
|
-
return this.walk(this.topRule), this.result;
|
|
45
|
-
}
|
|
46
|
-
}, h = class extends m {
|
|
47
|
-
walkMany(e, t, n) {
|
|
48
|
-
if (e.idx === this.occurrence) {
|
|
49
|
-
let e = t.concat(n)[0];
|
|
50
|
-
this.result.isEndOfRule = e === void 0, e instanceof l && (this.result.token = e.terminalType, this.result.occurrence = e.idx);
|
|
51
|
-
} else super.walkMany(e, t, n);
|
|
52
|
-
}
|
|
53
|
-
}, g = class extends m {
|
|
54
|
-
walkManySep(e, t, n) {
|
|
55
|
-
if (e.idx === this.occurrence) {
|
|
56
|
-
let e = t.concat(n)[0];
|
|
57
|
-
this.result.isEndOfRule = e === void 0, e instanceof l && (this.result.token = e.terminalType, this.result.occurrence = e.idx);
|
|
58
|
-
} else super.walkManySep(e, t, n);
|
|
59
|
-
}
|
|
60
|
-
}, _ = class extends m {
|
|
61
|
-
walkAtLeastOne(e, t, n) {
|
|
62
|
-
if (e.idx === this.occurrence) {
|
|
63
|
-
let e = t.concat(n)[0];
|
|
64
|
-
this.result.isEndOfRule = e === void 0, e instanceof l && (this.result.token = e.terminalType, this.result.occurrence = e.idx);
|
|
65
|
-
} else super.walkAtLeastOne(e, t, n);
|
|
66
|
-
}
|
|
67
|
-
}, v = class extends m {
|
|
68
|
-
walkAtLeastOneSep(e, t, n) {
|
|
69
|
-
if (e.idx === this.occurrence) {
|
|
70
|
-
let e = t.concat(n)[0];
|
|
71
|
-
this.result.isEndOfRule = e === void 0, e instanceof l && (this.result.token = e.terminalType, this.result.occurrence = e.idx);
|
|
72
|
-
} else super.walkAtLeastOneSep(e, t, n);
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
function y(c, u, d = []) {
|
|
76
|
-
d = [...d];
|
|
77
|
-
let f = [], p = 0;
|
|
78
|
-
function m(e) {
|
|
79
|
-
return e.concat(c.slice(p + 1));
|
|
80
|
-
}
|
|
81
|
-
function h(e) {
|
|
82
|
-
let t = y(m(e), u, d);
|
|
83
|
-
return f.concat(t);
|
|
84
|
-
}
|
|
85
|
-
for (; d.length < u && p < c.length;) {
|
|
86
|
-
let u = c[p];
|
|
87
|
-
if (u instanceof t || u instanceof n) return h(u.definition);
|
|
88
|
-
if (u instanceof r) f = h(u.definition);
|
|
89
|
-
else if (u instanceof a) return h(u.definition.concat([new i({ definition: u.definition })]));
|
|
90
|
-
else if (u instanceof o) return h([new t({ definition: u.definition }), new i({ definition: [new l({ terminalType: u.separator })].concat(u.definition) })]);
|
|
91
|
-
else if (u instanceof s) f = h(u.definition.concat([new i({ definition: [new l({ terminalType: u.separator })].concat(u.definition) })]));
|
|
92
|
-
else if (u instanceof i) f = h(u.definition.concat([new i({ definition: u.definition })]));
|
|
93
|
-
else if (u instanceof e) return u.definition.forEach((e) => {
|
|
94
|
-
e.definition.length !== 0 && (f = h(e.definition));
|
|
95
|
-
}), f;
|
|
96
|
-
else if (u instanceof l) d.push(u.terminalType);
|
|
97
|
-
else throw Error("non exhaustive match");
|
|
98
|
-
p++;
|
|
99
|
-
}
|
|
100
|
-
return f.push({
|
|
101
|
-
partialPath: d,
|
|
102
|
-
suffixDef: c.slice(p)
|
|
103
|
-
}), f;
|
|
104
|
-
}
|
|
105
|
-
function b(u, d, f, p) {
|
|
106
|
-
let m = "EXIT_NONE_TERMINAL", h = [m], g = "EXIT_ALTERNATIVE", _ = !1, v = d.length, y = v - p - 1, b = [], S = [];
|
|
107
|
-
for (S.push({
|
|
108
|
-
idx: -1,
|
|
109
|
-
def: u,
|
|
110
|
-
ruleStack: [],
|
|
111
|
-
occurrenceStack: []
|
|
112
|
-
}); S.length !== 0;) {
|
|
113
|
-
let u = S.pop();
|
|
114
|
-
if (u === g) {
|
|
115
|
-
_ && S.at(-1).idx <= y && S.pop();
|
|
116
|
-
continue;
|
|
117
|
-
}
|
|
118
|
-
let p = u.def, C = u.idx, w = u.ruleStack, T = u.occurrenceStack;
|
|
119
|
-
if (p.length === 0) continue;
|
|
120
|
-
let E = p[0];
|
|
121
|
-
/* istanbul ignore else */
|
|
122
|
-
if (E === m) {
|
|
123
|
-
let e = {
|
|
124
|
-
idx: C,
|
|
125
|
-
def: p.slice(1),
|
|
126
|
-
ruleStack: w.slice(0, -1),
|
|
127
|
-
occurrenceStack: T.slice(0, -1)
|
|
128
|
-
};
|
|
129
|
-
S.push(e);
|
|
130
|
-
} else if (E instanceof l)
|
|
131
|
-
/* istanbul ignore else */
|
|
132
|
-
if (C < v - 1) {
|
|
133
|
-
let e = C + 1, t = d[e];
|
|
134
|
-
if (f(t, E.terminalType)) {
|
|
135
|
-
let t = {
|
|
136
|
-
idx: e,
|
|
137
|
-
def: p.slice(1),
|
|
138
|
-
ruleStack: w,
|
|
139
|
-
occurrenceStack: T
|
|
140
|
-
};
|
|
141
|
-
S.push(t);
|
|
142
|
-
}
|
|
143
|
-
} else if (C === v - 1) b.push({
|
|
144
|
-
nextTokenType: E.terminalType,
|
|
145
|
-
nextTokenOccurrence: E.idx,
|
|
146
|
-
ruleStack: w,
|
|
147
|
-
occurrenceStack: T
|
|
148
|
-
}), _ = !0;
|
|
149
|
-
else throw Error("non exhaustive match");
|
|
150
|
-
else if (E instanceof n) {
|
|
151
|
-
let e = [...w];
|
|
152
|
-
e.push(E.nonTerminalName);
|
|
153
|
-
let t = [...T];
|
|
154
|
-
t.push(E.idx);
|
|
155
|
-
let n = {
|
|
156
|
-
idx: C,
|
|
157
|
-
def: E.definition.concat(h, p.slice(1)),
|
|
158
|
-
ruleStack: e,
|
|
159
|
-
occurrenceStack: t
|
|
160
|
-
};
|
|
161
|
-
S.push(n);
|
|
162
|
-
} else if (E instanceof r) {
|
|
163
|
-
let e = {
|
|
164
|
-
idx: C,
|
|
165
|
-
def: p.slice(1),
|
|
166
|
-
ruleStack: w,
|
|
167
|
-
occurrenceStack: T
|
|
168
|
-
};
|
|
169
|
-
S.push(e), S.push(g);
|
|
170
|
-
let t = {
|
|
171
|
-
idx: C,
|
|
172
|
-
def: E.definition.concat(p.slice(1)),
|
|
173
|
-
ruleStack: w,
|
|
174
|
-
occurrenceStack: T
|
|
175
|
-
};
|
|
176
|
-
S.push(t);
|
|
177
|
-
} else if (E instanceof a) {
|
|
178
|
-
let e = new i({
|
|
179
|
-
definition: E.definition,
|
|
180
|
-
idx: E.idx
|
|
181
|
-
}), t = {
|
|
182
|
-
idx: C,
|
|
183
|
-
def: E.definition.concat([e], p.slice(1)),
|
|
184
|
-
ruleStack: w,
|
|
185
|
-
occurrenceStack: T
|
|
186
|
-
};
|
|
187
|
-
S.push(t);
|
|
188
|
-
} else if (E instanceof o) {
|
|
189
|
-
let e = new i({
|
|
190
|
-
definition: [new l({ terminalType: E.separator })].concat(E.definition),
|
|
191
|
-
idx: E.idx
|
|
192
|
-
}), t = {
|
|
193
|
-
idx: C,
|
|
194
|
-
def: E.definition.concat([e], p.slice(1)),
|
|
195
|
-
ruleStack: w,
|
|
196
|
-
occurrenceStack: T
|
|
197
|
-
};
|
|
198
|
-
S.push(t);
|
|
199
|
-
} else if (E instanceof s) {
|
|
200
|
-
let e = {
|
|
201
|
-
idx: C,
|
|
202
|
-
def: p.slice(1),
|
|
203
|
-
ruleStack: w,
|
|
204
|
-
occurrenceStack: T
|
|
205
|
-
};
|
|
206
|
-
S.push(e), S.push(g);
|
|
207
|
-
let t = new i({
|
|
208
|
-
definition: [new l({ terminalType: E.separator })].concat(E.definition),
|
|
209
|
-
idx: E.idx
|
|
210
|
-
}), n = {
|
|
211
|
-
idx: C,
|
|
212
|
-
def: E.definition.concat([t], p.slice(1)),
|
|
213
|
-
ruleStack: w,
|
|
214
|
-
occurrenceStack: T
|
|
215
|
-
};
|
|
216
|
-
S.push(n);
|
|
217
|
-
} else if (E instanceof i) {
|
|
218
|
-
let e = {
|
|
219
|
-
idx: C,
|
|
220
|
-
def: p.slice(1),
|
|
221
|
-
ruleStack: w,
|
|
222
|
-
occurrenceStack: T
|
|
223
|
-
};
|
|
224
|
-
S.push(e), S.push(g);
|
|
225
|
-
let t = new i({
|
|
226
|
-
definition: E.definition,
|
|
227
|
-
idx: E.idx
|
|
228
|
-
}), n = {
|
|
229
|
-
idx: C,
|
|
230
|
-
def: E.definition.concat([t], p.slice(1)),
|
|
231
|
-
ruleStack: w,
|
|
232
|
-
occurrenceStack: T
|
|
233
|
-
};
|
|
234
|
-
S.push(n);
|
|
235
|
-
} else if (E instanceof e) for (let e = E.definition.length - 1; e >= 0; e--) {
|
|
236
|
-
let t = {
|
|
237
|
-
idx: C,
|
|
238
|
-
def: E.definition[e].definition.concat(p.slice(1)),
|
|
239
|
-
ruleStack: w,
|
|
240
|
-
occurrenceStack: T
|
|
241
|
-
};
|
|
242
|
-
S.push(t), S.push(g);
|
|
243
|
-
}
|
|
244
|
-
else if (E instanceof t) S.push({
|
|
245
|
-
idx: C,
|
|
246
|
-
def: E.definition.concat(p.slice(1)),
|
|
247
|
-
ruleStack: w,
|
|
248
|
-
occurrenceStack: T
|
|
249
|
-
});
|
|
250
|
-
else if (E instanceof c) S.push(x(E, C, w, T));
|
|
251
|
-
else throw Error("non exhaustive match");
|
|
252
|
-
}
|
|
253
|
-
return b;
|
|
254
|
-
}
|
|
255
|
-
function x(e, t, n, r) {
|
|
256
|
-
let i = [...n];
|
|
257
|
-
i.push(e.name);
|
|
258
|
-
let a = [...r];
|
|
259
|
-
return a.push(1), {
|
|
260
|
-
idx: t,
|
|
261
|
-
def: e.definition,
|
|
262
|
-
ruleStack: i,
|
|
263
|
-
occurrenceStack: a
|
|
264
|
-
};
|
|
265
|
-
}
|
|
266
|
-
//#endregion
|
|
267
|
-
export { p as NextAfterTokenWalker, v as NextTerminalAfterAtLeastOneSepWalker, _ as NextTerminalAfterAtLeastOneWalker, g as NextTerminalAfterManySepWalker, h as NextTerminalAfterManyWalker, b as nextPossibleTokensAfter, y as possiblePathsFrom };
|
|
268
|
-
|
|
269
|
-
//# sourceMappingURL=interpreter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"interpreter.js","names":[],"sources":["../../../../../../../../../../node_modules/chevrotain/lib/src/parse/grammar/interpreter.js"],"sourcesContent":["import { first } from \"./first.js\";\nimport { RestWalker } from \"./rest.js\";\nimport { Alternation, Alternative, NonTerminal, Option, Repetition, RepetitionMandatory, RepetitionMandatoryWithSeparator, RepetitionWithSeparator, Rule, Terminal, } from \"@chevrotain/gast\";\nexport class AbstractNextPossibleTokensWalker extends RestWalker {\n constructor(topProd, path) {\n super();\n this.topProd = topProd;\n this.path = path;\n this.possibleTokTypes = [];\n this.nextProductionName = \"\";\n this.nextProductionOccurrence = 0;\n this.found = false;\n this.isAtEndOfPath = false;\n }\n startWalking() {\n this.found = false;\n if (this.path.ruleStack[0] !== this.topProd.name) {\n throw Error(\"The path does not start with the walker's top Rule!\");\n }\n // immutable for the win\n this.ruleStack = [...this.path.ruleStack].reverse(); // intelij bug requires assertion\n this.occurrenceStack = [...this.path.occurrenceStack].reverse(); // intelij bug requires assertion\n // already verified that the first production is valid, we now seek the 2nd production\n this.ruleStack.pop();\n this.occurrenceStack.pop();\n this.updateExpectedNext();\n this.walk(this.topProd);\n return this.possibleTokTypes;\n }\n walk(prod, prevRest = []) {\n // stop scanning once we found the path\n if (!this.found) {\n super.walk(prod, prevRest);\n }\n }\n walkProdRef(refProd, currRest, prevRest) {\n // found the next production, need to keep walking in it\n if (refProd.referencedRule.name === this.nextProductionName &&\n refProd.idx === this.nextProductionOccurrence) {\n const fullRest = currRest.concat(prevRest);\n this.updateExpectedNext();\n this.walk(refProd.referencedRule, fullRest);\n }\n }\n updateExpectedNext() {\n // need to consume the Terminal\n if (this.ruleStack.length === 0) {\n // must reset nextProductionXXX to avoid walking down another Top Level production while what we are\n // really seeking is the last Terminal...\n this.nextProductionName = \"\";\n this.nextProductionOccurrence = 0;\n this.isAtEndOfPath = true;\n }\n else {\n this.nextProductionName = this.ruleStack.pop();\n this.nextProductionOccurrence = this.occurrenceStack.pop();\n }\n }\n}\nexport class NextAfterTokenWalker extends AbstractNextPossibleTokensWalker {\n constructor(topProd, path) {\n super(topProd, path);\n this.path = path;\n this.nextTerminalName = \"\";\n this.nextTerminalOccurrence = 0;\n this.nextTerminalName = this.path.lastTok.name;\n this.nextTerminalOccurrence = this.path.lastTokOccurrence;\n }\n walkTerminal(terminal, currRest, prevRest) {\n if (this.isAtEndOfPath &&\n terminal.terminalType.name === this.nextTerminalName &&\n terminal.idx === this.nextTerminalOccurrence &&\n !this.found) {\n const fullRest = currRest.concat(prevRest);\n const restProd = new Alternative({ definition: fullRest });\n this.possibleTokTypes = first(restProd);\n this.found = true;\n }\n }\n}\n/**\n * This walker only \"walks\" a single \"TOP\" level in the Grammar Ast, this means\n * it never \"follows\" production refs\n */\nexport class AbstractNextTerminalAfterProductionWalker extends RestWalker {\n constructor(topRule, occurrence) {\n super();\n this.topRule = topRule;\n this.occurrence = occurrence;\n this.result = {\n token: undefined,\n occurrence: undefined,\n isEndOfRule: undefined,\n };\n }\n startWalking() {\n this.walk(this.topRule);\n return this.result;\n }\n}\nexport class NextTerminalAfterManyWalker extends AbstractNextTerminalAfterProductionWalker {\n walkMany(manyProd, currRest, prevRest) {\n if (manyProd.idx === this.occurrence) {\n const firstAfterMany = currRest.concat(prevRest)[0];\n this.result.isEndOfRule = firstAfterMany === undefined;\n if (firstAfterMany instanceof Terminal) {\n this.result.token = firstAfterMany.terminalType;\n this.result.occurrence = firstAfterMany.idx;\n }\n }\n else {\n super.walkMany(manyProd, currRest, prevRest);\n }\n }\n}\nexport class NextTerminalAfterManySepWalker extends AbstractNextTerminalAfterProductionWalker {\n walkManySep(manySepProd, currRest, prevRest) {\n if (manySepProd.idx === this.occurrence) {\n const firstAfterManySep = currRest.concat(prevRest)[0];\n this.result.isEndOfRule = firstAfterManySep === undefined;\n if (firstAfterManySep instanceof Terminal) {\n this.result.token = firstAfterManySep.terminalType;\n this.result.occurrence = firstAfterManySep.idx;\n }\n }\n else {\n super.walkManySep(manySepProd, currRest, prevRest);\n }\n }\n}\nexport class NextTerminalAfterAtLeastOneWalker extends AbstractNextTerminalAfterProductionWalker {\n walkAtLeastOne(atLeastOneProd, currRest, prevRest) {\n if (atLeastOneProd.idx === this.occurrence) {\n const firstAfterAtLeastOne = currRest.concat(prevRest)[0];\n this.result.isEndOfRule = firstAfterAtLeastOne === undefined;\n if (firstAfterAtLeastOne instanceof Terminal) {\n this.result.token = firstAfterAtLeastOne.terminalType;\n this.result.occurrence = firstAfterAtLeastOne.idx;\n }\n }\n else {\n super.walkAtLeastOne(atLeastOneProd, currRest, prevRest);\n }\n }\n}\n// TODO: reduce code duplication in the AfterWalkers\nexport class NextTerminalAfterAtLeastOneSepWalker extends AbstractNextTerminalAfterProductionWalker {\n walkAtLeastOneSep(atleastOneSepProd, currRest, prevRest) {\n if (atleastOneSepProd.idx === this.occurrence) {\n const firstAfterfirstAfterAtLeastOneSep = currRest.concat(prevRest)[0];\n this.result.isEndOfRule = firstAfterfirstAfterAtLeastOneSep === undefined;\n if (firstAfterfirstAfterAtLeastOneSep instanceof Terminal) {\n this.result.token = firstAfterfirstAfterAtLeastOneSep.terminalType;\n this.result.occurrence = firstAfterfirstAfterAtLeastOneSep.idx;\n }\n }\n else {\n super.walkAtLeastOneSep(atleastOneSepProd, currRest, prevRest);\n }\n }\n}\nexport function possiblePathsFrom(targetDef, maxLength, currPath = []) {\n // avoid side effects\n currPath = [...currPath];\n let result = [];\n let i = 0;\n // TODO: avoid inner funcs\n function remainingPathWith(nextDef) {\n return nextDef.concat(targetDef.slice(i + 1));\n }\n // TODO: avoid inner funcs\n function getAlternativesForProd(definition) {\n const alternatives = possiblePathsFrom(remainingPathWith(definition), maxLength, currPath);\n return result.concat(alternatives);\n }\n /**\n * Mandatory productions will halt the loop as the paths computed from their recursive calls will already contain the\n * following (rest) of the targetDef.\n *\n * For optional productions (Option/Repetition/...) the loop will continue to represent the paths that do not include the\n * the optional production.\n */\n while (currPath.length < maxLength && i < targetDef.length) {\n const prod = targetDef[i];\n /* istanbul ignore else */\n if (prod instanceof Alternative) {\n return getAlternativesForProd(prod.definition);\n }\n else if (prod instanceof NonTerminal) {\n return getAlternativesForProd(prod.definition);\n }\n else if (prod instanceof Option) {\n result = getAlternativesForProd(prod.definition);\n }\n else if (prod instanceof RepetitionMandatory) {\n const newDef = prod.definition.concat([\n new Repetition({\n definition: prod.definition,\n }),\n ]);\n return getAlternativesForProd(newDef);\n }\n else if (prod instanceof RepetitionMandatoryWithSeparator) {\n const newDef = [\n new Alternative({ definition: prod.definition }),\n new Repetition({\n definition: [new Terminal({ terminalType: prod.separator })].concat(prod.definition),\n }),\n ];\n return getAlternativesForProd(newDef);\n }\n else if (prod instanceof RepetitionWithSeparator) {\n const newDef = prod.definition.concat([\n new Repetition({\n definition: [new Terminal({ terminalType: prod.separator })].concat(prod.definition),\n }),\n ]);\n result = getAlternativesForProd(newDef);\n }\n else if (prod instanceof Repetition) {\n const newDef = prod.definition.concat([\n new Repetition({\n definition: prod.definition,\n }),\n ]);\n result = getAlternativesForProd(newDef);\n }\n else if (prod instanceof Alternation) {\n prod.definition.forEach((currAlt) => {\n // TODO: this is a limited check for empty alternatives\n // It would prevent a common case of infinite loops during parser initialization.\n // However **in-directly** empty alternatives may still cause issues.\n if (currAlt.definition.length !== 0) {\n result = getAlternativesForProd(currAlt.definition);\n }\n });\n return result;\n }\n else if (prod instanceof Terminal) {\n currPath.push(prod.terminalType);\n }\n else {\n throw Error(\"non exhaustive match\");\n }\n i++;\n }\n result.push({\n partialPath: currPath,\n suffixDef: targetDef.slice(i),\n });\n return result;\n}\nexport function nextPossibleTokensAfter(initialDef, tokenVector, tokMatcher, maxLookAhead) {\n const EXIT_NON_TERMINAL = \"EXIT_NONE_TERMINAL\";\n // to avoid creating a new Array each time.\n const EXIT_NON_TERMINAL_ARR = [EXIT_NON_TERMINAL];\n const EXIT_ALTERNATIVE = \"EXIT_ALTERNATIVE\";\n let foundCompletePath = false;\n const tokenVectorLength = tokenVector.length;\n const minimalAlternativesIndex = tokenVectorLength - maxLookAhead - 1;\n const result = [];\n const possiblePaths = [];\n possiblePaths.push({\n idx: -1,\n def: initialDef,\n ruleStack: [],\n occurrenceStack: [],\n });\n while (possiblePaths.length !== 0) {\n const currPath = possiblePaths.pop();\n // skip alternatives if no more results can be found (assuming deterministic grammar with fixed lookahead)\n if (currPath === EXIT_ALTERNATIVE) {\n if (foundCompletePath &&\n possiblePaths.at(-1).idx <= minimalAlternativesIndex) {\n // remove irrelevant alternative\n possiblePaths.pop();\n }\n continue;\n }\n const currDef = currPath.def;\n const currIdx = currPath.idx;\n const currRuleStack = currPath.ruleStack;\n const currOccurrenceStack = currPath.occurrenceStack;\n // For Example: an empty path could exist in a valid grammar in the case of an EMPTY_ALT\n if (currDef.length === 0) {\n continue;\n }\n const prod = currDef[0];\n /* istanbul ignore else */\n if (prod === EXIT_NON_TERMINAL) {\n const nextPath = {\n idx: currIdx,\n def: currDef.slice(1),\n ruleStack: currRuleStack.slice(0, -1),\n occurrenceStack: currOccurrenceStack.slice(0, -1),\n };\n possiblePaths.push(nextPath);\n }\n else if (prod instanceof Terminal) {\n /* istanbul ignore else */\n if (currIdx < tokenVectorLength - 1) {\n const nextIdx = currIdx + 1;\n const actualToken = tokenVector[nextIdx];\n if (tokMatcher(actualToken, prod.terminalType)) {\n const nextPath = {\n idx: nextIdx,\n def: currDef.slice(1),\n ruleStack: currRuleStack,\n occurrenceStack: currOccurrenceStack,\n };\n possiblePaths.push(nextPath);\n }\n // end of the line\n }\n else if (currIdx === tokenVectorLength - 1) {\n // IGNORE ABOVE ELSE\n result.push({\n nextTokenType: prod.terminalType,\n nextTokenOccurrence: prod.idx,\n ruleStack: currRuleStack,\n occurrenceStack: currOccurrenceStack,\n });\n foundCompletePath = true;\n }\n else {\n throw Error(\"non exhaustive match\");\n }\n }\n else if (prod instanceof NonTerminal) {\n const newRuleStack = [...currRuleStack];\n newRuleStack.push(prod.nonTerminalName);\n const newOccurrenceStack = [...currOccurrenceStack];\n newOccurrenceStack.push(prod.idx);\n const nextPath = {\n idx: currIdx,\n def: prod.definition.concat(EXIT_NON_TERMINAL_ARR, currDef.slice(1)),\n ruleStack: newRuleStack,\n occurrenceStack: newOccurrenceStack,\n };\n possiblePaths.push(nextPath);\n }\n else if (prod instanceof Option) {\n // the order of alternatives is meaningful, FILO (Last path will be traversed first).\n const nextPathWithout = {\n idx: currIdx,\n def: currDef.slice(1),\n ruleStack: currRuleStack,\n occurrenceStack: currOccurrenceStack,\n };\n possiblePaths.push(nextPathWithout);\n // required marker to avoid backtracking paths whose higher priority alternatives already matched\n possiblePaths.push(EXIT_ALTERNATIVE);\n const nextPathWith = {\n idx: currIdx,\n def: prod.definition.concat(currDef.slice(1)),\n ruleStack: currRuleStack,\n occurrenceStack: currOccurrenceStack,\n };\n possiblePaths.push(nextPathWith);\n }\n else if (prod instanceof RepetitionMandatory) {\n // TODO:(THE NEW operators here take a while...) (convert once?)\n const secondIteration = new Repetition({\n definition: prod.definition,\n idx: prod.idx,\n });\n const nextDef = prod.definition.concat([secondIteration], currDef.slice(1));\n const nextPath = {\n idx: currIdx,\n def: nextDef,\n ruleStack: currRuleStack,\n occurrenceStack: currOccurrenceStack,\n };\n possiblePaths.push(nextPath);\n }\n else if (prod instanceof RepetitionMandatoryWithSeparator) {\n // TODO:(THE NEW operators here take a while...) (convert once?)\n const separatorGast = new Terminal({\n terminalType: prod.separator,\n });\n const secondIteration = new Repetition({\n definition: [separatorGast].concat(prod.definition),\n idx: prod.idx,\n });\n const nextDef = prod.definition.concat([secondIteration], currDef.slice(1));\n const nextPath = {\n idx: currIdx,\n def: nextDef,\n ruleStack: currRuleStack,\n occurrenceStack: currOccurrenceStack,\n };\n possiblePaths.push(nextPath);\n }\n else if (prod instanceof RepetitionWithSeparator) {\n // the order of alternatives is meaningful, FILO (Last path will be traversed first).\n const nextPathWithout = {\n idx: currIdx,\n def: currDef.slice(1),\n ruleStack: currRuleStack,\n occurrenceStack: currOccurrenceStack,\n };\n possiblePaths.push(nextPathWithout);\n // required marker to avoid backtracking paths whose higher priority alternatives already matched\n possiblePaths.push(EXIT_ALTERNATIVE);\n const separatorGast = new Terminal({\n terminalType: prod.separator,\n });\n const nthRepetition = new Repetition({\n definition: [separatorGast].concat(prod.definition),\n idx: prod.idx,\n });\n const nextDef = prod.definition.concat([nthRepetition], currDef.slice(1));\n const nextPathWith = {\n idx: currIdx,\n def: nextDef,\n ruleStack: currRuleStack,\n occurrenceStack: currOccurrenceStack,\n };\n possiblePaths.push(nextPathWith);\n }\n else if (prod instanceof Repetition) {\n // the order of alternatives is meaningful, FILO (Last path will be traversed first).\n const nextPathWithout = {\n idx: currIdx,\n def: currDef.slice(1),\n ruleStack: currRuleStack,\n occurrenceStack: currOccurrenceStack,\n };\n possiblePaths.push(nextPathWithout);\n // required marker to avoid backtracking paths whose higher priority alternatives already matched\n possiblePaths.push(EXIT_ALTERNATIVE);\n // TODO: an empty repetition will cause infinite loops here, will the parser detect this in selfAnalysis?\n const nthRepetition = new Repetition({\n definition: prod.definition,\n idx: prod.idx,\n });\n const nextDef = prod.definition.concat([nthRepetition], currDef.slice(1));\n const nextPathWith = {\n idx: currIdx,\n def: nextDef,\n ruleStack: currRuleStack,\n occurrenceStack: currOccurrenceStack,\n };\n possiblePaths.push(nextPathWith);\n }\n else if (prod instanceof Alternation) {\n // the order of alternatives is meaningful, FILO (Last path will be traversed first).\n for (let i = prod.definition.length - 1; i >= 0; i--) {\n const currAlt = prod.definition[i];\n const currAltPath = {\n idx: currIdx,\n def: currAlt.definition.concat(currDef.slice(1)),\n ruleStack: currRuleStack,\n occurrenceStack: currOccurrenceStack,\n };\n possiblePaths.push(currAltPath);\n possiblePaths.push(EXIT_ALTERNATIVE);\n }\n }\n else if (prod instanceof Alternative) {\n possiblePaths.push({\n idx: currIdx,\n def: prod.definition.concat(currDef.slice(1)),\n ruleStack: currRuleStack,\n occurrenceStack: currOccurrenceStack,\n });\n }\n else if (prod instanceof Rule) {\n // last because we should only encounter at most a single one of these per invocation.\n possiblePaths.push(expandTopLevelRule(prod, currIdx, currRuleStack, currOccurrenceStack));\n }\n else {\n throw Error(\"non exhaustive match\");\n }\n }\n return result;\n}\nfunction expandTopLevelRule(topRule, currIdx, currRuleStack, currOccurrenceStack) {\n const newRuleStack = [...currRuleStack];\n newRuleStack.push(topRule.name);\n const newCurrOccurrenceStack = [...currOccurrenceStack];\n // top rule is always assumed to have been called with occurrence index 1\n newCurrOccurrenceStack.push(1);\n return {\n idx: currIdx,\n def: topRule.definition,\n ruleStack: newRuleStack,\n occurrenceStack: newCurrOccurrenceStack,\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
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"keys.js","names":[],"sources":["../../../../../../../../../../node_modules/chevrotain/lib/src/parse/grammar/keys.js"],"sourcesContent":["// Lookahead keys are 32Bit integers in the form\n// TTTTTTTT-ZZZZZZZZZZZZ-YYYY-XXXXXXXX\n// XXXX -> Occurrence Index bitmap.\n// YYYY -> DSL Method Type bitmap.\n// ZZZZZZZZZZZZZZZ -> Rule short Index bitmap.\n// TTTTTTTTT -> alternation alternative index bitmap\nexport const BITS_FOR_METHOD_TYPE = 4;\nexport const BITS_FOR_OCCURRENCE_IDX = 8;\nexport const BITS_FOR_RULE_IDX = 12;\n// TODO: validation, this means that there may at most 2^8 --> 256 alternatives for an alternation.\nexport const BITS_FOR_ALT_IDX = 8;\n// short string used as part of mapping keys.\n// being short improves the performance when composing KEYS for maps out of these\n// The 5 - 8 bits (16 possible values, are reserved for the DSL method indices)\nexport const OR_IDX = 1 << BITS_FOR_OCCURRENCE_IDX;\nexport const OPTION_IDX = 2 << BITS_FOR_OCCURRENCE_IDX;\nexport const MANY_IDX = 3 << BITS_FOR_OCCURRENCE_IDX;\nexport const AT_LEAST_ONE_IDX = 4 << BITS_FOR_OCCURRENCE_IDX;\nexport const MANY_SEP_IDX = 5 << BITS_FOR_OCCURRENCE_IDX;\nexport const AT_LEAST_ONE_SEP_IDX = 6 << BITS_FOR_OCCURRENCE_IDX;\n// this actually returns a number, but it is always used as a string (object prop key)\nexport function getKeyForAutomaticLookahead(ruleIdx, dslMethodIdx, occurrence) {\n return occurrence | dslMethodIdx | ruleIdx;\n}\nconst BITS_START_FOR_ALT_IDX = 32 - BITS_FOR_ALT_IDX;\n//# sourceMappingURL=keys.js.map"],"x_google_ignoreList":[0],"mappings":"AAiBA,IAAa,IAAmB,MACnB,IAAe,MACf,IAAuB;AAEpC,SAAgB,EAA4B,GAAS,GAAc,GAAY;CAC3E,OAAO,IAAa,IAAe"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { defaultGrammarValidatorErrorProvider as e } from "../errors_public.js";
|
|
2
|
-
import { buildAlternativesLookAheadFunc as t, buildLookaheadFuncForOptionalProd as n, buildLookaheadFuncForOr as r, buildSingleAlternativeLookaheadFunction as i, getProdType as a } from "./lookahead.js";
|
|
3
|
-
import { validateAmbiguousAlternationAlternatives as o, validateEmptyOrAlternative as s, validateNoLeftRecursion as c, validateSomeNonEmptyLookaheadPath as l } from "./checks.js";
|
|
4
|
-
import { DEFAULT_PARSER_CONFIG as u } from "../parser/parser.js";
|
|
5
|
-
//#region ../../node_modules/chevrotain/lib/src/parse/grammar/llk_lookahead.js
|
|
6
|
-
var d = class {
|
|
7
|
-
constructor(e) {
|
|
8
|
-
this.maxLookahead = e?.maxLookahead ?? u.maxLookahead;
|
|
9
|
-
}
|
|
10
|
-
validate(e) {
|
|
11
|
-
let t = this.validateNoLeftRecursion(e.rules);
|
|
12
|
-
if (t.length === 0) {
|
|
13
|
-
let n = this.validateEmptyOrAlternatives(e.rules), r = this.validateAmbiguousAlternationAlternatives(e.rules, this.maxLookahead), i = this.validateSomeNonEmptyLookaheadPath(e.rules, this.maxLookahead);
|
|
14
|
-
return [
|
|
15
|
-
...t,
|
|
16
|
-
...n,
|
|
17
|
-
...r,
|
|
18
|
-
...i
|
|
19
|
-
];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
}
|
|
23
|
-
validateNoLeftRecursion(t) {
|
|
24
|
-
return t.flatMap((t) => c(t, t, e));
|
|
25
|
-
}
|
|
26
|
-
validateEmptyOrAlternatives(t) {
|
|
27
|
-
return t.flatMap((t) => s(t, e));
|
|
28
|
-
}
|
|
29
|
-
validateAmbiguousAlternationAlternatives(t, n) {
|
|
30
|
-
return t.flatMap((t) => o(t, n, e));
|
|
31
|
-
}
|
|
32
|
-
validateSomeNonEmptyLookaheadPath(t, n) {
|
|
33
|
-
return l(t, n, e);
|
|
34
|
-
}
|
|
35
|
-
buildLookaheadForAlternation(e) {
|
|
36
|
-
return r(e.prodOccurrence, e.rule, e.maxLookahead, e.hasPredicates, e.dynamicTokensEnabled, t);
|
|
37
|
-
}
|
|
38
|
-
buildLookaheadForOptional(e) {
|
|
39
|
-
return n(e.prodOccurrence, e.rule, e.maxLookahead, e.dynamicTokensEnabled, a(e.prodType), i);
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
//#endregion
|
|
43
|
-
export { d as LLkLookaheadStrategy };
|
|
44
|
-
|
|
45
|
-
//# sourceMappingURL=llk_lookahead.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"llk_lookahead.js","names":[],"sources":["../../../../../../../../../../node_modules/chevrotain/lib/src/parse/grammar/llk_lookahead.js"],"sourcesContent":["import { defaultGrammarValidatorErrorProvider } from \"../errors_public.js\";\nimport { DEFAULT_PARSER_CONFIG } from \"../parser/parser.js\";\nimport { validateAmbiguousAlternationAlternatives, validateEmptyOrAlternative, validateNoLeftRecursion, validateSomeNonEmptyLookaheadPath, } from \"./checks.js\";\nimport { buildAlternativesLookAheadFunc, buildLookaheadFuncForOptionalProd, buildLookaheadFuncForOr, buildSingleAlternativeLookaheadFunction, getProdType, } from \"./lookahead.js\";\nexport class LLkLookaheadStrategy {\n constructor(options) {\n var _a;\n this.maxLookahead =\n (_a = options === null || options === void 0 ? void 0 : options.maxLookahead) !== null && _a !== void 0 ? _a : DEFAULT_PARSER_CONFIG.maxLookahead;\n }\n validate(options) {\n const leftRecursionErrors = this.validateNoLeftRecursion(options.rules);\n if (leftRecursionErrors.length === 0) {\n const emptyAltErrors = this.validateEmptyOrAlternatives(options.rules);\n const ambiguousAltsErrors = this.validateAmbiguousAlternationAlternatives(options.rules, this.maxLookahead);\n const emptyRepetitionErrors = this.validateSomeNonEmptyLookaheadPath(options.rules, this.maxLookahead);\n const allErrors = [\n ...leftRecursionErrors,\n ...emptyAltErrors,\n ...ambiguousAltsErrors,\n ...emptyRepetitionErrors,\n ];\n return allErrors;\n }\n return leftRecursionErrors;\n }\n validateNoLeftRecursion(rules) {\n return rules.flatMap((currTopRule) => validateNoLeftRecursion(currTopRule, currTopRule, defaultGrammarValidatorErrorProvider));\n }\n validateEmptyOrAlternatives(rules) {\n return rules.flatMap((currTopRule) => validateEmptyOrAlternative(currTopRule, defaultGrammarValidatorErrorProvider));\n }\n validateAmbiguousAlternationAlternatives(rules, maxLookahead) {\n return rules.flatMap((currTopRule) => validateAmbiguousAlternationAlternatives(currTopRule, maxLookahead, defaultGrammarValidatorErrorProvider));\n }\n validateSomeNonEmptyLookaheadPath(rules, maxLookahead) {\n return validateSomeNonEmptyLookaheadPath(rules, maxLookahead, defaultGrammarValidatorErrorProvider);\n }\n buildLookaheadForAlternation(options) {\n return buildLookaheadFuncForOr(options.prodOccurrence, options.rule, options.maxLookahead, options.hasPredicates, options.dynamicTokensEnabled, buildAlternativesLookAheadFunc);\n }\n buildLookaheadForOptional(options) {\n return buildLookaheadFuncForOptionalProd(options.prodOccurrence, options.rule, options.maxLookahead, options.dynamicTokensEnabled, getProdType(options.prodType), buildSingleAlternativeLookaheadFunction);\n }\n}\n//# sourceMappingURL=llk_lookahead.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;AAIA,IAAa,IAAb,MAAkC;CAC9B,YAAY,GAAS;EAEjB,KAAK,eACK,GAA0D,gBAA+C,EAAsB;;CAE7I,SAAS,GAAS;EACd,IAAM,IAAsB,KAAK,wBAAwB,EAAQ,MAAM;EACvE,IAAI,EAAoB,WAAW,GAAG;GAClC,IAAM,IAAiB,KAAK,4BAA4B,EAAQ,MAAM,EAChE,IAAsB,KAAK,yCAAyC,EAAQ,OAAO,KAAK,aAAa,EACrG,IAAwB,KAAK,kCAAkC,EAAQ,OAAO,KAAK,aAAa;GAOtG,OAAO;IALH,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IAES;;EAEpB,OAAO;;CAEX,wBAAwB,GAAO;EAC3B,OAAO,EAAM,SAAS,MAAgB,EAAwB,GAAa,GAAa,EAAqC,CAAC;;CAElI,4BAA4B,GAAO;EAC/B,OAAO,EAAM,SAAS,MAAgB,EAA2B,GAAa,EAAqC,CAAC;;CAExH,yCAAyC,GAAO,GAAc;EAC1D,OAAO,EAAM,SAAS,MAAgB,EAAyC,GAAa,GAAc,EAAqC,CAAC;;CAEpJ,kCAAkC,GAAO,GAAc;EACnD,OAAO,EAAkC,GAAO,GAAc,EAAqC;;CAEvG,6BAA6B,GAAS;EAClC,OAAO,EAAwB,EAAQ,gBAAgB,EAAQ,MAAM,EAAQ,cAAc,EAAQ,eAAe,EAAQ,sBAAsB,EAA+B;;CAEnL,0BAA0B,GAAS;EAC/B,OAAO,EAAkC,EAAQ,gBAAgB,EAAQ,MAAM,EAAQ,cAAc,EAAQ,sBAAsB,EAAY,EAAQ,SAAS,EAAE,EAAwC"}
|
|
@@ -1,245 +0,0 @@
|
|
|
1
|
-
import { Alternation as e, Alternative as t, Option as n, Repetition as r, RepetitionMandatory as i, RepetitionMandatoryWithSeparator as a, RepetitionWithSeparator as o } from "../../../../../@chevrotain/gast/lib/src/model.js";
|
|
2
|
-
import { GAstVisitor as s } from "../../../../../@chevrotain/gast/lib/src/visitor.js";
|
|
3
|
-
import { RestWalker as c } from "./rest.js";
|
|
4
|
-
import { tokenStructuredMatcher as l, tokenStructuredMatcherNoCategories as u } from "../../scan/tokens.js";
|
|
5
|
-
import { possiblePathsFrom as d } from "./interpreter.js";
|
|
6
|
-
//#region ../../node_modules/chevrotain/lib/src/parse/grammar/lookahead.js
|
|
7
|
-
var f;
|
|
8
|
-
(function(e) {
|
|
9
|
-
e[e.OPTION = 0] = "OPTION", e[e.REPETITION = 1] = "REPETITION", e[e.REPETITION_MANDATORY = 2] = "REPETITION_MANDATORY", e[e.REPETITION_MANDATORY_WITH_SEPARATOR = 3] = "REPETITION_MANDATORY_WITH_SEPARATOR", e[e.REPETITION_WITH_SEPARATOR = 4] = "REPETITION_WITH_SEPARATOR", e[e.ALTERNATION = 5] = "ALTERNATION";
|
|
10
|
-
})(f ||= {});
|
|
11
|
-
function p(t) {
|
|
12
|
-
/* istanbul ignore else */
|
|
13
|
-
if (t instanceof n || t === "Option") return f.OPTION;
|
|
14
|
-
if (t instanceof r || t === "Repetition") return f.REPETITION;
|
|
15
|
-
if (t instanceof i || t === "RepetitionMandatory") return f.REPETITION_MANDATORY;
|
|
16
|
-
if (t instanceof a || t === "RepetitionMandatoryWithSeparator") return f.REPETITION_MANDATORY_WITH_SEPARATOR;
|
|
17
|
-
if (t instanceof o || t === "RepetitionWithSeparator") return f.REPETITION_WITH_SEPARATOR;
|
|
18
|
-
if (t instanceof e || t === "Alternation") return f.ALTERNATION;
|
|
19
|
-
throw Error("non exhaustive match");
|
|
20
|
-
}
|
|
21
|
-
function m(e) {
|
|
22
|
-
let { occurrence: t, rule: n, prodType: r, maxLookahead: i } = e, a = p(r);
|
|
23
|
-
return a === f.ALTERNATION ? T(t, n, i) : E(t, n, a, i);
|
|
24
|
-
}
|
|
25
|
-
function h(e, t, n, r, i, a) {
|
|
26
|
-
let o = T(e, t, n);
|
|
27
|
-
return a(o, r, k(o) ? u : l, i);
|
|
28
|
-
}
|
|
29
|
-
function g(e, t, n, r, i, a) {
|
|
30
|
-
let o = E(e, t, i, n), s = k(o) ? u : l;
|
|
31
|
-
return a(o[0], s, r);
|
|
32
|
-
}
|
|
33
|
-
function _(e, t, n, r) {
|
|
34
|
-
let i = e.length, a = e.every((e) => e.every((e) => e.length === 1));
|
|
35
|
-
if (t) return function(t) {
|
|
36
|
-
let r = t.map((e) => e.GATE);
|
|
37
|
-
for (let t = 0; t < i; t++) {
|
|
38
|
-
let i = e[t], a = i.length, o = r[t];
|
|
39
|
-
if (!(o !== void 0 && o.call(this) === !1)) nextPath: for (let e = 0; e < a; e++) {
|
|
40
|
-
let r = i[e], a = r.length;
|
|
41
|
-
for (let e = 0; e < a; e++) if (n(this.LA_FAST(e + 1), r[e]) === !1) continue nextPath;
|
|
42
|
-
return t;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
if (a && !r) {
|
|
47
|
-
let t = e.map((e) => e.flat()).reduce((e, t, n) => (t.forEach((t) => {
|
|
48
|
-
t.tokenTypeIdx in e || (e[t.tokenTypeIdx] = n), t.categoryMatches.forEach((t) => {
|
|
49
|
-
Object.hasOwn(e, t) || (e[t] = n);
|
|
50
|
-
});
|
|
51
|
-
}), e), {});
|
|
52
|
-
return function() {
|
|
53
|
-
return t[this.LA_FAST(1).tokenTypeIdx];
|
|
54
|
-
};
|
|
55
|
-
} else return function() {
|
|
56
|
-
for (let t = 0; t < i; t++) {
|
|
57
|
-
let r = e[t], i = r.length;
|
|
58
|
-
nextPath: for (let e = 0; e < i; e++) {
|
|
59
|
-
let i = r[e], a = i.length;
|
|
60
|
-
for (let e = 0; e < a; e++) if (n(this.LA_FAST(e + 1), i[e]) === !1) continue nextPath;
|
|
61
|
-
return t;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
function v(e, t, n) {
|
|
67
|
-
let r = e.every((e) => e.length === 1), i = e.length;
|
|
68
|
-
if (r && !n) {
|
|
69
|
-
let t = e.flat();
|
|
70
|
-
if (t.length === 1 && t[0].categoryMatches.length === 0) {
|
|
71
|
-
let e = t[0].tokenTypeIdx;
|
|
72
|
-
return function() {
|
|
73
|
-
return this.LA_FAST(1).tokenTypeIdx === e;
|
|
74
|
-
};
|
|
75
|
-
} else {
|
|
76
|
-
let e = t.reduce((e, t, n) => (e[t.tokenTypeIdx] = !0, t.categoryMatches.forEach((t) => {
|
|
77
|
-
e[t] = !0;
|
|
78
|
-
}), e), []);
|
|
79
|
-
return function() {
|
|
80
|
-
return e[this.LA_FAST(1).tokenTypeIdx] === !0;
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
} else return function() {
|
|
84
|
-
nextPath: for (let n = 0; n < i; n++) {
|
|
85
|
-
let r = e[n], i = r.length;
|
|
86
|
-
for (let e = 0; e < i; e++) if (t(this.LA_FAST(e + 1), r[e]) === !1) continue nextPath;
|
|
87
|
-
return !0;
|
|
88
|
-
}
|
|
89
|
-
return !1;
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
var y = class extends c {
|
|
93
|
-
constructor(e, t, n) {
|
|
94
|
-
super(), this.topProd = e, this.targetOccurrence = t, this.targetProdType = n;
|
|
95
|
-
}
|
|
96
|
-
startWalking() {
|
|
97
|
-
return this.walk(this.topProd), this.restDef;
|
|
98
|
-
}
|
|
99
|
-
checkIsTarget(e, t, n, r) {
|
|
100
|
-
return e.idx === this.targetOccurrence && this.targetProdType === t ? (this.restDef = n.concat(r), !0) : !1;
|
|
101
|
-
}
|
|
102
|
-
walkOption(e, t, n) {
|
|
103
|
-
this.checkIsTarget(e, f.OPTION, t, n) || super.walkOption(e, t, n);
|
|
104
|
-
}
|
|
105
|
-
walkAtLeastOne(e, t, n) {
|
|
106
|
-
this.checkIsTarget(e, f.REPETITION_MANDATORY, t, n) || super.walkOption(e, t, n);
|
|
107
|
-
}
|
|
108
|
-
walkAtLeastOneSep(e, t, n) {
|
|
109
|
-
this.checkIsTarget(e, f.REPETITION_MANDATORY_WITH_SEPARATOR, t, n) || super.walkOption(e, t, n);
|
|
110
|
-
}
|
|
111
|
-
walkMany(e, t, n) {
|
|
112
|
-
this.checkIsTarget(e, f.REPETITION, t, n) || super.walkOption(e, t, n);
|
|
113
|
-
}
|
|
114
|
-
walkManySep(e, t, n) {
|
|
115
|
-
this.checkIsTarget(e, f.REPETITION_WITH_SEPARATOR, t, n) || super.walkOption(e, t, n);
|
|
116
|
-
}
|
|
117
|
-
}, b = class extends s {
|
|
118
|
-
constructor(e, t, n) {
|
|
119
|
-
super(), this.targetOccurrence = e, this.targetProdType = t, this.targetRef = n, this.result = [];
|
|
120
|
-
}
|
|
121
|
-
checkIsTarget(e, t) {
|
|
122
|
-
e.idx === this.targetOccurrence && this.targetProdType === t && (this.targetRef === void 0 || e === this.targetRef) && (this.result = e.definition);
|
|
123
|
-
}
|
|
124
|
-
visitOption(e) {
|
|
125
|
-
this.checkIsTarget(e, f.OPTION);
|
|
126
|
-
}
|
|
127
|
-
visitRepetition(e) {
|
|
128
|
-
this.checkIsTarget(e, f.REPETITION);
|
|
129
|
-
}
|
|
130
|
-
visitRepetitionMandatory(e) {
|
|
131
|
-
this.checkIsTarget(e, f.REPETITION_MANDATORY);
|
|
132
|
-
}
|
|
133
|
-
visitRepetitionMandatoryWithSeparator(e) {
|
|
134
|
-
this.checkIsTarget(e, f.REPETITION_MANDATORY_WITH_SEPARATOR);
|
|
135
|
-
}
|
|
136
|
-
visitRepetitionWithSeparator(e) {
|
|
137
|
-
this.checkIsTarget(e, f.REPETITION_WITH_SEPARATOR);
|
|
138
|
-
}
|
|
139
|
-
visitAlternation(e) {
|
|
140
|
-
this.checkIsTarget(e, f.ALTERNATION);
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
function x(e) {
|
|
144
|
-
let t = Array(e);
|
|
145
|
-
for (let n = 0; n < e; n++) t[n] = [];
|
|
146
|
-
return t;
|
|
147
|
-
}
|
|
148
|
-
function S(e) {
|
|
149
|
-
let t = [""];
|
|
150
|
-
for (let n = 0; n < e.length; n++) {
|
|
151
|
-
let r = e[n], i = [];
|
|
152
|
-
for (let e = 0; e < t.length; e++) {
|
|
153
|
-
let n = t[e];
|
|
154
|
-
i.push(n + "_" + r.tokenTypeIdx);
|
|
155
|
-
for (let e = 0; e < r.categoryMatches.length; e++) {
|
|
156
|
-
let t = "_" + r.categoryMatches[e];
|
|
157
|
-
i.push(n + t);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
t = i;
|
|
161
|
-
}
|
|
162
|
-
return t;
|
|
163
|
-
}
|
|
164
|
-
function C(e, t, n) {
|
|
165
|
-
for (let r = 0; r < e.length; r++) {
|
|
166
|
-
if (r === n) continue;
|
|
167
|
-
let i = e[r];
|
|
168
|
-
for (let e = 0; e < t.length; e++) if (i[t[e]] === !0) return !1;
|
|
169
|
-
}
|
|
170
|
-
return !0;
|
|
171
|
-
}
|
|
172
|
-
function w(e, t) {
|
|
173
|
-
let n = e.map((e) => d([e], 1)), r = x(n.length), i = n.map((e) => {
|
|
174
|
-
let t = {};
|
|
175
|
-
return e.forEach((e) => {
|
|
176
|
-
S(e.partialPath).forEach((e) => {
|
|
177
|
-
t[e] = !0;
|
|
178
|
-
});
|
|
179
|
-
}), t;
|
|
180
|
-
}), a = n;
|
|
181
|
-
for (let e = 1; e <= t; e++) {
|
|
182
|
-
let n = a;
|
|
183
|
-
a = x(n.length);
|
|
184
|
-
for (let o = 0; o < n.length; o++) {
|
|
185
|
-
let s = n[o];
|
|
186
|
-
for (let n = 0; n < s.length; n++) {
|
|
187
|
-
let c = s[n].partialPath, l = s[n].suffixDef, u = S(c);
|
|
188
|
-
if (C(i, u, o) || l.length === 0 || c.length === t) {
|
|
189
|
-
let e = r[o];
|
|
190
|
-
if (D(e, c) === !1) {
|
|
191
|
-
e.push(c);
|
|
192
|
-
for (let e = 0; e < u.length; e++) {
|
|
193
|
-
let t = u[e];
|
|
194
|
-
i[o][t] = !0;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
} else {
|
|
198
|
-
let t = d(l, e + 1, c);
|
|
199
|
-
a[o] = a[o].concat(t), t.forEach((e) => {
|
|
200
|
-
S(e.partialPath).forEach((e) => {
|
|
201
|
-
i[o][e] = !0;
|
|
202
|
-
});
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
return r;
|
|
209
|
-
}
|
|
210
|
-
function T(e, t, n, r) {
|
|
211
|
-
let i = new b(e, f.ALTERNATION, r);
|
|
212
|
-
return t.accept(i), w(i.result, n);
|
|
213
|
-
}
|
|
214
|
-
function E(e, n, r, i) {
|
|
215
|
-
let a = new b(e, r);
|
|
216
|
-
n.accept(a);
|
|
217
|
-
let o = a.result, s = new y(n, e, r).startWalking();
|
|
218
|
-
return w([new t({ definition: o }), new t({ definition: s })], i);
|
|
219
|
-
}
|
|
220
|
-
function D(e, t) {
|
|
221
|
-
compareOtherPath: for (let n = 0; n < e.length; n++) {
|
|
222
|
-
let r = e[n];
|
|
223
|
-
if (r.length === t.length) {
|
|
224
|
-
for (let e = 0; e < r.length; e++) {
|
|
225
|
-
let n = t[e], i = r[e];
|
|
226
|
-
if (!(n === i || i.categoryMatchesMap[n.tokenTypeIdx] !== void 0)) continue compareOtherPath;
|
|
227
|
-
}
|
|
228
|
-
return !0;
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
return !1;
|
|
232
|
-
}
|
|
233
|
-
function O(e, t) {
|
|
234
|
-
return e.length < t.length && e.every((e, n) => {
|
|
235
|
-
let r = t[n];
|
|
236
|
-
return e === r || r.categoryMatchesMap[e.tokenTypeIdx];
|
|
237
|
-
});
|
|
238
|
-
}
|
|
239
|
-
function k(e) {
|
|
240
|
-
return e.every((e) => e.every((e) => e.every((e) => e.categoryMatches.length === 0)));
|
|
241
|
-
}
|
|
242
|
-
//#endregion
|
|
243
|
-
export { f as PROD_TYPE, _ as buildAlternativesLookAheadFunc, g as buildLookaheadFuncForOptionalProd, h as buildLookaheadFuncForOr, v as buildSingleAlternativeLookaheadFunction, D as containsPath, m as getLookaheadPaths, E as getLookaheadPathsForOptionalProd, T as getLookaheadPathsForOr, p as getProdType, O as isStrictPrefixOfPath };
|
|
244
|
-
|
|
245
|
-
//# sourceMappingURL=lookahead.js.map
|