i've been working on a compiler for an imperative language using lex and yacc, and today i finished the grammar, the thing is that i've been reading on the web that every grammar is expected to have a few shift/reduce conflicts, specially if it has if/else statements, that's often known as dangling if-else, and mine does have if/elsif/else statements yet it doesn't throw any conflict when compiled, the question is
¿does that means this grammar has flaws just because it doesn't throw any shift/reduce conflicts? i dont have much experience doing this but i can't find any problem with it
In case you want some more information the productions for the if/elsif/else statements in this grammar are something like this:
statement -> ...
------------| initial_conditional_stmt
initial_conditional_stmt: conditional_stmt
-----------------------| conditional_stmt 'else' block
conditional_stmt -> 'if' '(' expression ')' block
------------------| conditional_stmt elsif '(' expression ')' block
block is just a list of statements inside brackets {}