<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2009/01/df53bfdbdd951319dadbecfe271f6b08"
  from=""
  author=""
  date="2009-01-29T09:18:25"
  subject="RE: [Caml-list] Ampersand in camlp4 grammar extension"
  prev="2009/01/007b9a6049a34f1f9c3132589ab0dc87"
  next="2009/01/2ab9cc0e7892983f6930f81e8d176fb6"
  prev-in-thread="2009/01/daa57075110ea549219cf9b8a4510f2e"
  prev-thread="2009/01/95edc08cfde6a09340c5e2f438aca25e"
  next-thread="2009/01/7bbb57f36284fe4ff07085af2e385261"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="Ampersand in camlp4 grammar extension">
<msg 
  url="2009/01/ec5abc48403b5e7647c7a58e6fcf15a5"
  from="Paul Steckler &lt;Paul.Steckler@n...&gt;"
  author="Paul Steckler"
  date="2009-01-28T09:39:54"
  subject="Ampersand in camlp4 grammar extension">
<msg 
  url="2009/01/7f5296f864e2680c6b1297453233e3e2"
  from="Nicolas Pouillard &lt;nicolas.pouillard@g...&gt;"
  author="Nicolas Pouillard"
  date="2009-01-28T20:52:11"
  subject="Re: [Caml-list] Ampersand in camlp4 grammar extension">
<msg 
  url="2009/01/daa57075110ea549219cf9b8a4510f2e"
  from="Paul Steckler &lt;Paul.Steckler@n...&gt;"
  author="Paul Steckler"
  date="2009-01-29T04:37:57"
  subject="RE: [Caml-list] Ampersand in camlp4 grammar extension">
<msg 
  url="2009/01/df53bfdbdd951319dadbecfe271f6b08"
  from=""
  author=""
  date="2009-01-29T09:18:25"
  subject="RE: [Caml-list] Ampersand in camlp4 grammar extension">
</msg>
</msg>
</msg>
</msg>
</thread>

<contents>
Excerpts from Paul Steckler's message of Thu Jan 29 05:36:44 +0100 2009:
&gt; Hi Nicolas,
&gt; 
&gt; &gt; However I can guess in your question that you don't really want to change the
&gt; syntax of the binary operator "&amp;", but rather to change it's meaning. In
&gt; camlp4 there is a much more sane and easier way to do this using filters.
&gt; By the way there is an example in the camlp4 sources that does exactly this.
&gt; 
&gt; Yes, this seems to work -- but it would be simpler, in fact, if I could just use
&gt; a rule in my grammar extension.


&gt; Do you know if there's a way to debug grammar extensions?

I don't think there is a nice way do to it.

&gt; Maybe I need to
&gt; DELETE a rule from the original grammar, though it's not clear to me which
&gt; rule that is.

Look at Camlp4Parsers/Camlp4OCamlRevisedParser.ml

The rule is:
infixop5:
[ [ x = [ "&amp;" | "&amp;&amp;" ] -&gt; &lt;:expr&lt; $lid:x$ &gt;&gt; ] ]
;
               

-- 
Nicolas Pouillard

</contents>

</message>

