boost::spirit快速参考

简单C++ boost中文手册 目录
  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还不熟悉的读者使用的。它只是对语法及各个组件行为的简要提醒,以及到完整文档的链接。

  • Primitive parser generators (action arguments are listed on the right) 基本分析器生成器(动作参数在右侧列出)
    • Null parsers 空分析器
    • Character parsers 字符分析器
    • Number parsers 数字分析器
    • Other lexeme parsers 其它词位分析器
    • Text parsers 文本分析器

  • Other parser elements 其它分析器元素
    • Compound parsers 复合分析器
    • General directives 通用指示符
    • Tree-specific directives 树专用的指示符

  • Operators 操作符
    • Unary operators 单参操作符
    • Binary operators (in order of precedence) 二元操作符(按优先级顺序排)
Null parsers 空分析器
end_p Matches 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_p Always fails
总是匹配失败
iter,iter
Character parsers 字符分析器
alnum_p Matches any alphanumeric character
匹配任意字母和数字
char
alpha_p Matches any letter
匹配任意字母
char
anychar_p Matches any character
匹配任意字符
char
blank_p Matches a space or tab
匹配一个空格或制表符
char
ch_p(char) Matches a character
匹配一个字符
char
chset_p(charset) Matches a character in the set
匹配字符集中的某个字符
char
cntrl_p Matches any control character
匹配任意控制字符
char
digit_p Matches 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_p Matches any non-space printable character
匹配任意非空可打印字符
char
lower_p Matches any lower-case letter
匹配任意小写字母
char
print_p Matches any printable character
匹配任意可打印字符
char
punct_p Matches any punctuation mark
匹配任意标点符号
char
range_p(char1, char2) Matches any character in the inclusive range
匹配闭区间内的任意字符
char
sign_p Matches a plus or minus sign
匹配正号或负号
bool
space_p Matches any whitespace character
匹配任意空白字符
char
upper_p Matches any upper-case letter
匹配任意大写字母
char
xdigit_p Matches any hexadecimal digit
匹配任意十六进制数字
char
Number parsers 数字分析器
bin_p Matches an unsigned binary integer
匹配一个无符号二进制整数
numeric
hex_p Matches an unsigned hexadecimal integer
匹配一个无符号十六进制整数
numeric
int_p Matches a signed decimal integer
匹配一个有符号十进制整数
numeric
int_parser<type, base, min, max> Matches a signed integer with min to max digits
匹配 minmax 间的有符号整数
numeric
oct_p Matches an unsigned octal integer
匹配一个无符号八进制整数
numeric
real_p Matches a floating point number
匹配一个浮点数
numeric
real_parser<type, policy> Matches a floating point number
匹配一个浮点数
numeric
strict_real_p Matches a floating point number (requires decimal point)
匹配一个浮点数(要求小数点)
numeric
strict_ureal_p Matches an unsigned FP number (requires decimal point)
匹配一个无符号浮点数(要求小数点)
numeric
uint_p Matches an unsigned decimal integer numeric
uint_parser<type, base, min, max> Matches an unsigned integer with min to max digits
匹配 minmax 间的无符号整数
numeric
ureal_p Matches an unsigned FP number
匹配一个无符号浮点数
numeric
Other lexeme parsers 其它词位分析器
c_escape_ch_p Matches a C escape code
匹配一个C的转义代码
char
comment_p(string)
comment_p (string1, string2)
Matches C++ or C-style comments
匹配C++或C风格的注释
iter,iter
eol_p Matches CR, LF, or any combination
匹配 CR, LF 或其任意组合
iter,iter
f_str_p(func1, func2) Matches a string
匹配一个字符串
iter,iter
lex_escape_ch_p Matches 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]

你可能感兴趣的:(boost::spirit快速参考)