Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
From: Joel Reymont <joelr1@g...>
Subject: Re: [Caml-list] Error messages with dypgen
John,

There should at least be a textual message embedded in the exception.

This is what I have right now:

input_declarations:
   | INPUT COLON input_decs { `InputDecls (List.rev $3) }
   | INPUT COLON input_decs error {
       parser_error "Missing semicolon" $startpos($4) $endpos($4)
     }
   | INPUT COLON error {
       parser_error "Error after INPUT:" $startpos($3) $endpos($3)
     }
   | INPUT error {
       parser_error "Missing ':' after INPUT" $startpos($2) $endpos($2)
     }

I clearly know why the error is happening here. Positions  
notwithstanding, wow do I rewrite this for dypgen?

	Thanks, Joel

On May 18, 2007, at 9:42 AM, skaller wrote:

> No it isn't. Dypgen uses lexbufs for compatibility with the
> broken Ocamlyacc interface. Dypgen lets you use ulex or
> other lexer as well. The type of the error thrown by the
> automaton should not be polluted by positional information
> that has no reasonable standard specification.

--
http://wagerlabs.com/