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 KAA00921; Thu, 13 Sep 2001 10:17:18 +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 KAA00663 for ; Thu, 13 Sep 2001 10:17:17 +0200 (MET DST) Received: from jupiter.duonix.com ([211.41.0.239]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f8D8HEP23678 for ; Thu, 13 Sep 2001 10:17:14 +0200 (MET DST) Received: from hama (hama.duonix.com [192.168.1.30]) by jupiter.duonix.com (8.11.2/8.11.2) with SMTP id f8D8Hni10077 for ; Thu, 13 Sep 2001 17:17:49 +0900 Message-ID: <006501c13c2c$e833eff0$1e01a8c0@hama> From: "SooHyoung Oh" To: "caml-list" Subject: [Caml-list] function vs. parser Date: Thu, 13 Sep 2001 17:20:11 +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 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi! Could anyone explain me why "parser" was introduced in Ocaml? As you know, "function" is using in the caml light-instead of "parser". "parser" must be a reserved word like "let" and "function", right? I reviewed "The Objective Caml system release 3.02", specially 1.8 Pretty-printing and parsing it introduces lex and parser. 7.1 Streams and stream parser it shows the syntax of parser and stream matching. But I don't know why "parser" was introduced. Here is an example. # let next = parser [< 'x >] -> x | [<>] -> raise (Failure "end of stream") ;; val next : 'a Stream.t -> 'a = Thanks in advance for your help. --- SooHyoung Oh ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr