|
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 syntaxerrors.
Just take the calculator grammar in the Bison manual and replace + -> or, * -> and, - -> not. Give eor the precedence you want.
[Prev in Thread] | Current Thread | [Next in Thread] |