Original Post
🔒 Locked
Language maker?
Advertisement
I have recently become a big fan of ANTLR, another tool to help you write lexers and parsers. You can find ANTLR at http://www.antlr.org/.
Bison/Flex (Yacc/Lex) will do fine as well. I like ANTLR because it can generate C# code (which was a requirement for me), and it uses a unified syntax for lexers and parsers. It also allows you to do some really cool stuff with generating a tree parser to create your AST (abstract source tree, basically the programmatic representation of your parsed script or program).
It's main drawback (if you can call it that), is that it's written in Java and requires you to install a JVM to run, but that's not a huge issue to me.
In any case, don't be discouraged. I was told not to write the first language I wrote, and I did it anyway. It was a fun learning experience, and while I never released it (and never will), I learned a whole lot and it made my overall understanding of programming much better. If it's something you really want to do, go for it, but do understand that writing a language is not an easy thing to do. It requires quite a bit of work, but it's very rewarding in the end. Don't go in with the mindset that you are going to create the next Python. Instead start with a simple language, and move up.
Bison/Flex (Yacc/Lex) will do fine as well. I like ANTLR because it can generate C# code (which was a requirement for me), and it uses a unified syntax for lexers and parsers. It also allows you to do some really cool stuff with generating a tree parser to create your AST (abstract source tree, basically the programmatic representation of your parsed script or program).
It's main drawback (if you can call it that), is that it's written in Java and requires you to install a JVM to run, but that's not a huge issue to me.
In any case, don't be discouraged. I was told not to write the first language I wrote, and I did it anyway. It was a fun learning experience, and while I never released it (and never will), I learned a whole lot and it made my overall understanding of programming much better. If it's something you really want to do, go for it, but do understand that writing a language is not an easy thing to do. It requires quite a bit of work, but it's very rewarding in the end. Don't go in with the mindset that you are going to create the next Python. Instead start with a simple language, and move up.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement