caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Problem when parsing
@ 2001-03-02 10:46 Laurent Reveillere
  2001-03-02 13:02 ` Jean-Christophe Filliatre
  2001-03-02 13:21 ` Markus Mottl
  0 siblings, 2 replies; 4+ messages in thread
From: Laurent Reveillere @ 2001-03-02 10:46 UTC (permalink / raw)
  To: caml-list

I wrote a small parser for iso C which does nothing (for now).
The lexer and parser files are well compiled by ocamllex and ocamlyacc.
But when I run the generated program, I have the following error :

Fatal error: uncaught exception Failure(lexing: empty token)


If I replace the following rule in the parser :
	
translation_unit:  
     external_declaration   { () }
  |  translation_unit external_declaration   { () }
 
;                                                                             	


by

translation_unit:  
     external_declaration   { () }
 
;                                                                             	

the test file is parsed with no problem.
The test file is just "int x;"


Any idea ...


I know that this error is raised by lex_engine in byterun/lexing.c but I
do not understand why !!!

-- 
Laurent
-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-03-02 13:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-02 10:46 [Caml-list] Problem when parsing Laurent Reveillere
2001-03-02 13:02 ` Jean-Christophe Filliatre
2001-03-02 13:07   ` Laurent Reveillere
2001-03-02 13:21 ` Markus Mottl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).