I'm working on my compiler design project and i have to remove all ambiguities from this grammar. At first, the following code(.yac) had 27 shift/reduce conflicts with 3 reduce/reduce conflicts. I managed to make them only 15 shift/reduce conflicts and by now i can see that there are only conflicts on variable declarations like BOOLEAN_KW, CHRACTAR_KW, etc. I really need to solve this problem and i know that some Precedence or Priority need to be used here, and i have tested a lot of possibilites, but no success. If someone could have helped me with this output file of bison which shows the conflicts on shift/reduce, i would be greatly thankful. By the way, I guess that these reduce/conflicts are some warnings that bison gives me for acknowledgment purposes, But unfortunately even knowing that doesn't let me run the whole lexer and parser with my main program and i get this error while trying to run the whole code:
Error : syntax error
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -1
at YYParser$YYStack.stateAt(YYParser.java:315)
at YYParser.parse(YYParser.java:1568)
at global.main(global.java:39)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
And finally, here is my output from the -o output option with --verbose enabled using bison which shows the conflicts in the early section of the code: My code is uploaded here.