[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Syntax extension of infix languages



Here are two links:

Maya is an extension of java that allows syntactic extension.

http://www.cs.utah.edu/~jbaker/maya/

This is an approach by one of Paul Wilson's students.
ftp://ftp.cs.utexas.edu/pub/garbage/carl-msthesis.ps

At 09:44 PM 12/15/2001, Eric Kidd wrote:
>On Sat, 2001-12-15 at 20:27, Tim Hickey wrote:
>> Prolog uses an extensible infix grammar based on an extension of
>> operator grammars. A program can introduce new infix operators with
>> specified associativity, precedence, and fixity (infix, prefix, postfix).
>> The parser always translates the expressions into operator syntax
>> trees in a fairly simple manner.
>> 
>> Has anyone tried using a Prolog style syntax for Scheme? It might
>> provide an interesting (and easy to use) "skin" for Scheme.
>
>Let me clarify--
>
>I'm interested in syntax extension that's powerful enough to add new
>statements and declarations to the language.  A simple example might be
>an 'unless' statement in Dylan:
>
> define macro unless
>   { unless (?:expression) ?:body end }
>     => { if (~?expression) ?body end }
> end macro unless;
>
>A more complicated example might be implementing 'lex' or 'yacc' as a
>compile-time macro.
>
>This is a much more annoying problem than defining new operators.
>
>Cheers,
>Eric