in reply to (OT) Yapp rules and resolving reduce/reduce errors

The problem is that column_ident can match ident '.' ident in two different ways:

pc88mxer's solution to defer identifier validation until later is sound, but here's one that does it during parsing:

database_ident: ident ; table_ident: ident '.' ident | ident ; column_ident: ident '.' ident '.' ident | ident '.' ident | ident ;

Replies are listed 'Best First'.
Re^2: (OT) Yapp rules and resolving reduce/reduce errors
by dragonchild (Archbishop) on Apr 10, 2008 at 23:55 UTC
    That's the solution I'm using, but it means that any change to how database_ident is defined needs to be propagated by hand. Isn't there a way of saying "In the case of a reduce/reduce conflict, resolve in this fashion." ?

    My criteria for good software:
    1. Does it work?
    2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

      No idea. I don't know anything about Yapp (or yacc, for that matter). If you really think database_ident is likely to change, you could go with:

      database_ident: ident ; table_ident: ident ; column_ident: ident ; qualified_database_ident: database_ident ; qualified_table_ident: database_ident '.' table_ident | table_ident ; qualified_column_ident: database_ident '.' table_ident '.' column_ident | table_ident '.' column_ident | column_ident ;