Re: Precedence based parsing

toby@telegraphics.com.au (Toby Thain)
13 Dec 2003 21:04:11 -0500

          From comp.compilers

Related articles
Precedence based parsing Jeffrey.Kenton@comcast.net (Jeff Kenton) (2003-12-03)
Re: Precedence based parsing torbenm@diku.dk (2003-12-08)
Re: Precedence based parsing jmcenerney@austin.rr.com (John McEnerney) (2003-12-08)
Re: Precedence based parsing haberg@matematik.su.se (2003-12-08)
Re: Precedence based parsing freitag@alancoxonachip.com (Andi Kleen) (2003-12-08)
Re: Precedence based parsing toby@telegraphics.com.au (2003-12-13)
Re: Precedence based parsing robert.thorpe@antenova.com (Rob Thorpe) (2003-12-13)
Re: Precedence based parsing clint@0lsen.net (Clint Olsen) (2003-12-20)
Re: Precedence based parsing sjmeyer@www.tdl.com (Steve Meyer) (2003-12-23)
Re: Precedence based parsing joachim.durchholz@web.de (Joachim Durchholz) (2003-12-27)
Re: Precedence based parsing haberg@matematik.su.se (2003-12-27)
Re: Precedence based parsing derkgwen@HotPOP.com (Derk Gwen) (2004-01-02)
| List of all articles for this month |
From: toby@telegraphics.com.au (Toby Thain)
Newsgroups: comp.compilers
Date: 13 Dec 2003 21:04:11 -0500
Organization: http://groups.google.com
References: 03-12-035 03-12-071
Keywords: parse
Posted-Date: 13 Dec 2003 21:04:11 EST

> In the popular bison parser generator you can specify the precedence
> of operations with %prec (and that seems to actually get used).


%left, %right (and %nonassoc) would be more common. %prec is really
just a workaround for the case where an operator token's precedence
depends on its context (the example given in the bison manual [info
bison] is the token '-', which is often shared by unary or binary
operators of differing precedence).


Toby


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.