@sheetxl/mcp 0.8.0-beta.19 → 0.8.0-beta.20
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/assets/{BzkTa7l_e7R--ejo.js → -qQT-DFFz0CqGx5C.js} +392 -392
- package/assets/{DFlL4pAqxaQ_hVe1.js → 4Qlx8FuxoYbVTgNW.js} +30 -30
- package/assets/{CqOzqRIQFCnEegoB.js → 4Za9gEGCvms62R7k.js} +1 -1
- package/assets/{CjoRkjB9NzS4LaFy.js → 8FzS1bgbz4U1QE_m.js} +1 -1
- package/assets/{D6fQheA4qCS5CxYQ.js → 93ksqLKL1o40anfw.js} +1 -1
- package/assets/{Bk6SeqUJkn7ft1y1.js → B-7inN76S1zUWSAt.js} +1 -1
- package/assets/{CA_22AL82sRhLAko.js → B4ii9PGvnlYkSX2q.js} +2 -2
- package/assets/{EkavVNuGWG95UggH.js → B5UmlawoCVwHHM_e.js} +5 -5
- package/assets/{DngcuWO2cSuMCMu1.js → B5yaBbFj2Np9Eh8b.js} +1 -1
- package/assets/{DNtWf9lfGjzoB9Hy.js → B6J8XN1FRN00a_ps.js} +1 -1
- package/assets/{Bj1WHx6LIEq6RVGw.js → BBm3Xjnehvx2fYj8.js} +8 -8
- package/assets/{D4p9Pv82ECKCOlua.js → BEq2PSZQN7VV19RQ.js} +1 -1
- package/assets/{D-LrOz3Yvp17bUT8.js → BGQ1GrnQ-X16GU8k.js} +2 -2
- package/assets/{rT5f4v0Q_61nHkff.js → BGlx7_eRiv47Hu9C.js} +1 -1
- package/assets/{DLJH6ppG9VHjHe_z.js → BHiZ3GtGCWUWwHqY.js} +3 -3
- package/assets/{HVm22OJ1gEeY8kii.js → BItblzoSm0lN3bTV.js} +1 -1
- package/assets/{7MIo82Ay8jEFMBH-.js → BJYl-kvBtcnMVP8W.js} +1 -1
- package/assets/{BgVW1icycJewsx77.js → BKc7zTK6ZIhcD_Wu.js} +1 -1
- package/assets/{DXORLAVmseFlsxkG.js → BMH_wtFTiRj43c69.js} +2 -2
- package/assets/{BbvOmnXrmBNjeWjQ.js → BVdH9-49M3APSiPy.js} +1 -1
- package/assets/{iP-shs7tsDGMVvQh.js → BYYbglFmasE5PrS2.js} +1 -1
- package/assets/{Bgi6ubwGkGYsILci.js → Bg8EN9R3hbeNfFyU.js} +89 -89
- package/assets/{0hHP9xpWzhkDrCTL.js → BghxJxTwaebNVcIS.js} +1 -1
- package/assets/{ArL5bPq60ZcPcwU9.js → BieAybaOdneMdvBS.js} +1 -1
- package/assets/{BcYdUKmFOf5rn2VZ.js → BkhWR4P1Evw_VP5z.js} +1 -1
- package/assets/{CNPUPTd9h7hwijpZ.js → BmmIukrNOivfENgD.js} +66 -66
- package/assets/{BiOrM24CFYL1JGFE.js → Bndiqwoh132Upow1.js} +2 -2
- package/assets/{CE4VYOniMmY8sXQ_.js → Bp9zuG6P6r9GEb6G.js} +1 -1
- package/assets/{D1nQ_BminCM0cyH0.js → C0MAjW1vgsw6o0fx.js} +1 -1
- package/assets/{DrkfG324qZRPckuC.js → C3BZQ5NFwAU_ZdeQ.js} +1 -1
- package/assets/{Bbky1A_gIgE8i0Oy.js → C46dyA4YSP1-iTSN.js} +1 -1
- package/assets/{BPctZbHQFoqJNYzC.js → C7oUg84aGjYrJUc6.js} +2 -2
- package/assets/{DwWcXC4pUR3U2WXU.js → C9JUgNS6CrdgIcW3.js} +1 -1
- package/assets/{Cgf5GQVN-D8SlQ7A.js → C9aV1SF8uCWIB4zU.js} +15 -15
- package/assets/{CjrzyKFdie6KYfsG.js → C9eaFlFi_4GmymzP.js} +40 -40
- package/assets/{CoXgI3MEnvkXeshj.js → C9w-KoMwxvouC73F.js} +161 -161
- package/assets/{CkMXAUkUuJ2LJUBE.js → C9wXzrhl0dwqZgJ6.js} +1 -1
- package/assets/CCl8x9s8Bujsew7W.js +14 -0
- package/assets/{zEyWjY3NhC8w_spQ.js → CDmri0gcZxpVZfWn.js} +625 -624
- package/assets/{CiJq0zSDKpaKhL3y.js → CDvP9QyhDwdm3MZn.js} +2 -2
- package/assets/{jPim6WG_KS-ZDker.js → CLFe9HgUi_83dE3d.js} +1 -1
- package/assets/{CBSSZrizrucIG_9i.js → CTGfmocA1WgM0_e0.js} +556 -556
- package/assets/{Bz1lp0mtNAoPuPve.js → CUJiePMri5kkpdA7.js} +1 -1
- package/assets/{DSNaHPvgqymqpsko.js → CW2Ca6tsd0aLTz88.js} +1 -1
- package/assets/{Cj4MYfqHewu8IOOL.js → CaI562iJKKOoMw8p.js} +1 -1
- package/assets/{exNO4fmccU8Aq8cE.js → CaOEaghQqXiA1ZzO.js} +121 -121
- package/assets/{D06A3fKIe3WCTFru.js → CbTKUrroY9PQ6eTu.js} +3 -3
- package/assets/{Bl77DvFa09DuVVuj.js → CgIHqG1qp9n1Gwm7.js} +253 -253
- package/assets/{Gd_0grQd-3D1VPXW.js → Cheq-qaVWm7EaIlQ.js} +1 -1
- package/assets/{vb-L2Q2jyjjgDvJy.js → Cirpx81bWi4G2foA.js} +11 -11
- package/assets/{DxKZjKyewqvj46S2.js → Cm2WENwEZ0KMyF--.js} +2 -2
- package/assets/{Bpf9jHj5AFY9543y.js → CoOIn2wx6je_rMDO.js} +31 -31
- package/assets/{Bbxkz6vmyZJftTd-.js → Co_ZOyp4mKmSfh0A.js} +1 -1
- package/assets/{BSNegq0YcivZJmkf.js → CpLTCQemd_cJ4yFu.js} +14 -14
- package/assets/{D5OYqo56iGB-5gFG.js → CpfpXfCqzZumY4pf.js} +1 -1
- package/assets/{bJ-XKvDf7IkAafUI.js → CrRJqUPbvvhnp4p4.js} +1 -1
- package/assets/{CIOlYUuBZat8FhHa.js → CrULZhDt8uE-MR2s.js} +1 -1
- package/assets/{B7vRFm79CUJ1VvFw.js → CyOyY32LLW-Pj_L7.js} +1 -1
- package/assets/{Se9JmvmEtu4MfXJh.js → CyYbUk6pGr3NIBsy.js} +22 -22
- package/assets/{CIxf9Y_JsuEEO7Nu.js → D--emvI048MvLsXl.js} +1 -1
- package/assets/{LV6tvjnxRzrWaFb8.js → D4lMEKXi13vhDJbE.js} +1 -1
- package/assets/{DxTzG7VM8v4WJ6cI.js → DALP-GkmzCJdFIV9.js} +1 -1
- package/assets/{B6A2URH-mIs7J54h.js → DAVN6N3srI1WMHCN.js} +2 -2
- package/assets/{Cz7tKgNBbnr4DZCb.js → DBfBV-tvRxCLgdvs.js} +4 -4
- package/assets/{-iaCg5U9jrEDEl_O.js → DIntlX_ha_wRdxYj.js} +1 -1
- package/assets/{CqvcgwQ0UcKndrhO.js → DMDx0fX8tHKH0DdL.js} +2 -2
- package/assets/{b6GPrIkdzfTW4f2j.js → DMMw2v0iTuBnUjMI.js} +1 -1
- package/assets/{D1kI9nJRL1RUF3-E.js → DNwyEanz3LqtOorY.js} +1 -1
- package/assets/{BGLlbVFS6J3lt9Lw.js → DPUXpIzEs1t-jBiv.js} +1 -1
- package/assets/{GZJ4AFFt8qKRADOa.js → DSy6cpdU-KNWsbSj.js} +2 -2
- package/assets/{BkhdNc3LdmcyAjwk.js → DTXRsv2Ww7WbIwCb.js} +8838 -8773
- package/assets/{CcGrcjoI12MaDmwV.js → DV_nCOON8Fgq5RBt.js} +2 -2
- package/assets/{DS9HD6_BPxzdun0X.js → DYRis8fOyk2uIZ-1.js} +4 -4
- package/assets/{B8Z4-80QEORmYOJ9.js → DZ2Njh8YgfXcv7EM.js} +1 -1
- package/assets/{Bk6A5eONxLTBIA_p.js → Dc2LiflUYpt0nVVk.js} +4 -4
- package/assets/{CWHuM2GYuKmi0rZx.js → DcwqgbgqPyzQxSsQ.js} +1 -1
- package/assets/{2nx2Wljhbuct4aKx.js → DjH6ckvISyssOSit.js} +1 -1
- package/assets/{mrif6ZBbTbZKYaLJ.js → Dlbgs8csKymbxu7r.js} +1 -1
- package/assets/{DT_kCIZ600UsFy4t.js → DnDTldUjKy0O586y.js} +2 -2
- package/assets/{Bw2Nxye4Qj10uA3o.js → DndzARNYtmumqGnG.js} +1 -1
- package/assets/{Cur_-XiBPijLpwxX.js → Drmg3-gF0VJs4Yx3.js} +1 -1
- package/assets/{zkoJXSxpRzqfbG8k.js → DsSlUklPSAsh9DhW.js} +331 -331
- package/assets/{DwcKSqV5YEBBA8hY.js → DsWJ-YRyuwDUuSge.js} +1 -1
- package/assets/{CKvP54bJ4GkUqcZi.js → Dsjx528shW3GcGpD.js} +3 -3
- package/assets/{D1ZekPxeTGzhFy2L.js → Dv9ZDmKuxn2tQDGb.js} +1 -1
- package/assets/{Ln7XTzksutZHFpml.js → DvRH46hupHUjkc7a.js} +1 -1
- package/assets/{BHsQeg6najGesUM4.js → DwsoGIyPuoQij_vi.js} +1 -1
- package/assets/{Ds6LQkRDwXsJ-CFR.js → Dx_IFz5FEPKw-HC1.js} +1 -1
- package/assets/{C7Q4V5mU0wsErspO.js → DzLrAy24em5k5en0.js} +3 -3
- package/assets/{CQZq4cA5kbES6htE.js → I7LAF1nLmYqQwt9i.js} +1 -1
- package/assets/{DAnSdO8615XsOPNe.js → IDq3QQa5uRqjVJx_.js} +1 -1
- package/assets/{BfIJP4H3I51jnIVR.js → LugZP3XHNnoiiTJO.js} +1 -1
- package/assets/{BUHEmX1fseJVV65_.js → MpvZt7VpFWEINIT6.js} +1 -1
- package/assets/{DppU35gFSUPaiCQH.js → NiD8iNE47sjggYTx.js} +1 -1
- package/assets/{CubwsTFIaEVf039H.js → PMBjuoD2MpG87dao.js} +1 -1
- package/assets/{Di_C31GTbBJ_xVOK.js → TdK2ciXA5BAlGjbR.js} +1 -1
- package/assets/{D005GbIBowRGfwed.js → Ti7kMsQ-Eo3lkfIh.js} +6 -6
- package/assets/{C_v4hb9WXIt639Cm.js → Xkr_4WLwk0ZPaYH2.js} +1 -1
- package/assets/{DXe8SG12UJoGbbWR.js → YG5hEr6CzWNmNJQ2.js} +1 -1
- package/assets/{1bm0Yqgfehw1Z2QU.js → YGYD-116vlZfzPn1.js} +12 -12
- package/assets/{CQiv3YkDRDxTjy0r.js → Z1zwOeCe-JTLgkxf.js} +37 -37
- package/assets/{BQkQNqRh5xxYhBy4.js → _LMcVYWJksPfGVxz.js} +1 -1
- package/assets/{D990KjcBrCaAEz5k.js → eV0oowKJe44NBnWj.js} +1 -1
- package/assets/{DnMDfty7pU96BIEJ.js → eWHWPRWHX6YU8bJU.js} +1 -1
- package/assets/{CYTPpV3lqNGOwme7.js → hcXZqO-0tG873E-L.js} +2 -2
- package/assets/{C06iKc7jZ6affk2m.js → klKXcdZmbQmsK2rt.js} +1 -1
- package/assets/{DOg_zvSkhsKmw4q1.js → ltqqdJxoPnLCjhBV.js} +3 -3
- package/assets/{BgUHR-HVjZDY4SaH.js → mYZ9Z5AKCn7zltHw.js} +2 -2
- package/assets/{C17Wflhw5IFSgFFY.js → nV0eE4R3npcOHLbx.js} +1 -1
- package/assets/{udbHvSLquJ5xGK3R.js → ndBoGVVjmy3vkff8.js} +2 -2
- package/assets/{Bq6ocyztkvzKxMMC.js → noAnElnMhF05bfJN.js} +1 -1
- package/assets/{DtD0J-7IetHv5o6E.js → q57cDvIPcIvWlh5T.js} +3 -3
- package/assets/{D_6TeeMN5zmoQPTm.js → rtUwIBgECTX9UO_B.js} +4 -4
- package/assets/{BTnTQBSbzYU7cwra.js → swG-DVTsez1uNW8c.js} +1 -1
- package/assets/{ht0UxaAlRnuYUvpx.js → tCavNu-Tru6yRbec.js} +1 -1
- package/assets/{Curuj_knAdRpMy1L.js → u-pSumbU-rgT6eLF.js} +240 -240
- package/assets/{C53f6C0pAU7_9FI-.js → uMoGfJGab8mZX6eN.js} +1 -1
- package/assets/{CrjUfkCuRaXUC8X8.js → uoUKT9hTrwZ2INHN.js} +3 -3
- package/assets/{DIPDNtbm8FAru-FQ.js → wYvkLI8IeHaWTtAx.js} +120 -120
- package/assets/{DHL-ZmN5GzB4pIrM.js → yDh_W6M1rvuDhFv1.js} +1 -1
- package/index.js +91 -91
- package/lib.js +1 -1
- package/licenses/dependencies.txt +35 -35
- package/package.json +2 -2
- package/screenshot-page/assets/{Cx9lvo3Q1xOwYkRK.js → B9kA0vdaFJi9iRGo.js} +4 -4
- package/screenshot-page/assets/{DwNHMH9f_lQyn50d.js → BLPyKyNun9-SHQBZ.js} +1 -1
- package/screenshot-page/assets/BMKiUDjoabO4aG1U.js +1 -0
- package/screenshot-page/assets/{BU5vg917ZnXC04e-.js → BOjOE9CEMSzcij2W.js} +2 -2
- package/screenshot-page/assets/BQ5BNe1adYfpa2OH.js +1 -0
- package/screenshot-page/assets/{DeGMS3crYErjsRrw.js → BUO6zT3gqK0uOOa-.js} +1 -1
- package/screenshot-page/assets/{DjVxI3p3ssmCtYky.js → BWtLNVUXjY6EBdEt.js} +1 -1
- package/screenshot-page/assets/{Dt1A-DUBfvyouz_T.js → BZpFWPd0PR1kPT-A.js} +1 -1
- package/screenshot-page/assets/BaCs7lUeZ7NidSkP.js +1 -0
- package/screenshot-page/assets/Bf9AN5sYHaxae0vV.js +586 -0
- package/screenshot-page/assets/Bh2PQ0zsoGtMKWp1.js +39 -0
- package/screenshot-page/assets/BkhZQsVlVHOiKGTJ.js +1 -0
- package/screenshot-page/assets/{ClWDZixRy4DFZdI5.js → BnPHZ_1rjv6kQgsL.js} +1 -1
- package/screenshot-page/assets/{BX9VkTqZoroo08EG.js → Bzf_upccQ2ho6mX0.js} +6 -6
- package/screenshot-page/assets/{Chq6rvtA5qZAwYG4.js → C0AbuMHcIS9oy4XL.js} +1 -1
- package/screenshot-page/assets/{Cpwg3bWAqBBcgBmv.js → C4v6Ljs6kwQJu06t.js} +2 -2
- package/screenshot-page/assets/C7YRL2bVWHPIwzn_.js +1 -0
- package/screenshot-page/assets/CImp91jfSuqX0Wz-.js +1 -0
- package/screenshot-page/assets/{BWDqL5_mwspr6CjI.js → CXmrXx6MZ5ApF3co.js} +1 -1
- package/screenshot-page/assets/D8QsCbSaWCLAYYso.js +1 -0
- package/screenshot-page/assets/{Cb8ORg9ENgscK6yl.js → DC_Hdwa9KL7xKU8u.js} +2 -2
- package/screenshot-page/assets/DHtL9Iawmr2Uo5VV.js +2 -0
- package/screenshot-page/assets/{BF6igzahAW9pl35p.js → DKWRl8rs3K9jBYtr.js} +1 -1
- package/screenshot-page/assets/DNYWB6WNZTquqQ9v.js +4 -0
- package/screenshot-page/assets/{DwuLl9Ua1k8m9KcK.js → Dhh1xqujbhLa8WFd.js} +1 -1
- package/screenshot-page/assets/{CLcTX_nmvaVPsxDl.js → Dkr-6Z1RJsAp9Xrv.js} +1 -1
- package/screenshot-page/assets/DllI8kZZZ5LG0Mjd.js +2 -0
- package/screenshot-page/assets/{pH9rKZYDE8xrhkC4.js → DrcpGT9FLbDzeLeG.js} +2 -2
- package/screenshot-page/assets/FjOiReLnknWbsRRr.js +57 -0
- package/screenshot-page/assets/{MzJpKWgPrxR1UN-Y.js → H_hWDMWfWmjTui7V.js} +1 -1
- package/screenshot-page/assets/LCjlxIt1dn3smVjX.js +1 -0
- package/screenshot-page/assets/{CrUIo7hXByCWY7in.js → TwKKik-YQENv52LX.js} +1 -1
- package/screenshot-page/assets/XiUItCqTNNEApgfa.js +2 -0
- package/screenshot-page/assets/XrFpPrRqQNE9AAwH.js +1 -0
- package/screenshot-page/assets/mBuOPJeUPXlKwfPZ.js +48 -0
- package/screenshot-page/assets/zSnM7GhGzLu1MM_u.js +3 -0
- package/screenshot-page/index.html +5 -5
- package/types/scripting-api.json +9334 -9333
- package/types/scripting.d.ts +16 -3
- package/assets/gCkru9Vv-Ban4DCD.js +0 -14
- package/screenshot-page/assets/A_-Jwzwmm3lkcm2f.js +0 -586
- package/screenshot-page/assets/BdDouZl3VrM4yBP5.js +0 -2
- package/screenshot-page/assets/BqlVqRKpsFGl-elI.js +0 -57
- package/screenshot-page/assets/CJmdRzGWq0FZMrp5.js +0 -1
- package/screenshot-page/assets/CaTGa2NvuuE3qJAV.js +0 -1
- package/screenshot-page/assets/CmNlzN3DCl87wNU2.js +0 -1
- package/screenshot-page/assets/CoPUxkU9zZy0dXti.js +0 -2
- package/screenshot-page/assets/CqogMOf7MzkOk7as.js +0 -2
- package/screenshot-page/assets/D0nZlczIH0ULuSyL.js +0 -3
- package/screenshot-page/assets/D1ZZiOS7_HFjpZCA.js +0 -1
- package/screenshot-page/assets/D24UBy2L73pOCPPw.js +0 -1
- package/screenshot-page/assets/D6LmZnV2h3Kg7G3e.js +0 -1
- package/screenshot-page/assets/DAkSmFRVds51vhiy.js +0 -1
- package/screenshot-page/assets/DUFPgv-3CtD_sCVO.js +0 -1
- package/screenshot-page/assets/EY31tFQrw7iYFrr6.js +0 -4
- package/screenshot-page/assets/fQ13z3k3bntY-jfw.js +0 -1
- package/screenshot-page/assets/oO6aFwepb3DDkGYF.js +0 -39
- package/screenshot-page/assets/w7IQEh1FiqZA6o5y.js +0 -42
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/mcp - MCP server exposing SheetXL spreadsheet operations as tools and resources. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/mcp - MCP server exposing SheetXL spreadsheet operations as tools and resources. - v0.8.0-beta.20
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: SheetXL EULA — https://www.sheetxl.com/eula
|
|
6
6
|
*/
|
|
7
|
-
import { u as e } from "./
|
|
8
|
-
import {
|
|
7
|
+
import { u as e } from "./CrRJqUPbvvhnp4p4.js";
|
|
8
|
+
import { $a as t, $r as n, Bt as i, Ci as r, Gt as s, Ki as o, Ma as a, Pi as c, Qi as h, Wa as l, _r as u, a as d, aa as p, cr as f, fi as m, gi as E, jr as T, jt as g, q as O, t as A, tr as R, tt as I, u as _, ut as N, va as L, wa as S, wn as C, wr as y, xt as k, y as v } from "./DTXRsv2Ww7WbIwCb.js";
|
|
9
9
|
function x(e) {
|
|
10
10
|
console && console.error && console.error(`Error: ${e}`);
|
|
11
11
|
}
|
|
@@ -92,7 +92,7 @@ var U = class {
|
|
|
92
92
|
constructor(e) {
|
|
93
93
|
super(e.definition), this.idx = 1, this.ignoreAmbiguities = !1, this.hasPredicates = !1, Object.assign(this, Y(e));
|
|
94
94
|
}
|
|
95
|
-
},
|
|
95
|
+
}, V = class {
|
|
96
96
|
constructor(e) {
|
|
97
97
|
this.idx = 1, Object.assign(this, Y(e));
|
|
98
98
|
}
|
|
@@ -100,9 +100,9 @@ var U = class {
|
|
|
100
100
|
e.visit(this);
|
|
101
101
|
}
|
|
102
102
|
};
|
|
103
|
-
function
|
|
103
|
+
function H(e) {
|
|
104
104
|
function t(e) {
|
|
105
|
-
return e.map(
|
|
105
|
+
return e.map(H);
|
|
106
106
|
}
|
|
107
107
|
if (e instanceof w) {
|
|
108
108
|
const t = {
|
|
@@ -129,13 +129,13 @@ function V(e) {
|
|
|
129
129
|
if (e instanceof j) return {
|
|
130
130
|
type: "RepetitionMandatoryWithSeparator",
|
|
131
131
|
idx: e.idx,
|
|
132
|
-
separator:
|
|
132
|
+
separator: H(new V({ terminalType: e.separator })),
|
|
133
133
|
definition: t(e.definition)
|
|
134
134
|
};
|
|
135
135
|
if (e instanceof K) return {
|
|
136
136
|
type: "RepetitionWithSeparator",
|
|
137
137
|
idx: e.idx,
|
|
138
|
-
separator:
|
|
138
|
+
separator: H(new V({ terminalType: e.separator })),
|
|
139
139
|
definition: t(e.definition)
|
|
140
140
|
};
|
|
141
141
|
if (e instanceof G) return {
|
|
@@ -148,7 +148,7 @@ function V(e) {
|
|
|
148
148
|
idx: e.idx,
|
|
149
149
|
definition: t(e.definition)
|
|
150
150
|
};
|
|
151
|
-
if (e instanceof
|
|
151
|
+
if (e instanceof V) {
|
|
152
152
|
const t = {
|
|
153
153
|
type: "Terminal",
|
|
154
154
|
name: e.terminalType.name,
|
|
@@ -183,7 +183,7 @@ var z = class {
|
|
|
183
183
|
case K: return this.visitRepetitionWithSeparator(t);
|
|
184
184
|
case G: return this.visitRepetition(t);
|
|
185
185
|
case W: return this.visitAlternation(t);
|
|
186
|
-
case
|
|
186
|
+
case V: return this.visitTerminal(t);
|
|
187
187
|
case F: return this.visitRule(t);
|
|
188
188
|
default: throw Error("non exhaustive match");
|
|
189
189
|
}
|
|
@@ -210,15 +210,15 @@ function q(e) {
|
|
|
210
210
|
if (e instanceof j) return "AT_LEAST_ONE_SEP";
|
|
211
211
|
if (e instanceof K) return "MANY_SEP";
|
|
212
212
|
if (e instanceof G) return "MANY";
|
|
213
|
-
if (e instanceof
|
|
213
|
+
if (e instanceof V) return "CONSUME";
|
|
214
214
|
throw Error("non exhaustive match");
|
|
215
215
|
}
|
|
216
|
-
var
|
|
216
|
+
var Q = class {
|
|
217
217
|
walk(e, t = []) {
|
|
218
218
|
e.definition.forEach((n, i) => {
|
|
219
219
|
const r = e.definition.slice(i + 1);
|
|
220
220
|
if (n instanceof w) this.walkProdRef(n, r, t);
|
|
221
|
-
else if (n instanceof
|
|
221
|
+
else if (n instanceof V) this.walkTerminal(n, r, t);
|
|
222
222
|
else if (n instanceof D) this.walkFlat(n, r, t);
|
|
223
223
|
else if (n instanceof B) this.walkOption(n, r, t);
|
|
224
224
|
else if (n instanceof $) this.walkAtLeastOne(n, r, t);
|
|
@@ -246,7 +246,7 @@ var Z = class {
|
|
|
246
246
|
this.walk(e, i);
|
|
247
247
|
}
|
|
248
248
|
walkAtLeastOneSep(e, t, n) {
|
|
249
|
-
const i =
|
|
249
|
+
const i = Z(e, t, n);
|
|
250
250
|
this.walk(e, i);
|
|
251
251
|
}
|
|
252
252
|
walkMany(e, t, n) {
|
|
@@ -254,7 +254,7 @@ var Z = class {
|
|
|
254
254
|
this.walk(e, i);
|
|
255
255
|
}
|
|
256
256
|
walkManySep(e, t, n) {
|
|
257
|
-
const i =
|
|
257
|
+
const i = Z(e, t, n);
|
|
258
258
|
this.walk(e, i);
|
|
259
259
|
}
|
|
260
260
|
walkOr(e, t, n) {
|
|
@@ -265,14 +265,14 @@ var Z = class {
|
|
|
265
265
|
});
|
|
266
266
|
}
|
|
267
267
|
};
|
|
268
|
-
function
|
|
269
|
-
return [new B({ definition: [new
|
|
268
|
+
function Z(e, t, n) {
|
|
269
|
+
return [new B({ definition: [new V({ terminalType: e.separator })].concat(e.definition) })].concat(t, n);
|
|
270
270
|
}
|
|
271
271
|
function J(e) {
|
|
272
272
|
if (e instanceof w) return J(e.referencedRule);
|
|
273
|
-
if (e instanceof
|
|
273
|
+
if (e instanceof V) return [e.terminalType];
|
|
274
274
|
if (function(e) {
|
|
275
|
-
return e instanceof D || e instanceof B || e instanceof G || e instanceof $ || e instanceof j || e instanceof K || e instanceof
|
|
275
|
+
return e instanceof D || e instanceof B || e instanceof G || e instanceof $ || e instanceof j || e instanceof K || e instanceof V || e instanceof F;
|
|
276
276
|
}(e)) return function(e) {
|
|
277
277
|
let t = [];
|
|
278
278
|
const n = e.definition;
|
|
@@ -288,7 +288,7 @@ function J(e) {
|
|
|
288
288
|
}(e);
|
|
289
289
|
throw Error("non exhaustive match");
|
|
290
290
|
}
|
|
291
|
-
var ee = "_~IN~_", te = class extends
|
|
291
|
+
var ee = "_~IN~_", te = class extends Q {
|
|
292
292
|
constructor(e) {
|
|
293
293
|
super(), this.topProd = e, this.follows = {};
|
|
294
294
|
}
|
|
@@ -1277,7 +1277,7 @@ function ve(e, t) {
|
|
|
1277
1277
|
return {
|
|
1278
1278
|
errors: t.map((e) => ({
|
|
1279
1279
|
message: "Token Type: ->" + e.name + "<- missing static 'PATTERN' property",
|
|
1280
|
-
type:
|
|
1280
|
+
type: Ze.MISSING_PATTERN,
|
|
1281
1281
|
tokenTypes: [e]
|
|
1282
1282
|
})),
|
|
1283
1283
|
valid: e.filter((e) => !t.includes(e))
|
|
@@ -1292,7 +1292,7 @@ function ve(e, t) {
|
|
|
1292
1292
|
return {
|
|
1293
1293
|
errors: t.map((e) => ({
|
|
1294
1294
|
message: "Token Type: ->" + e.name + "<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",
|
|
1295
|
-
type:
|
|
1295
|
+
type: Ze.INVALID_PATTERN,
|
|
1296
1296
|
tokenTypes: [e]
|
|
1297
1297
|
})),
|
|
1298
1298
|
valid: e.filter((e) => !t.includes(e))
|
|
@@ -1320,7 +1320,7 @@ function ve(e, t) {
|
|
|
1320
1320
|
}
|
|
1321
1321
|
}).map((e) => ({
|
|
1322
1322
|
message: "Unexpected RegExp Anchor Error:\n Token Type: ->" + e.name + "<- static 'PATTERN' cannot contain end of input anchor '$'\n See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.",
|
|
1323
|
-
type:
|
|
1323
|
+
type: Ze.EOI_ANCHOR_FOUND,
|
|
1324
1324
|
tokenTypes: [e]
|
|
1325
1325
|
}));
|
|
1326
1326
|
}(n)), t = t.concat(function(e) {
|
|
@@ -1342,7 +1342,7 @@ function ve(e, t) {
|
|
|
1342
1342
|
}
|
|
1343
1343
|
}).map((e) => ({
|
|
1344
1344
|
message: "Unexpected RegExp Anchor Error:\n Token Type: ->" + e.name + "<- static 'PATTERN' cannot contain start of input anchor '^'\n See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.",
|
|
1345
|
-
type:
|
|
1345
|
+
type: Ze.SOI_ANCHOR_FOUND,
|
|
1346
1346
|
tokenTypes: [e]
|
|
1347
1347
|
}));
|
|
1348
1348
|
}(n)), t = t.concat(function(e) {
|
|
@@ -1351,7 +1351,7 @@ function ve(e, t) {
|
|
|
1351
1351
|
return t instanceof RegExp && (t.multiline || t.global);
|
|
1352
1352
|
}).map((e) => ({
|
|
1353
1353
|
message: "Token Type: ->" + e.name + "<- static 'PATTERN' may NOT contain global('g') or multiline('m')",
|
|
1354
|
-
type:
|
|
1354
|
+
type: Ze.UNSUPPORTED_FLAGS_FOUND,
|
|
1355
1355
|
tokenTypes: [e]
|
|
1356
1356
|
}));
|
|
1357
1357
|
}(n)), t = t.concat(function(e) {
|
|
@@ -1361,14 +1361,14 @@ function ve(e, t) {
|
|
|
1361
1361
|
const t = e.map((e) => e.name);
|
|
1362
1362
|
return {
|
|
1363
1363
|
message: `The same RegExp pattern ->${e[0].PATTERN}<-has been used in all of the following Token Types: ${t.join(", ")} <-`,
|
|
1364
|
-
type:
|
|
1364
|
+
type: Ze.DUPLICATE_PATTERNS_FOUND,
|
|
1365
1365
|
tokenTypes: e
|
|
1366
1366
|
};
|
|
1367
1367
|
});
|
|
1368
1368
|
}(n)), t = t.concat(function(e) {
|
|
1369
1369
|
return e.filter((e) => e.PATTERN.test("")).map((e) => ({
|
|
1370
1370
|
message: "Token Type: ->" + e.name + "<- static 'PATTERN' must not match an empty string",
|
|
1371
|
-
type:
|
|
1371
|
+
type: Ze.EMPTY_MATCH_PATTERN,
|
|
1372
1372
|
tokenTypes: [e]
|
|
1373
1373
|
}));
|
|
1374
1374
|
}(n)), t;
|
|
@@ -1379,13 +1379,13 @@ function ve(e, t) {
|
|
|
1379
1379
|
return t !== tt.SKIPPED && t !== tt.NA && !("string" == typeof t);
|
|
1380
1380
|
}).map((e) => ({
|
|
1381
1381
|
message: "Token Type: ->" + e.name + "<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",
|
|
1382
|
-
type:
|
|
1382
|
+
type: Ze.INVALID_GROUP_TYPE_FOUND,
|
|
1383
1383
|
tokenTypes: [e]
|
|
1384
1384
|
}));
|
|
1385
1385
|
}(s)), n = n.concat(function(e, t) {
|
|
1386
1386
|
return e.filter((e) => void 0 !== e.PUSH_MODE && !t.includes(e.PUSH_MODE)).map((e) => ({
|
|
1387
1387
|
message: `Token Type: ->${e.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${e.PUSH_MODE}<-which does not exist`,
|
|
1388
|
-
type:
|
|
1388
|
+
type: Ze.PUSH_MODE_DOES_NOT_EXIST,
|
|
1389
1389
|
tokenTypes: [e]
|
|
1390
1390
|
}));
|
|
1391
1391
|
}(s, t)), n = n.concat(function(e) {
|
|
@@ -1432,7 +1432,7 @@ function ve(e, t) {
|
|
|
1432
1432
|
const n = `Token: ->${s.name}<- can never be matched.\nBecause it appears AFTER the Token Type ->${e.name}<-in the lexer's definition.\nSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;
|
|
1433
1433
|
t.push({
|
|
1434
1434
|
message: n,
|
|
1435
|
-
type:
|
|
1435
|
+
type: Ze.UNREACHABLE_PATTERN,
|
|
1436
1436
|
tokenTypes: [e, s]
|
|
1437
1437
|
});
|
|
1438
1438
|
}
|
|
@@ -1476,19 +1476,19 @@ function Fe(e, t) {
|
|
|
1476
1476
|
Se(t, e.PATTERN);
|
|
1477
1477
|
} catch (e) {
|
|
1478
1478
|
return {
|
|
1479
|
-
issue:
|
|
1479
|
+
issue: Ze.IDENTIFY_TERMINATOR,
|
|
1480
1480
|
errMsg: e.message
|
|
1481
1481
|
};
|
|
1482
1482
|
}
|
|
1483
1483
|
return !1;
|
|
1484
1484
|
}
|
|
1485
1485
|
if ("string" == typeof e.PATTERN) return !1;
|
|
1486
|
-
if (be(e)) return { issue:
|
|
1486
|
+
if (be(e)) return { issue: Ze.CUSTOM_LINE_BREAK };
|
|
1487
1487
|
throw Error("non exhaustive match");
|
|
1488
1488
|
}
|
|
1489
1489
|
function De(e, t) {
|
|
1490
|
-
if (t.issue ===
|
|
1491
|
-
if (t.issue ===
|
|
1490
|
+
if (t.issue === Ze.IDENTIFY_TERMINATOR) return `Warning: unable to identify line terminator usage in pattern.\n\tThe problem is in the <${e.name}> Token Type\n\t Root cause: ${t.errMsg}.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;
|
|
1491
|
+
if (t.issue === Ze.CUSTOM_LINE_BREAK) return `Warning: A Custom Token Pattern should specify the <line_breaks> option.\n\tThe problem is in the <${e.name}> Token Type\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;
|
|
1492
1492
|
throw Error("non exhaustive match");
|
|
1493
1493
|
}
|
|
1494
1494
|
function Be(e) {
|
|
@@ -1508,7 +1508,7 @@ function Ke(e, t) {
|
|
|
1508
1508
|
function We(e, t) {
|
|
1509
1509
|
return e.tokenTypeIdx === t.tokenTypeIdx;
|
|
1510
1510
|
}
|
|
1511
|
-
var
|
|
1511
|
+
var Ve = 1, He = {};
|
|
1512
1512
|
function Ye(e) {
|
|
1513
1513
|
const t = function(e) {
|
|
1514
1514
|
let t = [...e], n = e, i = !0;
|
|
@@ -1522,7 +1522,7 @@ function Ye(e) {
|
|
|
1522
1522
|
(function(e) {
|
|
1523
1523
|
e.forEach((e) => {
|
|
1524
1524
|
var t;
|
|
1525
|
-
Xe(e) || (Ve
|
|
1525
|
+
Xe(e) || (He[Ve] = e, e.tokenTypeIdx = Ve++), qe(e) && !Array.isArray(e.CATEGORIES) && (e.CATEGORIES = [e.CATEGORIES]), qe(e) || (e.CATEGORIES = []), t = e, Object.hasOwn(null != t ? t : {}, "categoryMatches") || (e.categoryMatches = []), function(e) {
|
|
1526
1526
|
return Object.hasOwn(null != e ? e : {}, "categoryMatchesMap");
|
|
1527
1527
|
}(e) || (e.categoryMatchesMap = {});
|
|
1528
1528
|
});
|
|
@@ -1533,7 +1533,7 @@ function Ye(e) {
|
|
|
1533
1533
|
}(t), function(e) {
|
|
1534
1534
|
e.forEach((e) => {
|
|
1535
1535
|
e.categoryMatches = [], Object.keys(e.categoryMatchesMap).forEach((t) => {
|
|
1536
|
-
e.categoryMatches.push(
|
|
1536
|
+
e.categoryMatches.push(He[t].tokenTypeIdx);
|
|
1537
1537
|
});
|
|
1538
1538
|
});
|
|
1539
1539
|
}(t), t.forEach((e) => {
|
|
@@ -1554,16 +1554,16 @@ function Xe(e) {
|
|
|
1554
1554
|
function qe(e) {
|
|
1555
1555
|
return Object.hasOwn(null != e ? e : {}, "CATEGORIES");
|
|
1556
1556
|
}
|
|
1557
|
-
function
|
|
1557
|
+
function Qe(e) {
|
|
1558
1558
|
return Object.hasOwn(null != e ? e : {}, "tokenTypeIdx");
|
|
1559
1559
|
}
|
|
1560
|
-
var
|
|
1560
|
+
var Ze, Je = {
|
|
1561
1561
|
buildUnableToPopLexerModeMessage: (e) => `Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`,
|
|
1562
1562
|
buildUnexpectedCharactersMessage: (e, t, n, i, r, s) => `unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${n} characters.`
|
|
1563
1563
|
};
|
|
1564
1564
|
(function(e) {
|
|
1565
1565
|
e[e.MISSING_PATTERN = 0] = "MISSING_PATTERN", e[e.INVALID_PATTERN = 1] = "INVALID_PATTERN", e[e.EOI_ANCHOR_FOUND = 2] = "EOI_ANCHOR_FOUND", e[e.UNSUPPORTED_FLAGS_FOUND = 3] = "UNSUPPORTED_FLAGS_FOUND", e[e.DUPLICATE_PATTERNS_FOUND = 4] = "DUPLICATE_PATTERNS_FOUND", e[e.INVALID_GROUP_TYPE_FOUND = 5] = "INVALID_GROUP_TYPE_FOUND", e[e.PUSH_MODE_DOES_NOT_EXIST = 6] = "PUSH_MODE_DOES_NOT_EXIST", e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE = 7] = "MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE", e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY = 8] = "MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY", e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST = 9] = "MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST", e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED = 10] = "LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED", e[e.SOI_ANCHOR_FOUND = 11] = "SOI_ANCHOR_FOUND", e[e.EMPTY_MATCH_PATTERN = 12] = "EMPTY_MATCH_PATTERN", e[e.NO_LINE_BREAKS_FLAGS = 13] = "NO_LINE_BREAKS_FLAGS", e[e.UNREACHABLE_PATTERN = 14] = "UNREACHABLE_PATTERN", e[e.IDENTIFY_TERMINATOR = 15] = "IDENTIFY_TERMINATOR", e[e.CUSTOM_LINE_BREAK = 16] = "CUSTOM_LINE_BREAK", e[e.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE = 17] = "MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE";
|
|
1566
|
-
})(
|
|
1566
|
+
})(Ze || (Ze = {}));
|
|
1567
1567
|
var et = {
|
|
1568
1568
|
deferDefinitionErrorsHandling: !1,
|
|
1569
1569
|
positionTracking: "full",
|
|
@@ -1606,23 +1606,23 @@ var tt = class {
|
|
|
1606
1606
|
const t = [];
|
|
1607
1607
|
return Object.hasOwn(e, "defaultMode") || t.push({
|
|
1608
1608
|
message: "A MultiMode Lexer cannot be initialized without a <defaultMode> property in its definition\n",
|
|
1609
|
-
type:
|
|
1609
|
+
type: Ze.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE
|
|
1610
1610
|
}), Object.hasOwn(e, "modes") || t.push({
|
|
1611
1611
|
message: "A MultiMode Lexer cannot be initialized without a <modes> property in its definition\n",
|
|
1612
|
-
type:
|
|
1612
|
+
type: Ze.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY
|
|
1613
1613
|
}), Object.hasOwn(e, "modes") && Object.hasOwn(e, "defaultMode") && !Object.hasOwn(e.modes, e.defaultMode) && t.push({
|
|
1614
1614
|
message: `A MultiMode Lexer cannot be initialized with a ${ye}: <${e.defaultMode}>which does not exist\n`,
|
|
1615
|
-
type:
|
|
1615
|
+
type: Ze.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST
|
|
1616
1616
|
}), Object.hasOwn(e, "modes") && Object.keys(e.modes).forEach((n) => {
|
|
1617
1617
|
const i = e.modes[n];
|
|
1618
1618
|
i.forEach((e, r) => {
|
|
1619
1619
|
void 0 === e ? t.push({
|
|
1620
1620
|
message: `A Lexer cannot be initialized using an undefined Token Type. Mode:<${n}> at index: <${r}>\n`,
|
|
1621
|
-
type:
|
|
1621
|
+
type: Ze.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED
|
|
1622
1622
|
}) : Object.hasOwn(e, "LONGER_ALT") && (Array.isArray(e.LONGER_ALT) ? e.LONGER_ALT : [e.LONGER_ALT]).forEach((r) => {
|
|
1623
1623
|
void 0 === r || i.includes(r) || t.push({
|
|
1624
1624
|
message: `A MultiMode Lexer cannot be initialized with a longer_alt <${r.name}> on token <${e.name}> outside of mode <${n}>\n`,
|
|
1625
|
-
type:
|
|
1625
|
+
type: Ze.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE
|
|
1626
1626
|
});
|
|
1627
1627
|
});
|
|
1628
1628
|
});
|
|
@@ -1645,7 +1645,7 @@ var tt = class {
|
|
|
1645
1645
|
} else Object.hasOwn(e, "LINE_BREAKS") ? !0 === e.LINE_BREAKS && (r = !0) : Se(o, e.PATTERN) && (r = !0);
|
|
1646
1646
|
}), t && !r && i.push({
|
|
1647
1647
|
message: "Warning: No LINE_BREAKS Found.\n This Lexer has been defined to track line and column information,\n But none of the Token Types can be identified as matching a line terminator.\n See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n for details.",
|
|
1648
|
-
type:
|
|
1648
|
+
type: Ze.NO_LINE_BREAKS_FLAGS
|
|
1649
1649
|
}), i;
|
|
1650
1650
|
}(n, this.trackStartLines, this.config.lineTerminatorCharacters));
|
|
1651
1651
|
})), n.modes = n.modes ? n.modes : {}, Object.entries(n.modes).forEach(([e, t]) => {
|
|
@@ -1946,7 +1946,7 @@ var Et = {
|
|
|
1946
1946
|
Object.freeze(Et);
|
|
1947
1947
|
var Tt = { buildRuleNotFoundError: (e, t) => "Invalid grammar, reference to a rule which is not defined: ->" + t.nonTerminalName + "<-\ninside top level rule: ->" + e.name + "<-" }, gt = {
|
|
1948
1948
|
buildDuplicateFoundError(e, t) {
|
|
1949
|
-
const n = e.name, i = t[0], r = i.idx, s = q(i), o = (a = i) instanceof
|
|
1949
|
+
const n = e.name, i = t[0], r = i.idx, s = q(i), o = (a = i) instanceof V ? a.terminalType.name : a instanceof w ? a.nonTerminalName : "";
|
|
1950
1950
|
var a;
|
|
1951
1951
|
let c = `->${s}${r > 0 ? r : ""}<- ${o ? `with argument: ->${o}<-` : ""}\n appears more than once (${t.length} times) in the top level rule: ->${n}<-. \n For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES \n `;
|
|
1952
1952
|
return c = c.replace(/[ \t]+/g, " "), c = c.replace(/\s\s+/g, "\n"), c;
|
|
@@ -2002,7 +2002,7 @@ var Ot, At = class extends z {
|
|
|
2002
2002
|
});
|
|
2003
2003
|
}
|
|
2004
2004
|
}
|
|
2005
|
-
}, Rt = class extends
|
|
2005
|
+
}, Rt = class extends Q {
|
|
2006
2006
|
constructor(e, t) {
|
|
2007
2007
|
super(), this.topProd = e, this.path = t, this.possibleTokTypes = [], this.nextProductionName = "", this.nextProductionOccurrence = 0, this.found = !1, this.isAtEndOfPath = !1;
|
|
2008
2008
|
}
|
|
@@ -2032,7 +2032,7 @@ var Ot, At = class extends z {
|
|
|
2032
2032
|
this.possibleTokTypes = J(i), this.found = !0;
|
|
2033
2033
|
}
|
|
2034
2034
|
}
|
|
2035
|
-
}, _t = class extends
|
|
2035
|
+
}, _t = class extends Q {
|
|
2036
2036
|
constructor(e, t) {
|
|
2037
2037
|
super(), this.topRule = e, this.occurrence = t, this.result = {
|
|
2038
2038
|
token: void 0,
|
|
@@ -2047,28 +2047,28 @@ var Ot, At = class extends z {
|
|
|
2047
2047
|
walkMany(e, t, n) {
|
|
2048
2048
|
if (e.idx === this.occurrence) {
|
|
2049
2049
|
const e = t.concat(n)[0];
|
|
2050
|
-
this.result.isEndOfRule = void 0 === e, e instanceof
|
|
2050
|
+
this.result.isEndOfRule = void 0 === e, e instanceof V && (this.result.token = e.terminalType, this.result.occurrence = e.idx);
|
|
2051
2051
|
} else super.walkMany(e, t, n);
|
|
2052
2052
|
}
|
|
2053
2053
|
}, Lt = class extends _t {
|
|
2054
2054
|
walkManySep(e, t, n) {
|
|
2055
2055
|
if (e.idx === this.occurrence) {
|
|
2056
2056
|
const e = t.concat(n)[0];
|
|
2057
|
-
this.result.isEndOfRule = void 0 === e, e instanceof
|
|
2057
|
+
this.result.isEndOfRule = void 0 === e, e instanceof V && (this.result.token = e.terminalType, this.result.occurrence = e.idx);
|
|
2058
2058
|
} else super.walkManySep(e, t, n);
|
|
2059
2059
|
}
|
|
2060
2060
|
}, St = class extends _t {
|
|
2061
2061
|
walkAtLeastOne(e, t, n) {
|
|
2062
2062
|
if (e.idx === this.occurrence) {
|
|
2063
2063
|
const e = t.concat(n)[0];
|
|
2064
|
-
this.result.isEndOfRule = void 0 === e, e instanceof
|
|
2064
|
+
this.result.isEndOfRule = void 0 === e, e instanceof V && (this.result.token = e.terminalType, this.result.occurrence = e.idx);
|
|
2065
2065
|
} else super.walkAtLeastOne(e, t, n);
|
|
2066
2066
|
}
|
|
2067
2067
|
}, Ct = class extends _t {
|
|
2068
2068
|
walkAtLeastOneSep(e, t, n) {
|
|
2069
2069
|
if (e.idx === this.occurrence) {
|
|
2070
2070
|
const e = t.concat(n)[0];
|
|
2071
|
-
this.result.isEndOfRule = void 0 === e, e instanceof
|
|
2071
|
+
this.result.isEndOfRule = void 0 === e, e instanceof V && (this.result.token = e.terminalType, this.result.occurrence = e.idx);
|
|
2072
2072
|
} else super.walkAtLeastOneSep(e, t, n);
|
|
2073
2073
|
}
|
|
2074
2074
|
};
|
|
@@ -2086,14 +2086,14 @@ function yt(e, t, n = []) {
|
|
|
2086
2086
|
if (t instanceof B) i = s(t.definition);
|
|
2087
2087
|
else {
|
|
2088
2088
|
if (t instanceof $) return s(t.definition.concat([new G({ definition: t.definition })]));
|
|
2089
|
-
if (t instanceof j) return s([new D({ definition: t.definition }), new G({ definition: [new
|
|
2090
|
-
if (t instanceof K) i = s(t.definition.concat([new G({ definition: [new
|
|
2089
|
+
if (t instanceof j) return s([new D({ definition: t.definition }), new G({ definition: [new V({ terminalType: t.separator })].concat(t.definition) })]);
|
|
2090
|
+
if (t instanceof K) i = s(t.definition.concat([new G({ definition: [new V({ terminalType: t.separator })].concat(t.definition) })]));
|
|
2091
2091
|
else if (t instanceof G) i = s(t.definition.concat([new G({ definition: t.definition })]));
|
|
2092
2092
|
else {
|
|
2093
2093
|
if (t instanceof W) return t.definition.forEach((e) => {
|
|
2094
2094
|
0 !== e.definition.length && (i = s(e.definition));
|
|
2095
2095
|
}), i;
|
|
2096
|
-
if (!(t instanceof
|
|
2096
|
+
if (!(t instanceof V)) throw Error("non exhaustive match");
|
|
2097
2097
|
n.push(t.terminalType);
|
|
2098
2098
|
}
|
|
2099
2099
|
}
|
|
@@ -2191,7 +2191,7 @@ function Pt(e, t, n) {
|
|
|
2191
2191
|
(function(e) {
|
|
2192
2192
|
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";
|
|
2193
2193
|
})(Ot || (Ot = {}));
|
|
2194
|
-
var Mt = class extends
|
|
2194
|
+
var Mt = class extends Q {
|
|
2195
2195
|
constructor(e, t, n) {
|
|
2196
2196
|
super(), this.topProd = e, this.targetOccurrence = t, this.targetProdType = n;
|
|
2197
2197
|
}
|
|
@@ -2338,7 +2338,7 @@ function Gt(e) {
|
|
|
2338
2338
|
}
|
|
2339
2339
|
function Kt(e, t, n, i) {
|
|
2340
2340
|
const r = e.flatMap((e) => function(e, t) {
|
|
2341
|
-
const n = new
|
|
2341
|
+
const n = new Ht();
|
|
2342
2342
|
e.accept(n);
|
|
2343
2343
|
const i = n.allProductions, r = Object.groupBy(i, Wt), s = Object.fromEntries(Object.entries(r).filter(([e, t]) => t.length > 1));
|
|
2344
2344
|
return Object.values(s).map((n) => {
|
|
@@ -2348,7 +2348,7 @@ function Kt(e, t, n, i) {
|
|
|
2348
2348
|
ruleName: e.name,
|
|
2349
2349
|
dslName: s,
|
|
2350
2350
|
occurrence: i.idx
|
|
2351
|
-
}, a =
|
|
2351
|
+
}, a = Vt(i);
|
|
2352
2352
|
return a && (o.parameter = a), o;
|
|
2353
2353
|
});
|
|
2354
2354
|
}(e, n)), s = function(e, t, n) {
|
|
@@ -2393,12 +2393,12 @@ function Kt(e, t, n, i) {
|
|
|
2393
2393
|
return r.concat(s, o, a);
|
|
2394
2394
|
}
|
|
2395
2395
|
function Wt(e) {
|
|
2396
|
-
return `${q(e)}_#_${e.idx}_#_${
|
|
2396
|
+
return `${q(e)}_#_${e.idx}_#_${Vt(e)}`;
|
|
2397
2397
|
}
|
|
2398
|
-
function
|
|
2399
|
-
return e instanceof
|
|
2398
|
+
function Vt(e) {
|
|
2399
|
+
return e instanceof V ? e.terminalType.name : e instanceof w ? e.nonTerminalName : "";
|
|
2400
2400
|
}
|
|
2401
|
-
var
|
|
2401
|
+
var Ht = class extends z {
|
|
2402
2402
|
constructor() {
|
|
2403
2403
|
super(...arguments), this.allProductions = [];
|
|
2404
2404
|
}
|
|
@@ -2454,7 +2454,7 @@ function zt(e) {
|
|
|
2454
2454
|
if (n instanceof w) t.push(n.referencedRule);
|
|
2455
2455
|
else if (n instanceof D || n instanceof B || n instanceof $ || n instanceof j || n instanceof K || n instanceof G) t = t.concat(zt(n.definition));
|
|
2456
2456
|
else if (n instanceof W) t = n.definition.map((e) => zt(e.definition)).flat();
|
|
2457
|
-
else if (!(n instanceof
|
|
2457
|
+
else if (!(n instanceof V)) throw Error("non exhaustive match");
|
|
2458
2458
|
const i = X(n), r = e.length > 1;
|
|
2459
2459
|
if (i && r) {
|
|
2460
2460
|
const n = e.slice(1);
|
|
@@ -2498,7 +2498,7 @@ function qt(e, t) {
|
|
|
2498
2498
|
occurrenceStack: f.slice(0, -1)
|
|
2499
2499
|
};
|
|
2500
2500
|
u.push(e);
|
|
2501
|
-
} else if (m instanceof
|
|
2501
|
+
} else if (m instanceof V) if (d < c - 1) {
|
|
2502
2502
|
const e = d + 1;
|
|
2503
2503
|
if (n(t[e], m.terminalType)) {
|
|
2504
2504
|
const t = {
|
|
@@ -2558,7 +2558,7 @@ function qt(e, t) {
|
|
|
2558
2558
|
u.push(t);
|
|
2559
2559
|
} else if (m instanceof j) {
|
|
2560
2560
|
const t = new G({
|
|
2561
|
-
definition: [new
|
|
2561
|
+
definition: [new V({ terminalType: m.separator })].concat(m.definition),
|
|
2562
2562
|
idx: m.idx
|
|
2563
2563
|
}), n = {
|
|
2564
2564
|
idx: d,
|
|
@@ -2576,7 +2576,7 @@ function qt(e, t) {
|
|
|
2576
2576
|
};
|
|
2577
2577
|
u.push(e), u.push(o);
|
|
2578
2578
|
const n = new G({
|
|
2579
|
-
definition: [new
|
|
2579
|
+
definition: [new V({ terminalType: m.separator })].concat(m.definition),
|
|
2580
2580
|
idx: m.idx
|
|
2581
2581
|
}), r = {
|
|
2582
2582
|
idx: d,
|
|
@@ -2636,7 +2636,7 @@ function qt(e, t) {
|
|
|
2636
2636
|
alternative: r + 1
|
|
2637
2637
|
}] : []));
|
|
2638
2638
|
}
|
|
2639
|
-
function
|
|
2639
|
+
function Qt(e, t, n) {
|
|
2640
2640
|
const i = new Xt();
|
|
2641
2641
|
e.accept(i);
|
|
2642
2642
|
let r = i.alternations;
|
|
@@ -2703,7 +2703,7 @@ function Zt(e, t, n) {
|
|
|
2703
2703
|
return a.concat(c);
|
|
2704
2704
|
});
|
|
2705
2705
|
}
|
|
2706
|
-
var
|
|
2706
|
+
var Zt = class extends z {
|
|
2707
2707
|
constructor() {
|
|
2708
2708
|
super(...arguments), this.allProductions = [];
|
|
2709
2709
|
}
|
|
@@ -2801,13 +2801,13 @@ var mn = 1024, En = 1280, Tn = 1536, gn = class {
|
|
|
2801
2801
|
return e.flatMap((e) => qt(e, gt));
|
|
2802
2802
|
}
|
|
2803
2803
|
validateAmbiguousAlternationAlternatives(e, t) {
|
|
2804
|
-
return e.flatMap((e) =>
|
|
2804
|
+
return e.flatMap((e) => Qt(e, t, gt));
|
|
2805
2805
|
}
|
|
2806
2806
|
validateSomeNonEmptyLookaheadPath(e, t) {
|
|
2807
2807
|
return function(e, t, n) {
|
|
2808
2808
|
const i = [];
|
|
2809
2809
|
return e.forEach((e) => {
|
|
2810
|
-
const r = new
|
|
2810
|
+
const r = new Zt();
|
|
2811
2811
|
e.accept(r), r.allProductions.forEach((r) => {
|
|
2812
2812
|
const s = vt(r), o = r.maxLookahead || t;
|
|
2813
2813
|
if (0 === $t(r.idx, e, s, o)[0].flat().length) {
|
|
@@ -3398,7 +3398,7 @@ $n.DEFER_DEFINITION_ERRORS_HANDLING = !1, Bn = $n, [
|
|
|
3398
3398
|
if ("number" == typeof e[0].startOffset) 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.");
|
|
3399
3399
|
}
|
|
3400
3400
|
if (Array.isArray(e)) this.tokensMap = e.reduce((e, t) => (e[t.name] = t, e), {});
|
|
3401
|
-
else if (Object.hasOwn(e, "modes") && Object.values(e.modes).flat().every(
|
|
3401
|
+
else if (Object.hasOwn(e, "modes") && Object.values(e.modes).flat().every(Qe)) {
|
|
3402
3402
|
const t = Object.values(e.modes).flat(), n = [...new Set(t)];
|
|
3403
3403
|
this.tokensMap = n.reduce((e, t) => (e[t.name] = t, e), {});
|
|
3404
3404
|
} else {
|
|
@@ -3990,7 +3990,7 @@ $n.DEFER_DEFINITION_ERRORS_HANDLING = !1, Bn = $n, [
|
|
|
3990
3990
|
return this.gastProductionsCache;
|
|
3991
3991
|
}
|
|
3992
3992
|
getSerializedGastProductions() {
|
|
3993
|
-
return Object.values(this.gastProductionsCache).map(
|
|
3993
|
+
return Object.values(this.gastProductionsCache).map(H);
|
|
3994
3994
|
}
|
|
3995
3995
|
},
|
|
3996
3996
|
class {
|
|
@@ -4145,7 +4145,7 @@ $n.DEFER_DEFINITION_ERRORS_HANDLING = !1, Bn = $n, [
|
|
|
4145
4145
|
const n = /* @__PURE__ */ new Error(`<CONSUME${Mn(t)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);
|
|
4146
4146
|
throw n.KNOWN_RECORDER_ERROR = !0, n;
|
|
4147
4147
|
}
|
|
4148
|
-
const i = this.recordingProdStack.at(-1), r = new
|
|
4148
|
+
const i = this.recordingProdStack.at(-1), r = new V({
|
|
4149
4149
|
idx: t,
|
|
4150
4150
|
terminalType: e,
|
|
4151
4151
|
label: null == n ? void 0 : n.LABEL
|
|
@@ -4187,9 +4187,9 @@ var jn = class extends $n {
|
|
|
4187
4187
|
}
|
|
4188
4188
|
}, Gn = class t {
|
|
4189
4189
|
static shared(e) {
|
|
4190
|
-
const n = e?.locale ??
|
|
4191
|
-
let s =
|
|
4192
|
-
s || (s = /* @__PURE__ */ new Map(),
|
|
4190
|
+
const n = e?.locale ?? l, i = e?.maxColumn ?? Hn, r = e?.maxRow ?? Yn;
|
|
4191
|
+
let s = Vn.get(n);
|
|
4192
|
+
s || (s = /* @__PURE__ */ new Map(), Vn.set(n, s));
|
|
4193
4193
|
const o = `${i}:${r}`;
|
|
4194
4194
|
let a = s.get(o);
|
|
4195
4195
|
return a || (a = new t({
|
|
@@ -4199,34 +4199,34 @@ var jn = class extends $n {
|
|
|
4199
4199
|
}), s.set(o, a)), a;
|
|
4200
4200
|
}
|
|
4201
4201
|
constructor(e) {
|
|
4202
|
-
const t = e?.maxColumn ??
|
|
4202
|
+
const t = e?.maxColumn ?? Hn, n = e?.maxRow ?? Yn, i = e?.locale ?? l;
|
|
4203
4203
|
this._locale = i, this._maxColumn = t, this._maxRow = n;
|
|
4204
|
-
const { separatorFunction:
|
|
4205
|
-
if (
|
|
4204
|
+
const { separatorFunction: s, separatorColumn: o, separatorRow: a, separatorDecimal: c } = i.separators;
|
|
4205
|
+
if (o === a) throw new Error(`FormulaLexer: separatorColumn and separatorRow must differ (both '${o}')`);
|
|
4206
4206
|
const h = pt({
|
|
4207
4207
|
name: "WhiteSpace",
|
|
4208
4208
|
pattern: /[ \n\v\f\r\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,
|
|
4209
4209
|
group: tt.SKIPPED
|
|
4210
|
-
}),
|
|
4210
|
+
}), u = pt({
|
|
4211
4211
|
name: "StringToken",
|
|
4212
4212
|
pattern: /"(""|[^"])*"/
|
|
4213
|
-
}),
|
|
4213
|
+
}), d = pt({
|
|
4214
4214
|
name: "FunctionToken",
|
|
4215
4215
|
pattern: /[a-zA-Z_\u007F-\uFFFF]+[a-zA-Z0-9_.\u007F-\uFFFF]*(?=\()/
|
|
4216
|
-
}),
|
|
4216
|
+
}), p = pt({
|
|
4217
4217
|
name: "TableReference",
|
|
4218
|
-
pattern: { exec:
|
|
4218
|
+
pattern: { exec: f },
|
|
4219
4219
|
line_breaks: !1,
|
|
4220
4220
|
start_chars_hint: Wn
|
|
4221
|
-
}),
|
|
4221
|
+
}), m = pt({
|
|
4222
4222
|
name: "BracketedString",
|
|
4223
|
-
pattern: { exec:
|
|
4223
|
+
pattern: { exec: r },
|
|
4224
4224
|
line_breaks: !1,
|
|
4225
4225
|
start_chars_hint: [91],
|
|
4226
|
-
longer_alt: [
|
|
4227
|
-
}),
|
|
4226
|
+
longer_alt: [p, u]
|
|
4227
|
+
}), E = (e) => (e ?? []).map((e) => e?.trim()).filter(Boolean).map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).map((e) => e + "|").join(""), T = (e) => e.replace(/[A-Za-z]/g, (e) => `[${e.toUpperCase()}${e.toLowerCase()}]`), g = pt({
|
|
4228
4228
|
name: "LiteralError",
|
|
4229
|
-
pattern: new RegExp(
|
|
4229
|
+
pattern: new RegExp(E(i.errorLiterals) + [
|
|
4230
4230
|
"#PARSE!",
|
|
4231
4231
|
"#NULL!",
|
|
4232
4232
|
"#DIV\\/0!",
|
|
@@ -4243,24 +4243,24 @@ var jn = class extends $n {
|
|
|
4243
4243
|
"#BUSY!",
|
|
4244
4244
|
"#PYTHON!",
|
|
4245
4245
|
"#TIMEOUT!"
|
|
4246
|
-
].map(
|
|
4247
|
-
}), T = pt({
|
|
4248
|
-
name: "RefError",
|
|
4249
|
-
pattern: new RegExp(f(i.errorRefs) + ["#REF!", "#NAME\\?"].map(m).join("|"))
|
|
4246
|
+
].map(T).join("|"))
|
|
4250
4247
|
}), O = pt({
|
|
4248
|
+
name: "RefError",
|
|
4249
|
+
pattern: new RegExp(E(i.errorRefs) + ["#REF!", "#NAME\\?"].map(T).join("|"))
|
|
4250
|
+
}), A = pt({
|
|
4251
4251
|
name: "SingleQuotedString",
|
|
4252
4252
|
pattern: /'(''|[^'])*'/
|
|
4253
|
-
}),
|
|
4253
|
+
}), R = pt({
|
|
4254
4254
|
name: "SheetQuoted",
|
|
4255
4255
|
pattern: /'(?:''|[^'])*?'!/
|
|
4256
|
-
}),
|
|
4256
|
+
}), I = pt({
|
|
4257
4257
|
name: "Sheet",
|
|
4258
4258
|
pattern: /[A-Za-z_.\d\u007F-\uFFFF]*!/
|
|
4259
|
-
}),
|
|
4259
|
+
}), _ = /[a-zA-Z_\\\u007F-\uFFFF][a-zA-Z0-9_.?\\\u007F-\uFFFF]*:?/y, N = pt({
|
|
4260
4260
|
name: "NamedToken",
|
|
4261
4261
|
pattern: { exec: (e, t) => {
|
|
4262
|
-
|
|
4263
|
-
const n =
|
|
4262
|
+
_.lastIndex = t;
|
|
4263
|
+
const n = _.exec(e);
|
|
4264
4264
|
if (!n) return null;
|
|
4265
4265
|
let i = n[0];
|
|
4266
4266
|
const r = i.indexOf(".:");
|
|
@@ -4268,24 +4268,24 @@ var jn = class extends $n {
|
|
|
4268
4268
|
} },
|
|
4269
4269
|
line_breaks: !1,
|
|
4270
4270
|
start_chars_hint: Wn
|
|
4271
|
-
}),
|
|
4271
|
+
}), L = pt({
|
|
4272
4272
|
name: "Cell",
|
|
4273
4273
|
pattern: { exec: qn(t, n) },
|
|
4274
4274
|
line_breaks: !1,
|
|
4275
4275
|
start_chars_hint: [36, ...Kn],
|
|
4276
|
-
longer_alt:
|
|
4277
|
-
}),
|
|
4276
|
+
longer_alt: N
|
|
4277
|
+
}), S = pt({
|
|
4278
4278
|
name: "Column",
|
|
4279
4279
|
pattern: { exec: Xn(t) },
|
|
4280
4280
|
line_breaks: !1,
|
|
4281
4281
|
start_chars_hint: [36, ...Kn],
|
|
4282
|
-
longer_alt:
|
|
4283
|
-
}),
|
|
4282
|
+
longer_alt: N
|
|
4283
|
+
}), C = pt({
|
|
4284
4284
|
name: "AbsRow",
|
|
4285
4285
|
pattern: /[$][0-9]+/
|
|
4286
|
-
}),
|
|
4286
|
+
}), y = "." === c ? "\\." : c, k = pt({
|
|
4287
4287
|
name: "NumberToken",
|
|
4288
|
-
pattern: new RegExp(`[0-9]+${
|
|
4288
|
+
pattern: new RegExp(`[0-9]+${y}(?!:)[0-9]*([eE][+-]?[0-9]+|\\*\\*[+-]?[0-9]+)?|${y}[0-9]+([eE][+-]?[0-9]+|\\*\\*[+-]?[0-9]+)?|[0-9]+[eE][+-]?[0-9]+`)
|
|
4289
4289
|
}), v = pt({
|
|
4290
4290
|
name: "ScientificDigit",
|
|
4291
4291
|
pattern: /[0-9]+\*\*[+-]?[0-9]+/
|
|
@@ -4302,13 +4302,13 @@ var jn = class extends $n {
|
|
|
4302
4302
|
pattern: new RegExp(P.join("|"), "i")
|
|
4303
4303
|
}), b = pt({
|
|
4304
4304
|
name: "ArgSeparator",
|
|
4305
|
-
pattern:
|
|
4305
|
+
pattern: Qn(s)
|
|
4306
4306
|
}), U = pt({
|
|
4307
4307
|
name: "ColSeparator",
|
|
4308
|
-
pattern:
|
|
4308
|
+
pattern: Qn(o)
|
|
4309
4309
|
}), w = pt({
|
|
4310
4310
|
name: "RowSeparator",
|
|
4311
|
-
pattern:
|
|
4311
|
+
pattern: Qn(a)
|
|
4312
4312
|
}), F = pt({
|
|
4313
4313
|
name: "RangeOp",
|
|
4314
4314
|
pattern: /:/
|
|
@@ -4333,10 +4333,10 @@ var jn = class extends $n {
|
|
|
4333
4333
|
}), W = pt({
|
|
4334
4334
|
name: "CloseCurlyParen",
|
|
4335
4335
|
pattern: /}/
|
|
4336
|
-
}),
|
|
4336
|
+
}), V = pt({
|
|
4337
4337
|
name: "QuoteS",
|
|
4338
4338
|
pattern: /'/
|
|
4339
|
-
}),
|
|
4339
|
+
}), H = pt({
|
|
4340
4340
|
name: "MulOp",
|
|
4341
4341
|
pattern: /\*(?!\*)/
|
|
4342
4342
|
}), Y = pt({
|
|
@@ -4351,10 +4351,10 @@ var jn = class extends $n {
|
|
|
4351
4351
|
}), q = pt({
|
|
4352
4352
|
name: "ImplicitIntersectOp",
|
|
4353
4353
|
pattern: /@/
|
|
4354
|
-
}),
|
|
4354
|
+
}), Q = pt({
|
|
4355
4355
|
name: "ConcatOp",
|
|
4356
4356
|
pattern: /&/
|
|
4357
|
-
}),
|
|
4357
|
+
}), Z = pt({
|
|
4358
4358
|
name: "ExOp",
|
|
4359
4359
|
pattern: /\^/
|
|
4360
4360
|
}), J = pt({
|
|
@@ -4363,7 +4363,7 @@ var jn = class extends $n {
|
|
|
4363
4363
|
}), ee = pt({
|
|
4364
4364
|
name: "ArrayAnchorOp",
|
|
4365
4365
|
pattern: /#/,
|
|
4366
|
-
longer_alt: [
|
|
4366
|
+
longer_alt: [g, O]
|
|
4367
4367
|
}), te = pt({
|
|
4368
4368
|
name: "GtOp",
|
|
4369
4369
|
pattern: />/
|
|
@@ -4375,43 +4375,43 @@ var jn = class extends $n {
|
|
|
4375
4375
|
pattern: /</
|
|
4376
4376
|
}), re = [
|
|
4377
4377
|
h,
|
|
4378
|
-
l,
|
|
4379
|
-
A,
|
|
4380
|
-
O,
|
|
4381
|
-
R,
|
|
4382
4378
|
u,
|
|
4379
|
+
R,
|
|
4380
|
+
A,
|
|
4381
|
+
I,
|
|
4383
4382
|
d,
|
|
4384
4383
|
p,
|
|
4385
|
-
|
|
4386
|
-
|
|
4384
|
+
m,
|
|
4385
|
+
g,
|
|
4386
|
+
O,
|
|
4387
4387
|
b,
|
|
4388
|
-
...
|
|
4388
|
+
...o !== s ? [U] : [],
|
|
4389
4389
|
w,
|
|
4390
4390
|
D,
|
|
4391
4391
|
B,
|
|
4392
4392
|
$,
|
|
4393
4393
|
F,
|
|
4394
|
-
N,
|
|
4395
|
-
M,
|
|
4396
4394
|
L,
|
|
4395
|
+
M,
|
|
4397
4396
|
S,
|
|
4398
|
-
|
|
4397
|
+
C,
|
|
4398
|
+
k,
|
|
4399
4399
|
v,
|
|
4400
4400
|
x,
|
|
4401
4401
|
ee,
|
|
4402
4402
|
q,
|
|
4403
|
-
|
|
4403
|
+
N,
|
|
4404
4404
|
j,
|
|
4405
4405
|
G,
|
|
4406
4406
|
K,
|
|
4407
4407
|
W,
|
|
4408
|
-
H,
|
|
4409
4408
|
V,
|
|
4409
|
+
H,
|
|
4410
4410
|
Y,
|
|
4411
4411
|
z,
|
|
4412
4412
|
X,
|
|
4413
|
-
Z,
|
|
4414
4413
|
Q,
|
|
4414
|
+
Z,
|
|
4415
4415
|
J,
|
|
4416
4416
|
pt({
|
|
4417
4417
|
name: "NeqOp",
|
|
@@ -4433,7 +4433,7 @@ var jn = class extends $n {
|
|
|
4433
4433
|
const se = {};
|
|
4434
4434
|
re.forEach((e) => {
|
|
4435
4435
|
se[e.name] = e;
|
|
4436
|
-
}),
|
|
4436
|
+
}), o === s && (se.ColSeparator = b), this._vocabulary = se;
|
|
4437
4437
|
}
|
|
4438
4438
|
tokenize(t, n = !0) {
|
|
4439
4439
|
const i = this._lexer.tokenize(t);
|
|
@@ -4477,7 +4477,7 @@ var jn = class extends $n {
|
|
|
4477
4477
|
];
|
|
4478
4478
|
for (let t = 127; t <= 65535; t++) e.push(t);
|
|
4479
4479
|
return e;
|
|
4480
|
-
})(),
|
|
4480
|
+
})(), Vn = /* @__PURE__ */ new WeakMap(), Hn = 16384, Yn = 1048576;
|
|
4481
4481
|
function zn(e, t, n) {
|
|
4482
4482
|
let i = 0;
|
|
4483
4483
|
for (let r = t; r < n; r++) {
|
|
@@ -4529,13 +4529,13 @@ function qn(e, t) {
|
|
|
4529
4529
|
return a < 1 || a > t ? null : [n.substring(i, r)];
|
|
4530
4530
|
};
|
|
4531
4531
|
}
|
|
4532
|
-
function
|
|
4532
|
+
function Qn(e) {
|
|
4533
4533
|
return new RegExp(e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
|
|
4534
4534
|
}
|
|
4535
|
-
var
|
|
4536
|
-
constructor(e =
|
|
4535
|
+
var Zn = class {
|
|
4536
|
+
constructor(e = l) {
|
|
4537
4537
|
const t = function(e) {
|
|
4538
|
-
const t = [...
|
|
4538
|
+
const t = [...O];
|
|
4539
4539
|
if (e) for (const n of Object.values(e)) {
|
|
4540
4540
|
const e = n?.trim();
|
|
4541
4541
|
e && !t.some((t) => t.toLowerCase() === e.toLowerCase()) && t.push(e);
|
|
@@ -4582,8 +4582,8 @@ var Qn = class {
|
|
|
4582
4582
|
return this._lexer.tokenize(e);
|
|
4583
4583
|
}
|
|
4584
4584
|
}, Jn = class extends jn {
|
|
4585
|
-
constructor(e =
|
|
4586
|
-
const t = new
|
|
4585
|
+
constructor(e = l) {
|
|
4586
|
+
const t = new Zn(e), n = t.getVocabulary();
|
|
4587
4587
|
super(n, {
|
|
4588
4588
|
nodeLocationTracking: "none",
|
|
4589
4589
|
maxLookahead: 2,
|
|
@@ -4621,11 +4621,11 @@ var Qn = class {
|
|
|
4621
4621
|
return h.OPTION(() => {
|
|
4622
4622
|
t = h.CONSUME(a), n = h.CONSUME2(r);
|
|
4623
4623
|
}), h.ACTION(() => {
|
|
4624
|
-
const i =
|
|
4624
|
+
const i = R(e.image);
|
|
4625
4625
|
if (i.image = e.image, !n) return i;
|
|
4626
|
-
const r =
|
|
4626
|
+
const r = R(n.image);
|
|
4627
4627
|
r.image = n.image;
|
|
4628
|
-
const s =
|
|
4628
|
+
const s = A(":", i, r, !0);
|
|
4629
4629
|
return s.image = t?.image ?? ":", s;
|
|
4630
4630
|
});
|
|
4631
4631
|
}), h.performSelfAnalysis();
|
|
@@ -4642,23 +4642,23 @@ var Qn = class {
|
|
|
4642
4642
|
if ("@" === n) {
|
|
4643
4643
|
const e = t.slice(1).trim();
|
|
4644
4644
|
if (!e) {
|
|
4645
|
-
const e =
|
|
4645
|
+
const e = a("@", null, !0);
|
|
4646
4646
|
return e.image = "@", [e];
|
|
4647
4647
|
}
|
|
4648
4648
|
if ("[" === e.charAt(0)) {
|
|
4649
4649
|
const t = this._parseInner(e);
|
|
4650
4650
|
if (1 === t.length && "infix" === t[0].type) {
|
|
4651
|
-
const e =
|
|
4651
|
+
const e = a("@", t[0], !0);
|
|
4652
4652
|
return e.image = "@", [e];
|
|
4653
4653
|
}
|
|
4654
4654
|
}
|
|
4655
|
-
const n =
|
|
4655
|
+
const n = R(e);
|
|
4656
4656
|
n.image = e;
|
|
4657
|
-
const i =
|
|
4657
|
+
const i = a("@", n, !0);
|
|
4658
4658
|
return i.image = "@", [i];
|
|
4659
4659
|
}
|
|
4660
4660
|
if ("[" !== n && "#" !== n) {
|
|
4661
|
-
const t =
|
|
4661
|
+
const t = R(e);
|
|
4662
4662
|
return t.image = e, [t];
|
|
4663
4663
|
}
|
|
4664
4664
|
return this._parseInner(t);
|
|
@@ -4666,7 +4666,7 @@ var Qn = class {
|
|
|
4666
4666
|
parse(e, t, n) {
|
|
4667
4667
|
this.reset();
|
|
4668
4668
|
const i = () => ({
|
|
4669
|
-
root:
|
|
4669
|
+
root: N("", []),
|
|
4670
4670
|
errors: []
|
|
4671
4671
|
});
|
|
4672
4672
|
if (!n) return i();
|
|
@@ -4679,7 +4679,7 @@ var Qn = class {
|
|
|
4679
4679
|
if (-1 === s) return i();
|
|
4680
4680
|
const o = n.slice(0, s), a = n.slice(s + 1, -1), c = this._parseContent(a);
|
|
4681
4681
|
return {
|
|
4682
|
-
root:
|
|
4682
|
+
root: N(o, c),
|
|
4683
4683
|
errors: this.errors.length > 0 ? [...this.errors] : []
|
|
4684
4684
|
};
|
|
4685
4685
|
}
|
|
@@ -4694,7 +4694,7 @@ var Qn = class {
|
|
|
4694
4694
|
":."
|
|
4695
4695
|
]), ni = (e) => {
|
|
4696
4696
|
if (!e) return null;
|
|
4697
|
-
if (e.type ===
|
|
4697
|
+
if (e.type === _.Cell) {
|
|
4698
4698
|
const t = e.value;
|
|
4699
4699
|
return t.rowIndex === Number.MIN_SAFE_INTEGER ? "col" : t.colIndex === Number.MIN_SAFE_INTEGER ? "row" : null;
|
|
4700
4700
|
}
|
|
@@ -4725,8 +4725,8 @@ var ai = {
|
|
|
4725
4725
|
}
|
|
4726
4726
|
}, ci = class extends jn {
|
|
4727
4727
|
constructor(e) {
|
|
4728
|
-
const
|
|
4729
|
-
super(
|
|
4728
|
+
const r = e?.lexer ?? Gn.shared(e?.lexerOptions), s = r.getVocabulary();
|
|
4729
|
+
super(s, {
|
|
4730
4730
|
skipValidations: !0,
|
|
4731
4731
|
recoveryEnabled: !0,
|
|
4732
4732
|
...e,
|
|
@@ -4752,23 +4752,23 @@ var ai = {
|
|
|
4752
4752
|
])), f = {
|
|
4753
4753
|
value: p,
|
|
4754
4754
|
index: this.getLexerPosition(),
|
|
4755
|
-
isRange:
|
|
4756
|
-
},
|
|
4755
|
+
isRange: y.includes(p)
|
|
4756
|
+
}, m = this.SUBRULE2(this._rulePostfixOp);
|
|
4757
4757
|
d.push({
|
|
4758
4758
|
op: f,
|
|
4759
|
-
node:
|
|
4759
|
+
node: m
|
|
4760
4760
|
});
|
|
4761
4761
|
}), this.ACTION(() => {
|
|
4762
4762
|
let e = d.length - 1;
|
|
4763
|
-
const t =
|
|
4763
|
+
const t = p.length;
|
|
4764
4764
|
for (let n = 0; e > 0 && n < t; n++) {
|
|
4765
|
-
const t =
|
|
4765
|
+
const t = p[n];
|
|
4766
4766
|
let i = 1;
|
|
4767
4767
|
for (; i < d.length;) {
|
|
4768
4768
|
const n = d[i].op;
|
|
4769
4769
|
if (t.includes(n.value)) {
|
|
4770
4770
|
const t = d[i - 1].node, r = d[i].node;
|
|
4771
|
-
let s =
|
|
4771
|
+
let s = A(n.value, t, r, n.isRange);
|
|
4772
4772
|
s = this._tag(s, n.index), d[i - 1].node = s, d.splice(i, 1), e--;
|
|
4773
4773
|
} else i++;
|
|
4774
4774
|
}
|
|
@@ -4789,8 +4789,8 @@ var ai = {
|
|
|
4789
4789
|
}), this.ACTION(() => {
|
|
4790
4790
|
const e = n.length;
|
|
4791
4791
|
if (0 !== e) for (let i = 0; i < e; i++) {
|
|
4792
|
-
const e = n[i], r = e[0], s = e[1], o =
|
|
4793
|
-
t =
|
|
4792
|
+
const e = n[i], r = e[0], s = e[1], o = y.includes(r);
|
|
4793
|
+
t = u(r, t, o), t = this._tag(t, s);
|
|
4794
4794
|
}
|
|
4795
4795
|
}), t;
|
|
4796
4796
|
}), this._rulePrefixOp = this.RULE("rulePrefixOp", () => {
|
|
@@ -4809,8 +4809,8 @@ var ai = {
|
|
|
4809
4809
|
return this.ACTION(() => {
|
|
4810
4810
|
const e = i.length;
|
|
4811
4811
|
if (0 !== e) for (let t = e - 1; t >= 0; t--) {
|
|
4812
|
-
const e = i[t], n = e[0], s = e[1], o =
|
|
4813
|
-
r =
|
|
4812
|
+
const e = i[t], n = e[0], s = e[1], o = y.includes(n);
|
|
4813
|
+
r = a(n, r, o), r = this._tag(r, s);
|
|
4814
4814
|
}
|
|
4815
4815
|
}), r;
|
|
4816
4816
|
}), this._ruleRangeOp = this.RULE("ruleRangeOp", () => {
|
|
@@ -4838,22 +4838,22 @@ var ai = {
|
|
|
4838
4838
|
const t = s[e], n = s[e + 1];
|
|
4839
4839
|
if (":" !== t.op?.value || ":" !== n.op?.value) continue;
|
|
4840
4840
|
const i = ni(t.node);
|
|
4841
|
-
i && ni(n.node) === i && ni(s[e - 1].node) !== i && (t.node = this._tag(
|
|
4841
|
+
i && ni(n.node) === i && ni(s[e - 1].node) !== i && (t.node = this._tag(A(":", t.node, n.node, !0), n.op.index), s.splice(e + 1, 1));
|
|
4842
4842
|
}
|
|
4843
4843
|
for (let e = 1; e < s.length; e++) {
|
|
4844
4844
|
const t = s[e];
|
|
4845
4845
|
if (void 0 !== t.anchor) {
|
|
4846
|
-
s[0].node = this._tag(
|
|
4846
|
+
s[0].node = this._tag(u("#", s[0].node, !0), t.anchor);
|
|
4847
4847
|
continue;
|
|
4848
4848
|
}
|
|
4849
4849
|
const n = t.op;
|
|
4850
|
-
let i =
|
|
4850
|
+
let i = A(n.value, s[0].node, t.node, !0);
|
|
4851
4851
|
i = this._tag(i, n.index), s[0].node = i;
|
|
4852
4852
|
}
|
|
4853
4853
|
}), s[0].node;
|
|
4854
4854
|
}), this._ruleCallOp = this.RULE("ruleCallOp", () => {
|
|
4855
|
-
const { OpenParen: e, CloseParen:
|
|
4856
|
-
let
|
|
4855
|
+
const { OpenParen: e, CloseParen: t } = this._vocab;
|
|
4856
|
+
let n = this.SUBRULE(this._ruleFormula);
|
|
4857
4857
|
return this.MANY({
|
|
4858
4858
|
GATE: () => {
|
|
4859
4859
|
const t = this.LA(0), n = this.LA(1);
|
|
@@ -4861,12 +4861,12 @@ var ai = {
|
|
|
4861
4861
|
},
|
|
4862
4862
|
DEF: () => {
|
|
4863
4863
|
this.CONSUME(e);
|
|
4864
|
-
const
|
|
4864
|
+
const i = this.getLexerPosition(), r = this.SUBRULE(this._ruleFunctionArguments), s = n, o = this.ACTION(() => this._tag(k(s, r), i)), a = this.OPTION(() => this.CONSUME(t));
|
|
4865
4865
|
this.ACTION(() => {
|
|
4866
|
-
|
|
4866
|
+
a || this._reportError(o, "Missing closing parenthesis ')'", i), this._tagClose(o, this.getLexerPosition()), n = o;
|
|
4867
4867
|
});
|
|
4868
4868
|
}
|
|
4869
|
-
}),
|
|
4869
|
+
}), n;
|
|
4870
4870
|
}), this._ruleIntersectOp = this.RULE("ruleIntersectOp", () => {
|
|
4871
4871
|
const e = [this.SUBRULE(this._ruleInfixOp)];
|
|
4872
4872
|
return this.MANY(() => {
|
|
@@ -4883,7 +4883,7 @@ var ai = {
|
|
|
4883
4883
|
for (; e.length > 1;) {
|
|
4884
4884
|
let t = e.length - 1;
|
|
4885
4885
|
for (let n = 0; n < t; n++) {
|
|
4886
|
-
const i = e[n], r = e[n + 1], s =
|
|
4886
|
+
const i = e[n], r = e[n + 1], s = A(" ", i, r, !0), o = this._tokenMap.get(i);
|
|
4887
4887
|
o && delete o.tokenIndexClose;
|
|
4888
4888
|
const a = this._tokenMap.get(r), c = a?.tokenIndex;
|
|
4889
4889
|
if (void 0 !== c) {
|
|
@@ -4913,16 +4913,16 @@ var ai = {
|
|
|
4913
4913
|
}), t;
|
|
4914
4914
|
}), this._ruleParen = this.RULE("ruleParen", () => {
|
|
4915
4915
|
const { OpenParen: e, CloseParen: t } = this._vocab;
|
|
4916
|
-
return this._processParen(
|
|
4916
|
+
return this._processParen(_.Paren, e, t);
|
|
4917
4917
|
}), this._ruleLiteralArray = this.RULE("ruleLiteralArray", () => {
|
|
4918
4918
|
const { OpenCurlyParen: e, CloseCurlyParen: t, ColSeparator: n, RowSeparator: i } = this._vocab;
|
|
4919
|
-
let r =
|
|
4919
|
+
let r = E();
|
|
4920
4920
|
this.CONSUME(e);
|
|
4921
4921
|
const s = this.getLexerPosition();
|
|
4922
|
-
let
|
|
4923
|
-
const
|
|
4922
|
+
let o = this.ACTION(() => this._tag(S(r), s));
|
|
4923
|
+
const a = this.SUBRULE(this._ruleLiteralForArray);
|
|
4924
4924
|
this.ACTION(() => {
|
|
4925
|
-
r.value.push(
|
|
4925
|
+
r.value.push(a);
|
|
4926
4926
|
}), this.MANY(() => {
|
|
4927
4927
|
let e = !1;
|
|
4928
4928
|
this.OR([{ ALT: () => {
|
|
@@ -4930,33 +4930,33 @@ var ai = {
|
|
|
4930
4930
|
} }, { ALT: () => this.CONSUME(i) }]);
|
|
4931
4931
|
const t = this.SUBRULE2(this._ruleLiteralForArray);
|
|
4932
4932
|
this.ACTION(() => {
|
|
4933
|
-
e || (r =
|
|
4933
|
+
e || (r = E(), o.value.push(r)), r.value.push(t);
|
|
4934
4934
|
});
|
|
4935
4935
|
});
|
|
4936
|
-
const
|
|
4937
|
-
return
|
|
4936
|
+
const c = this.OPTION(() => this.CONSUME(t));
|
|
4937
|
+
return o = this.ACTION(() => (c || this._reportError(o, "Missing closing parenthesis '}'", s), this._tagClose(o, this.getLexerPosition()))), o;
|
|
4938
4938
|
}), this._ruleLiteralForArray = this.RULE("ruleLiteralForArray", () => {
|
|
4939
|
-
const { StringToken: e, BooleanToken: t, LiteralError:
|
|
4939
|
+
const { StringToken: e, BooleanToken: t, LiteralError: i, RefError: r } = this._vocab;
|
|
4940
4940
|
return this.OR([
|
|
4941
4941
|
{ ALT: () => {
|
|
4942
|
-
const e = this.OPTION(() => this.SUBRULE(this._rulePlusMinusOp)), t = this.SUBRULE(this._ruleNumber),
|
|
4943
|
-
return this.ACTION(() => e ?
|
|
4942
|
+
const e = this.OPTION(() => this.SUBRULE(this._rulePlusMinusOp)), t = this.SUBRULE(this._ruleNumber), i = this.ACTION(() => this._tag(h(t.image, this._locale), this.getLexerPosition()));
|
|
4943
|
+
return this.ACTION(() => e ? n(e.image, i) : i);
|
|
4944
4944
|
} },
|
|
4945
4945
|
{ ALT: () => {
|
|
4946
4946
|
const t = this.CONSUME(e);
|
|
4947
|
-
return this.ACTION(() => this._tag(
|
|
4947
|
+
return this.ACTION(() => this._tag(L(t.image), this.getLexerPosition()));
|
|
4948
4948
|
} },
|
|
4949
4949
|
{ ALT: () => {
|
|
4950
4950
|
const e = this.CONSUME(t);
|
|
4951
|
-
return this.ACTION(() => this._tag(
|
|
4951
|
+
return this.ACTION(() => this._tag(c(e.image, this._locale), this.getLexerPosition()));
|
|
4952
4952
|
} },
|
|
4953
4953
|
{ ALT: () => {
|
|
4954
|
-
const e = this.CONSUME(
|
|
4955
|
-
return this.ACTION(() => this._tag(
|
|
4954
|
+
const e = this.CONSUME(i);
|
|
4955
|
+
return this.ACTION(() => this._tag(T(e.image, this._locale), this.getLexerPosition()));
|
|
4956
4956
|
} },
|
|
4957
4957
|
{ ALT: () => {
|
|
4958
|
-
const e = this.CONSUME(
|
|
4959
|
-
return this.ACTION(() => this._tag(
|
|
4958
|
+
const e = this.CONSUME(r);
|
|
4959
|
+
return this.ACTION(() => this._tag(d(e.image, this._locale), this.getLexerPosition()));
|
|
4960
4960
|
} }
|
|
4961
4961
|
]);
|
|
4962
4962
|
}), this._ruleLiteral = this.RULE("ruleLiteral", () => {
|
|
@@ -4964,48 +4964,48 @@ var ai = {
|
|
|
4964
4964
|
return this.OR([
|
|
4965
4965
|
{ ALT: () => {
|
|
4966
4966
|
const e = this.SUBRULE(this._ruleNumber);
|
|
4967
|
-
return this.ACTION(() => this._tag(
|
|
4967
|
+
return this.ACTION(() => this._tag(h(e.image, this._locale), this.getLexerPosition()));
|
|
4968
4968
|
} },
|
|
4969
4969
|
{ ALT: () => {
|
|
4970
4970
|
const t = this.CONSUME(e);
|
|
4971
|
-
return this.ACTION(() => this._tag(
|
|
4971
|
+
return this.ACTION(() => this._tag(L(t.image), this.getLexerPosition()));
|
|
4972
4972
|
} },
|
|
4973
4973
|
{ ALT: () => {
|
|
4974
4974
|
const e = this.CONSUME(t);
|
|
4975
|
-
return this.ACTION(() => this._tag(
|
|
4975
|
+
return this.ACTION(() => this._tag(c(e.image, this._locale), this.getLexerPosition()));
|
|
4976
4976
|
} },
|
|
4977
4977
|
{ ALT: () => {
|
|
4978
4978
|
const e = this.CONSUME(n);
|
|
4979
|
-
return this.ACTION(() => this._tag(
|
|
4979
|
+
return this.ACTION(() => this._tag(T(e.image, this._locale), this.getLexerPosition()));
|
|
4980
4980
|
} },
|
|
4981
4981
|
{ ALT: () => {
|
|
4982
4982
|
const e = this.CONSUME(i);
|
|
4983
|
-
return this.ACTION(() => this._tag(
|
|
4983
|
+
return this.ACTION(() => this._tag(d(e.image, this._locale), this.getLexerPosition()));
|
|
4984
4984
|
} }
|
|
4985
4985
|
]);
|
|
4986
4986
|
}), this._ruleFunction = this.RULE("ruleFunction", () => {
|
|
4987
4987
|
const { FunctionToken: e, OpenParen: t, CloseParen: n } = this._vocab, i = this.CONSUME(e).image, r = this.getLexerPosition();
|
|
4988
4988
|
this.CONSUME(t);
|
|
4989
4989
|
const s = this.SUBRULE(this._ruleFunctionArguments);
|
|
4990
|
-
let o = this.ACTION(() => this._tag(
|
|
4990
|
+
let o = this.ACTION(() => this._tag(C(i, s), r));
|
|
4991
4991
|
const a = this.OPTION(() => this.CONSUME(n));
|
|
4992
4992
|
return o = this.ACTION(() => (a || this._reportError(o, "Missing closing parenthesis ')'", r), this._tagClose(o, this.getLexerPosition()))), o;
|
|
4993
4993
|
}), this._ruleFunctionArguments = this.RULE("ruleFunctionArguments", () => {
|
|
4994
|
-
const { ArgSeparator: e, CloseParen: t } = this._vocab,
|
|
4994
|
+
const { ArgSeparator: e, CloseParen: t } = this._vocab, n = [];
|
|
4995
4995
|
return this.OPTION({
|
|
4996
4996
|
GATE: () => this.LA(1).tokenType !== t,
|
|
4997
4997
|
DEF: () => {
|
|
4998
4998
|
let t;
|
|
4999
4999
|
this.OPTION2(() => {
|
|
5000
5000
|
t = this.SUBRULE(this._ruleIntersectOp);
|
|
5001
|
-
}), t = this.ACTION(() => t ?? this._tagClose(
|
|
5001
|
+
}), t = this.ACTION(() => t ?? this._tagClose(m(), this.getLexerPosition())), n.push(t), this.MANY(() => {
|
|
5002
5002
|
let t;
|
|
5003
5003
|
this.CONSUME(e), this.OPTION3(() => {
|
|
5004
5004
|
t = this.SUBRULE2(this._ruleIntersectOp);
|
|
5005
|
-
}), t = this.ACTION(() => t ?? this._tagClose(
|
|
5005
|
+
}), t = this.ACTION(() => t ?? this._tagClose(m(), this.getLexerPosition())), n.push(t);
|
|
5006
5006
|
});
|
|
5007
5007
|
}
|
|
5008
|
-
}),
|
|
5008
|
+
}), n;
|
|
5009
5009
|
}), this._ruleBracketedString = this.RULE("ruleBracketedString", () => {
|
|
5010
5010
|
const { BracketedString: e } = this._vocab, t = this.CONSUME(e), n = this.getLexerPosition();
|
|
5011
5011
|
return this.ACTION(() => {
|
|
@@ -5021,60 +5021,60 @@ var ai = {
|
|
|
5021
5021
|
return this._tag(e.root, n);
|
|
5022
5022
|
});
|
|
5023
5023
|
}), this._ruleReference = this.RULE("ruleReference", () => {
|
|
5024
|
-
const { Sheet: e, SheetQuoted:
|
|
5025
|
-
let
|
|
5024
|
+
const { Sheet: e, SheetQuoted: n, DivOp: r, MulOp: s, PlusOp: a, MinOp: c, ArgSeparator: h, Cell: l, NamedToken: u, SingleQuotedString: p, Column: f, AbsRow: m, DigitToken: E, RefError: T } = this._vocab;
|
|
5025
|
+
let O, A;
|
|
5026
5026
|
this.OPTION2({
|
|
5027
5027
|
GATE: () => {
|
|
5028
|
-
for (let
|
|
5029
|
-
const
|
|
5030
|
-
if (
|
|
5031
|
-
if ("" ===
|
|
5028
|
+
for (let t = 1; t < 6; t++) {
|
|
5029
|
+
const i = this.LA(t);
|
|
5030
|
+
if (i.tokenType === e || i.tokenType === n) return !0;
|
|
5031
|
+
if ("" === i.image || ")" === i.image || i.tokenType === r || i.tokenType === s || i.tokenType === a || i.tokenType === c || i.tokenType === h) break;
|
|
5032
5032
|
}
|
|
5033
5033
|
return !1;
|
|
5034
5034
|
},
|
|
5035
5035
|
DEF: () => {
|
|
5036
|
-
|
|
5036
|
+
A = this.getLexerPosition() + 1, O = this.SUBRULE(this._rulePrefixSheetName);
|
|
5037
5037
|
}
|
|
5038
5038
|
});
|
|
5039
|
-
let
|
|
5039
|
+
let R = this.OR([
|
|
5040
5040
|
{ ALT: () => {
|
|
5041
|
-
const e = this.CONSUME(
|
|
5042
|
-
return this.ACTION(() => this._tag(
|
|
5041
|
+
const e = this.CONSUME(l), n = this.getLexerPosition();
|
|
5042
|
+
return this.ACTION(() => this._tag(t(e.image, this.rowIndex, this.colIndex), n));
|
|
5043
5043
|
} },
|
|
5044
5044
|
{ ALT: () => {
|
|
5045
|
-
const e = this.OR2([{ ALT: () => this.CONSUME(
|
|
5046
|
-
return this.ACTION(() => this._tag(
|
|
5045
|
+
const e = this.OR2([{ ALT: () => this.CONSUME(u) }, { ALT: () => this.CONSUME(p) }]);
|
|
5046
|
+
return this.ACTION(() => this._tag(o(e.image), this.getLexerPosition()));
|
|
5047
5047
|
} },
|
|
5048
5048
|
{ ALT: () => this.SUBRULE(this._ruleBracketedString) },
|
|
5049
5049
|
{ ALT: () => this.SUBRULE(this._ruleFunction) },
|
|
5050
5050
|
{ ALT: () => {
|
|
5051
|
-
const e = this.CONSUME(
|
|
5052
|
-
return this.ACTION(() => this._tag(
|
|
5053
|
-
} },
|
|
5054
|
-
{ ALT: () => {
|
|
5055
|
-
const e = this.CONSUME(p);
|
|
5056
|
-
return this.ACTION(() => this._tag(T(e.image, this.rowIndex), this.getLexerPosition()));
|
|
5051
|
+
const e = this.CONSUME(f);
|
|
5052
|
+
return this.ACTION(() => this._tag(i(e.image, this.colIndex), this.getLexerPosition()));
|
|
5057
5053
|
} },
|
|
5058
5054
|
{ ALT: () => {
|
|
5059
5055
|
const e = this.CONSUME(m);
|
|
5060
|
-
return this.ACTION(() => this._tag(
|
|
5056
|
+
return this.ACTION(() => this._tag(g(e.image, this.rowIndex), this.getLexerPosition()));
|
|
5061
5057
|
} },
|
|
5062
5058
|
{ ALT: () => {
|
|
5063
5059
|
const e = this.CONSUME(E);
|
|
5064
|
-
return this.ACTION(() => this._tag(
|
|
5060
|
+
return this.ACTION(() => this._tag(g(e.image, this.rowIndex), this.getLexerPosition()));
|
|
5061
|
+
} },
|
|
5062
|
+
{ ALT: () => {
|
|
5063
|
+
const e = this.CONSUME(T);
|
|
5064
|
+
return this.ACTION(() => this._tag(d(e.image, this._locale), this.getLexerPosition()));
|
|
5065
5065
|
} }
|
|
5066
5066
|
]);
|
|
5067
5067
|
return this.ACTION(() => {
|
|
5068
|
-
if (
|
|
5069
|
-
if ("" ===
|
|
5070
|
-
let e =
|
|
5071
|
-
if (
|
|
5072
|
-
e.value.scope =
|
|
5068
|
+
if (O && R) {
|
|
5069
|
+
if ("" === O.name) return void this._reportError(R, `'${O.image}' is not a valid sheet reference — a '!' needs a sheet name before it`);
|
|
5070
|
+
let e = R;
|
|
5071
|
+
if (R.type === _.Postfix && R.inputs?.[0] && (e = R.inputs[0]), e.type === _.Cell || e.type === _.Named || e.type === _.Row || e.type === _.TableColumn || e.type === _.Error) {
|
|
5072
|
+
e.value.scope = O.name, e.value.scopeImage = O.image;
|
|
5073
5073
|
const t = this._tokenMap.get(e);
|
|
5074
|
-
t && void 0 !==
|
|
5074
|
+
t && void 0 !== A && (t.tokenIndex = A);
|
|
5075
5075
|
}
|
|
5076
5076
|
}
|
|
5077
|
-
}),
|
|
5077
|
+
}), R;
|
|
5078
5078
|
}), this._rulePrefixSheetName = this.RULE("rulePrefixSheetName", () => {
|
|
5079
5079
|
const { SheetQuoted: e, BracketedString: t, NamedToken: n, Column: i, RangeOp: r, Sheet: s } = this._vocab;
|
|
5080
5080
|
return this.OR([{ ALT: () => {
|
|
@@ -5114,48 +5114,48 @@ var ai = {
|
|
|
5114
5114
|
return this.MANY(() => {
|
|
5115
5115
|
this.CONSUME(e), n.push(this.SUBRULE2(this._ruleIntersectOp));
|
|
5116
5116
|
}), this.ACTION(() => 0 === n.length ? t : {
|
|
5117
|
-
type:
|
|
5117
|
+
type: _.List,
|
|
5118
5118
|
value: ",",
|
|
5119
5119
|
inputs: [t, ...n],
|
|
5120
5120
|
isReference: !0
|
|
5121
5121
|
});
|
|
5122
|
-
}), this._lexer =
|
|
5122
|
+
}), this._lexer = r, this._locale = r.getLocale(), this._vocab = s, this._srParser = e?.srParser ?? new Jn(this._locale), this.performSelfAnalysis();
|
|
5123
5123
|
}
|
|
5124
5124
|
getLexer() {
|
|
5125
5125
|
return this._lexer;
|
|
5126
5126
|
}
|
|
5127
5127
|
parse(t, n, i) {
|
|
5128
|
-
const
|
|
5129
|
-
let
|
|
5130
|
-
if (!
|
|
5128
|
+
const r = this._lexer.tokenize(i);
|
|
5129
|
+
let s;
|
|
5130
|
+
if (!r) return {
|
|
5131
5131
|
root: {
|
|
5132
|
-
type:
|
|
5132
|
+
type: _.Unparsed,
|
|
5133
5133
|
value: i
|
|
5134
5134
|
},
|
|
5135
5135
|
errors: []
|
|
5136
5136
|
};
|
|
5137
|
-
const a =
|
|
5137
|
+
const a = r.tokens;
|
|
5138
5138
|
if (0 === a.length) throw new e.Parse(ri);
|
|
5139
|
-
return this.input = a, this._inputText = i, this._inputTextLength = i.length, this.rowIndex = t, this.colIndex = n, this._astErrors = [], this._tokenMap = /* @__PURE__ */ new Map(), this.reset(),
|
|
5140
|
-
const i = e.type,
|
|
5141
|
-
if (
|
|
5142
|
-
const n =
|
|
5143
|
-
return
|
|
5139
|
+
return this.input = a, this._inputText = i, this._inputTextLength = i.length, this.rowIndex = t, this.colIndex = n, this._astErrors = [], this._tokenMap = /* @__PURE__ */ new Map(), this.reset(), s = this._ruleRoot(), s && this._bindAllWhitespace(s), s = v(s, (e, n) => {
|
|
5140
|
+
const i = e.type, r = n?.isReference ? n.value : void 0, s = "string" == typeof r && ei.has(r), a = "string" == typeof r && ti.has(r), c = s ? n.inputs : void 0, h = c ? c[0] === e ? c[1] : c[0] : void 0, l = this._lexer.getMaxRow();
|
|
5141
|
+
if (s && i !== _.Cell && Number.isInteger(e.value)) {
|
|
5142
|
+
const n = g(e.image, t);
|
|
5143
|
+
return I(n, e), "row" !== ni(h) ? this._reportError(n, `'${e.image}' is not a valid reference — a whole row can only pair with another row (as in ${e.image}:${e.image})`) : ii(e.image, l) || this._reportError(n, `'${e.image}' is not a valid row — rows run from 1 to ${l}`), n;
|
|
5144
5144
|
}
|
|
5145
|
-
if (a && i ===
|
|
5146
|
-
if (i ===
|
|
5145
|
+
if (a && i === _.Named) return this._reportError(e, `'${e.image ?? e.value?.nameId}' is a name — '${r}' needs a cell or range on both sides`), e;
|
|
5146
|
+
if (i === _.Cell) {
|
|
5147
5147
|
const t = e.value, n = t.colIndex === Number.MIN_SAFE_INTEGER, i = t.rowIndex === Number.MIN_SAFE_INTEGER;
|
|
5148
5148
|
if ((n || i) && ni(h) === (n ? "row" : "col")) return n && !ii(e.image, l) && this._reportError(e, `'${e.image}' is not a valid row — rows run from 1 to ${l}`), e;
|
|
5149
5149
|
if (n || i || t.colIndex >= 16384) {
|
|
5150
|
-
const
|
|
5151
|
-
|
|
5152
|
-
const
|
|
5153
|
-
return
|
|
5150
|
+
const s = o(e.image);
|
|
5151
|
+
I(s, e);
|
|
5152
|
+
const c = t.scope;
|
|
5153
|
+
return c && (s.value.scope = c, s.value.scopeImage = t.scopeImage), n ? this._reportError(s, `'${e.image}' is not a valid reference — a row needs a column (use ${e.image}:${e.image} for the whole row)`) : i && e.image.includes("$") ? this._reportError(s, `'${e.image}' is not a valid reference — a whole column can only pair with another column (as in ${e.image}:${e.image})`) : a && this._reportError(s, `'${e.image}' is a name — '${r}' needs a cell or range on both sides`), s;
|
|
5154
5154
|
}
|
|
5155
5155
|
}
|
|
5156
5156
|
return e;
|
|
5157
5157
|
}), {
|
|
5158
|
-
root:
|
|
5158
|
+
root: s,
|
|
5159
5159
|
errors: [...this.errors, ...this._astErrors]
|
|
5160
5160
|
};
|
|
5161
5161
|
}
|
|
@@ -5211,7 +5211,7 @@ var ai = {
|
|
|
5211
5211
|
_bindAllWhitespace(e) {
|
|
5212
5212
|
if (e) {
|
|
5213
5213
|
if (this._bindNodeWhitespace(e), e.inputs) for (const t of e.inputs) t && this._bindAllWhitespace(t);
|
|
5214
|
-
if (e.type ===
|
|
5214
|
+
if (e.type === _.Array && Array.isArray(e.value)) {
|
|
5215
5215
|
for (const t of e.value) if (t && Array.isArray(t.value)) for (const e of t.value) e && this._bindAllWhitespace(e);
|
|
5216
5216
|
}
|
|
5217
5217
|
}
|