I have read about compiler construction some concepts. What is understood is that
- You need a lexer that divides your program statements into tokens.
- You need to check and identify tokens into known types.
- You have to create a grammar and check if your tokens fit between the grammar defination.
- You have to create a AST syntax tree .
I am stuck at the parser and AST step , I am trying to create a simple language compiler.
How can I create a parser and AST for simple statements like var a = 10 * 20; ... etc.