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 RAA17575; Fri, 13 Aug 2004 17:05:31 +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 RAA16598 for ; Fri, 13 Aug 2004 17:05:31 +0200 (MET DST) Received: from [128.93.8.158] (macaque.inria.fr [128.93.8.158]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i7DF5UmL026649 for ; Fri, 13 Aug 2004 17:05:30 +0200 Mime-Version: 1.0 (Apple Message framework v619) In-Reply-To: References: Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <382DD1D8-ED3A-11D8-B4FA-00039310CAE8@inria.fr> Content-Transfer-Encoding: 7bit From: Damien Doligez Subject: Re: [Caml-list] CFG's and OCaml Date: Fri, 13 Aug 2004 17:05:31 +0200 To: caml Caml X-Mailer: Apple Mail (2.619) X-Miltered: at nez-perce with ID 411CD8BA.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; damien:01 damien:01 caml-list:01 mcclain:01 expr:01 expr:01 reductions:01 ocaml:01 int:01 int:01 doligez:01 doligez:01 float:02 float:02 04,:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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