47 ms·
I guess the only option to keep clean grammars is to extend the meta language itself enough to support language-specific features. And if you implement it yours
by zzzcpan 10y ago
I guess the only option to keep clean grammars is to extend the meta language itself enough to support language-specific features. And if you implement it yourself it's not actually that hard to do. Parsing is not really a big deal after all.
If I remember correctly the idea behind OMeta is to invent new languages to fit better into your problem domain so you could save a ton of code, not to parse existing ones.
- chubot 10y agoYeah, I agree that they are more suited to designing new languages rather than parsing existing ones. Parsing toy languages is not a big deal -- but then I have to make the observation that metalanguages are solving precisely the problem that's not a big deal. But parsing real languages is a big deal. How many C, C++, Perl, Ruby, or shell parsers are there? How many text editors or lint tools contain poor implementations of such parsers? Those are languages people actually use. I think the lesson is that humans can understand more complex languages than "standard algorithms" can, and they PREFER those languages (as shown by voting with their feet). Metalanguages should be designed for the languages that people actually use rather than constraining them to an artificial model.