Arcane is an Interpreter written in Go.
- Defines constants representing the lexical tokens of Arcane.
- Declares the types used to represent the syntax tree.
- Takes the source code as input and output the tokens that represent the source code.
- Passes these tokens to the parser.
- Uses a recursive decent parser, specifically the Top Down Operator Precedence (Pratt Parser) by Vaughan Pratt. More Info
- Takes the input from Lexer and builds the AST from it.
- Similar to
console
orinteractive mode
in other programming languages. - Reads input, send it to the interpreter to evaluation, print the result, and start again.