[From nobody Mon Jul 14 12:00:06 2008
X-Account-Key: account4
X-Mozilla-Keys: 
Received: by 10.210.74.7 with HTTP; Mon, 14 Jul 2008 08:27:26 -0700 (PDT)
Message-ID: &lt;53c4e43f0807140827v78ae3628mb05b562edb42f56a@mail.gmail.com&gt;
Date: Mon, 14 Jul 2008 17:27:26 +0200
From: &quot;Jens Boeykens&quot; &lt;jens.boeykens@gmail.com&gt;
To: antlr-interest@antlr.org
Subject: Don't know some tree walker rules for specific parser rules
MIME-Version: 1.0
Content-Type: multipart/alternative; 
	boundary=&quot;----=_Part_38039_27457096.1216049246354&quot;
Delivered-To: jens.boeykens@gmail.com

------=_Part_38039_27457096.1216049246354
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi,

What should be the walker rules for:

*A) r: (id -&gt; id) ('+' id -&gt; ^('+' r id))*;
B) r: (id -&gt; ^(ARG id)) ('+' id -&gt; ^('+' $r id))*;
C) r: (id -&gt; ^(ARG id)) ('+' id -&gt; ^('+' BLOCK id));*
*
*My suggestions:
A) r: id | ^('+' r id)*;
B) r: ^(ARG id) | ^('+' r id)*;
C) r: ^(ARG id) ^('+' BLOCK id);

Are these correct? Note that first 2 rules are using recursion and the third
does not.

Jens

------=_Part_38039_27457096.1216049246354
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi,&lt;br&gt;&lt;br&gt;What should be the walker rules for:&lt;br&gt;&lt;br&gt;&lt;i&gt;A) r: (id -&amp;gt; id) (&amp;#39;+&amp;#39; id -&amp;gt; ^(&amp;#39;+&amp;#39; r id))*;&lt;br&gt;B) r: (id -&amp;gt; ^(ARG id)) (&amp;#39;+&amp;#39; id -&amp;gt; ^(&amp;#39;+&amp;#39; $r id))*;&lt;br&gt;C) r: (id -&amp;gt; ^(ARG id)) (&amp;#39;+&amp;#39; id -&amp;gt; ^(&amp;#39;+&amp;#39; BLOCK id));&lt;/i&gt;&lt;br&gt;
&lt;i&gt;&lt;br&gt;&lt;/i&gt;My suggestions:&lt;br&gt;A) r: id | ^(&amp;#39;+&amp;#39; r id)*;&lt;br&gt;B) r: ^(ARG id) | ^(&amp;#39;+&amp;#39; r id)*;&lt;br&gt;C) r: ^(ARG id) ^(&amp;#39;+&amp;#39; BLOCK id);&lt;br&gt;&lt;br&gt;Are these correct? Note that first 2 rules are using recursion and the third does not.&lt;br&gt;
&lt;br&gt;Jens&lt;br&gt;

------=_Part_38039_27457096.1216049246354--

]
