Skip to content

Writing a compiler in Golang for fictional MindScript programming language based on the OSes in the culture series

License

Notifications You must be signed in to change notification settings

robert-cronin/mindscript-go

Repository files navigation

MindScript

Writing a compiler in Golang for fictional MindScript programming language based on the OSes in the culture series.

Parts of a compiler

  1. 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.
  2. Syntax Analysis
  3. Semantic Analysis
  4. Intermediate Code Generation
  5. Code Optimization
  6. Code Generation

Usage

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}

References

About

Writing a compiler in Golang for fictional MindScript programming language based on the OSes in the culture series

Resources

License

Stars

Watchers

Forks

Packages

No packages published