logoalt Hacker News

cowlevel • yesterday at 11:07 PM • 1 reply • view on HN

Note that if you want to write a programming language, it's not too hard, even doing it from scratch in C without any specific helper libraries. You should try it over a week, it's great fun (the first time). Either make an interpreter or a compiler to another language you're very familiar with - you do not need to understand how to make an executable file.

The main technique you probably won't figure out by yourself is called "recursive descent parsing". You can also use a parser generator if you like one.


Replies

kccqzy • today at 12:23 AM

Recursive descent is something you can figure out without having heard of it. What you can’t easily figure out is what to do when the grammar is inherently left-recursive. Or limit the amount of lookahead. Or any fancier algorithm like the Earley algorithm.