-- Sami Siren
Piotr Kosiorowski (JIRA) wrote:
[ http://issues.apache.org/jira/browse/NUTCH-4?page=comments#action_62272 ]
Piotr Kosiorowski commented on NUTCH-4:
---------------------------------------
Some time ago I sent a patch for this with JUnit test on the list - but it was using old package naming. I had plans to resubmit it last week but due to amount of other work I have posponed it. Anyway there is one difference between your and mine solution: I have added one additional method: void nonTermOrEOF() : {} { nonTerm() | <EOF> } and changed: /** Parse anything but a term or an operator (plur or minus or quote). */ void nonOpOrTerm() : {} { (LOOKAHEAD(2) (<WHITE> | nonOpInfix() | ((<PLUS>|<MINUS>) nonTerm())))* }
into
/** Parse anything but a term or an operator (plur or minus or quote). */ void nonOpOrTerm() : {} { (LOOKAHEAD(2) (<WHITE> | nonOpInfix() | ((<PLUS>|<MINUS>) nonTermOrEOF())))* }
My solution allows to parse: "test +" query as "test" in your case such query throws parse exception.
I can send the patch again if you wish so we can merge our versions. I will have a look at Junit tests too, to see if they can/should be merged.
