Open mingodad opened 1 year ago
From the bison manual https://www.gnu.org/software/bison/manual/bison.html#Mysterious-Conflicts lalr doesn't report any conflict.
lalr
mysterious_reduce_reduce { %whitespace "[ \t\r\n]*" ; def: param_spec return_spec ','; param_spec: type | name_list ':' type ; return_spec: type | name ':' type ; type: 'id'; name: 'id'; name_list: name | name ',' name_list ; }
input:
id id
Playground lexer dump:
=line:column:type:index:identifier:lexeme:value 1:1:1:10:[name]:[id]:[id] 1:4:1:10:[name]:[id]:[id] 1:6:1:7:[comma_terminal]:[,]:[,] =line:column:type:index:identifier:lexeme:value 1:1:1:10:[name]:[id]:[id] 1:4:1:10:[name]:[id]:[id] 1:6:1:7:[comma_terminal]:[,]:[,]
Playground parse tree:
def |param_spec | |name -> id |return_spec | |name -> id |comma_terminal -> ,
From the bison manual https://www.gnu.org/software/bison/manual/bison.html#Mysterious-Conflicts
lalr
doesn't report any conflict.input:
Playground lexer dump:
Playground parse tree: