臺中市\\\@
-政府
-@2+2==4;
+公園
+@1+2==3;
console.log("122");@
-人民
+山頂
`;
const PROG = p.rule();
const SEGMENT = p.rule();
* 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));