A
Aleksi Kallio
I need to do reliable input parsing of complex input strings, for
security purposes. Regexes are too weak for this. The easy way to do it
is to write context-free grammars and have a tool to validate input
against my grammar.
The issue is that I would like to keep my grammar flexible. All parser
generators for Java that I have found are, obviously, tools that
generate Java code. For me, loading grammar at runtime and creating
parser on fly to some appropriate memory structure would be the correct
solution. I do not want to generate a java-file, compile and load it.
Is there a tool that does the job? All I need is true/false if input
adheres to syntax. Informative error messages are a bonus.
security purposes. Regexes are too weak for this. The easy way to do it
is to write context-free grammars and have a tool to validate input
against my grammar.
The issue is that I would like to keep my grammar flexible. All parser
generators for Java that I have found are, obviously, tools that
generate Java code. For me, loading grammar at runtime and creating
parser on fly to some appropriate memory structure would be the correct
solution. I do not want to generate a java-file, compile and load it.
Is there a tool that does the job? All I need is true/false if input
adheres to syntax. Informative error messages are a bonus.