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 RAA13594; Fri, 13 Aug 2004 17:27:19 +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 RAA17504 for ; Fri, 13 Aug 2004 17:27:18 +0200 (MET DST) Received: from asmtp-a063f35.pas.sa.earthlink.net (asmtp-a063f35.pas.sa.earthlink.net [207.217.120.220]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i7DFRGmL028859; Fri, 13 Aug 2004 17:27:17 +0200 Received: from 65-103-213-184.tcsn.qwest.net ([65.103.213.184] helo=dylan) by asmtp-a063f35.pas.sa.earthlink.net with asmtp (Exim 4.34) id 1Bvdxb-00062W-T9; Fri, 13 Aug 2004 08:27:16 -0700 Message-ID: <004b01c4814a$3b221970$0401000a@dylan> From: "David McClain" To: "Damien Doligez" , "caml Caml" References: <382DD1D8-ED3A-11D8-B4FA-00039310CAE8@inria.fr> Subject: Re: [Caml-list] CFG's and OCaml Date: Fri, 13 Aug 2004 08:28:43 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1437 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-ELNK-Trace: 7a0ab3eafc8cf994b22988ad1c62733440683398e744b8a4a0d6235fd07b28180293e24f5453048d3ca473d225a0f487350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 65.103.213.184 X-Miltered: at nez-perce with ID 411CDDD4.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; mcclain:01 dmcclain:01 caml-list:01 expr:01 expr:01 damien:01 damien:01 caml-list:01 2004:99 mcclain:01 reductions:01 bug:01 faq:01 faq:01 beginner's:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Sorry, mistyping... expr: | simple_expr ... | MINUS expr %prec unary_minus ... simple_expr: ... | constant ... simple_pattern: ... | signed_constant ... constant: INT | FLOAT signed_constant: constant | MINUS INT | MINUS FLOAT ----- Original Message ----- From: "Damien Doligez" To: "caml Caml" Sent: Friday, August 13, 2004 08:05 Subject: Re: [Caml-list] CFG's and OCaml > On Aug 13, 2004, at 16:04, David McClain wrote: > > > simple_expr: > > constant > > ... > > > > simple_pattern: > > signed_constant > > ... > > > > constant: > > INT > > | FLOAT > > > > signed_constant: > > constant > > | MINUS INT > > | MINUS FLOAT > > ;; /* ---------------------------------------------------------- */ > > > > The reduce/reduce conflict comes on deciding whether to assign an INT > > seen to signed_constant which will reduce to simple_pattern, or > > instead to become constant which reduces to simple_expr. Both Inria > > and I do completely different semantic reductions in these two cases, > > and so a reduce/reduce conflict could be fatal here... > > But... There can only be a reduce-reduce conflict if you have two > derivations > of the same prefix, one of which expects a constant as the next > nonterminal, > and the other expects a signed_constant. In other words, we need more > context > to tell what's going on. You should give option -v to ocamlyacc and > look > at the resulting *.output file. It's a bit hard to understand at first, > but with some experience you can get a little information out of it. > > -- Damien > > ------------------- > 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 > ------------------- 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