Lines Matching full:can
12 for template metaprograms. For example the string `"Hello World!"` can be
27 read. The maximum length of the string that can be defined this way is limited,
36 following functions can be used to query it:
51 [link debug_parsing_error `debug_parsing_error`] can be used to display the
70 Complex parsers can be built by combining simple parsers. The parser library
82 Having [link accept_when `accept_when`], [link one_char `one_char`] can be
99 was not parsed. The remaining string can be processed by another parser. The
122 the [link int_ `int_`] parser we can use to parse one of these numbers.
134 Our example input is a list of numbers. Each number can be parsed by
139 This diagram shows how the repeated application of `int_token` can parse the
150 But we need the sum of these, so we need to summarise the result. We can do this
155 the vector. Let's assume that it can be implemented by a lambda expression and
178 [link repeated `repeated`]`<int_token>`. We can summarise the numbers in a
214 summarise the result. Using template metaprograms in your applications can have
219 need two loops: you can merge them together and add every number to your summary
231 Our parser can be implemented this way:
235 As you can see the implementation of the parser is more compact.
241 As you can see, not only the implementation of the parser is more compact, but
252 done. If you don't wan to accept it, you can use [link foldl1 `foldl1`] instead
276 As you can see this is very similar to using [link foldl `foldl`], but the
306 `"+ 13 + 3 + 21"`. This can easily be parsed by [link foldl `foldl`] (or
326 did. Because of this, it can be used as a drop-in replacement of `int_token` in
330 This [link foldl `foldl`] can not parse the first element, because it expects a
352 diagram shows how it can be used to parse a list of numbers separated by `+`
392 As you can see, it starts with the parser that is applied repeatedly on the
413 [link foldl_start_with_parser `foldl_start_with_parser`] we can parse the input
423 input ['as long as it can]. It parses the first`int_token` (`11`) and then it
431 parser can be wrapped by [link entire_input `entire_input`] to make sure to
433 won't make the error message useful. ([link entire_input `entire_input`] can
441 repeated parser (in our example `plus_int`) fails. When it can make any progress
452 parses the example invalid input and how it fails. This can be used for better
484 [section What can be built from a compile-time string?]
487 at compile-time. Here is a list of things that can be the "result" of parsing:
495 * A ['runtime object]. A static runtime object can be generated that might be
499 * A C++ ['function], which might be called at runtime. A C++ function can be
500 generated that can be called at runtime. It is good for generating native
514 [link grammar `grammar`] template can be used to define a grammar. It can be
528 Existing parsers can be bound to names and be used in the rules by importing
531 The result of a grammar definition is a parser which can be given to other
532 parser combinators or be used directly. Given that grammars can import existing
542 `constexpr`, which can be used for parsing at compile-time as well. While
545 has to be a `constexpr` value. Parsers based on template metaprogramming can
547 values but can be metafunction classes, classes with static functions which can
552 can implement the sub-parser based on `constexpr` functions. Metaparse
553 can be integrated with them and lift their results into C++ template
554 metaprogramming. An example demonstrating this feature can be found among the
560 [section What types of grammars can be used?]
563 However, this is not the most general category of grammars that can be used. As
567 It can be used to provide arbitrary predicates for enabled/disabling a specific
568 rule. One can go as far as providing the Turing machine (as a
570 can build parsers for ['unrestricted grammars] that can be parsed using a Turing
578 can be considered building a new parser library. There is no clear boundary for