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
camlp4 stream parser syntax
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-03-08 (00:37)
From: Matthieu Wipliez <mwipliez@y...>
Subject: Re : Re : [Caml-list] camlp4 stream parser syntax

> While we are on this subject... How do you troubleshoot camlp4 rules?

Not sure what you mean :(

> With a stream parser you can invoke individual functions since each is a 
> full-blown parser. Can the same be done with camlp4, e.g. individual rules 
> invoked?

Well when you invoke the parser with Gram.parse, you give it the entry point. So you may parse only a subset of your language if the grammar allows it.

> Can rules be traced to see which ones are being taken?

Erm, I don't really know... You can always printf when a rule is taken, but I'm not aware of a built-in construct that allows you to monitor the rules that are taken.