-
Notifications
You must be signed in to change notification settings - Fork 101
Description
Hello,
I was following the tutorial, but at this step
var ast = ProgramNode.Parse("Id(simpleInput)", grammar, ASTSerializationFormat.HumanReadable);
I got Unhandled exception. System.NotSupportedException: Deserializing human-readable ASTs is not supported.
In which Id is my identity function that does nothing.
If I use the equivalent XML as the input
program_string = "<NonterminalNode symbol=\"simpleOutput\" rule=\"Id\"><VariableNode symbol=\"simpleInput\" /></NonterminalNode>";
and parse with ASTSerializationFormat.XML, then it works.
I look into the code and it seems like only the XML format is currently supported. So given a more complicated function, like "Substring(x, PositionPair(AbsolutePosition(x, 0), AbsolutePosition(x, 5)))", how do I manually construct the XML to test?
Thanks.