nom-bibtex

Build Status

A nearly feature complete BibTeX zero-copy parser using nom.

nom-bibtex can parse the four different type of entries listed in the BibTeX format description:

Code example

```rust extern crate nombibtex; use nombibtex::*;

const BIBFILE_DATA: &str = " @preamble{ A bibtex preamble }

@misc{my_citation_key,
    author= {Charles Vandevoorde},
    title = \"nom-bibtex\"
}

";

fn main() { let biblio = Bibtex::parse(BIBFILE_DATA).unwrap(); let entries = biblio.entries();

assert_eq!(entries[0], Entry::Preamble("A bibtex preamble".into()));
assert_eq!(entries[1], Entry::Bibliography(BibliographyEntry::new(
    "misc",
    "my_citation_key",
    vec![
        ("author".into(), "Charles Vandevoorde".into()),
        ("title".into(), "nom-bibtex".into())
    ]
)));

} ```

TODO