Call by pattern parsing (Mark Grosberg)
Wed, 3 Aug 1994 17:59:00 GMT

          From comp.compilers

Related articles
Call by pattern parsing (1994-08-03)
Re: Call by pattern parsing (1994-08-04)
Re: Call by pattern parsing (1994-08-05)
| List of all articles for this month |

Newsgroups: comp.compilers
From: (Mark Grosberg)
Keywords: parse, question
Organization: Compilers Central
Date: Wed, 3 Aug 1994 17:59:00 GMT
Status: RO

Hello all,

Some languages (especially functional languages) use a function calling
scheme calling "call by pattern" where, rather than naming a function and
having it use a strict syntax, the PROGRAMMER (not the language) defines
the syntax. For example, a binary + operator would be declared like this:

  a:in Integer; + b:in Integer;

where a symbol followed by a ":" is a parameter. One could also do
something like this:

[ a: in String; ] to make an indexing operator. This seems simple enough,
but the problem I had when coding my algorithm is basically what to do
about precedence and associativity and perhaps a more efficient way than
the way I did it (nested has tables that recurse when an "expression" is
required); Any help or code would be appriciated.

Thanks in advance,
Mark G.

Post a followup to this message

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