Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
camlp4 stream parser syntax
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-03-08 (11:52)
From: Joel Reymont <joelr1@g...>
Subject: Re: Re : Re : Re : [Caml-list] Re: camlp4 stream parser syntax

On Mar 8, 2009, at 11:45 AM, Matthieu Wipliez wrote:

> In this case, here is a possible solution, you have your hash table  
> associate a lowercase version of the token with what you'd like to  
> use in the grammar:
> "buytocover" => "BuyToCover"
> "sellshort" => "SellShort"
> ...

I'm doing this already but I don't think it will do the trick with a  
camlp4 parser since it goes through is_kwd to find a match when you  
use "delay".

I think that the internal keyword hash table in the grammar needs to  
be populated with lowercase keywords (by invoking 'using'). I don't  
know how to get to the 'using' function yet, though.

	Thanks, Joel

Mac, C++, OCaml