]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/metaparse/doc/parser.qbk
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / metaparse / doc / parser.qbk
1 [#parser]
2 [section Parser]
3
4 A ['parser] is a [link metafunction_class template metafunction class] that
5 takes the following arguments:
6
7 * a suffix of the input text, a [link string `string`]
8 * a [link source_position source position] describing at which position of the
9 entire input text the suffix begins at
10
11 The function parses a prefix of the input string.
12 When the parsing is successful, it returns an [link accept `accept`] value.
13 When there is a parsing error, the parser returns a [link reject `reject`]
14 value. The [link is_error `is_error`] metafunction can be used to determine
15 about the result of a parser if it succeeded or failed.
16
17 The documentation refers often to the ['result of a parser]. This means that the
18 parser accepts the input and refers to what [link get_result `get_result`]
19 returns for the value returned by the parser.
20
21 [endsect]
22