Hacker News new | ask | show | jobs
by vkaku 2703 days ago
Practical steps:

1. Create a grammar for your language. Start with Lex/Yacc and model your grammar with Lex/Yacc. Use them to generate lexer/parser.

2. Create sample code in your new language. Parse the generated parser on said language file into a list of Syntax trees.

3. With said Syntax trees, generate target code - Compiler (or) evaluate the tree and print results - Interpreter.

Iterate and repeat steps until your language is complete.