English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Error messages with dypgen
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-05-18 (07:20)
From: Joel Reymont <joelr1@g...>
Subject: Error messages with dypgen
I understand that dypgen throws an exception when a syntax error is  

How do I get it to produce line/column numbers when that happens?

It would be rather groovy if the the exception carried  
symbol_start_pos, symbol_end_pos, rhs_start_pos, rhs_end_pos from the  
dyp record since this information is available at the time that the  
exception is raised. A placeholder for a textual message would also  
be very helpful.

A simple error function built into dypgen could then take a message  
and raise the syntax error exception with all the required info.

	Thanks, Joel