[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Parsers for Programming Languages.



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