0

Hi,
I would like to write a parser in C#. Lets say I have expression like
NOT(NOT(a AND b) OR (c AND d)). I want this to be in Sum of Products for->(a AND b AND NOT c) OR (a AND b AND NOT d). To do that normally in the logic, demorgan rule is applied and then distributivity of AND over OR. I am having problems about it and tried to find a solution on the Net. Some people have suggested to use Antlr but it does not have tutorials enough. Is there any sample program or at least piece of solution? Even simple guidence like "Use bla bla library in C#" is appreciated-
Best regards,
N

2
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by ddanbe
0

Hi, karismasa, welcome at DaniWeb!
Some time ago I worked on something just that.
I don't have it here at hand, but I let you know more as soon as I can.
See ya:)

0

Hi, karismasa, welcome at DaniWeb!
Some time ago I worked on something just that.
I don't have it here at hand, but I let you know more as soon as I can.
See ya:)

Thank you for your answer. I will wait your message later on.
Take care

0

This is a small C# app which parses logical expressions and builds thruth tables out of it. You may have it as is, maybe it helps you maybe not, I don't know. You may change it like you see fit. I know it works for simple expressions, but it is in fact still "under contruction" as they say. Have fun with it and if you have more questions just ask. Succes!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.