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-list] Problem when parsing
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Laurent Reveillere <Laurent.Reveillere@l...>
Subject: [Caml-list] Problem when parsing
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 :
     external_declaration   { () }
  |  translation_unit external_declaration   { () }


     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 !!!

To unsubscribe, mail  Archives: