Thanks, Jim for fast reply. I can't give you any info about the grammar from May thread. But in my grammar (the second link: http://www.antlr.org/pipermail/antlr-interest/2010-September/039764.html) I can see the same behavior (described at the link location). Definitions for Identifier, WS, Comments and so on are typical (according to the book "The Definitive ANTLR Reference: Building domain-specific languages"). Could you have a look on my grammar and the problem?
Kind regards, Andrey 2010/10/1 Jim Idle <[email protected]>: > > >> -----Original Message----- >> From: Andrey Desyatov [mailto:[email protected]] >> Sent: Friday, October 01, 2010 9:28 AM >> To: Jim Idle >> Cc: [email protected] >> Subject: Re: [antlr-interest] Context-Sensitive Follow Sets.. Bug? >> >> Sorry, Jim for the confusing question. >> I've tried to continue thread from May with subject "Context-Sensitive >> Follow Sets.. Bug?" >> (http://www.antlr.org/pipermail/antlr-interest/2010-May/038776.html), >> but without success (it was my second post to mailing list and I couldn't >> understand how to continue any thread). > > I had to remove the many stars from the grammar to see what it was: > > start: animal (AND acClass)? service EOF; > > animal: (DOG | CAT ); > > service: (HARDWARE | SOFTWARE) ; > > AND: 'and'; > > DOG: 'dog'; > > CAT: 'cat'; > > HARDWARE: 'hardware'; > > > SOFTWARE: 'software'; > > acClass > @init* > { > System.out.println(computeContextSensitiveRuleFOLLOW().toString()); > } > : > ; > > And the OP says: > > > Testing this grammar, with let's say input: > "*dog and software*", > the result in the console is: > "{4, 7, 8}" (which stands for tokens {THE, HARDWARE, SOFTWARE}), > > However, the grammar given does not have a token for THE, or a specification > for WS, or a grammar xzy; > > so the grammar is incomplete. I suspect that there is a problem with the > grammar and not the followsets. If someone can give a complete example, then > I can look at it > > Jim > > > >> >> Description of my problem I've given in another thread: >> http://www.antlr.org/pipermail/antlr-interest/2010- >> September/039764.html. >> > > > > List: http://www.antlr.org/mailman/listinfo/antlr-interest > Unsubscribe: > http://www.antlr.org/mailman/options/antlr-interest/your-email-address > List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en.
