Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #1520
| Path | csiph.com!usenet.pasdenom.info!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED!nerds-end |
|---|---|
| From | Stefan Monnier <monnier@iro.umontreal.ca> |
| Newsgroups | comp.compilers |
| Subject | Re: Grammar with low-precedence postfix operator? |
| Date | Sun, 08 Feb 2015 12:34:27 -0500 |
| Organization | A noiseless patient Spider |
| Lines | 20 |
| Sender | news@iecc.com |
| Approved | comp.compilers@iecc.com |
| Message-ID | <15-02-018@comp.compilers> (permalink) |
| References | <15-02-006@comp.compilers> |
| NNTP-Posting-Host | news.iecc.com |
| Mime-Version | 1.0 |
| Content-Type | text/plain |
| X-Trace | miucha.iecc.com 1423440382 82577 2001:470:1f07:1126:0:676f:7373:6970 (9 Feb 2015 00:06:22 GMT) |
| X-Complaints-To | abuse@iecc.com |
| NNTP-Posting-Date | Mon, 9 Feb 2015 00:06:22 +0000 (UTC) |
| Keywords | parse |
| Posted-Date | 08 Feb 2015 19:06:22 EST |
| X-submission-address | compilers@iecc.com |
| X-moderator-address | compilers-request@iecc.com |
| X-FAQ-and-archives | http://compilers.iecc.com |
| Xref | csiph.com comp.compilers:1520 |
Show key headers only | View raw
> term
> : INT
> | '(' expr ')' //parentheses
> | <assoc=right> term '^' term //exponentiation
> | term term //implicit multiplication
> ;
> expr
> : term
> | ('+' | '-') expr //unary plus/minus
> | expr ('/' | '*') expr //division and explicit multiplication
> | expr ('+' | '-') expr //addition/subtraction
> | expr '++' //increment
> ;
This last production rule is wrong: "expr ++" should produce a "term", not
an "expr".
Stefan
Back to comp.compilers | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Grammar with low-precedence postfix operator? Robert Jacobson <rljacobson@gmail.com> - 2015-02-05 13:27 -0500
Re: Grammar with low-precedence postfix operator? Kaz Kylheku <kaz@kylheku.com> - 2015-02-05 21:10 +0000
Re: Grammar with low-precedence postfix operator? Robert Jacobson <rljacobson@gmail.com> - 2015-02-07 10:30 -0800
Re: Grammar with low-precedence postfix operator? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-02-07 11:27 +0000
Re: Grammar with low-precedence postfix operator? jgk@panix.com (Joe keane) - 2015-02-10 21:03 +0000
Re: Grammar with low-precedence postfix operator? Kaz Kylheku <kaz@kylheku.com> - 2015-02-11 02:19 +0000
Re: Grammar with low-precedence postfix operator? Stefan Monnier <monnier@iro.umontreal.ca> - 2015-02-08 12:34 -0500
Re: Grammar with low-precedence postfix operator? Kaz Kylheku <kaz@kylheku.com> - 2015-02-09 01:24 +0000
Re: Grammar with low-precedence postfix operator? Hans-Peter Diettrich <DrDiettrich1@netscape.net> - 2015-02-09 08:05 +0100
Re: Grammar with low-precedence postfix operator? Robert Jacobson <rljacobson@gmail.com> - 2015-02-21 12:55 -0800
csiph-web