Skip to content
This repository was archived by the owner on Mar 3, 2018. It is now read-only.
/ tapdigit Public archive

Simple JavaScript-based math evaluator

License

Notifications You must be signed in to change notification settings

ariya/tapdigit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

121319a · Mar 3, 2018

History

60 Commits
Jul 25, 2011
Jan 22, 2018
Jul 16, 2011
Jul 16, 2011
Mar 3, 2018
Nov 1, 2013
Jul 24, 2011
Jul 22, 2011
Jul 25, 2011
Aug 12, 2011
Jul 20, 2011
Jan 22, 2018

Repository files navigation

TapDigit

TapDigit is a simple JavaScript implementation of a math expression lexer, parser, and evaluator.

TapDigit.Lexer splits a math expression into a sequence of tokens. This is useful for e.g. an expression editor with color syntax highlighting.

TapDigit.Parser parses an expression and produces the JSON-formatted syntax tree representation thereof.

TapDigit.Evaluator computes the result of an expression. Variables, constants, and functions supported in the expression syntax can be extended via TapDigit.Context object.

There is also a simple web page (open eval.htm) which demonstrates how it works:

Evaluator screenshot

TapDigit is created by @AriyaHidayat. It is distributed under the BSD license.

Releases

No releases published

Packages

No packages published