lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lex Lawrence" <lex_lawre...@hotmail.com>
Subject Re: AW: Lexical Error
Date Mon, 10 Dec 2001 08:54:58 GMT
Perhaps something as simple as adding a catch-all token.  When the parser 
encounters something goofy, it will match the last token (and not throw an 
Error), but since it isn't expecting a <CATCHALL> token,
you'll get a nice ParseException.

<*> TOKEN : {
  < WHATEVER_TOKEN_DEFS_YOU_WANT: "blah" > |
  < CATCHALL: ~[] >
}

-Lex



>From: Brian Goetz <brian@quiotix.com>
>Reply-To: "Lucene Users List" <lucene-user@jakarta.apache.org>
>To: Lucene Users List <lucene-user@jakarta.apache.org>
>Subject: Re: AW: Lexical Error
>Date: Fri, 7 Dec 2001 12:44:09 -0800
>
> > >Is there a good reason, why the QueryParser should throw an Error 
>instead of
> > >an Exception?
> > >
> > Unfortunatly this is the feature of JavaCC and not only of Lucene's
> > QueryParser.
>
>Sort of.  It should be possible to fix this by using a different approach
>to token building.
>
>--
>To unsubscribe, e-mail:   
><mailto:lucene-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: 
><mailto:lucene-user-help@jakarta.apache.org>
>


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


--
To unsubscribe, e-mail:   <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>


Mime
View raw message