Hello I'm testing this nice project with a minimal example.
%prefix "w"
test <-
word {puts("OK");}
word <-
[_a-zA-Z]*
%%
int main()
{
w_context_t * ctx = w_create(NULL);
printf("parse res: %d\n", w_parse(ctx, NULL));
w_destroy(ctx);
return 0;
}
When this parser reads a word and prints "OK" I guess the "test" rule is successful. But the "print" prints 1. There is no "Syntax error" default message.
Is a kind person can explain what I'm doing wrong if it is not an issue ?
Hello I'm testing this nice project with a minimal example.
When this parser reads a word and prints "OK" I guess the "test" rule is successful. But the "print" prints 1. There is no "Syntax error" default message. Is a kind person can explain what I'm doing wrong if it is not an issue ?