Essentially, your input does not conform to your grammar (but you
probably know that).
%error-verbose will give you more information about where the grammar
and your input disagree.
Set yydebug=1 to get a trace of the parse. With that, inspect
y.output for the failing state.
j.
If you mean why do you get the shift/reduce errors, it is because your
grammar is ambiguous.
You can deal with the ambiguity in several ways, but %left to specify
associativity and precedence as I said earlier seems like the easiest
in your case.
Doing that will remove all conflicts from your gra
Any comments on why I would be getting a syntax error?
On Wed, Sep 1, 2010 at 1:50 AM, John P. Hartmann wrote:
> -- Forwarded message --
> From: John P. Hartmann
> Date: 1 September 2010 07:49
> Subject: Re: grammar for propositional logic
> To: Martin McDermott
>
>
> You should
-- Forwarded message --
From: John P. Hartmann
Date: 1 September 2010 07:49
Subject: Re: grammar for propositional logic
To: Martin McDermott
You should inspect the .output file to resolve your conflicts. For
something as simple as yours, you should have zero tolerance for
conf
Know that feeling alright...
On Wed, Sep 1, 2010 at 1:13 AM, Alfonso Urdaneta wrote:
> On 9/1/10 1:01 AM, 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
>>
On 9/1/10 1:01 AM, 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.
Anyone mind taking
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.
Anyone mind taking a look at it?
Thanks
Marty
syntaxAnalyzer