Skip to content
louis272Public

About

Numo is a collection of small math expression parsers and a Tiny Math Language (TML) interpreter written in JavaScript.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

28 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Numo

Numo is a collection of small math expression parsers and a Tiny Math Language (TML) interpreter written in JavaScript.

The TML implementation supports variables, arithmetic expressions, function calls, and print statements.

The project follows the Math Expression Parser in JavaScript series and explores several parsing techniques:

  • RPN evaluator
  • Shunting yard algorithm
  • LL parser generator
  • LR parser generator
  • PEG parser generator
  • Recursive descent parser
  • Pratt parser

Run an example

node src/pratt/ast-example.js
node src/shunting_yard/main.js

Project structure

Each parser implementation is under src/ with its grammar, tokenizer, parser, and examples where applicable.

The src/tml directory contains the TML grammar, parser, AST support, and command-line runner:

node src/tml/tml-runner src/tml/example.tml

Example TML program:

var x = 1;
var y = 2;
print(x + y);

About

Numo is a collection of small math expression parsers and a Tiny Math Language (TML) interpreter written in JavaScript.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages