From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA06699; Tue, 22 Apr 2003 09:46:36 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id JAA06897 for ; Tue, 22 Apr 2003 09:46:33 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from www.duonix.com ([210.113.163.221]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h3M66w907546 for ; Tue, 22 Apr 2003 08:07:11 +0200 (MET DST) Received: from hama ([192.168.0.254]) by www.duonix.com (8.12.8/8.11.6) with SMTP id h3M6DBvu092261 for ; Tue, 22 Apr 2003 15:13:11 +0900 (KST) (envelope-from shoh@duonix.com) Message-ID: <002101c30895$52410cd0$fe00a8c0@hama> From: "SooHyoung Oh" To: "Caml-List" Subject: [Caml-list] ocamlyacc bug? Date: Tue, 22 Apr 2003 15:06:31 +0900 MIME-Version: 1.0 Content-Type: text/plain; charset="ks_c_5601-1987" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Spam: no; 0.00; bug:01 foo:01 ocaml:01 int:01 token:01 shoh:03 soohyoung:03 lexbuf:03 mly:03 let:04 parse:04 ocamlyacc:05 duonix:05 ocamllex:05 source:07 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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