[antlr-interest] ANTLR Lexer stops reading the file

Gokulakannan Somasundaram gokul007 at gmail.com
Fri Feb 5 22:49:44 PST 2010


OK. I understood, even though i have been looking at the generated token EOF
in the source code, never thought of using it directly.

On Fri, Feb 5, 2010 at 5:16 PM, Gokulakannan Somasundaram <
gokul007 at gmail.com> wrote:

> Jim,
>       No i haven't used EOF anywhere explicitly. Is that the reason for the
> lexing to stop?
>
> Thanks,
> Gokul.
>
>
>
> On Thu, Feb 4, 2010 at 8:00 PM, Jim Idle <jimi at temporal-wave.com> wrote:
>
>> Does your parsing rule end in EOF?
>>
>> Jim
>>
>> > -----Original Message-----
>> > From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
>> > bounces at antlr.org] On Behalf Of Gokulakannan Somasundaram
>> > Sent: Thursday, February 04, 2010 6:19 AM
>> > To: antlr-interest at antlr.org
>> > Subject: Re: [antlr-interest] ANTLR Lexer stops reading the file
>> >
>> > I found the problem. It was a semicolon, at the end of the line, that i
>> > missed to match in the rule. It stopped the lexing without emitting an
>> > error. Is it an expected behavior?
>> >
>> > Gokul.
>> >
>> > On Thu, Feb 4, 2010 at 7:22 PM, Gokulakannan Somasundaram <
>> > gokul007 at gmail.com> wrote:
>> >
>> > > Hi,
>> > >     I am faced with a problem, where in some of the statements that
>> > have to
>> > > get parsed are not getting parsed. When i tried the remote debugging,
>> > it is
>> > > saying the input has terminated, whereas there are further lines in
>> > the file
>> > > to be read and parsed.
>> > >     I am attaching the source of the Lexer, Parser(with Templates)
>> > and the
>> > > input file and Main.java.
>> > >     I tried remote debugging the stuff and the tokens are not getting
>> > > generated after a point. In the input file test.bdf, there is a
>> > portion like
>> > > this
>> > >
>> > > dclform
>> > >   THROBBER_SERVLET001:
>> > >     "loading"                   := "true"; */* Things are terminating
>> > here
>> > > */*
>> > >
>> > >   THROBBER_SERVLET002:
>> > >     "loading"                   := "true";
>> > >
>> > >
>> > >   Can anyone help me on this?
>> > >
>> > >   When i ran it like  "java  Main test.bdf", i am facing this issue.
>> > >
>> > >
>> > > Thanks,
>> > > Gokul.
>> > >
>> >
>> > 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
>>
>
>


More information about the antlr-interest mailing list