Expand description
ShEx compact syntax parser
Example
use shex_ast::{Schema, Shape, ShapeExpr, ShapeExprLabel};
use shex_compact::ShExParser;
let str = r#"prefix : <http://example.org/>
:S {}
"#;
let schema = ShExParser::parse(str, None).unwrap();
let mut expected = Schema::new();
expected.add_prefix("", &IriS::new_unchecked("http://example.org/"));
expected.add_shape(
ShapeExprLabel::iri_unchecked("http://example.org/S"),
ShapeExpr::empty_shape(),
false
);
assert_eq!(schema,expected)
Re-exports§
pub use crate::shapemap_compact_printer::*;
pub use crate::shapemap_parser::*;
pub use crate::shex_compact_printer::*;
pub use crate::shex_parser::*;
pub use crate::shex_parser_error::*;
Modules§
Structs§
- A
ShExParseError
at a certain location
Statics§
Functions§
[13t] literal ::= rdfLiteral | numericLiteral | booleanLiteral