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?

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 2013-06-06 12:10 -0400
Organization The World Public Access UNIX, Brookline, MA
Message-ID <13-06-009@comp.compilers> (permalink)
References <13-06-005@comp.compilers>

Show all headers | 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