bug-bison
[Top][All Lists]
Advanced

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

Re: Bison Files and Token Order


From: Tom Browder
Subject: Re: Bison Files and Token Order
Date: Mon, 21 Jan 2008 16:35:28 -0600

On Jan 21, 2008 3:02 PM, tim <address@hidden> wrote:
>
> On Mon, 2008-01-21 at 09:30 -0600, Tom Browder wrote:
> > Tim, digging into bison a little more, it seems that the problem is
> > the use of precedence keywords is not compatible with assigning a
> > token number.
> >
> > I believe the list of tokens has to be first and then list the
> > precedence without the token number, e.g.,
> >
> > %token BLAH 1
> > ...
> > %token BLAHN 300
> >
> > %nonassoc BLAH
> > %nonassoc BLAHN
> >
> > I'll try that unless you think I'm going down a rabbit hole (it seems
> > to work in my small test case).
> >
> > -Tom
>
> That looks OK. It used to work (putting token numbers on %left/%right/%
> nonassoc), but bison has had a number of incompatible changes over past
> years.
>
> The user code also now has to be M4-friendly, otherwise large slabs of
> your code silently disappear or strange error messages appear, as I
> found.
>
> The upcoming release also flags various (4) long-standing syntaxes as
> deprecated eg %pure-parser.
>
> You used to be able to specify the token numbers on left/right/nonassoc.
> Now you have to have a separate token declaration. As far as I can tell
> the bison info file is not clear about this point.
>
> It might be difficult to get autogen to do this change for you though.
> Most tokens are just tokens not left/right etc.

So far I've been able to get it to do it Ok (with a little help from
Bruce).  Now if I can just get past gperf (a dependency that I don't
believe is mentioned anywhere).

-Tom




reply via email to

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