parsing - Logic expression parser -


I am trying to create an argument expression parser for expressions like: ((VariableA -> VariableB) AND not VariableC ) Parser should be able to return, whether the result is correct or wrong for the given parameters of the variable.

Actually, only the variables in the expression will be logical operators (or, and, implications, equivalents, rejection and brackets).

I want to ask what is the best way to apply such a parser (AST tree, or reverse polish notation) to use? Or maybe there are already some open source parsers available that can work?

What language are you targeting?

If you want to make a parser, it may be a trick for you. It is basically Java based, but it has a generator for different languages ​​(for example I use it to create a C # parser) and there is no difficulty for pick-up. This is a good editor (ANTLRworks) Which allows to test grammar, which is a good plus.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -