nom 0.1.6

A byte oriented, zero copy, parser combinators library
docs.rs failed to build nom-0.1.6
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: nom-7.1.1

Nom, eating data byte by byte

The goal is to make a parser combinator library that is safe, supports streaming (push and pull), and as much as possible zero copy.

The code is available on Github

Example

 use std::str;
 fn local_print<'a,T: Debug>(input: T) -> IResult<T, ()> {
   println!("{:?}", input);
   Done(input, ())
 }
 // create a data producer from a file
 FileProducer::new("links.txt", 20).map(|producer: FileProducer| {
   let mut p = producer;

   // create the parsing function
   fn parser(par: IResult<(),&[u8]>) -> IResult<&[u8],()> {
     // convert byte array to a string, then print it
     par.map_res(str::from_utf8).flat_map(local_print);

     // return a dummy answer
     Done("".as_bytes(), ())
   }

   // adapt the parsing function to the producer
   pusher!(push, parser);
   // get started
   push(&mut p);
 });