caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "SooHyoung Oh" <shoh@duonix.com>
To: "Caml-List" <caml-list@inria.fr>
Subject: [Caml-list] ocamlyacc bug?
Date: Tue, 22 Apr 2003 15:06:31 +0900	[thread overview]
Message-ID: <002101c30895$52410cd0$fe00a8c0@hama> (raw)


Is the following an ocamlyacc bug?

When making application with using ocamlyacc + ocamllex,
you can make main function in trailer part (after second "%%") of "foo.mly"
It that case, it generates an error like this:
    This expression has type Lexing.lexbuf -> Eg_parse.token
    but is here used with type Lexing.lexbuf -> token

It can be fixed by excluding type specification of start non-terminal
function in "foo.ml" like this:
(before)

    let line (lexfun : Lexing.lexbuf -> token) (lexbuf : Lexing.lexbuf) =
       (yyparse yytables 1 lexfun lexbuf : int)

(after)

    let line lexfun (lexbuf : Lexing.lexbuf) =
       (yyparse yytables 1 lexfun lexbuf : int)

If you want, you can view my full source in
http://www.duonix.com/~shoh/ocaml/ocamlyacc.html#bug

---
SooHyoung Oh

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


             reply	other threads:[~2003-04-22  7:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-22  6:06 SooHyoung Oh [this message]
2003-04-22 14:28 ` Damien Doligez

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='002101c30895$52410cd0$fe00a8c0@hama' \
    --to=shoh@duonix.com \
    --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).