help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: grammar for propositional logic


From: Hans Aberg
Subject: Re: grammar for propositional logic
Date: Wed, 1 Sep 2010 10:15:20 +0200

On 1 Sep 2010, at 07:01, Martin McDermott wrote:

I'm trying to write a simple grammar for propositional logic for a project of mine, with support for AND, OR, XOR, NOT. Nothing fancy, only I cant seem to come up with a correct grammar. My simple test cases all give me syntax
errors.

Just take the calculator grammar in the Bison manual and replace + -> or, * -> and, - -> not. Give eor the precedence you want.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]