3 ms·
Having parsers at hand in a language is an important feature. In Opa (http://opalang.org http://opalang.org), we decided to have parsers as first-class objects
by hbbio 12y ago
Having parsers at hand in a language is an important feature.
In Opa (http://opalang.org http://opalang.org), we decided to have parsers as first-class objects: cf. https://github.com/MLstate/opalang/wiki/The-core-language#parser https://github.com/MLstate/opalang/wiki/The-core-language#pa...
And this is used at least 35 times in a real project such as PEPS: https://github.com/MLstate/PEPS https://github.com/MLstate/PEPS
(according to `git grep "= parser" | wc -l`)
- vinceguidry 12y agoRuby DSLs are great, you get most of the benefit of a parser and your own language getting Ruby syntax and semantics for free. You just eval the code in the context of your DSL class.
- hugofirth 12y agoAre you suggesting that parsing capability should be part of a languages standard library, or just that it is useful to have good open source libraries available for the purpose? Anecdotally, my experience with Scala's parser combinators has led me to the latter conclusion bu not the former. Parsers and parser generators are very specific tools which (as useful as they are) don't see use in most applications. This leads you to a situation like the one in Scala, where open source libs such as Parboiled ( http://git.io/xpg3 http://git.io/xpg3 ) are far better than the std lib offering because they recieve more attention.
- amelius 12y agoI think the language should support the creation of parser generators such that the output of the generators can be used in a straightforward way (as opposed to the Yacc way, where you have to write difficult make files to include the generator output in the build process)