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

"Costello, Roger L." <costello@mitre.org>
Mon, 3 Jun 2013 19:47:07 +0000

          From comp.compilers

Related articles
Should data filtering be done while building the parse tree or after t costello@mitre.org (Costello, Roger L.) (2013-06-03)
Re: Should data filtering be done while building the parse tree or aft bobduff@shell01.TheWorld.com (Robert A Duff) (2013-06-06)
| List of all articles for this month |

From: "Costello, Roger L." <costello@mitre.org>
Newsgroups: comp.compilers
Date: Mon, 3 Jun 2013 19:47:07 +0000
Organization: Compilers Central
Keywords: parse, question
Posted-Date: 05 Jun 2013 11:28:15 EDT

Hi Folks,


I am building a parser to parse some data.


I want to filter some of the data.


For example, I want to "fuzz" latitude and longitude values to contain just
two digits to the right of the decimal point.


        Fuzz this latitude value:
                    42.3583
        to this:
                  42.35


When should filtering be done?


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?


/Roger



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.