Well the first thing I get is:

[15:59:05] error(201): t.g:4:5: The following alternatives can never be 
matched: 3

This is because your parser rule does not make sense. It should be:

simplerule : CHAR* EOF ;

However, that token makes more sense to be called WORD to be honest. IF you 
cannot launch the debugger after that, then there is something wrong with your 
setup. As I say below, you should start ANTLRWorks from a command line console 
and see what it tells you when you try to start the debugger. Do you have 
firewalls for instance.

Jim


> -----Original Message-----
> From: [email protected] [mailto:antlr-interest-
> [email protected]] On Behalf Of J.R Karthikeyan
> Sent: Tuesday, August 17, 2010 3:47 PM
> To: [email protected]
> Subject: Re: [antlr-interest] Regardig time out
> 
> Hi,
> 
>   I am using the simple grammar file. Please find the grammar file attached
> along with this mail. I have attached the screenshot at various stage also.
> Please let me know what I should need to make sure the compiler works.
> 
> The grammar is
> grammar checkforcompile;
> 
> simplerule
>     :    CHAR | EOF |
>     ;
> 
> WHITESPACE  : ( '\t' | ' ' | '\r' | '\n'| '\u000C' )+
>               {
>                  $channel = HIDDEN;
>               }
>             ;
> 
> fragment
> LETTER    :    ('a'..'z' | 'A'..'Z')
>     ;
> 
> CHAR    :    LETTER (LETTER | '_')+
>     ;
> 
> 
> 
> 
> 
> 
> Date: Mon, 16 Aug 2010 11:17:18 -0700
> From: "Jim Idle" <[email protected]>
> Subject: Re: [antlr-interest] Regardig time out
> To: <[email protected]>
> Message-ID: <[email protected]>
> Content-Type: text/plain;    charset="us-ascii"
> 
> What does the console print to the screen? Start ANTLRWorks from a
> command shell and look at what it tells you. Also, you need to post the actual
> error messages as there a number of places where you might get some
> timeout message. Finally, use a working example grammar first as it could
> also be an error in your grammar (which you are advised to post if you cannot
> get it to work). For instance if you are trying to run via the debugger, then
> the compile might work but if you had a lexer rule like this:
> 
> BADRULE : ;
> 
> Then that rule will match for ever and never consume any input. There are
> too many variables to know what your issue is from the information supplied.
> 
> Jim
> 
> > -----Original Message-----
> > From: [email protected] [mailto:antlr-interest-
> > [email protected]] On Behalf Of J.R Karthikeyan
> > Sent: Monday, August 16, 2010 10:51 AM
> > To: [email protected]
> > Subject: [antlr-interest] Regardig time out
> >
> > Hi,
> >
> >   I am new to this antlr. I trying to create parser using antlr works.
> > I
> wrote
> > some sample grammer and tried to compile from windows as well as from
> > mac. It is compiling in mac machine but not in windows. I tried to
> > compile different file in my mac. When I try to do that it is not
> > compiling the
> new file.
> > It is always compiling the old file. So I deleted the folder name 'ouput'
> and I
> > think it is created during my compilation. Now none of the file in my
> > mac
> is
> > also compiling and it is giving the same error "time out". I rebooted
> > many times and I make sure that port is not used by any application.
> > But still
> it is
> > showing the same error. Suggestion please..
> >
> >
> > Thanks,
> > Jrk



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.

Reply via email to