Version française
Home     About     Download     Resources     Contact us    
Browse thread
ocamllex and python-style indentation
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Andreas Rossberg <rossberg@m...>
Subject: Re: [Caml-list] ocamllex and python-style indentation
On Jun 11, 2009, at 14.57 h, Andrej Bauer wrote:

> My parsing powers are not sufficient to easily come up with
> lexer/parser for a simple language that uses python-style indentation
> and newline rules. Does anyone have such a thing lying around, written
> in ocamllex/yacc or menhir? I would appreciate a peek to see how
> you've dealt with it.

Hi Andrej,

I have some _very_ old code (a source-to-source translator that  
provides Haskell-style syntax for Ocaml itself) that does that:

   http://www.mpi-sws.org/~rossberg/hocaml-0.12.tgz

Hope that helps.

Cheers,
- Andreas