shex 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,83 +1,82 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  # frozen_string_literal: true
3
- # This file generated automatically from https://shexspec.github.io/context.jsonld
3
+ # This file generated automatically from http://www.w3.org/ns/shex.jsonld
4
4
  require 'json/ld'
5
5
  class JSON::LD::Context
6
- add_preloaded("https://shexspec.github.io/context.jsonld") do
6
+ add_preloaded("http://www.w3.org/ns/shex.jsonld") do
7
7
  new(term_definitions: {
8
- "Annotation" => TermDefinition.new("Annotation", id: "http://shex.io/ns/shex#Annotation", simple: true),
9
- "EachOf" => TermDefinition.new("EachOf", id: "http://shex.io/ns/shex#EachOf", simple: true),
10
- "Inclusion" => TermDefinition.new("Inclusion", id: "http://shex.io/ns/shex#Inclusion", simple: true),
11
- "NodeConstraint" => TermDefinition.new("NodeConstraint", id: "http://shex.io/ns/shex#NodeConstraint", simple: true),
12
- "NodeKind" => TermDefinition.new("NodeKind", id: "http://shex.io/ns/shex#NodeKind", simple: true),
13
- "OneOf" => TermDefinition.new("OneOf", id: "http://shex.io/ns/shex#OneOf", simple: true),
14
- "Schema" => TermDefinition.new("Schema", id: "http://shex.io/ns/shex#Schema", simple: true),
15
- "SemAct" => TermDefinition.new("SemAct", id: "http://shex.io/ns/shex#SemAct", simple: true),
16
- "Shape" => TermDefinition.new("Shape", id: "http://shex.io/ns/shex#Shape", simple: true),
17
- "ShapeAnd" => TermDefinition.new("ShapeAnd", id: "http://shex.io/ns/shex#ShapeAnd", simple: true),
18
- "ShapeExpression" => TermDefinition.new("ShapeExpression", id: "http://shex.io/ns/shex#ShapeExpression", simple: true),
19
- "ShapeExternal" => TermDefinition.new("ShapeExternal", id: "http://shex.io/ns/shex#ShapeExternal", simple: true),
20
- "ShapeNot" => TermDefinition.new("ShapeNot", id: "http://shex.io/ns/shex#ShapeNot", simple: true),
21
- "ShapeOr" => TermDefinition.new("ShapeOr", id: "http://shex.io/ns/shex#ShapeOr", simple: true),
22
- "ShapeRef" => TermDefinition.new("ShapeRef", id: "http://shex.io/ns/shex#ShapeRef", simple: true),
23
- "Stem" => TermDefinition.new("Stem", id: "http://shex.io/ns/shex#Stem", simple: true),
24
- "StemRange" => TermDefinition.new("StemRange", id: "http://shex.io/ns/shex#StemRange", simple: true),
25
- "TripleConstraint" => TermDefinition.new("TripleConstraint", id: "http://shex.io/ns/shex#TripleConstraint", simple: true),
26
- "TripleExpression" => TermDefinition.new("TripleExpression", id: "http://shex.io/ns/shex#TripleExpression", simple: true),
27
- "Wildcard" => TermDefinition.new("Wildcard", id: "http://shex.io/ns/shex#Wildcard", simple: true),
28
- "annotation" => TermDefinition.new("annotation", id: "http://shex.io/ns/shex#annotation", type_mapping: "@id"),
29
- "annotations" => TermDefinition.new("annotations", id: "http://shex.io/ns/shex#annotation", type_mapping: "@id"),
30
- "bnode" => TermDefinition.new("bnode", id: "http://shex.io/ns/shex#bnode", simple: true),
31
- "closed" => TermDefinition.new("closed", id: "http://shex.io/ns/shex#closed", type_mapping: "http://www.w3.org/2001/XMLSchema#boolean"),
32
- "code" => TermDefinition.new("code", id: "http://shex.io/ns/shex#code"),
33
- "datatype" => TermDefinition.new("datatype", id: "http://shex.io/ns/shex#datatype", type_mapping: "@id"),
34
- "exclusion" => TermDefinition.new("exclusion", id: "http://shex.io/ns/shex#exclusion", type_mapping: "@id"),
35
- "exclusions" => TermDefinition.new("exclusions", id: "http://shex.io/ns/shex#exclusion", type_mapping: "@id"),
36
- "expression" => TermDefinition.new("expression", id: "http://shex.io/ns/shex#expression", type_mapping: "@id"),
37
- "expressions" => TermDefinition.new("expressions", id: "http://shex.io/ns/shex#expressions", type_mapping: "@id", container_mapping: "@list"),
38
- "extra" => TermDefinition.new("extra", id: "http://shex.io/ns/shex#extra", type_mapping: "@id"),
39
- "fractiondigits" => TermDefinition.new("fractiondigits", id: "http://shex.io/ns/shex#fractiondigits", type_mapping: "http://www.w3.org/2001/XMLSchema#integer"),
40
- "include" => TermDefinition.new("include", id: "http://shex.io/ns/shex#include", type_mapping: "@id"),
41
- "inverse" => TermDefinition.new("inverse", id: "http://shex.io/ns/shex#inverse", type_mapping: "http://www.w3.org/2001/XMLSchema#boolean"),
42
- "iri" => TermDefinition.new("iri", id: "http://shex.io/ns/shex#iri", simple: true),
8
+ "Annotation" => TermDefinition.new("Annotation", id: "http://www.w3.org/ns/shex#Annotation", simple: true),
9
+ "EachOf" => TermDefinition.new("EachOf", id: "http://www.w3.org/ns/shex#EachOf", simple: true),
10
+ "IriStem" => TermDefinition.new("IriStem", id: "http://www.w3.org/ns/shex#IriStem", simple: true),
11
+ "LanguageStem" => TermDefinition.new("LanguageStem", id: "http://www.w3.org/ns/shex#LanguageStem", simple: true),
12
+ "LiteralStem" => TermDefinition.new("LiteralStem", id: "http://www.w3.org/ns/shex#LiteralStem", simple: true),
13
+ "NodeConstraint" => TermDefinition.new("NodeConstraint", id: "http://www.w3.org/ns/shex#NodeConstraint", simple: true),
14
+ "NodeKind" => TermDefinition.new("NodeKind", id: "http://www.w3.org/ns/shex#NodeKind", simple: true),
15
+ "OneOf" => TermDefinition.new("OneOf", id: "http://www.w3.org/ns/shex#OneOf", simple: true),
16
+ "Schema" => TermDefinition.new("Schema", id: "http://www.w3.org/ns/shex#Schema", simple: true),
17
+ "SemAct" => TermDefinition.new("SemAct", id: "http://www.w3.org/ns/shex#SemAct", simple: true),
18
+ "Shape" => TermDefinition.new("Shape", id: "http://www.w3.org/ns/shex#Shape", simple: true),
19
+ "ShapeAnd" => TermDefinition.new("ShapeAnd", id: "http://www.w3.org/ns/shex#ShapeAnd", simple: true),
20
+ "ShapeExpression" => TermDefinition.new("ShapeExpression", id: "http://www.w3.org/ns/shex#ShapeExpression", simple: true),
21
+ "ShapeExternal" => TermDefinition.new("ShapeExternal", id: "http://www.w3.org/ns/shex#ShapeExternal", simple: true),
22
+ "ShapeNot" => TermDefinition.new("ShapeNot", id: "http://www.w3.org/ns/shex#ShapeNot", simple: true),
23
+ "ShapeOr" => TermDefinition.new("ShapeOr", id: "http://www.w3.org/ns/shex#ShapeOr", simple: true),
24
+ "Stem" => TermDefinition.new("Stem", id: "http://www.w3.org/ns/shex#Stem", simple: true),
25
+ "StemRange" => TermDefinition.new("StemRange", id: "http://www.w3.org/ns/shex#StemRange", simple: true),
26
+ "TripleConstraint" => TermDefinition.new("TripleConstraint", id: "http://www.w3.org/ns/shex#TripleConstraint", simple: true),
27
+ "TripleExpression" => TermDefinition.new("TripleExpression", id: "http://www.w3.org/ns/shex#TripleExpression", simple: true),
28
+ "Wildcard" => TermDefinition.new("Wildcard", id: "http://www.w3.org/ns/shex#Wildcard", simple: true),
29
+ "annotation" => TermDefinition.new("annotation", id: "http://www.w3.org/ns/shex#annotation", type_mapping: "@id"),
30
+ "annotations" => TermDefinition.new("annotations", id: "http://www.w3.org/ns/shex#annotation", type_mapping: "@id"),
31
+ "bnode" => TermDefinition.new("bnode", id: "http://www.w3.org/ns/shex#bnode", simple: true),
32
+ "closed" => TermDefinition.new("closed", id: "http://www.w3.org/ns/shex#closed", type_mapping: "http://www.w3.org/2001/XMLSchema#boolean"),
33
+ "code" => TermDefinition.new("code", id: "http://www.w3.org/ns/shex#code"),
34
+ "datatype" => TermDefinition.new("datatype", id: "http://www.w3.org/ns/shex#datatype", type_mapping: "@id"),
35
+ "exclusion" => TermDefinition.new("exclusion", id: "http://www.w3.org/ns/shex#exclusion", type_mapping: "@id"),
36
+ "exclusions" => TermDefinition.new("exclusions", id: "http://www.w3.org/ns/shex#exclusion", type_mapping: "@id"),
37
+ "expression" => TermDefinition.new("expression", id: "http://www.w3.org/ns/shex#expression", type_mapping: "@id"),
38
+ "expressions" => TermDefinition.new("expressions", id: "http://www.w3.org/ns/shex#expressions", type_mapping: "@id", container_mapping: "@list"),
39
+ "extra" => TermDefinition.new("extra", id: "http://www.w3.org/ns/shex#extra", type_mapping: "@id"),
40
+ "fractiondigits" => TermDefinition.new("fractiondigits", id: "http://www.w3.org/ns/shex#fractiondigits", type_mapping: "http://www.w3.org/2001/XMLSchema#integer"),
43
41
  "id" => TermDefinition.new("id", id: "@id", simple: true),
42
+ "inverse" => TermDefinition.new("inverse", id: "http://www.w3.org/ns/shex#inverse", type_mapping: "http://www.w3.org/2001/XMLSchema#boolean"),
43
+ "iri" => TermDefinition.new("iri", id: "http://www.w3.org/ns/shex#iri", simple: true),
44
44
  "language" => TermDefinition.new("language", id: "@language", simple: true),
45
- "length" => TermDefinition.new("length", id: "http://shex.io/ns/shex#length", type_mapping: "http://www.w3.org/2001/XMLSchema#integer"),
46
- "literal" => TermDefinition.new("literal", id: "http://shex.io/ns/shex#literal", simple: true),
47
- "max" => TermDefinition.new("max", id: "http://shex.io/ns/shex#max"),
48
- "maxexclusive" => TermDefinition.new("maxexclusive", id: "http://shex.io/ns/shex#maxexclusive", type_mapping: "http://www.w3.org/2001/XMLSchema#integer"),
49
- "maxinclusive" => TermDefinition.new("maxinclusive", id: "http://shex.io/ns/shex#maxinclusive", type_mapping: "http://www.w3.org/2001/XMLSchema#integer"),
50
- "maxlength" => TermDefinition.new("maxlength", id: "http://shex.io/ns/shex#maxlength", type_mapping: "http://www.w3.org/2001/XMLSchema#integer"),
51
- "min" => TermDefinition.new("min", id: "http://shex.io/ns/shex#min", type_mapping: "http://www.w3.org/2001/XMLSchema#integer"),
52
- "minexclusive" => TermDefinition.new("minexclusive", id: "http://shex.io/ns/shex#minexclusive", type_mapping: "http://www.w3.org/2001/XMLSchema#integer"),
53
- "mininclusive" => TermDefinition.new("mininclusive", id: "http://shex.io/ns/shex#mininclusive", type_mapping: "http://www.w3.org/2001/XMLSchema#integer"),
54
- "minlength" => TermDefinition.new("minlength", id: "http://shex.io/ns/shex#minlength", type_mapping: "http://www.w3.org/2001/XMLSchema#integer"),
55
- "name" => TermDefinition.new("name", id: "http://shex.io/ns/shex#name", type_mapping: "@id"),
56
- "nodeKind" => TermDefinition.new("nodeKind", id: "http://shex.io/ns/shex#nodeKind", type_mapping: "@vocab"),
57
- "nonliteral" => TermDefinition.new("nonliteral", id: "http://shex.io/ns/shex#nonliteral", simple: true),
58
- "numericFacet" => TermDefinition.new("numericFacet", id: "http://shex.io/ns/shex#numericFacet"),
59
- "object" => TermDefinition.new("object", id: "http://shex.io/ns/shex#object", type_mapping: "@id"),
60
- "pattern" => TermDefinition.new("pattern", id: "http://shex.io/ns/shex#pattern"),
61
- "predicate" => TermDefinition.new("predicate", id: "http://shex.io/ns/shex#predicate", type_mapping: "@id"),
45
+ "length" => TermDefinition.new("length", id: "http://www.w3.org/ns/shex#length", type_mapping: "http://www.w3.org/2001/XMLSchema#integer"),
46
+ "literal" => TermDefinition.new("literal", id: "http://www.w3.org/ns/shex#literal", simple: true),
47
+ "max" => TermDefinition.new("max", id: "http://www.w3.org/ns/shex#max", type_mapping: "http://www.w3.org/2001/XMLSchema#integer"),
48
+ "maxexclusive" => TermDefinition.new("maxexclusive", id: "http://www.w3.org/ns/shex#maxexclusive", type_mapping: "http://www.w3.org/2001/XMLSchema#integer"),
49
+ "maxinclusive" => TermDefinition.new("maxinclusive", id: "http://www.w3.org/ns/shex#maxinclusive", type_mapping: "http://www.w3.org/2001/XMLSchema#integer"),
50
+ "maxlength" => TermDefinition.new("maxlength", id: "http://www.w3.org/ns/shex#maxlength", type_mapping: "http://www.w3.org/2001/XMLSchema#integer"),
51
+ "min" => TermDefinition.new("min", id: "http://www.w3.org/ns/shex#min", type_mapping: "http://www.w3.org/2001/XMLSchema#integer"),
52
+ "minexclusive" => TermDefinition.new("minexclusive", id: "http://www.w3.org/ns/shex#minexclusive", type_mapping: "http://www.w3.org/2001/XMLSchema#integer"),
53
+ "mininclusive" => TermDefinition.new("mininclusive", id: "http://www.w3.org/ns/shex#mininclusive", type_mapping: "http://www.w3.org/2001/XMLSchema#integer"),
54
+ "minlength" => TermDefinition.new("minlength", id: "http://www.w3.org/ns/shex#minlength", type_mapping: "http://www.w3.org/2001/XMLSchema#integer"),
55
+ "name" => TermDefinition.new("name", id: "http://www.w3.org/ns/shex#name", type_mapping: "@id"),
56
+ "nodeKind" => TermDefinition.new("nodeKind", id: "http://www.w3.org/ns/shex#nodeKind", type_mapping: "@vocab"),
57
+ "nonliteral" => TermDefinition.new("nonliteral", id: "http://www.w3.org/ns/shex#nonliteral", simple: true),
58
+ "numericFacet" => TermDefinition.new("numericFacet", id: "http://www.w3.org/ns/shex#numericFacet"),
59
+ "object" => TermDefinition.new("object", id: "http://www.w3.org/ns/shex#object", type_mapping: "@id"),
60
+ "pattern" => TermDefinition.new("pattern", id: "http://www.w3.org/ns/shex#pattern"),
61
+ "predicate" => TermDefinition.new("predicate", id: "http://www.w3.org/ns/shex#predicate", type_mapping: "@id"),
62
62
  "rdf" => TermDefinition.new("rdf", id: "http://www.w3.org/1999/02/22-rdf-syntax-ns#", simple: true),
63
63
  "rdfs" => TermDefinition.new("rdfs", id: "http://www.w3.org/2000/01/rdf-schema#", simple: true),
64
- "reference" => TermDefinition.new("reference", id: "http://shex.io/ns/shex#reference", type_mapping: "@id"),
65
- "semActs" => TermDefinition.new("semActs", id: "http://shex.io/ns/shex#semActs", type_mapping: "@id", container_mapping: "@list"),
66
- "shapeExpr" => TermDefinition.new("shapeExpr", id: "http://shex.io/ns/shex#shapeExpr", type_mapping: "@id"),
67
- "shapeExprs" => TermDefinition.new("shapeExprs", id: "http://shex.io/ns/shex#shapeExprs", type_mapping: "@id", container_mapping: "@list"),
68
- "shapes" => TermDefinition.new("shapes", id: "http://shex.io/ns/shex#shapes", type_mapping: "@id"),
69
- "shex" => TermDefinition.new("shex", id: "http://shex.io/ns/shex#", simple: true),
70
- "start" => TermDefinition.new("start", id: "http://shex.io/ns/shex#start", type_mapping: "@id"),
71
- "startActs" => TermDefinition.new("startActs", id: "http://shex.io/ns/shex#startActs", type_mapping: "@id", container_mapping: "@list"),
72
- "stem" => TermDefinition.new("stem", id: "http://shex.io/ns/shex#stem", type_mapping: "http://www.w3.org/2001/XMLSchema#anyUri"),
73
- "stringFacet" => TermDefinition.new("stringFacet", id: "http://shex.io/ns/shex#stringFacet"),
74
- "totaldigits" => TermDefinition.new("totaldigits", id: "http://shex.io/ns/shex#totaldigits", type_mapping: "http://www.w3.org/2001/XMLSchema#integer"),
64
+ "semActs" => TermDefinition.new("semActs", id: "http://www.w3.org/ns/shex#semActs", type_mapping: "@id", container_mapping: "@list"),
65
+ "shapeExpr" => TermDefinition.new("shapeExpr", id: "http://www.w3.org/ns/shex#shapeExpr", type_mapping: "@id"),
66
+ "shapeExprs" => TermDefinition.new("shapeExprs", id: "http://www.w3.org/ns/shex#shapeExprs", type_mapping: "@id", container_mapping: "@list"),
67
+ "shapes" => TermDefinition.new("shapes", id: "http://www.w3.org/ns/shex#shapes", type_mapping: "@id"),
68
+ "shex" => TermDefinition.new("shex", id: "http://www.w3.org/ns/shex#", simple: true),
69
+ "start" => TermDefinition.new("start", id: "http://www.w3.org/ns/shex#start", type_mapping: "@id"),
70
+ "startActs" => TermDefinition.new("startActs", id: "http://www.w3.org/ns/shex#startActs", type_mapping: "@id", container_mapping: "@list"),
71
+ "stem" => TermDefinition.new("stem", id: "http://www.w3.org/ns/shex#stem", type_mapping: "http://www.w3.org/2001/XMLSchema#anyUri"),
72
+ "stringFacet" => TermDefinition.new("stringFacet", id: "http://www.w3.org/ns/shex#stringFacet"),
73
+ "totaldigits" => TermDefinition.new("totaldigits", id: "http://www.w3.org/ns/shex#totaldigits", type_mapping: "http://www.w3.org/2001/XMLSchema#integer"),
75
74
  "type" => TermDefinition.new("type", id: "@type", simple: true),
76
75
  "uri" => TermDefinition.new("uri", id: "@id", simple: true),
77
76
  "value" => TermDefinition.new("value", id: "@value", simple: true),
78
- "valueExpr" => TermDefinition.new("valueExpr", id: "http://shex.io/ns/shex#valueExpr", type_mapping: "@id"),
79
- "values" => TermDefinition.new("values", id: "http://shex.io/ns/shex#values", type_mapping: "@id", container_mapping: "@list"),
80
- "xsFacet" => TermDefinition.new("xsFacet", id: "http://shex.io/ns/shex#xsFacet"),
77
+ "valueExpr" => TermDefinition.new("valueExpr", id: "http://www.w3.org/ns/shex#valueExpr", type_mapping: "@id"),
78
+ "values" => TermDefinition.new("values", id: "http://www.w3.org/ns/shex#values", type_mapping: "@id", container_mapping: "@list"),
79
+ "xsFacet" => TermDefinition.new("xsFacet", id: "http://www.w3.org/ns/shex#xsFacet"),
81
80
  "xsd" => TermDefinition.new("xsd", id: "http://www.w3.org/2001/XMLSchema#", simple: true)
82
81
  })
83
82
  end
@@ -1,3 +1,4 @@
1
+ # -*- encoding: utf-8 -*-
1
2
  require 'ebnf/ll1/lexer'
2
3
 
3
4
  module ShEx
@@ -15,8 +16,10 @@ module ShEx
15
16
  U_CHARS2 = Regexp.compile("\\u00B7|[\\u0300-\\u036F]|[\\u203F-\\u2040]").freeze
16
17
  IRI_RANGE = Regexp.compile("[[^<>\"{}|^`\\\\]&&[^\\x00-\\x20]]").freeze
17
18
 
18
- # 26t
19
- UCHAR = EBNF::LL1::Lexer::UCHAR
19
+ # 87
20
+ UCHAR4 = /\\u([0-9A-Fa-f]{4,4})/.freeze
21
+ UCHAR8 = /\\U([0-9A-Fa-f]{8,8})/.freeze
22
+ UCHAR = Regexp.union(UCHAR4, UCHAR8).freeze
20
23
  # 171s
21
24
  PERCENT = /%\h\h/.freeze
22
25
  # 173s
@@ -42,49 +45,61 @@ module ShEx
42
45
 
43
46
  WS = /(?:\s|(?:#[^\n\r]*))+/m.freeze
44
47
 
45
- # 60
48
+ # 69
46
49
  RDF_TYPE = /a/.freeze
47
50
  # 18t
48
51
  IRIREF = /<(?:#{IRI_RANGE}|#{UCHAR})*>/.freeze
49
- # 140s
52
+ # 73
50
53
  PNAME_NS = /#{PN_PREFIX}?:/.freeze
51
- # 141s
54
+ # 74
52
55
  PNAME_LN = /#{PNAME_NS}#{PN_LOCAL}/.freeze
53
- # 61
56
+ # 75
54
57
  ATPNAME_NS = /@#{WS}*#{PN_PREFIX}?:/m.freeze
55
- # 62
58
+ # 76
56
59
  ATPNAME_LN = /@#{WS}*#{PNAME_NS}#{PN_LOCAL}/m.freeze
57
- # 142s
60
+ # 77
58
61
  BLANK_NODE_LABEL = /_:(?:\d|#{PN_CHARS_U})(?:(?:#{PN_CHARS}|\.)*#{PN_CHARS})?/.freeze
59
- # 145s
62
+ # 78
60
63
  LANGTAG = /@[a-zA-Z]+(?:-[a-zA-Z0-9]+)*/.freeze
61
- # 19t
64
+ # 79
62
65
  INTEGER = /[+-]?\d+/.freeze
63
- # 20t
66
+ # 80
64
67
  DECIMAL = /[+-]?(?:\d*\.\d+)/.freeze
65
- # 21t
68
+ # 81
66
69
  DOUBLE = /[+-]?(?:\d+\.\d*#{EXPONENT}|\.?\d+#{EXPONENT})/.freeze
67
- # 156s
70
+ # 83
68
71
  STRING_LITERAL1 = /'(?:[^\'\\\n\r]|#{ECHAR}|#{UCHAR})*'/.freeze
69
- # 157s
72
+ # 84
70
73
  STRING_LITERAL2 = /"(?:[^\"\\\n\r]|#{ECHAR}|#{UCHAR})*"/.freeze
71
- # 158s
74
+ # 85
72
75
  STRING_LITERAL_LONG1 = /'''(?:(?:'|'')?(?:[^'\\]|#{ECHAR}|#{UCHAR}))*'''/m.freeze
73
- # 159s
76
+ # 86
74
77
  STRING_LITERAL_LONG2 = /"""(?:(?:"|"")?(?:[^"\\]|#{ECHAR}|#{UCHAR}))*"""/m.freeze
75
78
 
76
- # 29
79
+ # 83l
80
+ LANG_STRING_LITERAL1 = /'(?:[^\'\\\n\r]|#{ECHAR}|#{UCHAR})*'#{LANGTAG}/.freeze
81
+ # 84l
82
+ LANG_STRING_LITERAL2 = /"(?:[^\"\\\n\r]|#{ECHAR}|#{UCHAR})*"#{LANGTAG}/.freeze
83
+ # 85l
84
+ LANG_STRING_LITERAL_LONG1 = /'''(?:(?:'|'')?(?:[^'\\]|#{ECHAR}|#{UCHAR}))*'''#{LANGTAG}/m.freeze
85
+ # 86l
86
+ LANG_STRING_LITERAL_LONG2 = /"""(?:(?:"|"")?(?:[^"\\]|#{ECHAR}|#{UCHAR}))*"""#{LANGTAG}/m.freeze
87
+
88
+ # XX
89
+ REGEXP = %r(/(?:[^/\\\n\r]|\\[nrt\\|.?*+(){}$-\[\]^/]|#{UCHAR})+/[smix]*).freeze
90
+
91
+ # 68
77
92
  CODE = /\{(?:[^%\\]|\\[%\\]|#{UCHAR})*%#{WS}*\}/m.freeze
78
- # 30
93
+ # 70
79
94
  REPEAT_RANGE = /\{\s*#{INTEGER}(?:,#{WS}*(?:#{INTEGER}|\*)?)?#{WS}*\}/.freeze
80
95
 
81
96
  # String terminals, mixed case sensitivity
82
97
  STR_EXPR = %r(true|false
83
98
  |\^\^|\/\/
84
- |[\(\)\{\}\[\],\.;\=\-\~!\|\&\@\$\?\+\*\%\^\/a]|
99
+ |[\(\)\{\}\[\],\.;\=\-\~!\|\&\@\$\?\+\*\%\^a]|
85
100
  (?i:OR|AND|NOT
86
101
  |BASE|PREFIX
87
- |IRI|BNODE|NONLITERAL|PATTERN
102
+ |IRI|BNODE|NONLITERAL
88
103
  |MINLENGTH|MAXLENGTH|LENGTH
89
104
  |MAXINCLUSIVE|MAXEXCLUSIVE
90
105
  |MININCLUSIVE|MINEXCLUSIVE
@@ -95,7 +110,7 @@ module ShEx
95
110
  )x.freeze
96
111
 
97
112
  # Map terminals to canonical form
98
- STR_MAP = %w{OR AND NOT BASE PREFIX IRI BNODE NONLITERAL PATTERN
113
+ STR_MAP = %w{OR AND NOT BASE PREFIX IRI BNODE NONLITERAL
99
114
  MINLENGTH MAXLENGTH LENGTH MININCLUSIVE MAXINCLUSIVE MINEXCLUSIVE MAXEXCLUSIVE
100
115
  TOTALDIGITS FRACTIONDIGITS START EXTERNAL CLOSED EXTRA LITERAL}.
101
116
  inject({}) do |memo, t|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregg Kellogg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-28 00:00:00.000000000 Z
11
+ date: 2017-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdf