It seems that a closing paren is indistinguishable from "(end)": test("1)") yields (literal 1). Similarly for brackets, braces, and commas. I'm not sure how to improve error detection in the parser.
BTW, using ideas from this article, I've managed to write a regexp parser with postfix operators that wrap their arguments instead of modifying them.
It seems that a closing paren is indistinguishable from "(end)": test("1)") yields (literal 1). Similarly for brackets, braces, and commas. I'm not sure how to improve error detection in the parser.
BTW, using ideas from this article, I've managed to write a regexp parser with postfix operators that wrap their arguments instead of modifying them.