and not have the grammar distinguish between table_ident, column_ident and database_ident. The checking of the proper kind of ident can be done later. This approach also generally makes it easier to recover from errors.ident : IDENT | INDENT_QUOTED | ident '.' IDENT | ident '.' IDENT_QUOT +ED ;
Update: The reduce-reduce conflict is this: when trying to parse a column_ident and the current input token is ident with look-ahead of ., the following reductions are possible:
One solution would be to reverse the recursion:database_ident -> ident # i.e. column_ident -> ident '.' ident '.' i +dent table_ident -> ident # i.e. column_ident -> ident '.' ident
Then when the look-ahead is '.' the grammar knows exactly what production to try to complete.database_ident: ident ; table_ident: ident | ident '.' database_ident ; column_ident: ident | ident '.' table_indent ;
In reply to Re: (OT) Yapp rules and resolving reduce/reduce errors
by pc88mxer
in thread (OT) Yapp rules and resolving reduce/reduce errors
by dragonchild
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |