hime
hime copied to clipboard
Test mode does not work
Hi, I think the --test
mode of himecc
doesn't work properly.
Using this trivial grammar file:
grammar Test
{
options
{
Axiom = "expression";
}
terminals
{
A -> 'a'+;
}
rules
{
expression -> A ;
}
}
Running echo "aaa" | himecc --test Test.gram
yields
{"errors":[{"type":"UnexpectedToken","position":{"line":1,"column":1},"length":3,"value":"aaa","terminal":{"id":3,"name":"A"},"expected":[]}],"root":null}
But running it with e.g. the .NET runtime works as expected, yielding one A = aaa
ASTNode.