> -----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
--
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.