[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Parsers for Programming Languages.
- To: Matthew Estes <address@hidden>
- Subject: Re: Parsers for Programming Languages.
- From: "Michael St . Hippolyte" <address@hidden>
- Date: Wed, 17 Sep 2003 11:35:33 -0400
- Cc: address@hidden
- In-reply-to: <20030917103427.A3623@localhost.inet>; from mash@brooklyndigital.net on Wed, Sep 17, 2003 at 10:34:27 -0400
- References: <20030917103427.A3623@localhost.inet>
- Sender: address@hidden
On 2003.09.17 00:35 Matthew Estes wrote:
> I'm also curious if there's still useful work(for programming
> languages application in particular) in the field of parsing. I would
> assume so, and that this would be a good direction(hint, I'm a graduate
> student looking at thesis topics) to work in.
This has probably already been done, but one idea I'd love to see
someone research is analyzing arbitrary programs as grammars. If you
take a functional program which generates structured output, you can
think of the functions in the program as productions, and the output
statements as terminals for the language defined by all possible outputs
of the program. Assuming some reasonable constraints on such a program
and its output, how practical is it to generate a parser for the program's
output by analyzing the program as a grammar? I think some work along
these lines has been done specifically on compilers (grammar recovery),
but the more general case is interesting too -- there are an awful lot of
files out there in formats whose only grammatical representation are the
programs which generated them...
Michael
-----------------------------
Michael St. Hippolyte
http://www.bentodev.org