I see the problem now.  I put a breakpoint in the parser and that production
was never hit.  The reason is that in my root production namespace_decl is
preceded by non-terminal filler:

cs_file    :    filler    namespace_decl LBRACE ((comment)* class_def)*
RBRACE;


filler    :    ( options {greedy=false;} : . )*;

removing filler causes my case statement breakpoint to be hit.  I must have
misunderstood the nature of "greedy=false".  I interpreted that to mean
"consume all characters that could not constitute other non terminals".  I
saw this construct in an example grammar file for block comments:

COMMENT_BLOCK
    :   '/*' ( options {greedy=false;} : . )* '*/'

If indeed  my interpretation is wrong, then how does the (.)* regex avoid
eating the closing */ in a block comment?

-- Matt

On Tue, Oct 21, 2008 at 3:33 PM, Terence Parr <[EMAIL PROTECTED]> wrote:

>
> On Oct 21, 2008, at 1:31 PM, Dejas Ninethousand wrote:
>
>  I attached the whole parser file last reply, but here is the
>> namespace_decl production:
>>
>
> right you have to make it as easy as possible on people so they are willing
> to help. We are all lazy ;)
>
> Anyhoo, your problem seems strange because it clearly calls
>
>                    adaptor.AddChild(root_0,
> adaptor.Create(NAMESPACE_COMPLETE, "blort"));
>
> create. If you set a breakpoint at it does not get there, the only
> explanation is that an exception occurs or something else that prevents it
> from going there.
>
> Ter
>
>

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

List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address

Reply via email to