On 14 Jun 2007, at 12:48, Alessandro Di Marco wrote:
I was trying to create a GLR grammar for natural languages
Though your efforts are welcome, Flex/Bison are not made for parsing
natural languages, the problem is with sentences like
Time flies like an arrow, fruit flies like a banana.
where different word groupings can produce different grammar constructs.
...when I stuck on the
following s/r ambiguity.
...
text:
/* empty */
| text sentence
;
sentence:
WORD EOL
| DOUBLEQ WORD EOL
| DOUBLEQ WORD EOL DOUBLEQ
;
Some shift/reduce conflicts can be resolved using token precedence (%
left, etc.); see the thread "how to resolve if/elseif/else
ambiguity?" (archive URL is in the long headers of the mail you get
from this list). I am not using GLR, so perhaps somebody else can
help you with that.
Hans Aberg
_______________________________________________
[email protected] http://lists.gnu.org/mailman/listinfo/help-bison