|
|
|
|
|
by bloaf
3515 days ago
|
|
If I were going to write a programming language for myself, I would lay out the following challenge to myself: > You are only allowed to store the AST and variable names found by parser. The input to the lexer is not allowed to be persistent. To do this, your lexer would need to be in some sense invertible, capable of both producing a source-code-representation of an AST given some naming metadata, as well as converting that source-code-representation back to names+AST. I think that would make the lexing + parsing task worthy of an 80% article. |
|