Re: Re: Stack based machines

"Quinn Tyler Jackson" <>
28 Mar 2000 00:59:54 -0500

          From comp.compilers

Related articles
Stack based machines (Linus Thand) (2000-03-23)
Re: Stack based machines (Pieter Koopman) (2000-03-25)
Re: Re: Stack based machines (Quinn Tyler Jackson) (2000-03-28)
| List of all articles for this month |

From: "Quinn Tyler Jackson" <>
Newsgroups: comp.compilers
Date: 28 Mar 2000 00:59:54 -0500
Organization: Compilers Central
References: 00-03-101 00-03-128
Keywords: architecture

"Pieter Koopman" <> said:

> > What is happening in the world of stack-based machines?
> > Are there any active groups working on processors or
> > compilers (I'm especially interested in functional languages).
> Many modern functional language implementations like Haskell
> ( and Clean ( use stack-based
> abstract machines for their compilation schemes.

More than a few LPM users complain that the syntax is ugly, but I try
to remind them that since the patterns are compiled to an interpreted
machine at runtime, the reverse notation allows for efficient pattern
compilation, since each parameter is just pushed to a stack, and once
the last character is encountered, the entire clause is available for

      % 2-5 'a' ; 'b' {NOCASE} !

"Match 2 to 5 hits from the sets 'a' or 'b', disregarding case."

It got enough response for ugliness that I added some predefined macros:

        <!('a' ; 'b', 2-5, NOCASE)>

Which just expands to the more easily parsed version under the hood.
Some would even have the more verbose macro "class" instead of the

        <class ('a' ; 'b', 2-5, NOCASE)>

Quinn Tyler Jackson

Post a followup to this message

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