Allowing users to control software using input control files has substantial benefits for ease of use, avoidance of error and reproducibility of results. Evaluation of mathematical expressions provides a powerful way of allowing user control of even the most complex codes while remaining natural and easy-to-learn for the end user. Derived from the input control system of the EPOCH particle-in-cell plasma code, EIS2 allows a developer to add rich text file based controls to a large scientific code. EIS2 combines a mechanism for reading structured, hierarchical text files with a mechanism for evaluting mathematical expressions while allowing the host code to provide contextual information as the expression is evaluated. This means that a text expression provided by a user such as (1+sin(x))*(1+cos(y)) can be easily evaluated over a range of x and y values and used to set values as required by the host code. By using an approach that is optimised for performance rather than generality evaluating these expressions is many times faster than a general purpose parser such as Python.
EIS2 is written in standard Fortran 2003 (with optional 2008 extensions) and has a C interoperable interface for other languages (releasing soon).