[antlr-interest] Factorization of Logic Expressions
newsreply at areeda.com
Thu Mar 18 08:59:00 PDT 2010
I'm confused (not an abnormal condition)
If I understand it, you start with a logical expression, parse, factor
then save it. The question is how to recover the original, right?
If that is the problem, I'd say it is impossible. The original parse
operation is a many to one transform as is the factoring. So given a
factored expression, I don't see a way to choose among the many possible
If I am understanding what you're trying to do, it would seem you have a
couple of choices:
You could define some sort of canonical expression ie: factored, or
expanded and call it "equivalent" or you can save additional information
on the transforms you have done to arrived at the factored.
John B. Brodie wrote:
> On Thu, 2010-03-18 at 07:56 +0000, Nazim Oztahtaci wrote:
>> I guess my point is misunderstood. for example, my output is smt like
>> abc+abd and this is the only information I save on a text file. Later
>> on I will read this string, no more information I know about original
>> diagram or what I did for DNF transformation. My program reads this
>> string and factorize it to ab(c+d). I need to read all minterms, make
>> some calculations(either in a matrix or there can be co-graphs
>> maybe).I dont think I can use Antlr because I cant define this in a
>> grammar, at least on my mind.
> Sorry. I misunderstood what you are trying to do. My previous
> suggestions are not relevant to your problem. Sorry.
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
More information about the antlr-interest