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
Parser state variables
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-10-28 (06:26)
From: Alain Frisch <Alain.Frisch@i...>
Subject: Re: [Caml-list] Parser state variables
skaller wrote:
> Are there any plans to extend Ocamlyacc to allow state variables,
> in a manner similar to the recent extensions to Ocamllex to
> allow them?
> At present, there are two workarounds:

Another one is to make semantic actions return functions which take the
state as an argument. This is similar to introducing a new data type to
represent pure concrete parse trees and then post-process these trees to
produce abstract syntax.

-- Alain