We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
sample-1
S式みたいなのの構文解析を行うサンプル
expr ::= int_lit | token('(') op expr expr token(')') int_lit ::= token(int_lit_s) op ::= token(op_s) int_lit_s ::= digit+ op_s ::= alpha+ token(T) ::= T ws*
token(T) はジェネリックなルールで後ろについた空白文字を食べる。
sample-2
actionを定義しなくても、boost::fusion::vector<T1, T2, T3, …>ならそのまま作ってくれるよサンプル。
sample-3
普通の式の構文解析を行うサンプル。よくある左再起を除去した規則をジェネリックに書いてみる
start ::= expr primary_expr ::= int_lit | '(' expr ')' "sample-4":http://github.com/kik/cpppeg/blob/master/sample-4.cpp sample-3をASTを生成するように変更したもの
There was an error while loading. Please reload this page.