Answer the question
In order to leave comments, you need to log in
Is there a ready-made parser query string solution in java?
Hello toasters.
The question is. It is necessary to parse lines of the form: value = key OR (value2 = key3 AND value3=key3)
Is there a ready-made solution for parsing such requests in essence?
Answer the question
In order to leave comments, you need to log in
There is such a solution.
As an option - write your own grammar (it's simple here) and feed it into ANTLR.
At the output, we get a parser file in the desired language, which can already be used.
But ANTLR is more beneficial to use when grammars are complex, for such a simple example it may be overkill
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question