[antlr-interest] Regardig time out

Jim Idle jimi at temporal-wave.com
Tue Aug 17 16:03:32 PDT 2010


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: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of J.R Karthikeyan
> Sent: Tuesday, August 17, 2010 3:47 PM
> To: antlr-interest at antlr.org
> 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" <jimi at temporal-wave.com>
> Subject: Re: [antlr-interest] Regardig time out
> To: <antlr-interest at antlr.org>
> Message-ID: <012401cb3d6f$42d28c30$c877a490$@temporal-wave.com>
> 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: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> > bounces at antlr.org] On Behalf Of J.R Karthikeyan
> > Sent: Monday, August 16, 2010 10:51 AM
> > To: antlr-interest at antlr.org
> > 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




More information about the antlr-interest mailing list