DEV Community

Discussion on: What are you working on?

Collapse
 
vimmer9 profile image
Damir Franusic • Edited

Not yet, I'll have to check with the company that hired me. It's licensed under Apache license so I assume it will become public when it's done. It's just a config parser but anyway, I am preparing an article about writing parsers using Flex as lexical analyser/tokeniser and Bison for parser generation based on BNF rules. Most examples don't handle the creation of AST but I find this to be crucial and most useful feature of any parser. I've done numerous parsers for DSLs(Domain Specific Languages) and configuration files and have some experience in that field. Of course you can, to some extent, produce similar results with string splitting and regexes, but sooner or later you will have to face the BNF syntax and use some form of parser generator. I prefer Flex/Bison combo since it's quite mature and used everywhere, even in Linux kernel. That's just my preference, some people prefer different tools like ANTLR for example.

Thread Thread
 
deleteman123 profile image
Fernando Doglio

Awesome! Looking forward to that article! Building parsers has always been in my To-Learn list, I've always wanted to build my own language. Maybe someday! Thanks for sharing :)