Dennis Yurichev schrieb: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi! > > Sorry if my question is not suitable for this list. > > Let's say I have a huge text files written on *some*programming*language*. > It is possible somehow to build grammar automatically from these texts? > Theoretically, these texts represent all possible language constructs in > various forms. > It will be OK if output grammar be in need of some rework. > So, is there anything usable?
Sounds like machine learning. I don't know if one can actually create grammars via the use of such a special program or if one can, if you really manage to get a large enough sample to derive the correct structures (after all, every language has some obscure constructs). I can imagine that the machine-created grammar allows disallowed constructs and disallows allowed constructs and you have to find those cases. But even if you get a working grammar out of it, it won't be actually human-readable because the rules don't have sensible names. Anyways, ANTLR isn't suitable for this task, but may be actually faster to create grammars than your proposal as the rework is in part doing things, which one would do using ANTLR. In fact, starting with an official grammar is far easier than inventing your own. Johannes > > - -- > My PGP public key: http://yurichev.com/dennis.yurichev.asc > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.8 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAkkFfJ0ACgkQ1YPmFmJG++N5lgCfdygGPsgLJjkTXtSz3w3q0W82 > 0KIAnj1gpx+vp9sQC2UieRT6W1ra0iKP > =nWUX > -----END PGP SIGNATURE----- > > List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest > Unsubscribe: > http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address > List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~----------~----~----~----~------~----~------~--~---
