yacc - How to do a if condition
问题 I am trying to do a simple if condition from an input file. i will have something like if(color = black) No matter what i do i keep getting 1 shift / reduce I am very new to lex and yacc Do YACC grammars often have shift-reduce conflicts? and should i not worry about them? My lex file will return every character in the file correctly so i wont show you the lex file However, here is my yacc file: %{ #include <ctype.h> #include <stdio.h> %} |IF LPAREN COLOR EQ BLACK RPAREN {$$ = $1; printf(