gnupic: Thread: A question about parse.y


[<<] [<] Page 1 of 1 [>] [>>]
Subject: A question about parse.y
From: feqin fan ####@####.####
Date: 24 Aug 2012 02:25:49 -0000
Message-Id: <CAOfAq_pP3FS7E4HsaC--C+7jav3nzYkngpJ1X7bzpPsnfwZejw@mail.gmail.com>

When I using bison compile the parse.y(gputils-0.14.2/gpasm/parse.y) to get
the parse.c.
Using this directive bison -d -vt parse.y in terminal, And I get this
output --- conflicts : 26 shift/reduce.

Is it normal..??
I'm not familiar with bison..

Thanks..
Subject: Re: A question about parse.y
From: feqin fan ####@####.####
Date: 24 Aug 2012 07:13:56 -0000
Message-Id: <CAOfAq_pv6W8aRj_j5v7N8zG-k7fKEnV-ga7uhd6Y4DJcqvQhnw@mail.gmail.com>

Thanks..
It's can work,I have compile the parse.y(modified to satisfy my
requirement).everything is OK, except that the .lst file have
some duplicate information root in the included header file..
:-)


2012/8/24 Joe Pfeiffer ####@####.####

> feqin fan writes:
> >When I using bison compile the parse.y(gputils-0.14.2/gpasm/parse.y) to
> get
> >the parse.c.
> >Using this directive bison -d -vt parse.y in terminal, And I get this
> >output --- conflicts : 26 shift/reduce.
> >
> >Is it normal..??
> >I'm not familiar with bison..
>
> Yes, it's normal; it happens when a grammar is ambiguous.  I haven't
> looked at it in detail to know whether there is actually a problem or
> if the author just wasn't careful, but if it works you can assume it's
> correct "enough".
> --
> Joe Pfeiffer                                   http://pfeifferfamily.net/
> 1440 Tierra del Sol Dr                         575.525.2764 (H)
> Las Cruces, NM 88007                           575.496.3501 (C)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####
>
>
Subject: Re: A question about parse.y
From: Ralph Corderoy ####@####.####
Date: 24 Aug 2012 09:31:46 -0000
Message-Id: <20120824093141.9F767274F5@orac.inputplus.co.uk>

Hi,

> > Using this directive bison -d -vt parse.y in terminal, And I get
> > this output --- conflicts : 26 shift/reduce.
> 
> Yes, it's normal; it happens when a grammar is ambiguous.

I too don't know the specifics of this case but assuming each of the 26
is happy with bison's default action and that the grammar can't be
easily re-worked to lessen them then bison has a %expect directive so 26
can be stated removing the warning unless it deviates in the future.

    http://www.gnu.org/software/bison/manual/html_node/Expect-Decl.html

Cheers, Ralph.
[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.