Received: by 10.224.108.202 with SMTP id g10mr17412854qap.8.1340834185191; Wed, 27 Jun 2012 14:56:25 -0700 (PDT) X-BeenThere: treetop-dev@googlegroups.com Received: by 10.229.105.206 with SMTP id u14ls2122169qco.4.gmail; Wed, 27 Jun 2012 14:56:24 -0700 (PDT) Received: by 10.224.31.135 with SMTP id y7mr9825267qac.5.1340834184514; Wed, 27 Jun 2012 14:56:24 -0700 (PDT) Received: by 10.224.214.195 with SMTP id hb3msqab; Wed, 27 Jun 2012 13:02:27 -0700 (PDT) Received: by 10.52.19.110 with SMTP id d14mr1562608vde.10.1340827346932; Wed, 27 Jun 2012 13:02:26 -0700 (PDT) Date: Wed, 27 Jun 2012 13:02:26 -0700 (PDT) From: Bernhard To: treetop-dev@googlegroups.com Message-Id: <3654fdfb-7659-4a05-a1b5-3d8c66014784@googlegroups.com> In-Reply-To: <508ADFB80666488A9E42315172320963@gmail.com> References: <5F8EED2E77A9475D99E84455E51402C2@gmail.com> <13275188.5892.1330490239658.JavaMail.geo-discussion-forums@vbbed8> <1330495400.17809.9.camel@AVA-351181> <508ADFB80666488A9E42315172320963@gmail.com> Subject: Re: Parser trying to extend with a SyntaxNode subclass weirdness. MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1805_16835513.1340827346168" ------=_Part_1805_16835513.1340827346168 Content-Type: multipart/alternative; boundary="----=_Part_1806_23498337.1340827346168" ------=_Part_1806_23498337.1340827346168 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit One motivation to use subclasses is the approach in http://thingsaaronmade.com/blog/a-quick-intro-to-writing-a-parser-using-treetop.html. It allows to clean the parse tree such that it only has the semantically relevant information and no longer keep the syntactical sugar. Am Mittwoch, 29. Februar 2012 09:30:37 UTC+1 schrieb James Harton: > > Thanks folks for the feedback and explanation. I've switched over to > modules so at least it's stopped complaining about that. > I've also wrapped the rules for interger_literal and literal in parens. > I'm still a little confused about the fact that the parser still refuses > to recognise any of my patterns: > > ------=_Part_1806_23498337.1340827346168 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit One motivation to use subclasses is the approach in http://thingsaaronmade.com/blog/a-quick-intro-to-writing-a-parser-using-treetop.html.

It allows to clean the parse tree such that it only has the semantically relevant information and no longer keep the syntactical sugar.



Am Mittwoch, 29. Februar 2012 09:30:37 UTC+1 schrieb James Harton:
Thanks folks for the feedback and explanation. I've switched over to modules so at least it's stopped complaining about that.
I've also wrapped the rules for interger_literal and literal in parens.
I'm still a little confused about the fact that the parser still refuses to recognise any of my patterns:

------=_Part_1806_23498337.1340827346168-- ------=_Part_1805_16835513.1340827346168--