Expressio 1.0 it's now released!
Updated a year ago
A useful and optimized tool for every task that requires arithmetical operations

What is 'Expressio'?

Expressio it's an 'Automatic' Parser and Solver of custom provided arithmetical expressions. Based onto the chosen implementation, it supports:
  • Constants: numeric string literals, formatted as: #.#####;
  • Variables: custom-defined string literals not followed by parentheses that hold values;
  • Operators: set of defined common operators like +, -, *, / etc; (Supported operators)
  • Functions: a default extensible and ovveridable set of functions to call within an expression;
  • Expressions/Arrays: mix and match of the above elements.

How does it work?

The Unity Package downloaded from the Asset Store contains just a DLL. Simple as that. Unity will do all the work for you regarding linking it to your project. Awesome!
Let's see how you can begin to use it, just add the following lines to your script:
using Expressio.Float;
With the above line you will be able to create instances of the Parser class that is part of one of the Expressio namespaces. Now we can try to implement a simple expression to parse:
void OnStart(){ //Create a parser instance Parser parser = new Parser(ContextConfiguration.Default); //Parse an expression ExpressionContext expression = parser.Parse("5^2"); //Evaluate it float result = expression.Evaluate(); //25 }
Fantastic! We now have the result of a simple expression!

See it on the Asset Store

Find out more

  • Getting started
  • Supported arithmetical operators
  • Follow us for updates
Developing JIT gameplays - Programmer