Crate shex_compact

Source
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§

shapemap_compact_printer
shapemap_parser
shex_compact_printer
shex_parser
shex_parser_error

Structs§

LocatedParseError
A ShExParseError at a certain location

Statics§

HEX

Functions§

hex
hex_refactor
literal
[13t] literal ::= rdfLiteral | numericLiteral | booleanLiteral
re_find