Re: Syntax

"Eric A. Anderson" <ea08+@andrew.cmu.edu>
Thu, 5 Dec 1991 12:59:47 -0500 (EST)

          From comp.compilers

Related articles
Current work in compiler/language design. hackeron@Athena.MIT.EDU (Harris L. Gilliam - MIT Project Athena) (1991-11-10)
Syntax andy@SAIL.Stanford.EDU (1991-11-27)
Re: Syntax drw@cantor.mit.edu (1991-12-03)
Re: Syntax salomon@silver.cs.umanitoba.ca (1991-12-04)
Re: Syntax rockwell@socrates.umd.edu (Raul Deluth Miller-Rockwell) (1991-12-05)
Re: Syntax buzzard@eng.umd.edu (1991-12-05)
Re: Syntax ea08+@andrew.cmu.edu (Eric A. Anderson) (1991-12-05)
Re: Syntax gaynor@remus.rutgers.edu (1991-12-05)
Re: Syntax kend@data.rain.com (1991-12-04)
| List of all articles for this month |

Newsgroups: comp.compilers
From: "Eric A. Anderson" <ea08+@andrew.cmu.edu>
Keywords: syntax
Organization: Compilers Central
References: 91-11-030 91-12-021
Date: Thu, 5 Dec 1991 12:59:47 -0500 (EST)

salomon@silver.cs.umanitoba.ca (Dan Salomon) writes:
[stuff deleted]
> [...] In any case, infix is more concise than
> prefix since it usually requires fewer parentheses. [...]


I hate to nit-pick or anything, but that's not true, prefix and
postfix notation in and of themselves require no parenthesis if the
arity of your operators is known.


+ 2 * 3 4


Can be parsed by the obvious prefix parser.


5*(7+9) becomes:* 5 + 7 9


Lisp requires parenthesis, 1 - I suspect for consistancy, 2 - because
(+ 3 4 5) is a legal thing to add, and stuff like that couldn't be
handled without parenthesis or something like that.
                    -Eric the vaguely competent
--


Post a followup to this message

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