|Language inference tool ? email@example.com (Vivien Parlat) (2010-11-29)|
|Re: Language inference tool ? firstname.lastname@example.org (George Neuner) (2010-12-01)|
|Re: Language inference tool ? email@example.com (2010-12-01)|
|Re: Language inference tool ? firstname.lastname@example.org (glen herrmannsfeldt) (2010-12-02)|
|Re: Language inference tool ? email@example.com (Valerio Cavadini) (2010-12-04)|
|Re: Language inference tool ? firstname.lastname@example.org (George Neuner) (2010-12-05)|
|From:||email@example.com (Torben Ęgidius Mogensen)|
|Date:||Wed, 01 Dec 2010 12:21:02 +0100|
|Organization:||SunSITE.dk - Supporting Open source|
|Posted-Date:||02 Dec 2010 16:05:00 EST|
Vivien Parlat <firstname.lastname@example.org> writes:
> My job requires me to work with a no-more-supported and unknown
> language. I'm considering the idea of building tools in order to
> facilitate the work with it, but defining its grammar manually could
> be very tedious.
> Does anybody know a free software which could do grammar inference for
> me ?
> Thank you in advance
Grammar inference will not give you anything useful. If you only show
positive examples, the simplest grammar is the one that accepts any
text string, and the most precise is the one that accepts the examples
and nothing else. Anything in between these two extremes is extremely
difficult to define, and I know of no tool that will give a useful
result, especially if the grammar is inherently large.
Also, even if you manage to infer a grammar, this will only give you
a recognizer for valid programs but not any useful structure, as the
inferred grammar is likely to be highly ambiguous. Making it
unambiguous requires expert knowledge on par with what is required to
write a grammar from scratch.
So while grammar inference may be of theoretical interest, it is not
useful for writing grammars for programming languages.
It will probably be more useful to try to uncover documentation for the
language. If you don't know its name or anything, you could try to post
an example of code on comp.languages.misc and see if anyone recognizes
Return to the
Search the comp.compilers archives again.