Hacker News new | past | comments | ask | show | jobs | submit login

Just take any tutorial about writing a compiler and stop at the Abstract Syntax Tree generation.

There is not that much difference between parsing a programming language like C and something like JSON. JSON grammar is smaller but the ideas are the same. In fact, JSON is essentially a subset of JS, and JS has a C-like syntax.

What makes a compiler a compiler is what comes after the parser, i.e. code generation.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: