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
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: 2009-06-11 (13:21)
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:

Hope that helps.

- Andreas