2022-01-29 21:48:55 +01:00
2022-01-02 18:44:05 +01:00
2022-01-02 18:44:05 +01:00
2022-01-29 21:48:55 +01:00

NEK-Lang

High level Components

  • Lexer: Transforms text into Tokens
  • Parser: Transforms Tokens into Abstract Syntax Tree
  • Interpreter (tree-walk-interpreter): Walks the tree and evaluates the expressions / statements
  • Abstract Syntax Tree Optimizer

Language features

  • General expressions
    • Arithmetic operations
      • Addition X+Y
      • Subtraction X-Y
      • Multiplication X*Y
      • Division X/Y
      • Modulo X%Y
    • Unary operators
      • Negate -X
    • Parentheses (X+Y)*Z
    • Logical boolean operators
      • Equal ==
      • Not equal !=
      • Greater than >
      • Less than <
      • Greater than or equal >=
      • Less than or equal <=
    • Bitwise operators
      • Bitwise AND X&Y
      • Bitwise OR X|Y
      • Bitwise XOR X^Y
      • Bitwise NOT ~X
      • Bitwise left shift X<<Y
      • Bitwise right shift X>>Y
  • Variables
    • Declaration
    • Assignment
  • Control flow
    • While loop while X { ... }
    • If else statement if X { ... } else { ... }
      • If Statement
      • Else statement
  • Line comments //
  • Strings
  • IO Intrinsics
    • Print
    • ReadLine
Description
No description provided
Readme 635 KiB
Languages
Rust 100%