From: Tan Kian-ting Date: Tue, 10 Oct 2023 14:16:13 +0000 (+0800) Subject: modify somethinig X-Git-Url: https://git.kianting.info/?a=commitdiff_plain;h=d4dfd2e99f564ca880d40172687986ea3ce757f0;p=clo modify somethinig --- diff --git a/src/index.js b/src/index.js index 6b49d56..15e1862 100644 --- a/src/index.js +++ b/src/index.js @@ -100,12 +100,12 @@ import you as john; 臺中市\\\@ -政府 -@2+2==4; +公園 +@1+2==3; console.log("122");@ -人民 +山頂 `; const PROG = p.rule(); const SEGMENT = p.rule(); @@ -202,6 +202,5 @@ SEGMENT.setPattern(p.alt(p.apply(p.rep_sc(NOT_AT_TEXT), applyText), p.apply(p.se * CONTENT : SEGMENT* */ CONTENT.setPattern(p.apply(p.rep(SEGMENT), applyContent)); -console.log(repr(lexer.parse(inputTxt))); let tree = p.expectSingleResult(p.expectEOF(PROG.parse(lexer.parse(inputTxt)))); console.log("RESULT=" + tkTreeToSExp(tree)); diff --git a/src/index.ts b/src/index.ts index f5f55af..26a690e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -88,12 +88,12 @@ import you as john; 臺中市\\\@ -政府 -@2+2==4; +公園 +@1+2==3; console.log("122");@ -人民 +山頂 `; @@ -258,7 +258,6 @@ CONTENT.setPattern( ); -console.log(repr(lexer.parse(inputTxt))); let tree = p.expectSingleResult(p.expectEOF(PROG.parse(lexer.parse(inputTxt))));