robpike / expr

A simple evaluator for arithmetic integer expressions.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The expr package provides a simple evaluator for arithmetic integer expressions. The syntax and operations are the same as in Go. Operands are the native "int" type, except that unlike in Go, boolean values, which are created by comparisons, are integer 1 (true) and 0 (false). Create a parsed expression using Parse, and then evaluate it with Eval.

About

A simple evaluator for arithmetic integer expressions.

License:Other


Languages

Language:Go 100.0%