caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Laurent Reveillere <Laurent.Reveillere@labri.u-bordeaux.fr>
To: Jean-Christophe Filliatre <Jean-Christophe.Filliatre@lri.fr>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Problem when parsing
Date: Fri, 02 Mar 2001 14:07:43 +0100	[thread overview]
Message-ID: <3A9F9B1F.F0C860E0@labri.fr> (raw)
In-Reply-To: <15007.39415.612361.167527@pc803>

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


  reply	other threads:[~2001-03-02 13:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-02 10:46 Laurent Reveillere
2001-03-02 13:02 ` Jean-Christophe Filliatre
2001-03-02 13:07   ` Laurent Reveillere [this message]
2001-03-02 13:21 ` Markus Mottl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3A9F9B1F.F0C860E0@labri.fr \
    --to=laurent.reveillere@labri.u-bordeaux.fr \
    --cc=Jean-Christophe.Filliatre@lri.fr \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).