参考:使用boost.spirit制作一个简单的四则计算器 - woaidongmao - C++博客
目前支持运算符: +,-,*,/, %, ()
Demo程序:
/*=============================================================================
Copyright (c) 2002-2003 Joel de Guzman
The Spirit Parser Library download | SourceForge.net
Use, modification and distribution is subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
====================================================================