• Home
  • Raw
  • Download

Lines Matching full:parsers

56 //! about [how to write parsers](https://github.com/Geal/nom/blob/master/doc/making_a_new_parser_fr…
68 //! Parser combinators are an approach to parsers that is very different from
80 //! - The parsers are small and easy to write
81 //! - The parsers components are easy to reuse (if they're general enough, please add them to nom!)
82 //! - The parsers components are easy to test separately (unit tests and property-based tests)
84 //! - You can build partial parsers, specific to the data you need at the moment, and ignore the re…
123 //! Writing all the parsers manually, like this, is dangerous, despite Rust's
125 //! nom provides a list of functions to help in developing parsers.
170 …://github.com/Geal/nom/blob/master/doc/choosing_a_combinator.md) for an exhaustive list of parsers.
173 //! ## Making new parsers with function combinators
175 //! nom is based on functions that generate parsers, with a signature like
178 //! a number of bytes or character as argument) or even other parsers (like
179 //! `delimited` which takes as argument 3 parsers, and returns the result of
196 //! ## Combining parsers
199 //! provides a choice between multiple parsers. If one branch fails, it tries
256 //! There are more complex (and more useful) parsers like `tuple!`, which is
257 //! used to apply a series of parsers then assemble their results.
320 //! This can happen with some network protocol or large file parsers, where the
340 //! // both parsers will take 4 bytes as expected
360 //! // if there's a clear limit to the recognized characters, both parsers work the same way