math_compute

Last updated:

0 purchases

math_compute Image
math_compute Images
Add to Cart

Description:

math compute

Math lexer/parser/evaluator #
A highly customizable and easy to use math expression lexer/parser/evaluator
Features #

Comprehensible error system with originating token
Customizable math context

Custom token types
Custom constants
Custom functions
Custom operators


Token constructors and validators aware of surrounding tokens in lexer
Parser to Reverse Polish Notation
Parser to compute tree
Simple to use recursively-based evaluator

Getting started #
Add this package to your Dart/Flutter project via
dart pub add math_parser
copied to clipboard
or
flutter pub add math_parser
copied to clipboard
Usage #

You can find samples in the example page.

To compute an expression, simply put it in the "compute" function:
final result = compute('2 + 2');
print(result); // 4
copied to clipboard
Additional information #
If I was able to write this package myself it is thanks to Thorsten Ball's "Writing an interpreter in Go". I recommend
this book for any projects like this.

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.