| Related articles |
|---|
| Call by pattern parsing myg@gate.net (1994-08-03) |
| Re: Call by pattern parsing bos@dcs.gla.ac.uk (1994-08-04) |
| Re: Call by pattern parsing ok@cs.rmit.oz.au (1994-08-05) |
| Newsgroups: | comp.compilers |
| From: | myg@gate.net (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.
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.