Boost.Xpressive

Boost.Xpressiveのメモ

困ったらepsilon >>をつける 再帰的なregexを使うときはスタックに負担をかけないようにkeepする numeric_castは切捨てを許さない (detail/sequence_stack.hpp, line 88; 1.5を2にでもする) ソース

Boost.Spiritの例(calculator)をBoost.Xpressiveで書ける

spirit::grammar<>のようなフレームワークを使わなくていい SemanticActionも使えるようだ []#include[][] "stdafx.h"[][]#include[][] <iostream>[] []#include[][] <string>[] []#include[][] <boost/iterator.hpp>[] []#include[][] <boost/xpressive/xpressive_static.hpp>[][]// See:[] []// http://www.boost.org/libs/spirit/doc/se</boost/xpressive/xpressive_static.hpp></boost/iterator.hpp></string></iostream>…

Boost.Xpressiveの落書き

boost::regexとboost::spiritをまとめて置きかえるライブラリであるらしい ヘッダーのみのライブラリでビルドは必要ない 正規表現を文字からではなく、オブジェクトから組み立てる(文字列の正規表現も扱える) []#include[][] "stdafx.h"[][]#include[][] <sstream>[] </sstream>…