User:Mlforcada/Robust LR for Transfer
We need a way to implement Apertium4 Bison grammars that are robust.
Here, Bison GRAMMAR is a LALR(1) grammar with actions between braces.
There should be a way (or a procedure) to complete handwritten rules, if possible automatically, to generate a robust parser (and translator). The idea is to take the handwritten Bison grammar and complement it with automatically-generated glue rules in such a way that conflicts are not produced (or are harmless) to produce a new grammar .
One possible way to do so is to model left-to-right restarts as follows:
- by accepting the longest possible constituent that cannot be merged with the remaining output and generating some kind of translation for it
- and treating the remaining output as a complete sentence again