4 ms·
k. so this is an OCaml parser for a toy language? I mean, cool, but... I don't know OCaml and this doesn't do a lot to sell the language over AntLR or whatever
by scrame 4y ago
k. so this is an OCaml parser for a toy language?
I mean, cool, but... I don't know OCaml and this doesn't do a lot to sell the language over AntLR or whatever lex/yacc is called these days.
I just feel like I need to learn another language to learn the language to be efficient.
That's not really a criticism of the language, but it feels a little code-golfy.
Is there a use for these tools other than writing yet-another-language?
edit:I think ocaml actually can run perl5 modules, if I remember correctly.
- p4bl0 4y ago> k. so this is an OCaml parser for a toy language? The parser consists only of the first two files (and it is not even for a "toy language", it is really just for boolean expressions, a toy language could have been a lot more complex!). > I mean, cool, but... I don't know OCaml and this doesn't do a lot to sell the language over AntLR or whatever lex/yacc is called these days. > I just feel like I need to learn another language to learn the language to be efficient. So you don't know OCaml or it's parsing tools and don't want to learn about either, that is your choice but has nothing to do with this project :). > Is there a use for these tools other than writing yet-another-language? These tools are made for lexing and parsing. They work as a DSL because it's easier this way. They could have other usages but that's not their point. If you never want to parse anything you may never need them. And that's fine, you can just move along.