Open
Description
Grammar file: https://github.com/opencybersecurityalliance/kestrel-lang/blob/develop/src/kestrel/syntax/kestrel.lark
Generated parser:
kestrelParser.js.zip
When parsing this statement procs2 = GET process abc
, the parser throws the exception like below which is not caught by parser.
Code
function handle_errors(e) { return true; }
try {
treeData = parser.parse(text, null, handle_errors).children[0];
} catch (e) {
console.debug("uncaught error:", e)
}
Expected:
This kind of error can be handled by the parser, so we can get the parsing tree and the error info like Unexpected character
or Unexpected Token
.