Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate Generation of QueryParser to C# #126

Open
bongohrtech opened this issue Aug 16, 2019 · 0 comments
Open

Automate Generation of QueryParser to C# #126

bongohrtech opened this issue Aug 16, 2019 · 0 comments

Comments

@bongohrtech
Copy link
Owner

The Lucene team is using a tool called javacc to generate the main business logic behind the query parsers. If we had a similar tool it could help:

  • Speed up the process of porting/upgrading QueryParser
  • Reduce the number of bugs in these modules caused by doing it manually
  • Most importantly, QueryParser could potentially be generated without using exceptions for control flow

The javacc tool uses a configuration file as input and creates java code as output. Here are some examples of those configuration files:

This has not been fully researched, but there are at least 2 potential ways we could approach this:

  1. Find a similar tool to javacc in .NET that supports similar options that were used in javacc, and create a converter tool to change the javacc configuration into a configuration that the .NET tool supports.
  2. Do a direct port of javacc to C#, and fix its logic to use a more efficient control flow mechanism than exceptions (perhaps goto would be the most direct replacement).

It seems according to this document that using a port of javacc should be our first choice because of the performance benchmarks of the resultant code. And certainly that would eliminate the risk of having a .NET tool not support an option that we need either now or for some future version of Lucene.

JIRA link - [LUCENENET-620] created by nightowl888
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant