boost::spirit快速参考

 Quick Reference 快速参考

 

This isn't intended to be a full, detailed reference; nor is it intended to be of any use to readers who aren't already familiar with Spirit. It's just a brief reminder of the syntax and behaviour of each component, with links to the full documentation.
本章的目的不是给出一个完整、详尽的参考手册;也不是给那些对Spirit还不熟悉的读者使用的。它只是对语法及各个组件行为的简要提醒,以及到完整文档的链接。

Null parsers 空分析器
end_pMatches EOF
匹配EOF
iter,iter
eps_p
eps_p(P)
Matches without consuming text
匹配且不消耗文本
iter,iter
epsilon_p
epsilon_p(P)
Synonym for eps_p
eps_p
的同义词
iter,iter
nothing_pAlways fails
总是匹配失败
iter,iter
Character parsers 字符分析器
alnum_pMatches any alphanumeric character
匹配任意字母和数字
char
alpha_pMatches any letter
匹配任意字母
char
anychar_pMatches any character
匹配任意字符
char
blank_pMatches a space or tab
匹配一个空格或制表符
char
ch_p(char)Matches a character
匹配一个字符
char
chset_p(charset)Matches a character in the set
匹配字符集中的某个字符
char
cntrl_pMatches any control character
匹配任意控制字符
char
digit_pMatches any digit
匹配任意数字
char
f_ch_p(func)Matches a character
匹配一个字符
char
f_range_p(func1, func2)Matches any character in the inclusive range
匹配闭区间内的任意字符
char
graph_pMatches any non-space printable character
匹配任意非空可打印字符
char
lower_pMatches any lower-case letter
匹配任意小写字母
char
print_pMatches any printable character
匹配任意可打印字符
char
punct_pMatches any punctuation mark
匹配任意标点符号
char
range_p(char1, char2)Matches any character in the inclusive range
匹配闭区间内的任意字符
char
sign_pMatches a plus or minus sign
匹配正号或负号
bool
space_pMatches any whitespace character
匹配任意空白字符
char
upper_pMatches any upper-case letter
匹配任意大写字母
char
xdigit_pMatches any hexadecimal digit
匹配任意十六进制数字
char
Number parsers 数字分析器
bin_pMatches an unsigned binary integer
匹配一个无符号二进制整数
numeric
hex_pMatches an unsigned hexadecimal integer
匹配一个无符号十六进制整数
numeric
int_pMatches a signed decimal integer
匹配一个有符号十进制整数
numeric
int_parser<type, base, min, max>Matches a signed integer with min to max digits
匹配 minmax 间的有符号整数
numeric
oct_pMatches an unsigned octal integer
匹配一个无符号八进制整数
numeric
real_pMatches a floating point number
匹配一个浮点数
numeric
real_parser<type, policy>Matches a floating point number
匹配一个浮点数
numeric
strict_real_pMatches a floating point number (requires decimal point)
匹配一个浮点数(要求小数点)
numeric
strict_ureal_pMatches an unsigned FP number (requires decimal point)
匹配一个无符号浮点数(要求小数点)
numeric
uint_pMatches an unsigned decimal integernumeric
uint_parser<type, base, min, max>Matches an unsigned integer with min to max digits
匹配 minmax 间的无符号整数
numeric
ureal_pMatches an unsigned FP number
匹配一个无符号浮点数
numeric
Other lexeme parsers 其它词位分析器
c_escape_ch_pMatches a C escape code
匹配一个C的转义代码
char
comment_p(string)
comment_p (string1, string2)
Matches C++ or C-style comments
匹配C++或C风格的注释
iter,iter
eol_pMatches CR, LF, or any combination
匹配 CR, LF 或其任意组合
iter,iter
f_str_p(func1, func2)Matches a string
匹配一个字符串
iter,iter
lex_escape_ch_pMatches a C escape code or any backslash escape
匹配一个C的转义代码或任意反斜杠转义
char
regex_p(regex)Matches a regular expression
匹配一个正则表达式
iter,iter
str_p(string)
str_p(iter1, iter2)
Matches a string
匹配一个字符串
iter,iter
Text parsers 文本分析器
chseq_p(string)
chseq_p(iter1, iter2)
Matches a string, possibly with embedded whitespace
匹配一个字符串,可以带有内嵌的空白
iter,iter
f_chseq_p(func1, func2)Matches a string, possibly with embedded whitespace
匹配一个字符串,可以带有内嵌的空白
iter,iter
 
Compound parsers 复合分析器
confix_p(open, exp, close)Matches open >> (exp - close) >> close
匹配 open >> (exp - close) >> close
do_p[P].while_p(cond)Matches while a condition is true (at least once)
当条件为真时匹配(至少一次)
for_p(init, cond, step)[P]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值