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 RAA18478; Fri, 13 Aug 2004 17:25:25 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA18046 for ; Fri, 13 Aug 2004 17:25:24 +0200 (MET DST) Received: from asmtp-a063f35.pas.sa.earthlink.net (asmtp-a063f35.pas.sa.earthlink.net [207.217.120.220]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i7DFPMRM009139; Fri, 13 Aug 2004 17:25:23 +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 1Bvdvl-0001GS-R0; Fri, 13 Aug 2004 08:25:22 -0700 Message-ID: <004701c48149$f1227720$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:26:38 -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: 7a0ab3eafc8cf994b22988ad1c62733440683398e744b8a4a0d6235fd07b281879a3023955ad8486350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 65.103.213.184 X-Miltered: at concorde with ID 411CDD62.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 ?? I thought I had provided the context you want to see... That's simple_expr and simple_pattern. Perhaps I should have also shown you what else the simple_expr expects to see... indeed it is also looking for a unary MINUS. expr: simple_expr ... simple_expr: ... | constant ... | MINUS expr %prec prec_unary_minus ... And yes, I have been religiously studying the parser.output files at every step of the way. ----- 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