lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Miller <markrmil...@gmail.com>
Subject Re: Installing a custom tokenizer
Date Tue, 29 Aug 2006 22:55:45 GMT
Bill Taylor wrote:
> I have copied Lucene's StandardTokenizer.jj into my directory, renamed 
> it, and did a global change of the names to my class name, LogTokenizer.
>
> The issue is that the generated LogTokenizer.java does not compile for 
> 2 reasons:
>
> 1) in the constructor, this(new FastCharStream(reader)); fails because 
> there is no such constructor in the parent class.  I commented it out.
>
> 2) I get an error on the next() method which throws ParseException and 
> IO Exception.  The message is Exception ParseException is not 
> compatible with throws clause in TokenStream.next().  As far as I can 
> see, the exceptions are OK.
>
> Since all of this is generated code, my feelings are a bit hurt.  Did 
> Lucene use an older version of JavaCC?  I am using javacc-4.0
>
> On Aug 29, 2006, at 4:57 PM, Erick Erickson wrote:
>
>
>
1. I would need to know more, but it sounds like you should uncomment it :)

2. JavaCC 4.0 is fine.  If you look at the Lucene build.xml you will see 
that  it compile the javacc generated classes in a separate directory so 
that it can exclude the ParseException class from compilation. Check out 
the build file and copy that method.

- Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message