Version française
Home     About     Download     Resources     Contact us    
Browse thread
How to achieve this camlp4 syntax extension
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Conglun Yao <yaoconglun@g...>
Subject: Re: How to achieve this camlp4 syntax extension
Nice code!!!   Thank you very much.

I'm trying to get the Module name, then used in my syntax extension.

ModuleName.[ my extension ]

It's really a great idea to perform checking in the rule definition.

Conglun

On Thu, Apr 2, 2009 at 2:00 PM, Zheng Li <zheng_li@users.sourceforge.net> wrote:
> On 4/2/2009 1:42 PM, Conglun Yao wrote:
>>
>> Different kinds of error happened, when trying to use it.
>>
>> Even the ordinary expression:  List.length [1; 2;3 ],  failed.  'List'
>> is parsed as module_longident, try to match the rule I defined.
>>
>> Thanks for any help.
>>
>> Conglun
>
> You may have a look at the source code of my pa_scope [1]. It deals with
> these issues and support both open scope (via @) and closed scope (via .{},
> .[], .()). The code is just ~50 lines.
>
> HTH.
>
> [1] http://www.pps.jussieu.fr/~li/software/index.html#pa_scope
>
> --
> Zheng
>
>
>
>
>
>
>