ebnf 2.3.5 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -1
- data/VERSION +1 -1
- data/etc/abnf.sxp +1 -1
- data/etc/ebnf.html +13 -13
- data/etc/ebnf.ll1.rb +1 -1
- data/etc/ebnf.ll1.sxp +94 -94
- data/etc/ebnf.peg.rb +1 -1
- data/etc/ebnf.peg.sxp +29 -29
- data/etc/ebnf.sxp +18 -18
- data/etc/iso-ebnf.sxp +27 -27
- data/etc/sparql.sxp +195 -195
- data/etc/turtle.ebnf +70 -67
- data/etc/turtle.html +56 -106
- data/etc/turtle.peg.sxp +182 -191
- data/etc/turtle.sxp +64 -70
- data/lib/ebnf/abnf.rb +3 -3
- data/lib/ebnf/base.rb +1 -1
- data/lib/ebnf/isoebnf.rb +1 -1
- data/lib/ebnf/native.rb +3 -2
- data/lib/ebnf/parser.rb +4 -2
- data/lib/ebnf/rule.rb +1 -2
- data/lib/ebnf/unescape.rb +1 -1
- data/lib/ebnf/writer.rb +9 -7
- data/lib/ebnf.rb +2 -0
- metadata +16 -23
- data/etc/sparql.html +0 -1425
- data/etc/sparql.ll1.sxp +0 -7372
- data/etc/sparql.peg.rb +0 -532
- data/etc/sparql.peg.sxp +0 -597
- data/etc/turtle.ll1.rb +0 -1482
- data/etc/turtle.ll1.sxp +0 -425
- data/etc/turtle.peg.rb +0 -182
data/etc/turtle.ebnf
CHANGED
@@ -1,70 +1,73 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
1
|
+
turtleDoc ::= statement*
|
2
|
+
statement ::= directive | triples '.'
|
3
|
+
directive ::= prefixID | base | sparqlPrefix | sparqlBase
|
4
|
+
prefixID ::= '@prefix' PNAME_NS IRIREF '.'
|
5
|
+
base ::= '@base' IRIREF '.'
|
6
|
+
sparqlPrefix ::= "PREFIX" PNAME_NS IRIREF
|
7
|
+
sparqlBase ::= "BASE" IRIREF
|
8
|
+
triples ::= subject predicateObjectList | blankNodePropertyList predicateObjectList?
|
9
|
+
predicateObjectList ::= verb objectList (';' (verb objectList)? )*
|
10
|
+
objectList ::= object ( ',' object )*
|
11
|
+
verb ::= predicate | 'a'
|
12
|
+
subject ::= iri | BlankNode | collection
|
13
|
+
predicate ::= iri
|
14
|
+
object ::= iri | BlankNode | collection | blankNodePropertyList | literal
|
15
|
+
literal ::= RDFLiteral | NumericLiteral | BooleanLiteral
|
16
|
+
blankNodePropertyList ::= '[' predicateObjectList ']'
|
17
|
+
collection ::= '(' object* ')'
|
18
|
+
NumericLiteral ::= INTEGER | DECIMAL | DOUBLE
|
19
|
+
RDFLiteral ::= String ( LANGTAG | ( '^^' iri ) )?
|
20
|
+
BooleanLiteral ::= 'true' | 'false'
|
21
|
+
String ::= STRING_LITERAL_QUOTE | STRING_LITERAL_SINGLE_QUOTE
|
22
|
+
| STRING_LITERAL_LONG_SINGLE_QUOTE | STRING_LITERAL_LONG_QUOTE
|
23
|
+
iri ::= IRIREF | PrefixedName
|
24
|
+
PrefixedName ::= PNAME_LN | PNAME_NS
|
25
|
+
BlankNode ::= BLANK_NODE_LABEL | ANON
|
26
26
|
|
27
27
|
@terminals
|
28
28
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
[
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
[
|
65
|
-
|
66
|
-
[
|
67
|
-
[
|
68
|
-
|
69
|
-
|
70
|
-
|
29
|
+
IRIREF ::= '<' ([^#x00-#x20<>"{}|^`\] | UCHAR)* '>'
|
30
|
+
PNAME_NS ::= PN_PREFIX? ':'
|
31
|
+
PNAME_LN ::= PNAME_NS PN_LOCAL
|
32
|
+
BLANK_NODE_LABEL ::= '_:' ( PN_CHARS_U | [0-9] ) ((PN_CHARS|'.')* PN_CHARS)?
|
33
|
+
LANGTAG ::= '@' [a-zA-Z]+ ( '-' [a-zA-Z0-9]+ )*
|
34
|
+
INTEGER ::= [+-]? [0-9]+
|
35
|
+
DECIMAL ::= [+-]? ( ([0-9])* '.' ([0-9])+ )
|
36
|
+
DOUBLE ::= [+-]? ( [0-9]+ '.' [0-9]* EXPONENT | '.' ([0-9])+ EXPONENT | ([0-9])+ EXPONENT )
|
37
|
+
EXPONENT ::= [eE] [+-]? [0-9]+
|
38
|
+
STRING_LITERAL_QUOTE ::= '"' ( [^#x22#x5C#xA#xD] | ECHAR | UCHAR )* '"' /* #x22=" #x5C=\ #xA=new line #xD=carriage return */
|
39
|
+
STRING_LITERAL_SINGLE_QUOTE ::= "'" ( [^#x27#x5C#xA#xD] | ECHAR | UCHAR )* "'" /* #x27=' #x5C=\ #xA=new line #xD=carriage return */
|
40
|
+
STRING_LITERAL_LONG_SINGLE_QUOTE ::= "'''" ( ( "'" | "''" )? ( [^'\] | ECHAR | UCHAR ) )* "'''"
|
41
|
+
STRING_LITERAL_LONG_QUOTE ::= '"""' ( ( '"' | '""' )? ( [^"\] | ECHAR | UCHAR ) )* '"""'
|
42
|
+
UCHAR ::= ( '\u' HEX HEX HEX HEX ) | ( '\U' HEX HEX HEX HEX HEX HEX HEX HEX )
|
43
|
+
ECHAR ::= ('\' [tbnrf\"'])
|
44
|
+
NIL ::= '(' WS* ')'
|
45
|
+
WS ::= #x20 | #x9 | #xD | #xA /* #x20=space #x9=character tabulation #xD=carriage return #xA=new line */
|
46
|
+
ANON ::= '[' WS* ']'
|
47
|
+
PN_CHARS_BASE ::= ([A-Z]
|
48
|
+
| [a-z]
|
49
|
+
| [#x00C0-#x00D6]
|
50
|
+
| [#x00D8-#x00F6]
|
51
|
+
| [#x00F8-#x02FF]
|
52
|
+
| [#x0370-#x037D]
|
53
|
+
| [#x037F-#x1FFF]
|
54
|
+
| [#x200C-#x200D]
|
55
|
+
| [#x2070-#x218F]
|
56
|
+
| [#x2C00-#x2FEF]
|
57
|
+
| [#x3001-#xD7FF]
|
58
|
+
| [#xF900-#xFDCF]
|
59
|
+
| [#xFDF0-#xFFFD]
|
60
|
+
| [#x10000-#xEFFFF])
|
61
|
+
PN_CHARS_U ::= PN_CHARS_BASE | '_'
|
62
|
+
PN_CHARS ::= (PN_CHARS_U
|
63
|
+
| '-'
|
64
|
+
| [0-9]
|
65
|
+
| #x00B7
|
66
|
+
| [#x0300-#x036F]
|
67
|
+
| [#x203F-#x2040])
|
68
|
+
PN_PREFIX ::= PN_CHARS_BASE ( ( PN_CHARS | '.' )* PN_CHARS )?
|
69
|
+
PN_LOCAL ::= ( PN_CHARS_U | ':' | [0-9] | PLX ) ( ( PN_CHARS | '.' | ':' | PLX )* ( PN_CHARS | ':' | PLX ) ) ?
|
70
|
+
PLX ::= PERCENT | PN_LOCAL_ESC
|
71
|
+
PERCENT ::= '%' HEX HEX
|
72
|
+
HEX ::= ([0-9] | [A-F] | [a-f])
|
73
|
+
PN_LOCAL_ESC ::= '\' ( '_' | '~' | '.' | '-' | '!' | '$' | '&' | "'" | '(' | ')' | '*' | '+' | ',' | ';' | '=' | '/' | '?' | '#' | '@' | '%' )
|