Published STX Expression Parser Framework Version 0.7
Posted on 2007-07-17 17:10 by Timo Bingmann at Permlink with 0 Comments. Tags: #c++ #parsing
Released the first version 0.7 of the STX Expression Parser C++ Framework package. The library is licensed under the GNU Lesser General Public License (LGPL) (2.1 or later).
The STX Expression Parser provides a C++ framework, which can process user-specified expression strings containing program-specific variables. It can be integrated into applications to allow user-customized data selection and filtering. The expresssion strings are intuitive SQL-like WHERE-clauses and can contain arbitrarily complex arithmetic. At the same time the expression processing time is guaranteed to be fast enough to safely iterate over larger data sets.
The expression parser can process arbitrarily complex arithmetic expressions like those seen below. To access application-defined data, functions and variables may be included in the expression. An expression can be used as a boolean filter by using comparison and logic operators.
6 + 3 * 12
a == 6 * 9
(a - 28) * (int)(e + 0.4 * 2.5 / (PI() - EXP(-0.644) * 4))
a >= 5 OR (42 <= field2 AND field2 <= 48) || NOT(got == "yes")
For more information see the STX Expression Parser web page.
Most impressive are the interactive online CGI parser demo and the online CSV file filter.