Writing a compiler in Golang for fictional MindScript programming language based on the OSes in the culture series.
- Lexical Analysis Also known as "scanning". We should break the input into a series of tokens. A token is a sequence of characters that can be treated as a single logical entity.
- Syntax Analysis
- Semantic Analysis
- Intermediate Code Generation
- Code Optimization
- Code Generation
make
./bin/msc -i ./examples/example.ms
Output:
Input file: ./examples/example.ms
Output file: ./examples/example.mind
{Type:KEYWORD Literal:agent}
{Type:KEYWORD Literal:DataProcessor}
{Type:LBRACE Literal:{}
{Type:KEYWORD Literal:goal}