in reply to (OT) Yapp rules and resolving reduce/reduce errors
This solution also avoided conflicts: The only shift-reduce conflict is solved in favor of "shift" (that I supppose is what you need here):pl@nereida:~/LEyapp/examples$ cat -n dc3.eyp 1 %start column_ident 2 3 %left DUMMY 4 %right '.' 5 6 %% 7 column_ident: 8 table_ident '.' ident 9 | table_ident 10 ; 11 12 table_ident: 13 database_ident '.' ident 14 | database_ident %prec DUMMY 15 ; 16 17 database_ident: 18 ident 19 ; 20 21 ident: 22 IDENT 23 | IDENT_QUOTED 24 ; 25 %%
Bestpl@nereida:~/LEyapp/examples$ eyapp -v dc3.eyp pl@nereida:~/LEyapp/examples$ head -15 dc3.output Conflicts: ---------- Conflict in state 1 between rule 4 and token '.' resolved as shift. Rules: ------ 0: $start -> column_ident $end 1: column_ident -> table_ident '.' ident 2: column_ident -> table_ident 3: table_ident -> database_ident '.' ident 4: table_ident -> database_ident 5: database_ident -> ident 6: ident -> IDENT 7: ident -> IDENT_QUOTED
Casiano
|
|---|