Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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