On Thu, 5 Apr 2007, Martin Jambon wrote: > > On Thu, 5 Apr 2007, Hugo Ferreira wrote: > > > > > Hello, > > > > I would like to use a reserved word and substitute that by a function > > call. For example, the following: > > > > let _ = HEAP in > > let h1 = HEAP in > > > > would become > > > > let __heap = new_heap () in > > let h1 = new_heap () in > > You shouldn't try to do this because the parser looks only one token ahead > to make its decision. If you add a rule that starts from "let" (it has > to), the token which enables the parser to select this rule is in position > 3, so it comes too late. Camlp4 will not warn you about the conflict but > fail during preprocessing because it will choose either the predefined > "let" rule or yours without knowing if it's the right one. > > It's what I was trying to explain in that message [ocaml-developer 20]: > > http://groups.google.com/group/ocaml-developer/browse_frm/thread/532cfd6cc675e98b?hl=en
By the way, it's not documented anywhere, but it really should. Martin -- Martin Jambon http://martin.jambon.free.fr --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "ocaml-developer" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/ocaml-developer?hl=en For other OCaml forums, see http://caml.inria.fr/resources/forums.en.html -~----------~----~----~----~------~----~------~--~---
