1pub mod iri;
2mod shared;
3mod string_parser;
4mod triple_common_parser;
5pub mod turtle;
6pub mod utils {
7 pub use crate::shared::*;
8}
9pub mod prelude {
10 pub use nom::{
11 AsChar, IResult, ParseTo, Parser,
12 branch::alt,
13 bytes::complete::{
14 tag, tag_no_case, take, take_till, take_till1, take_until, take_until1, take_while,
15 take_while1,
16 },
17 character::complete::{
18 alphanumeric1, char, i64 as I64, line_ending, multispace0, multispace1, space0, space1,
19 u8 as U8, u16 as U16, u32 as U32,
20 },
21 combinator::{
22 all_consuming, cut, eof, map, map_parser, map_res, opt, peek, recognize, value, verify,
23 },
24 error::{Error, ErrorKind, make_error},
25 multi::{many0, separated_list0, separated_list1},
26 number::complete::{double, float, recognize_float},
27 sequence::{delimited, pair, preceded, separated_pair, terminated},
28 };
29 use nom_language::error::VerboseError;
30 pub type ParserResult<'a, T> = IResult<&'a str, T, VerboseError<&'a str>>;
31}
32
33pub mod grammar {
34 pub const PN_LOCAL_ESC: &str = "_~-!$&\\:()*+=/?#%";
35 pub const PERCENT: &str = "%";
36 pub const STRING_LITERAL_QUOTE: &str = r#"""#;
37 pub const STRING_LITERAL_SINGLE_QUOTE: &str = "'";
38 pub const STRING_LITERAL_LONG_SINGLE_QUOTE: &str = "'''";
39 pub const STRING_LITERAL_LONG_QUOTE: &str = r#"""""#;
40 pub const LANGTAG: &str = "@";
41 pub const BLANK_NODE_LABEL: &str = "_:";
42}
43
44#[cfg(test)]
45mod tests;