Hi, I'm new to bison and need help to acheive my following syntax,
syntax1: decl_spec semicolon syntax2: decl_spec decl_attrib(optional) init_spec decl_attrib(optional) semicolon To achieve this i wrote bison grammar as, declaration: decl_spec semicolon |decl_spec decl_attrib init_spec decl_attrib semicolon decl_attrib: /* Since this is optional i kept blank rule */ | '__attribute__' But am getting shift/reduce conflicts. Also my grammar is not parsing the input successfully, throws parser syntax error. Please correct me where i did mistake. Also please let me know if any other information required to fix this. Thanks, Anand V -- View this message in context: http://old.nabble.com/Optional-rule-throws-shift-reduce-conflict-tp29751078p29751078.html Sent from the Gnu - Bison - Help mailing list archive at Nabble.com. _______________________________________________ help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison