the situation is i wrote a very very simple syntax, but when compile, i got a conflict. I have no idear why a syntax such a simple can get a conflict.
%token SCRIPT_ID
%token STRING
%start functions
%%
functions: SCRIPT_ID '(' STRING ')' {printf("script_id is %s", $3);};
%%
I just want to use yacc to parse my file. In my file there are stuffs like script_id("1232444").
I search on yacc manual, and find when talking about shift/reduce conflict, it raises an example like 'if and else'. And i do understand that why 'if and else' has a conflict if the prioprity is not designate. But i do not know what that if-else-conflict has something to do with the conflict i met.
Can some one tell me what is wrong with my code?
-v
option. This generates a filey.output
(or something like that) with information in it. – Linus Kleen