Related articles |
---|
Language inference tool ? pocky6@gmail.com (Vivien Parlat) (2010-11-29) |
Re: Language inference tool ? gneuner2@comcast.net (George Neuner) (2010-12-01) |
Re: Language inference tool ? torbenm@diku.dk (2010-12-01) |
Re: Language inference tool ? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2010-12-02) |
Re: Language inference tool ? valeriocavadini@hotmail.com (Valerio Cavadini) (2010-12-04) |
Re: Language inference tool ? gneuner2@comcast.net (George Neuner) (2010-12-05) |
From: | torbenm@diku.dk (Torben Ęgidius Mogensen) |
Newsgroups: | comp.compilers |
Date: | Wed, 01 Dec 2010 12:21:02 +0100 |
Organization: | SunSITE.dk - Supporting Open source |
References: | 10-11-040 |
Keywords: | parse, tools |
Posted-Date: | 02 Dec 2010 16:05:00 EST |
Vivien Parlat <pocky6@gmail.com> 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
it.
Torben
Return to the
comp.compilers page.
Search the
comp.compilers archives again.