grammatica-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Grammatica-users] basic question


From: J. Merrill
Subject: Re: [Grammatica-users] basic question
Date: Fri, 18 Feb 2005 14:15:20 -0500

At 01:46 PM 2/18/2005, Leo Ferres wrote: (in part)
>Dear list;
>
>I'm afraid I've got to ask what I think is a very simple question. So,
>my apologies. I seem to have a problem accessing the parser from my java
>code. The "standalone" parser works, but when I call it, I get an
>"unexpected EOF" error. Here are the details of my implementation:
>
>try {
>                        parseFOL(myString);
>                } catch (ParserLogException e) {
>                        System.out.println(e.getError(0).getMessage());
>                } catch (ParserCreationException e) {
>                        System.out.println(e.getMessage());
>                }
>
>myString is a String object. I get no errors in either the packages or
>the classes, but when I put in an expression to be parsed, here's what I
>get for some sample runs:
>
>input: BLUE(car)
>Sentence(2001)
>unexpected end of file, on line 1 column: 10
>[snip]

I think it's possible that the grammar is expecting there to be a 
line-terminator before end-of-file is encountered.  You could try appending a 
newline to myString before trying to parse it.  Other than that I have no ideas.


J. Merrill / Analytical Software Corp





reply via email to

[Prev in Thread] Current Thread [Next in Thread]