ebnf 2.3.4 → 2.4.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 +1 -1
- data/VERSION +1 -1
- data/etc/ebnf.html +26 -39
- data/etc/ebnf.ll1.rb +1 -1
- data/etc/ebnf.peg.rb +1 -1
- data/etc/sparql.html +1424 -1604
- data/etc/turtle.html +120 -68
- data/lib/ebnf/writer.rb +87 -61
- metadata +16 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47cef27b676f78632ab4898ee26c5c1af57de2c3dbfafa90c7e5a124335ade4c
|
4
|
+
data.tar.gz: f14be1671157a53571c64c3563173b5325ff6d0f8b52c772676594ebe36e75a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d50eb81d6f029a8eb68778430bcc7a82749064edc24eb0aaa5c65470056d091cbde401e1945a83123ef7e0b9196268fa0d6e76e503d4a916f179e83b98b0ec4f
|
7
|
+
data.tar.gz: 8d9ad8ba8816473d6ba954472dffb7d05a9d986568942f01dc265a87917f05e141d9cabb193a3c67c404715658f766eab99585da1735c84f0b24dc6ee681b6f0
|
data/README.md
CHANGED
@@ -290,7 +290,7 @@ A copy of the [Turtle EBNF][] and derived parser files are included in the repos
|
|
290
290
|
[ISO/IEC 14977]:https://www.iso.org/standard/26153.html
|
291
291
|
[LL(1)]: https://www.csd.uwo.ca/~moreno//CS447/Lectures/Syntax.html/node14.html
|
292
292
|
[LL(1) Parser]: https://en.wikipedia.org/wiki/LL_parser
|
293
|
-
[Logger]: https://ruby-doc.org/stdlib-
|
293
|
+
[Logger]: https://ruby-doc.org/stdlib-3.0.0/libdoc/logger/rdoc/Logger.html
|
294
294
|
[S-expression]: https://en.wikipedia.org/wiki/S-expression
|
295
295
|
[Tokenizer]: https://en.wikipedia.org/wiki/Lexical_analysis#Tokenizer
|
296
296
|
[Turtle]: https://www.w3.org/TR/2012/WD-turtle-20120710/
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.4.0
|
data/etc/ebnf.html
CHANGED
@@ -1,17 +1,17 @@
|
|
1
|
-
|
1
|
+
<!-- Generated with ebnf version 2.3.4. See https://github.com/dryruby/ebnf. -->
|
2
2
|
<table class="grammar">
|
3
3
|
<tbody id="grammar-productions" class="ebnf">
|
4
4
|
<tr id="grammar-production-ebnf">
|
5
5
|
<td>[1]</td>
|
6
6
|
<td><code>ebnf</code></td>
|
7
7
|
<td>::=</td>
|
8
|
-
<td><code>(</code
|
8
|
+
<td><code class="grammar-paren">(</code><a href="#grammar-production-declaration">declaration</a> <code class="grammar-alt">|</code> <a href="#grammar-production-rule">rule</a><code class="grammar-paren">)</code><code class="grammar-star">*</code></td>
|
9
9
|
</tr>
|
10
10
|
<tr id="grammar-production-declaration">
|
11
11
|
<td>[2]</td>
|
12
12
|
<td><code>declaration</code></td>
|
13
13
|
<td>::=</td>
|
14
|
-
<td
|
14
|
+
<td>"<code class="grammar-literal">@terminals</code>" <code class="grammar-alt">|</code> <a href="#grammar-production-pass">pass</a></td>
|
15
15
|
</tr>
|
16
16
|
<tr id="grammar-production-rule">
|
17
17
|
<td>[3]</td>
|
@@ -29,40 +29,41 @@
|
|
29
29
|
<td>[5]</td>
|
30
30
|
<td><code>alt</code></td>
|
31
31
|
<td>::=</td>
|
32
|
-
<td><a href="#grammar-production-seq">seq</a> <code>(</code>
|
32
|
+
<td><a href="#grammar-production-seq">seq</a> <code class="grammar-paren">(</code>"<code class="grammar-literal">|</code>" <a href="#grammar-production-seq">seq</a><code class="grammar-paren">)</code><code class="grammar-star">*</code></td>
|
33
33
|
</tr>
|
34
34
|
<tr id="grammar-production-seq">
|
35
35
|
<td>[6]</td>
|
36
36
|
<td><code>seq</code></td>
|
37
37
|
<td>::=</td>
|
38
|
-
<td><a href="#grammar-production-diff">diff</a><code>+</code
|
38
|
+
<td><a href="#grammar-production-diff">diff</a><code class="grammar-plus">+</code></td>
|
39
39
|
</tr>
|
40
40
|
<tr id="grammar-production-diff">
|
41
41
|
<td>[7]</td>
|
42
42
|
<td><code>diff</code></td>
|
43
43
|
<td>::=</td>
|
44
|
-
<td><a href="#grammar-production-postfix">postfix</a> <code>(</code>
|
44
|
+
<td><a href="#grammar-production-postfix">postfix</a> <code class="grammar-paren">(</code>"<code class="grammar-literal">-</code>" <a href="#grammar-production-postfix">postfix</a><code class="grammar-paren">)</code><code class="grammar-opt">?</code></td>
|
45
45
|
</tr>
|
46
46
|
<tr id="grammar-production-postfix">
|
47
47
|
<td>[8]</td>
|
48
48
|
<td><code>postfix</code></td>
|
49
49
|
<td>::=</td>
|
50
|
-
<td><a href="#grammar-production-primary">primary</a> <a href="#grammar-production-POSTFIX">POSTFIX</a><code>?</code
|
50
|
+
<td><a href="#grammar-production-primary">primary</a> <a href="#grammar-production-POSTFIX">POSTFIX</a><code class="grammar-opt">?</code></td>
|
51
51
|
</tr>
|
52
52
|
<tr id="grammar-production-primary">
|
53
53
|
<td>[9]</td>
|
54
54
|
<td><code>primary</code></td>
|
55
55
|
<td>::=</td>
|
56
|
-
<td><a href="#grammar-production-HEX">HEX</a> <code>|</code> <a href="#grammar-production-SYMBOL">SYMBOL</a> <code>|</code> <a href="#grammar-production-O_RANGE">O_RANGE</a> <code>|</code> <a href="#grammar-production-RANGE">RANGE</a> <code>|</code> <a href="#grammar-production-STRING1">STRING1</a> <code>|</code> <a href="#grammar-production-STRING2">STRING2</a> <code>|</code> <code>(</code>
|
56
|
+
<td><a href="#grammar-production-HEX">HEX</a> <code class="grammar-alt">|</code> <a href="#grammar-production-SYMBOL">SYMBOL</a> <code class="grammar-alt">|</code> <a href="#grammar-production-O_RANGE">O_RANGE</a> <code class="grammar-alt">|</code> <a href="#grammar-production-RANGE">RANGE</a> <code class="grammar-alt">|</code> <a href="#grammar-production-STRING1">STRING1</a> <code class="grammar-alt">|</code> <a href="#grammar-production-STRING2">STRING2</a> <code class="grammar-alt">|</code> <code class="grammar-paren">(</code>"<code class="grammar-literal">(</code>" <a href="#grammar-production-expression">expression</a> "<code class="grammar-literal">)</code>"<code class="grammar-paren">)</code></td>
|
57
57
|
</tr>
|
58
58
|
<tr id="grammar-production-pass">
|
59
59
|
<td>[10]</td>
|
60
60
|
<td><code>pass</code></td>
|
61
61
|
<td>::=</td>
|
62
|
-
<td
|
62
|
+
<td>"<code class="grammar-literal">@pass</code>" <a href="#grammar-production-expression">expression</a></td>
|
63
63
|
</tr>
|
64
|
-
<tr>
|
65
|
-
<td
|
64
|
+
<tr id="grammar-declaration-terminals">
|
65
|
+
<td>@terminals</td>
|
66
|
+
<td><code></code></td>
|
66
67
|
<td></td>
|
67
68
|
<td><strong># Productions for terminals</strong></td>
|
68
69
|
</tr>
|
@@ -70,85 +71,71 @@
|
|
70
71
|
<td>[11]</td>
|
71
72
|
<td><code>LHS</code></td>
|
72
73
|
<td>::=</td>
|
73
|
-
<td><code>(</code>
|
74
|
+
<td><code class="grammar-paren">(</code>"<code class="grammar-literal">[</code>" <a href="#grammar-production-SYMBOL">SYMBOL</a> "<code class="grammar-literal">]</code>" <code class="grammar-char-escape"><abbr title="space">#x20</abbr></code><code class="grammar-plus">+</code><code class="grammar-paren">)</code><code class="grammar-opt">?</code> <a href="#grammar-production-SYMBOL">SYMBOL</a> <code class="grammar-char-escape"><abbr title="space">#x20</abbr></code><code class="grammar-star">*</code> "<code class="grammar-literal">::=</code>"</td>
|
74
75
|
</tr>
|
75
76
|
<tr id="grammar-production-SYMBOL">
|
76
77
|
<td>[12]</td>
|
77
78
|
<td><code>SYMBOL</code></td>
|
78
79
|
<td>::=</td>
|
79
|
-
<td><code>(</code
|
80
|
+
<td><code class="grammar-paren">(</code><code class="grammar-brac">[</code><code class="grammar-literal">a-z</code><code class="grammar-brac">]</code> <code class="grammar-alt">|</code> <code class="grammar-brac">[</code><code class="grammar-literal">A-Z</code><code class="grammar-brac">]</code> <code class="grammar-alt">|</code> <code class="grammar-brac">[</code><code class="grammar-literal">0-9</code><code class="grammar-brac">]</code> <code class="grammar-alt">|</code> "<code class="grammar-literal">_</code>" <code class="grammar-alt">|</code> "<code class="grammar-literal">.</code>"<code class="grammar-paren">)</code><code class="grammar-plus">+</code></td>
|
80
81
|
</tr>
|
81
82
|
<tr id="grammar-production-HEX">
|
82
83
|
<td>[13]</td>
|
83
84
|
<td><code>HEX</code></td>
|
84
85
|
<td>::=</td>
|
85
|
-
<td
|
86
|
+
<td>"<code class="grammar-literal">#x</code>" <code class="grammar-paren">(</code><code class="grammar-brac">[</code><code class="grammar-literal">a-f</code><code class="grammar-brac">]</code> <code class="grammar-alt">|</code> <code class="grammar-brac">[</code><code class="grammar-literal">A-F</code><code class="grammar-brac">]</code> <code class="grammar-alt">|</code> <code class="grammar-brac">[</code><code class="grammar-literal">0-9</code><code class="grammar-brac">]</code><code class="grammar-paren">)</code><code class="grammar-plus">+</code></td>
|
86
87
|
</tr>
|
87
88
|
<tr id="grammar-production-RANGE">
|
88
89
|
<td>[14]</td>
|
89
90
|
<td><code>RANGE</code></td>
|
90
91
|
<td>::=</td>
|
91
|
-
<td>"<code class="grammar-literal">[</code>" <code>(</code
|
92
|
+
<td>"<code class="grammar-literal">[</code>" <code class="grammar-paren">(</code><code class="grammar-paren">(</code><a href="#grammar-production-R_CHAR">R_CHAR</a> "<code class="grammar-literal">-</code>" <a href="#grammar-production-R_CHAR">R_CHAR</a><code class="grammar-paren">)</code> <code class="grammar-alt">|</code> <code class="grammar-paren">(</code><a href="#grammar-production-HEX">HEX</a> "<code class="grammar-literal">-</code>" <a href="#grammar-production-HEX">HEX</a><code class="grammar-paren">)</code> <code class="grammar-alt">|</code> <a href="#grammar-production-R_CHAR">R_CHAR</a> <code class="grammar-alt">|</code> <a href="#grammar-production-HEX">HEX</a><code class="grammar-paren">)</code><code class="grammar-plus">+</code> "<code class="grammar-literal">-</code>"<code class="grammar-opt">?</code> <code class="grammar-paren">(</code>"<code class="grammar-literal">]</code>" <code class="grammar-diff">-</code> <a href="#grammar-production-LHS">LHS</a><code class="grammar-paren">)</code></td>
|
92
93
|
</tr>
|
93
94
|
<tr id="grammar-production-O_RANGE">
|
94
95
|
<td>[15]</td>
|
95
96
|
<td><code>O_RANGE</code></td>
|
96
97
|
<td>::=</td>
|
97
|
-
<td
|
98
|
+
<td>"<code class="grammar-literal">[^</code>" <code class="grammar-paren">(</code><code class="grammar-paren">(</code><a href="#grammar-production-R_CHAR">R_CHAR</a> "<code class="grammar-literal">-</code>" <a href="#grammar-production-R_CHAR">R_CHAR</a><code class="grammar-paren">)</code> <code class="grammar-alt">|</code> <code class="grammar-paren">(</code><a href="#grammar-production-HEX">HEX</a> "<code class="grammar-literal">-</code>" <a href="#grammar-production-HEX">HEX</a><code class="grammar-paren">)</code> <code class="grammar-alt">|</code> <a href="#grammar-production-R_CHAR">R_CHAR</a> <code class="grammar-alt">|</code> <a href="#grammar-production-HEX">HEX</a><code class="grammar-paren">)</code><code class="grammar-plus">+</code> "<code class="grammar-literal">-</code>"<code class="grammar-opt">?</code> "<code class="grammar-literal">]</code>"</td>
|
98
99
|
</tr>
|
99
100
|
<tr id="grammar-production-STRING1">
|
100
101
|
<td>[16]</td>
|
101
102
|
<td><code>STRING1</code></td>
|
102
103
|
<td>::=</td>
|
103
|
-
<td>'<code class="grammar-literal">"</code>' <code>(</code
|
104
|
+
<td>'<code class="grammar-literal">"</code>' <code class="grammar-paren">(</code><a href="#grammar-production-CHAR">CHAR</a> <code class="grammar-diff">-</code> '<code class="grammar-literal">"</code>'<code class="grammar-paren">)</code><code class="grammar-star">*</code> '<code class="grammar-literal">"</code>'</td>
|
104
105
|
</tr>
|
105
106
|
<tr id="grammar-production-STRING2">
|
106
107
|
<td>[17]</td>
|
107
108
|
<td><code>STRING2</code></td>
|
108
109
|
<td>::=</td>
|
109
|
-
<td>"<code class="grammar-literal">'</code>" <code>(</code
|
110
|
+
<td>"<code class="grammar-literal">'</code>" <code class="grammar-paren">(</code><a href="#grammar-production-CHAR">CHAR</a> <code class="grammar-diff">-</code> "<code class="grammar-literal">'</code>"<code class="grammar-paren">)</code><code class="grammar-star">*</code> "<code class="grammar-literal">'</code>"</td>
|
110
111
|
</tr>
|
111
112
|
<tr id="grammar-production-CHAR">
|
112
113
|
<td>[18]</td>
|
113
114
|
<td><code>CHAR</code></td>
|
114
115
|
<td>::=</td>
|
115
|
-
<td><code>[</code
|
116
|
+
<td><code class="grammar-brac">[</code><code class="grammar-char-escape"><abbr title="horizontal tab">#x09</abbr></code><code class="grammar-char-escape"><abbr title="new line">#x0A</abbr></code><code class="grammar-char-escape"><abbr title="carriage return">#x0D</abbr></code><code class="grammar-brac">]</code> <code class="grammar-alt">|</code> <code class="grammar-brac">[</code><code class="grammar-char-escape"><abbr title="space">#x20</abbr></code><code class="grammar-literal">-</code><code class="grammar-char-escape"><abbr title="unicode U+D7FF">#xD7FF</abbr></code><code class="grammar-brac">]</code> <code class="grammar-alt">|</code> <code class="grammar-brac">[</code><code class="grammar-char-escape"><abbr title="unicode U+E000">#xE000</abbr></code><code class="grammar-literal">-</code><code class="grammar-char-escape"><abbr title="unicode U+FFFD">#xFFFD</abbr></code><code class="grammar-brac">]</code> <code class="grammar-alt">|</code> <code class="grammar-brac">[</code><code class="grammar-char-escape"><abbr title="unicode U+10000">#x00010000</abbr></code><code class="grammar-literal">-</code><code class="grammar-char-escape"><abbr title="unicode U+10FFFF">#x0010FFFF</abbr></code><code class="grammar-brac">]</code></td>
|
116
117
|
</tr>
|
117
118
|
<tr id="grammar-production-R_CHAR">
|
118
119
|
<td>[19]</td>
|
119
120
|
<td><code>R_CHAR</code></td>
|
120
121
|
<td>::=</td>
|
121
|
-
<td><a href="#grammar-production-CHAR">CHAR</a> <code>-</code> <code>(</code>
|
122
|
+
<td><a href="#grammar-production-CHAR">CHAR</a> <code class="grammar-diff">-</code> <code class="grammar-paren">(</code>"<code class="grammar-literal">]</code>" <code class="grammar-alt">|</code> "<code class="grammar-literal">-</code>" <code class="grammar-alt">|</code> <a href="#grammar-production-HEX">HEX</a><code class="grammar-paren">)</code></td>
|
122
123
|
</tr>
|
123
124
|
<tr id="grammar-production-POSTFIX">
|
124
125
|
<td>[20]</td>
|
125
126
|
<td><code>POSTFIX</code></td>
|
126
127
|
<td>::=</td>
|
127
|
-
<td><code>[</code
|
128
|
+
<td><code class="grammar-brac">[</code><code class="grammar-literal">?*+</code><code class="grammar-brac">]</code></td>
|
128
129
|
</tr>
|
129
130
|
<tr id="grammar-production-PASS">
|
130
131
|
<td>[21]</td>
|
131
132
|
<td><code>PASS</code></td>
|
132
133
|
<td>::=</td>
|
133
|
-
<td><code>[</code
|
134
|
+
<td><code class="grammar-brac">[</code><code class="grammar-char-escape"><abbr title="horizontal tab">#x09</abbr></code><code class="grammar-char-escape"><abbr title="new line">#x0A</abbr></code><code class="grammar-char-escape"><abbr title="carriage return">#x0D</abbr></code><code class="grammar-char-escape"><abbr title="space">#x20</abbr></code><code class="grammar-brac">]</code> <code class="grammar-alt">|</code> <code class="grammar-paren">(</code><code class="grammar-paren">(</code><code class="grammar-paren">(</code>"<code class="grammar-literal">#</code>" <code class="grammar-diff">-</code> "<code class="grammar-literal">#x</code>"<code class="grammar-paren">)</code> <code class="grammar-alt">|</code> "<code class="grammar-literal">//</code>"<code class="grammar-paren">)</code> <code class="grammar-brac">[</code><code class="grammar-literal">^</code><code class="grammar-char-escape"><abbr title="new line">#x0A</abbr></code><code class="grammar-char-escape"><abbr title="carriage return">#x0D</abbr></code><code class="grammar-brac">]</code><code class="grammar-star">*</code><code class="grammar-paren">)</code> <code class="grammar-alt">|</code> <code class="grammar-paren">(</code>"<code class="grammar-literal">/*</code>" <code class="grammar-paren">(</code><code class="grammar-paren">(</code>"<code class="grammar-literal">*</code>" <code class="grammar-brac">[</code><code class="grammar-literal">^/</code><code class="grammar-brac">]</code><code class="grammar-paren">)</code><code class="grammar-opt">?</code> <code class="grammar-alt">|</code> <code class="grammar-brac">[</code><code class="grammar-literal">^*</code><code class="grammar-brac">]</code><code class="grammar-paren">)</code><code class="grammar-star">*</code> "<code class="grammar-literal">*/</code>"<code class="grammar-paren">)</code> <code class="grammar-alt">|</code> <code class="grammar-paren">(</code>"<code class="grammar-literal">(*</code>" <code class="grammar-paren">(</code><code class="grammar-paren">(</code>"<code class="grammar-literal">*</code>" <code class="grammar-brac">[</code><code class="grammar-literal">^)</code><code class="grammar-brac">]</code><code class="grammar-paren">)</code><code class="grammar-opt">?</code> <code class="grammar-alt">|</code> <code class="grammar-brac">[</code><code class="grammar-literal">^*</code><code class="grammar-brac">]</code><code class="grammar-paren">)</code><code class="grammar-star">*</code> "<code class="grammar-literal">*)</code>"<code class="grammar-paren">)</code></td>
|
134
135
|
</tr>
|
135
|
-
<tr>
|
136
|
-
<td
|
137
|
-
<td
|
138
|
-
<td><code>(</code> <code>(</code> <code>(</code> "<code class="grammar-literal">#</code>" <code>-</code> "#x"<code>)</code> <code>|</code> "//"<code>)</code> <code>[</code> <code class="grammar-literal">^</code><code class="grammar-char-escape"><abbr title="new line">#x0A</abbr></code><code class="grammar-char-escape"><abbr title="carriage return">#x0D</abbr></code><code>]</code> <code>*</code> <code>)</code></td>
|
139
|
-
</tr>
|
140
|
-
<tr>
|
141
|
-
<td colspan=2></td>
|
142
|
-
<td>|</td>
|
143
|
-
<td><code>(</code> "/*" <code>(</code> <code>(</code> "<code class="grammar-literal">*</code>" <code>[</code> <code class="grammar-literal">^/</code><code>]</code> <code>)</code> <code>?</code> <code>|</code> <code>[</code> <code class="grammar-literal">^*</code><code>]</code> <code>)</code> <code>*</code> "*/"<code>)</code></td>
|
144
|
-
</tr>
|
145
|
-
<tr>
|
146
|
-
<td colspan=2></td>
|
147
|
-
<td>|</td>
|
148
|
-
<td><code>(</code> "(*" <code>(</code> <code>(</code> "<code class="grammar-literal">*</code>" <code>[</code> <code class="grammar-literal">^)</code><code>]</code> <code>)</code> <code>?</code> <code>|</code> <code>[</code> <code class="grammar-literal">^*</code><code>]</code> <code>)</code> <code>*</code> "*)"<code>)</code> </td>
|
149
|
-
</tr>
|
150
|
-
<tr>
|
151
|
-
<td colspan=2>@pass</td>
|
136
|
+
<tr id="grammar-declaration-pass">
|
137
|
+
<td>@pass</td>
|
138
|
+
<td><code></code></td>
|
152
139
|
<td></td>
|
153
140
|
<td><a href="#grammar-production-PASS">PASS</a></td>
|
154
141
|
</tr>
|
data/etc/ebnf.ll1.rb
CHANGED
data/etc/ebnf.peg.rb
CHANGED