Browse thread
[Caml-list] Problem when parsing
-
Laurent Reveillere
-
Jean-Christophe Filliatre
- Laurent Reveillere
- Markus Mottl
-
Jean-Christophe Filliatre
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Laurent Reveillere <Laurent.Reveillere@l...> |
| Subject: | Re: [Caml-list] Problem when parsing |
Jean-Christophe Filliatre wrote: > > Laurent Reveillere writes: > > 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) > > This exception is raised by the lexer when input does not match any of > the lexer rules. So it has probably to do with your lexer rules, not > with your parser rules. > > Hope this helps, > -- > Jean-Christophe FILLIATRE > mailto:Jean-Christophe.Filliatre@lri.fr > http://www.lri.fr/~filliatr Yes, I fixed the problem. The error came from the fact that I forgot a rule for eof in my lexer. Still, I would like to know why the eof special char is not match by a rule like | _ -> raise (Failure "unknown token") -- Lauren ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr