Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #919

Re: Should data filtering be done while building the parse tree or after the parse tree is built?

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.misty.com!news.iecc.com!.POSTED!nerds-end
From Robert A Duff <bobduff@shell01.TheWorld.com>
Newsgroups comp.compilers
Subject Re: Should data filtering be done while building the parse tree or after the parse tree is built?
Date Thu, 06 Jun 2013 12:10:05 -0400
Organization The World Public Access UNIX, Brookline, MA
Lines 13
Sender johnl@iecc.com
Approved comp.compilers@iecc.com
Message-ID <13-06-009@comp.compilers> (permalink)
References <13-06-005@comp.compilers>
NNTP-Posting-Host news.iecc.com
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Trace leila.iecc.com 1370536435 67305 64.57.183.58 (6 Jun 2013 16:33:55 GMT)
X-Complaints-To abuse@iecc.com
NNTP-Posting-Date Thu, 6 Jun 2013 16:33:55 +0000 (UTC)
Keywords parse
Posted-Date 06 Jun 2013 12:33:55 EDT
X-submission-address compilers@iecc.com
X-moderator-address compilers-request@iecc.com
X-FAQ-and-archives http://compilers.iecc.com
Xref csiph.com comp.compilers:919

Show key headers only | View raw


> Should I embed filtering rules into the grammar -- perform filtering as I
> build the parse tree?
>
> Or, should I build the parse tree and then have an application perform
> filtering on the parse tree?

I think the second approach is usually simpler.  Separation of concerns.
A parser is working with text (or a sequence of tokens, or whatever).
A syntax tree is an easier data structure to work with for doing
various transformations.

- Bob

Back to comp.compilers | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Should data filtering be done while building the parse tree or after the parse tree is built? "Costello, Roger L." <costello@mitre.org> - 2013-06-03 19:47 +0000
  Re: Should data filtering be done while building the parse tree or after the parse tree is built? Robert A Duff <bobduff@shell01.TheWorld.com> - 2013-06-06 12:10 -0400

csiph-web