Related articles |
---|
Precedence values for Reverse Polish nerd@freeuk.com (Nerd) (1999-10-27) |
Re: Precedence values for Reverse Polish cbrtjr@ix.netcom.com (Charles E. Bortle, Jr.) (1999-10-29) |
Re: Precedence values for Reverse Polish lex@cc.gatech.edu (1999-10-31) |
Re: Precedence values for Reverse Polish ppaatt@aol.com (1999-10-31) |
Re: Precedence values for Reverse Polish nerd@freeuk.com (Nerd) (1999-10-31) |
Re: Precedence values for Reverse Polish anton@mips.complang.tuwien.ac.at (1999-11-02) |
Re: Precedence values for Reverse Polish ppaatt@aol.com (1999-11-02) |
Re: Precedence values for Reverse Polish anton@mips.complang.tuwien.ac.at (1999-11-03) |
Re: Precedence values for Reverse Polish ppaatt@aol.com (1999-11-05) |
Re: Precedence values for Reverse Polish anton@mips.complang.tuwien.ac.at (1999-11-18) |
[1 later articles] |
From: | ppaatt@aol.com (PPAATT) |
Newsgroups: | comp.compilers |
Date: | 31 Oct 1999 23:58:40 -0500 |
Organization: | AOL http://www.aol.com |
References: | 99-10-190 |
Keywords: | parse, comment |
> > a b = c 1 := c 2 := if
> ... deferred ... lambda ... then your RPN evaluator can remain
> extremely simple.
Why isn't this approach more popular?
This Way removes the need for the infamously irregular (non-portable)
"special forms" of Lisp, the "compile mode behaviour" of Forth, etc.?
For example, with lambda, assign/ if/ while/ switch/
declare-a-subroutine all start to APPEAR as closely related as in real
life they are:
( ( 1 "c" := ) ( 2 "c" := ) ( a b =? ) if )
( ( ans ) ( n 0 >? ) while )
( ( dup rot + ) "fibonacci" := )
My current compiler project passes this kind of tree as the
intermediate form between front and back end ... what is it about this
approach that is going to bite me but just hasn't quite yet?
I hope it's clear here I used lots of irritatingly silly parentheses
to mean defer evaluation rather than the << and >> of HP?
> the notion of a deferred routine ...
> lambda ...
Is "anonymous code fragment" a more widely understandable English
translation of "lambda"? Or does this phrase leave out some important
element of the definition of a "lambda" expression?
Pat LaVarre p.lavarre@ieee.org http://members.aol.com/ppaatt/nqjava/
[A lambda is an anonymous code segment with arguments. If you like RPN,
you'll love Forth, some do, some don't. -John]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.