Skip to content

iamaray/mini_interp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mini_interp

A small interpreter for an extremely simple "toy" programming language. The intepreter -- with its corresponding tokenization, lexing, and parsing -- is fully written in C.

The ultimate goal is to slowly expand this into a GPU-accelerated language for scientific computing and deep learning.

Core Language Features

As of now, the core language allows for the following very basic features:

  • Variable assignment (int types only)
  • While loops
  • Basic mathematical operations (+, -, *, /)
  • Printing to console
  • Comments with // syntax
  • Comparison operators (==, !=, <=, <=, <, >, %)

To-Do

  • Implement tokenization and dynamic token list.
  • Implement lexer.
    • Small lexing optimizations -- lookup table for single-char operators and switch statements.
  • Implement parser.
    • AST definition and basic operations.
    • Global variables for token list navigation.
    • Parsing functionality.
  • Enhance core language capabilities.
    • More numeric data types: floats, doubles, etc.
    • Custom typing (struct-like) functionality.
    • Functions
  • Numerical computing capabilities.
    • Tensors & tensor manipulations.
    • Basic DL constructions (linear & conv layers, activation functs, etc.)
    • Comp. graph + autodiff.
    • A library of numerical algorithms (quadrature, FFT, etc.).
  • GPU acceleration
    • CUDA interfacing.

About

A small interpreter for an extremely simple "toy" programming language.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages