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
Caml Parsing
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Stephan Zdancewic <zdance@c...>
Subject: Caml Parsing

	I'm trying to use the SML version of yacc to write a parser
for Objective Caml, but I've run into problems because of some
differences in SML-yacc and Caml-yacc.  More precisely, Caml-yacc
allows you to specify precedence and associativity for non-terminals
in the grammar, while SML-yacc will let you do this only for
terminals.  Since the Caml-yacc grammar for OCaml makes extensive use
of this feature, I need a way of getting the same behavior in
	If anyone knows of a way around this, I'd be very greatful
for the information. Alternatively, does there exist a specification
of the OCaml grammar that doesn't rely on these precedence 
levels/associativities?  Or, better yet, has anyone already written
an OCaml parser for SML?

Steve Zdancewic