ebnf 2.3.3 → 2.3.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c4fb86945b28f51ba07f086e46e5d89e0707bbaa5d59c88c1748c4701d1106e4
4
- data.tar.gz: e7df3a8153bf07c292ccd0aa1d7664583032ecd06a224a48a0485c0f87024fe5
3
+ metadata.gz: 507c2fb1540ade02c7fd97e8379a9da0175025f9658b14f00111748d46ab86a5
4
+ data.tar.gz: 51e580981bec7097249da661cb76c9a2ae0cf97e2a3e87c500494aad9147a603
5
5
  SHA512:
6
- metadata.gz: 0cfe707433ef76136a8e856f5ae6e7eb8e1cb9e6430d762f337f9ce388fa7b055a6dc4538d272fb4c4a91a57b65d888ee0c314d47ba35ec77d9cbae826936810
7
- data.tar.gz: 316d8928d79e585bc00a9667b7ab31f4ab8236863af0526631c5dcf5eeb3d152cf3ac31f188264f43250498bc7f3fe6d735d6b1e06ca99b186cdc1996c553fd6
6
+ metadata.gz: 51486439b64d9ac1fac9cbea93b9326f37cc59e2125d68ba3ecf86e52b2d5aa653bdd83bd2d366ef4f4a1705ce629e4b927c89f03884a380929378ab7f253ca8
7
+ data.tar.gz: f2036691fcd52736d63a615db302ef2efc45220a174740af984768a546e250d1b376d54d606d1a34e3886913c740f5c50dedae2a8ee9962e5d5533aec23c432d
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.3.3
1
+ 2.3.4
data/etc/turtle.html CHANGED
@@ -1,387 +1,336 @@
1
1
 
2
+ <!-- Generated with ebnf version #{EBNF::VERSION}. See https://github.com/dryruby/ebnf. -->
2
3
  <table class="grammar">
3
4
  <tbody id="grammar-productions" class="ebnf">
4
- <tr id="grammar-production-turtleDoc">
5
+ <tr id="grammar-OpenStruct-turtleDoc">
5
6
  <td>[1]</td>
6
- <td><code>turtleDoc</code></td>
7
7
  <td>::=</td>
8
- <td><a href="#grammar-production-statement">statement</a><code>*</code></td>
8
+ <td><a href="#grammar-production-statement">statement</a><code class="grammar-star">*</code></td>
9
9
  </tr>
10
- <tr id="grammar-production-statement">
10
+ <tr id="grammar-OpenStruct-statement">
11
11
  <td>[2]</td>
12
- <td><code>statement</code></td>
13
12
  <td>::=</td>
14
- <td><a href="#grammar-production-directive">directive</a> <code>|</code> <code>(</code><a href="#grammar-production-triples">triples</a> "<code class="grammar-literal">.</code>"<code>)</code></td>
13
+ <td><a href="#grammar-production-directive">directive</a> <code class="grammar-alt">|</code> <code class="grammar-paren">(</code><a href="#grammar-production-triples">triples</a> "<code class="grammar-literal">.</code>"<code class="grammar-paren">)</code></td>
15
14
  </tr>
16
- <tr id="grammar-production-directive">
15
+ <tr id="grammar-OpenStruct-directive">
17
16
  <td>[3]</td>
18
- <td><code>directive</code></td>
19
17
  <td>::=</td>
20
- <td><a href="#grammar-production-prefixID">prefixID</a> <code>|</code> <a href="#grammar-production-base">base</a> <code>|</code> <a href="#grammar-production-sparqlPrefix">sparqlPrefix</a> <code>|</code> <a href="#grammar-production-sparqlBase">sparqlBase</a></td>
18
+ <td><a href="#grammar-production-prefixID">prefixID</a> <code class="grammar-alt">|</code> <a href="#grammar-production-base">base</a> <code class="grammar-alt">|</code> <a href="#grammar-production-sparqlPrefix">sparqlPrefix</a> <code class="grammar-alt">|</code> <a href="#grammar-production-sparqlBase">sparqlBase</a></td>
21
19
  </tr>
22
- <tr id="grammar-production-prefixID">
20
+ <tr id="grammar-OpenStruct-prefixID">
23
21
  <td>[4]</td>
24
- <td><code>prefixID</code></td>
25
22
  <td>::=</td>
26
- <td>&quot;@prefix&quot; <a href="#grammar-production-PNAME_NS">PNAME_NS</a> <a href="#grammar-production-IRIREF">IRIREF</a> "<code class="grammar-literal">.</code>"</td>
23
+ <td>"<code class="grammar-literal">@prefix</code>" <a href="#grammar-production-PNAME_NS">PNAME_NS</a> <a href="#grammar-production-IRIREF">IRIREF</a> "<code class="grammar-literal">.</code>"</td>
27
24
  </tr>
28
- <tr id="grammar-production-base">
25
+ <tr id="grammar-OpenStruct-base">
29
26
  <td>[5]</td>
30
- <td><code>base</code></td>
31
27
  <td>::=</td>
32
- <td>&quot;@base&quot; <a href="#grammar-production-IRIREF">IRIREF</a> "<code class="grammar-literal">.</code>"</td>
28
+ <td>"<code class="grammar-literal">@base</code>" <a href="#grammar-production-IRIREF">IRIREF</a> "<code class="grammar-literal">.</code>"</td>
33
29
  </tr>
34
- <tr id="grammar-production-sparqlPrefix">
30
+ <tr id="grammar-OpenStruct-sparqlPrefix">
35
31
  <td>[28s]</td>
36
- <td><code>sparqlPrefix</code></td>
37
32
  <td>::=</td>
38
33
  <td><a href="#grammar-production-SPARQL_PREFIX">SPARQL_PREFIX</a> <a href="#grammar-production-PNAME_NS">PNAME_NS</a> <a href="#grammar-production-IRIREF">IRIREF</a></td>
39
34
  </tr>
40
- <tr id="grammar-production-sparqlBase">
35
+ <tr id="grammar-OpenStruct-sparqlBase">
41
36
  <td>[29s]</td>
42
- <td><code>sparqlBase</code></td>
43
37
  <td>::=</td>
44
38
  <td><a href="#grammar-production-SPARQL_BASE">SPARQL_BASE</a> <a href="#grammar-production-IRIREF">IRIREF</a></td>
45
39
  </tr>
46
- <tr id="grammar-production-triples">
40
+ <tr id="grammar-OpenStruct-triples">
47
41
  <td>[6]</td>
48
- <td><code>triples</code></td>
49
42
  <td>::=</td>
50
- <td><code>(</code><a href="#grammar-production-subject">subject</a> <a href="#grammar-production-predicateObjectList">predicateObjectList</a><code>)</code> <code>|</code> <code>(</code><a href="#grammar-production-blankNodePropertyList">blankNodePropertyList</a> <a href="#grammar-production-predicateObjectList">predicateObjectList</a><code>?</code><code>)</code></td>
43
+ <td><code class="grammar-paren">(</code><a href="#grammar-production-subject">subject</a> <a href="#grammar-production-predicateObjectList">predicateObjectList</a><code class="grammar-paren">)</code> <code class="grammar-alt">|</code> <code class="grammar-paren">(</code><a href="#grammar-production-blankNodePropertyList">blankNodePropertyList</a> <a href="#grammar-production-predicateObjectList">predicateObjectList</a><code class="grammar-opt">?</code><code class="grammar-paren">)</code></td>
51
44
  </tr>
52
- <tr id="grammar-production-predicateObjectList">
45
+ <tr id="grammar-OpenStruct-predicateObjectList">
53
46
  <td>[7]</td>
54
- <td><code>predicateObjectList</code></td>
55
47
  <td>::=</td>
56
- <td><a href="#grammar-production-verb">verb</a> <a href="#grammar-production-objectList">objectList</a> <code>(</code>"<code class="grammar-literal">;</code>" <code>(</code><a href="#grammar-production-verb">verb</a> <a href="#grammar-production-objectList">objectList</a><code>)</code><code>?</code><code>)</code><code>*</code></td>
48
+ <td><a href="#grammar-production-verb">verb</a> <a href="#grammar-production-objectList">objectList</a> <code class="grammar-paren">(</code>"<code class="grammar-literal">;</code>" <code class="grammar-paren">(</code><a href="#grammar-production-verb">verb</a> <a href="#grammar-production-objectList">objectList</a><code class="grammar-paren">)</code><code class="grammar-opt">?</code><code class="grammar-paren">)</code><code class="grammar-star">*</code></td>
57
49
  </tr>
58
- <tr id="grammar-production-objectList">
50
+ <tr id="grammar-OpenStruct-objectList">
59
51
  <td>[8]</td>
60
- <td><code>objectList</code></td>
61
52
  <td>::=</td>
62
- <td><a href="#grammar-production-object">object</a> <code>(</code>"<code class="grammar-literal">,</code>" <a href="#grammar-production-object">object</a><code>)</code><code>*</code></td>
53
+ <td><a href="#grammar-production-object">object</a> <code class="grammar-paren">(</code>"<code class="grammar-literal">,</code>" <a href="#grammar-production-object">object</a><code class="grammar-paren">)</code><code class="grammar-star">*</code></td>
63
54
  </tr>
64
- <tr id="grammar-production-verb">
55
+ <tr id="grammar-OpenStruct-verb">
65
56
  <td>[9]</td>
66
- <td><code>verb</code></td>
67
57
  <td>::=</td>
68
- <td><a href="#grammar-production-predicate">predicate</a> <code>|</code> "<code class="grammar-literal">a</code>"</td>
58
+ <td><a href="#grammar-production-predicate">predicate</a> <code class="grammar-alt">|</code> "<code class="grammar-literal">a</code>"</td>
69
59
  </tr>
70
- <tr id="grammar-production-subject">
60
+ <tr id="grammar-OpenStruct-subject">
71
61
  <td>[10]</td>
72
- <td><code>subject</code></td>
73
62
  <td>::=</td>
74
- <td><a href="#grammar-production-iri">iri</a> <code>|</code> <a href="#grammar-production-BlankNode">BlankNode</a> <code>|</code> <a href="#grammar-production-collection">collection</a></td>
63
+ <td><a href="#grammar-production-iri">iri</a> <code class="grammar-alt">|</code> <a href="#grammar-production-BlankNode">BlankNode</a> <code class="grammar-alt">|</code> <a href="#grammar-production-collection">collection</a></td>
75
64
  </tr>
76
- <tr id="grammar-production-predicate">
65
+ <tr id="grammar-OpenStruct-predicate">
77
66
  <td>[11]</td>
78
- <td><code>predicate</code></td>
79
67
  <td>::=</td>
80
68
  <td><a href="#grammar-production-iri">iri</a></td>
81
69
  </tr>
82
- <tr id="grammar-production-object">
70
+ <tr id="grammar-OpenStruct-object">
83
71
  <td>[12]</td>
84
- <td><code>object</code></td>
85
72
  <td>::=</td>
86
- <td><a href="#grammar-production-iri">iri</a> <code>|</code> <a href="#grammar-production-BlankNode">BlankNode</a> <code>|</code> <a href="#grammar-production-collection">collection</a> <code>|</code> <a href="#grammar-production-blankNodePropertyList">blankNodePropertyList</a> <code>|</code> <a href="#grammar-production-literal">literal</a></td>
73
+ <td><a href="#grammar-production-iri">iri</a> <code class="grammar-alt">|</code> <a href="#grammar-production-BlankNode">BlankNode</a> <code class="grammar-alt">|</code> <a href="#grammar-production-collection">collection</a> <code class="grammar-alt">|</code> <a href="#grammar-production-blankNodePropertyList">blankNodePropertyList</a> <code class="grammar-alt">|</code> <a href="#grammar-production-literal">literal</a></td>
87
74
  </tr>
88
- <tr id="grammar-production-literal">
75
+ <tr id="grammar-OpenStruct-literal">
89
76
  <td>[13]</td>
90
- <td><code>literal</code></td>
91
77
  <td>::=</td>
92
- <td><a href="#grammar-production-RDFLiteral">RDFLiteral</a> <code>|</code> <a href="#grammar-production-NumericLiteral">NumericLiteral</a> <code>|</code> <a href="#grammar-production-BooleanLiteral">BooleanLiteral</a></td>
78
+ <td><a href="#grammar-production-RDFLiteral">RDFLiteral</a> <code class="grammar-alt">|</code> <a href="#grammar-production-NumericLiteral">NumericLiteral</a> <code class="grammar-alt">|</code> <a href="#grammar-production-BooleanLiteral">BooleanLiteral</a></td>
93
79
  </tr>
94
- <tr id="grammar-production-blankNodePropertyList">
80
+ <tr id="grammar-OpenStruct-blankNodePropertyList">
95
81
  <td>[14]</td>
96
- <td><code>blankNodePropertyList</code></td>
97
82
  <td>::=</td>
98
83
  <td>"<code class="grammar-literal">[</code>" <a href="#grammar-production-predicateObjectList">predicateObjectList</a> "<code class="grammar-literal">]</code>"</td>
99
84
  </tr>
100
- <tr id="grammar-production-collection">
85
+ <tr id="grammar-OpenStruct-collection">
101
86
  <td>[15]</td>
102
- <td><code>collection</code></td>
103
87
  <td>::=</td>
104
- <td>"<code class="grammar-literal">(</code>" <a href="#grammar-production-object">object</a><code>*</code> "<code class="grammar-literal">)</code>"</td>
88
+ <td>"<code class="grammar-literal">(</code>" <a href="#grammar-production-object">object</a><code class="grammar-star">*</code> "<code class="grammar-literal">)</code>"</td>
105
89
  </tr>
106
- <tr id="grammar-production-NumericLiteral">
90
+ <tr id="grammar-OpenStruct-NumericLiteral">
107
91
  <td>[16]</td>
108
- <td><code>NumericLiteral</code></td>
109
92
  <td>::=</td>
110
- <td><a href="#grammar-production-INTEGER">INTEGER</a> <code>|</code> <a href="#grammar-production-DECIMAL">DECIMAL</a> <code>|</code> <a href="#grammar-production-DOUBLE">DOUBLE</a></td>
93
+ <td><a href="#grammar-production-INTEGER">INTEGER</a> <code class="grammar-alt">|</code> <a href="#grammar-production-DECIMAL">DECIMAL</a> <code class="grammar-alt">|</code> <a href="#grammar-production-DOUBLE">DOUBLE</a></td>
111
94
  </tr>
112
- <tr id="grammar-production-RDFLiteral">
95
+ <tr id="grammar-OpenStruct-RDFLiteral">
113
96
  <td>[128s]</td>
114
- <td><code>RDFLiteral</code></td>
115
97
  <td>::=</td>
116
- <td><a href="#grammar-production-String">String</a> <code>(</code><a href="#grammar-production-LANGTAG">LANGTAG</a> <code>|</code> <code>(</code>&quot;^^&quot; <a href="#grammar-production-iri">iri</a><code>)</code><code>)</code><code>?</code></td>
98
+ <td><a href="#grammar-production-String">String</a> <code class="grammar-paren">(</code><a href="#grammar-production-LANGTAG">LANGTAG</a> <code class="grammar-alt">|</code> <code class="grammar-paren">(</code>"<code class="grammar-literal">^^</code>" <a href="#grammar-production-iri">iri</a><code class="grammar-paren">)</code><code class="grammar-paren">)</code><code class="grammar-opt">?</code></td>
117
99
  </tr>
118
- <tr id="grammar-production-BooleanLiteral">
100
+ <tr id="grammar-OpenStruct-BooleanLiteral">
119
101
  <td>[133s]</td>
120
- <td><code>BooleanLiteral</code></td>
121
102
  <td>::=</td>
122
- <td>&quot;true&quot; <code>|</code> &quot;false&quot;</td>
103
+ <td>"<code class="grammar-literal">true</code>" <code class="grammar-alt">|</code> "<code class="grammar-literal">false</code>"</td>
123
104
  </tr>
124
- <tr id="grammar-production-String">
105
+ <tr id="grammar-OpenStruct-String">
125
106
  <td>[17]</td>
126
- <td><code>String</code></td>
127
107
  <td>::=</td>
128
- <td><a href="#grammar-production-STRING_LITERAL_QUOTE">STRING_LITERAL_QUOTE</a> <code>|</code> <a href="#grammar-production-STRING_LITERAL_SINGLE_QUOTE">STRING_LITERAL_SINGLE_QUOTE</a> <code>|</code> <a href="#grammar-production-STRING_LITERAL_LONG_SINGLE_QUOTE">STRING_LITERAL_LONG_SINGLE_QUOTE</a> <code>|</code> <a href="#grammar-production-STRING_LITERAL_LONG_QUOTE">STRING_LITERAL_LONG_QUOTE</a></td>
108
+ <td><a href="#grammar-production-STRING_LITERAL_QUOTE">STRING_LITERAL_QUOTE</a> <code class="grammar-alt">|</code> <a href="#grammar-production-STRING_LITERAL_SINGLE_QUOTE">STRING_LITERAL_SINGLE_QUOTE</a> <code class="grammar-alt">|</code> <a href="#grammar-production-STRING_LITERAL_LONG_SINGLE_QUOTE">STRING_LITERAL_LONG_SINGLE_QUOTE</a> <code class="grammar-alt">|</code> <a href="#grammar-production-STRING_LITERAL_LONG_QUOTE">STRING_LITERAL_LONG_QUOTE</a></td>
129
109
  </tr>
130
- <tr id="grammar-production-iri">
110
+ <tr id="grammar-OpenStruct-iri">
131
111
  <td>[135s]</td>
132
- <td><code>iri</code></td>
133
112
  <td>::=</td>
134
- <td><a href="#grammar-production-IRIREF">IRIREF</a> <code>|</code> <a href="#grammar-production-PrefixedName">PrefixedName</a></td>
113
+ <td><a href="#grammar-production-IRIREF">IRIREF</a> <code class="grammar-alt">|</code> <a href="#grammar-production-PrefixedName">PrefixedName</a></td>
135
114
  </tr>
136
- <tr id="grammar-production-PrefixedName">
115
+ <tr id="grammar-OpenStruct-PrefixedName">
137
116
  <td>[136s]</td>
138
- <td><code>PrefixedName</code></td>
139
117
  <td>::=</td>
140
- <td><a href="#grammar-production-PNAME_LN">PNAME_LN</a> <code>|</code> <a href="#grammar-production-PNAME_NS">PNAME_NS</a></td>
118
+ <td><a href="#grammar-production-PNAME_LN">PNAME_LN</a> <code class="grammar-alt">|</code> <a href="#grammar-production-PNAME_NS">PNAME_NS</a></td>
141
119
  </tr>
142
- <tr id="grammar-production-BlankNode">
120
+ <tr id="grammar-OpenStruct-BlankNode">
143
121
  <td>[137s]</td>
144
- <td><code>BlankNode</code></td>
145
122
  <td>::=</td>
146
- <td><a href="#grammar-production-BLANK_NODE_LABEL">BLANK_NODE_LABEL</a> <code>|</code> <a href="#grammar-production-ANON">ANON</a></td>
123
+ <td><a href="#grammar-production-BLANK_NODE_LABEL">BLANK_NODE_LABEL</a> <code class="grammar-alt">|</code> <a href="#grammar-production-ANON">ANON</a></td>
147
124
  </tr>
148
- <tr>
149
- <td colspan=2>@terminals</td>
125
+ <tr id="grammar-declaration-terminals">
126
+ <td>@terminals</td>
150
127
  <td></td>
151
128
  <td><strong># Productions for terminals</strong></td>
152
129
  </tr>
153
- <tr id="grammar-production-IRIREF">
130
+ <tr id="grammar-OpenStruct-IRIREF">
154
131
  <td>[18]</td>
155
- <td><code>IRIREF</code></td>
156
132
  <td>::=</td>
157
- <td>"<code class="grammar-literal">&lt;</code>" <code>(</code><code>[</code><code class="grammar-literal">^&lt;&gt;&quot;{}|^`]-[</code><code class="grammar-char-escape"><abbr title="null">#x00</abbr></code><code class="grammar-literal">-</code><code class="grammar-char-escape"><abbr title="space">#x20</abbr></code><code>]</code> <code>|</code> <a href="#grammar-production-UCHAR">UCHAR</a><code>)</code><code>*</code> "<code class="grammar-literal">&gt;</code>"</td>
133
+ <td>"<code class="grammar-literal">&lt;</code>" <code class="grammar-paren">(</code><code class="grammar-paren">(</code><code class="grammar-brac">[</code><code class="grammar-literal">^&lt;&gt;&quot;{}|^`\</code><code class="grammar-brac">]</code> <code class="grammar-diff">-</code> <code class="grammar-brac">[</code><code class="grammar-char-escape"><abbr title="null">#x00</abbr></code><code class="grammar-literal">-</code><code class="grammar-char-escape"><abbr title="space">#x20</abbr></code><code class="grammar-brac">]</code><code class="grammar-paren">)</code> <code class="grammar-alt">|</code> <a href="#grammar-production-UCHAR">UCHAR</a><code class="grammar-paren">)</code><code class="grammar-star">*</code> "<code class="grammar-literal">&gt;</code>"</td>
158
134
  </tr>
159
- <tr id="grammar-production-PNAME_NS">
135
+ <tr id="grammar-OpenStruct-PNAME_NS">
160
136
  <td>[139s]</td>
161
- <td><code>PNAME_NS</code></td>
162
137
  <td>::=</td>
163
- <td><a href="#grammar-production-PN_PREFIX">PN_PREFIX</a><code>?</code> "<code class="grammar-literal">:</code>"</td>
138
+ <td><a href="#grammar-production-PN_PREFIX">PN_PREFIX</a><code class="grammar-opt">?</code> "<code class="grammar-literal">:</code>"</td>
164
139
  </tr>
165
- <tr id="grammar-production-PNAME_LN">
140
+ <tr id="grammar-OpenStruct-PNAME_LN">
166
141
  <td>[140s]</td>
167
- <td><code>PNAME_LN</code></td>
168
142
  <td>::=</td>
169
143
  <td><a href="#grammar-production-PNAME_NS">PNAME_NS</a> <a href="#grammar-production-PN_LOCAL">PN_LOCAL</a></td>
170
144
  </tr>
171
- <tr id="grammar-production-BLANK_NODE_LABEL">
145
+ <tr id="grammar-OpenStruct-BLANK_NODE_LABEL">
172
146
  <td>[141s]</td>
173
- <td><code>BLANK_NODE_LABEL</code></td>
174
147
  <td>::=</td>
175
- <td>&quot;_:&quot; <code>(</code><a href="#grammar-production-PN_CHARS_U">PN_CHARS_U</a> <code>|</code> <code>[</code><code class="grammar-literal">0-9</code><code>]</code><code>)</code> <code>(</code><code>(</code><a href="#grammar-production-PN_CHARS">PN_CHARS</a> <code>|</code> "<code class="grammar-literal">.</code>"<code>)</code><code>*</code> <a href="#grammar-production-PN_CHARS">PN_CHARS</a><code>)</code><code>?</code></td>
148
+ <td>"<code class="grammar-literal">_:</code>" <code class="grammar-paren">(</code><a href="#grammar-production-PN_CHARS_U">PN_CHARS_U</a> <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-paren">(</code><code class="grammar-paren">(</code><a href="#grammar-production-PN_CHARS">PN_CHARS</a> <code class="grammar-alt">|</code> "<code class="grammar-literal">.</code>"<code class="grammar-paren">)</code><code class="grammar-star">*</code> <a href="#grammar-production-PN_CHARS">PN_CHARS</a><code class="grammar-paren">)</code><code class="grammar-opt">?</code></td>
176
149
  </tr>
177
- <tr id="grammar-production-LANGTAG">
150
+ <tr id="grammar-OpenStruct-LANGTAG">
178
151
  <td>[144s]</td>
179
- <td><code>LANGTAG</code></td>
180
152
  <td>::=</td>
181
- <td>"<code class="grammar-literal">@</code>" <code>[</code><code class="grammar-literal">a-zA-Z</code><code>]</code><code>+</code> <code>(</code>"<code class="grammar-literal">-</code>" <code>[</code><code class="grammar-literal">a-zA-Z0-9</code><code>]</code><code>+</code><code>)</code><code>*</code></td>
153
+ <td>"<code class="grammar-literal">@</code>" <code class="grammar-brac">[</code><code class="grammar-literal">a-zA-Z</code><code class="grammar-brac">]</code><code class="grammar-plus">+</code> <code class="grammar-paren">(</code>"<code class="grammar-literal">-</code>" <code class="grammar-brac">[</code><code class="grammar-literal">a-zA-Z0-9</code><code class="grammar-brac">]</code><code class="grammar-plus">+</code><code class="grammar-paren">)</code><code class="grammar-star">*</code></td>
182
154
  </tr>
183
- <tr id="grammar-production-INTEGER">
155
+ <tr id="grammar-OpenStruct-INTEGER">
184
156
  <td>[19]</td>
185
- <td><code>INTEGER</code></td>
186
157
  <td>::=</td>
187
- <td><code>[</code><code class="grammar-literal">+-</code><code>]</code><code>?</code> <code>[</code><code class="grammar-literal">0-9</code><code>]</code><code>+</code></td>
158
+ <td><code class="grammar-brac">[</code><code class="grammar-literal">+-</code><code class="grammar-brac">]</code><code class="grammar-opt">?</code> <code class="grammar-brac">[</code><code class="grammar-literal">0-9</code><code class="grammar-brac">]</code><code class="grammar-plus">+</code></td>
188
159
  </tr>
189
- <tr id="grammar-production-DECIMAL">
160
+ <tr id="grammar-OpenStruct-DECIMAL">
190
161
  <td>[20]</td>
191
- <td><code>DECIMAL</code></td>
192
162
  <td>::=</td>
193
- <td><code>[</code><code class="grammar-literal">+-</code><code>]</code><code>?</code> <code>(</code><code>[</code><code class="grammar-literal">0-9</code><code>]</code><code>*</code> "<code class="grammar-literal">.</code>" <code>[</code><code class="grammar-literal">0-9</code><code>]</code><code>+</code><code>)</code></td>
163
+ <td><code class="grammar-brac">[</code><code class="grammar-literal">+-</code><code class="grammar-brac">]</code><code class="grammar-opt">?</code> <code class="grammar-paren">(</code><code class="grammar-brac">[</code><code class="grammar-literal">0-9</code><code class="grammar-brac">]</code><code class="grammar-star">*</code> "<code class="grammar-literal">.</code>" <code class="grammar-brac">[</code><code class="grammar-literal">0-9</code><code class="grammar-brac">]</code><code class="grammar-plus">+</code><code class="grammar-paren">)</code></td>
194
164
  </tr>
195
- <tr id="grammar-production-DOUBLE">
165
+ <tr id="grammar-OpenStruct-DOUBLE">
196
166
  <td>[21]</td>
197
- <td><code>DOUBLE</code></td>
198
167
  <td>::=</td>
199
- <td><code>[</code><code class="grammar-literal">+-</code><code>]</code><code>?</code> <code>(</code><code>(</code><code>[</code><code class="grammar-literal">0-9</code><code>]</code><code>+</code> "<code class="grammar-literal">.</code>" <code>[</code><code class="grammar-literal">0-9</code><code>]</code><code>*</code> <a href="#grammar-production-EXPONENT">EXPONENT</a><code>)</code> <code>|</code> <code>(</code>"<code class="grammar-literal">.</code>" <code>[</code><code class="grammar-literal">0-9</code><code>]</code><code>+</code> <a href="#grammar-production-EXPONENT">EXPONENT</a><code>)</code> <code>|</code> <code>(</code><code>[</code><code class="grammar-literal">0-9</code><code>]</code><code>+</code> <a href="#grammar-production-EXPONENT">EXPONENT</a><code>)</code><code>)</code></td>
168
+ <td><code class="grammar-brac">[</code><code class="grammar-literal">+-</code><code class="grammar-brac">]</code><code class="grammar-opt">?</code> <code class="grammar-paren">(</code><code class="grammar-paren">(</code><code class="grammar-brac">[</code><code class="grammar-literal">0-9</code><code class="grammar-brac">]</code><code class="grammar-plus">+</code> "<code class="grammar-literal">.</code>" <code class="grammar-brac">[</code><code class="grammar-literal">0-9</code><code class="grammar-brac">]</code><code class="grammar-star">*</code> <a href="#grammar-production-EXPONENT">EXPONENT</a><code class="grammar-paren">)</code> <code class="grammar-alt">|</code> <code class="grammar-paren">(</code>"<code class="grammar-literal">.</code>" <code class="grammar-brac">[</code><code class="grammar-literal">0-9</code><code class="grammar-brac">]</code><code class="grammar-plus">+</code> <a href="#grammar-production-EXPONENT">EXPONENT</a><code class="grammar-paren">)</code> <code class="grammar-alt">|</code> <code class="grammar-paren">(</code><code class="grammar-brac">[</code><code class="grammar-literal">0-9</code><code class="grammar-brac">]</code><code class="grammar-plus">+</code> <a href="#grammar-production-EXPONENT">EXPONENT</a><code class="grammar-paren">)</code><code class="grammar-paren">)</code></td>
200
169
  </tr>
201
- <tr id="grammar-production-EXPONENT">
170
+ <tr id="grammar-OpenStruct-EXPONENT">
202
171
  <td>[154s]</td>
203
- <td><code>EXPONENT</code></td>
204
172
  <td>::=</td>
205
- <td><code>[</code><code class="grammar-literal">eE</code><code>]</code> <code>[</code><code class="grammar-literal">+-</code><code>]</code><code>?</code> <code>[</code><code class="grammar-literal">0-9</code><code>]</code><code>+</code></td>
173
+ <td><code class="grammar-brac">[</code><code class="grammar-literal">eE</code><code class="grammar-brac">]</code> <code class="grammar-brac">[</code><code class="grammar-literal">+-</code><code class="grammar-brac">]</code><code class="grammar-opt">?</code> <code class="grammar-brac">[</code><code class="grammar-literal">0-9</code><code class="grammar-brac">]</code><code class="grammar-plus">+</code></td>
206
174
  </tr>
207
- <tr id="grammar-production-STRING_LITERAL_QUOTE">
175
+ <tr id="grammar-OpenStruct-STRING_LITERAL_QUOTE">
208
176
  <td>[22]</td>
209
- <td><code>STRING_LITERAL_QUOTE</code></td>
210
177
  <td>::=</td>
211
- <td>'<code class="grammar-literal">&quot;</code>' <code>(</code><code>[</code><code class="grammar-literal">^</code><code class="grammar-char-escape"><abbr title="quot">>&quot;</abbr></code><code class="grammar-char-escape"><abbr title="ascii '\'">#x5C</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>]</code> <code>|</code> <a href="#grammar-production-ECHAR">ECHAR</a> <code>|</code> <a href="#grammar-production-UCHAR">UCHAR</a><code>)</code><code>*</code> '<code class="grammar-literal">&quot;</code>'</td>
178
+ <td>'<code class="grammar-literal">&quot;</code>' <code class="grammar-paren">(</code><code class="grammar-brac">[</code><code class="grammar-literal">^</code><code class="grammar-char-escape"><abbr title="quot">>&quot;</abbr></code><code class="grammar-char-escape"><abbr title="ascii '\'">#x5C</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> <a href="#grammar-production-ECHAR">ECHAR</a> <code class="grammar-alt">|</code> <a href="#grammar-production-UCHAR">UCHAR</a><code class="grammar-paren">)</code><code class="grammar-star">*</code> '<code class="grammar-literal">&quot;</code>'</td>
212
179
  </tr>
213
- <tr id="grammar-production-STRING_LITERAL_SINGLE_QUOTE">
180
+ <tr id="grammar-OpenStruct-STRING_LITERAL_SINGLE_QUOTE">
214
181
  <td>[23]</td>
215
- <td><code>STRING_LITERAL_SINGLE_QUOTE</code></td>
216
182
  <td>::=</td>
217
- <td>"<code class="grammar-literal">&apos;</code>" <code>(</code><code>[</code><code class="grammar-literal">^</code><code class="grammar-char-escape"><abbr title="ascii '&apos;'">#x27</abbr></code><code class="grammar-char-escape"><abbr title="ascii '\'">#x5C</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>]</code> <code>|</code> <a href="#grammar-production-ECHAR">ECHAR</a> <code>|</code> <a href="#grammar-production-UCHAR">UCHAR</a><code>)</code><code>*</code> "<code class="grammar-literal">&apos;</code>"</td>
183
+ <td>"<code class="grammar-literal">&apos;</code>" <code class="grammar-paren">(</code><code class="grammar-brac">[</code><code class="grammar-literal">^</code><code class="grammar-char-escape"><abbr title="ascii '&apos;'">#x27</abbr></code><code class="grammar-char-escape"><abbr title="ascii '\'">#x5C</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> <a href="#grammar-production-ECHAR">ECHAR</a> <code class="grammar-alt">|</code> <a href="#grammar-production-UCHAR">UCHAR</a><code class="grammar-paren">)</code><code class="grammar-star">*</code> "<code class="grammar-literal">&apos;</code>"</td>
218
184
  </tr>
219
- <tr id="grammar-production-STRING_LITERAL_LONG_SINGLE_QUOTE">
185
+ <tr id="grammar-OpenStruct-STRING_LITERAL_LONG_SINGLE_QUOTE">
220
186
  <td>[24]</td>
221
- <td><code>STRING_LITERAL_LONG_SINGLE_QUOTE</code></td>
222
187
  <td>::=</td>
223
- <td>&quot;&apos;&apos;&apos;&quot; <code>(</code><code>(</code>"<code class="grammar-literal">&apos;</code>" <code>|</code> &quot;&apos;&apos;&quot;<code>)</code><code>?</code> <code>[</code><code class="grammar-literal">^&apos;]</code><code class="grammar-char-escape"><abbr title="space">#x20</abbr></code><code class="grammar-literal">|</code><code class="grammar-char-escape"><abbr title="space">#x20</abbr></code><code class="grammar-literal">ECHAR</code><code class="grammar-char-escape"><abbr title="space">#x20</abbr></code><code class="grammar-literal">|</code><code class="grammar-char-escape"><abbr title="space">#x20</abbr></code><code class="grammar-literal">UCHAR</code><code class="grammar-char-escape"><abbr title="space">#x20</abbr></code><code class="grammar-literal">)</code><code class="grammar-char-escape"><abbr title="space">#x20</abbr></code><code class="grammar-literal">)*</code><code class="grammar-char-escape"><abbr title="space">#x20</abbr></code><code class="grammar-literal">&quot;&apos;&apos;&apos;&quot;</code><code>]</code><code>)</code></td>
188
+ <td>"<code class="grammar-literal">&apos;&apos;&apos;</code>" <code class="grammar-paren">(</code><code class="grammar-paren">(</code>"<code class="grammar-literal">&apos;</code>" <code class="grammar-alt">|</code> "<code class="grammar-literal">&apos;&apos;</code>"<code class="grammar-paren">)</code><code class="grammar-opt">?</code> <code class="grammar-paren">(</code><code class="grammar-brac">[</code><code class="grammar-literal">^&apos;\</code><code class="grammar-brac">]</code> <code class="grammar-alt">|</code> <a href="#grammar-production-ECHAR">ECHAR</a> <code class="grammar-alt">|</code> <a href="#grammar-production-UCHAR">UCHAR</a><code class="grammar-paren">)</code><code class="grammar-paren">)</code><code class="grammar-star">*</code> "<code class="grammar-literal">&apos;&apos;&apos;</code>"</td>
224
189
  </tr>
225
- <tr id="grammar-production-STRING_LITERAL_LONG_QUOTE">
190
+ <tr id="grammar-OpenStruct-STRING_LITERAL_LONG_QUOTE">
226
191
  <td>[25]</td>
227
- <td><code>STRING_LITERAL_LONG_QUOTE</code></td>
228
192
  <td>::=</td>
229
- <td>&apos;&quot;&quot;&quot;&apos; <code>(</code><code>(</code>'<code class="grammar-literal">&quot;</code>' <code>|</code> &apos;&quot;&quot;&apos;<code>)</code><code>?</code> <code>[</code><code class="grammar-literal">^&quot;]</code><code class="grammar-char-escape"><abbr title="space">#x20</abbr></code><code class="grammar-literal">|</code><code class="grammar-char-escape"><abbr title="space">#x20</abbr></code><code class="grammar-literal">ECHAR</code><code class="grammar-char-escape"><abbr title="space">#x20</abbr></code><code class="grammar-literal">|</code><code class="grammar-char-escape"><abbr title="space">#x20</abbr></code><code class="grammar-literal">UCHAR</code><code class="grammar-char-escape"><abbr title="space">#x20</abbr></code><code class="grammar-literal">)</code><code class="grammar-char-escape"><abbr title="space">#x20</abbr></code><code class="grammar-literal">)*</code><code class="grammar-char-escape"><abbr title="space">#x20</abbr></code><code class="grammar-literal">&apos;&quot;&quot;&quot;&apos;</code><code>]</code><code>)</code></td>
193
+ <td>'<code class="grammar-literal">&quot;&quot;&quot;</code>' <code class="grammar-paren">(</code><code class="grammar-paren">(</code>'<code class="grammar-literal">&quot;</code>' <code class="grammar-alt">|</code> '<code class="grammar-literal">&quot;&quot;</code>'<code class="grammar-paren">)</code><code class="grammar-opt">?</code> <code class="grammar-paren">(</code><code class="grammar-brac">[</code><code class="grammar-literal">^&quot;\</code><code class="grammar-brac">]</code> <code class="grammar-alt">|</code> <a href="#grammar-production-ECHAR">ECHAR</a> <code class="grammar-alt">|</code> <a href="#grammar-production-UCHAR">UCHAR</a><code class="grammar-paren">)</code><code class="grammar-paren">)</code><code class="grammar-star">*</code> '<code class="grammar-literal">&quot;&quot;&quot;</code>'</td>
230
194
  </tr>
231
- <tr id="grammar-production-UCHAR">
195
+ <tr id="grammar-OpenStruct-UCHAR">
232
196
  <td>[26]</td>
233
- <td><code>UCHAR</code></td>
234
197
  <td>::=</td>
235
- <td><code>(</code>"<code class="grammar-literal">u</code>" <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a><code>)</code> <code>|</code> <code>(</code>"<code class="grammar-literal">U</code>" <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a><code>)</code></td>
198
+ <td><code class="grammar-paren">(</code>"<code class="grammar-literal">u</code>" <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a><code class="grammar-paren">)</code> <code class="grammar-alt">|</code> <code class="grammar-paren">(</code>"<code class="grammar-literal">U</code>" <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a><code class="grammar-paren">)</code></td>
236
199
  </tr>
237
- <tr id="grammar-production-ECHAR">
200
+ <tr id="grammar-OpenStruct-ECHAR">
238
201
  <td>[159s]</td>
239
- <td><code>ECHAR</code></td>
240
202
  <td>::=</td>
241
- <td>"<code class="grammar-literal">\</code>" <code>[</code><code class="grammar-literal">tbnrf&quot;&apos;</code><code>]</code></td>
203
+ <td>"<code class="grammar-literal">\</code>" <code class="grammar-brac">[</code><code class="grammar-literal">tbnrf&quot;&apos;</code><code class="grammar-brac">]</code></td>
242
204
  </tr>
243
- <tr id="grammar-production-SPARQL_PREFIX">
205
+ <tr id="grammar-OpenStruct-SPARQL_PREFIX">
244
206
  <td>[28t]</td>
245
- <td><code>SPARQL_PREFIX</code></td>
246
207
  <td>::=</td>
247
- <td><code>[</code><code class="grammar-literal">Pp</code><code>]</code> <code>[</code><code class="grammar-literal">Rr</code><code>]</code> <code>[</code><code class="grammar-literal">Ee</code><code>]</code> <code>[</code><code class="grammar-literal">Ff</code><code>]</code> <code>[</code><code class="grammar-literal">Ii</code><code>]</code> <code>[</code><code class="grammar-literal">Xx</code><code>]</code></td>
208
+ <td><code class="grammar-brac">[</code><code class="grammar-literal">Pp</code><code class="grammar-brac">]</code> <code class="grammar-brac">[</code><code class="grammar-literal">Rr</code><code class="grammar-brac">]</code> <code class="grammar-brac">[</code><code class="grammar-literal">Ee</code><code class="grammar-brac">]</code> <code class="grammar-brac">[</code><code class="grammar-literal">Ff</code><code class="grammar-brac">]</code> <code class="grammar-brac">[</code><code class="grammar-literal">Ii</code><code class="grammar-brac">]</code> <code class="grammar-brac">[</code><code class="grammar-literal">Xx</code><code class="grammar-brac">]</code></td>
248
209
  </tr>
249
- <tr id="grammar-production-SPARQL_BASE">
210
+ <tr id="grammar-OpenStruct-SPARQL_BASE">
250
211
  <td>[29t]</td>
251
- <td><code>SPARQL_BASE</code></td>
252
212
  <td>::=</td>
253
- <td><code>[</code><code class="grammar-literal">Bb</code><code>]</code> <code>[</code><code class="grammar-literal">Aa</code><code>]</code> <code>[</code><code class="grammar-literal">Ss</code><code>]</code> <code>[</code><code class="grammar-literal">Ee</code><code>]</code></td>
213
+ <td><code class="grammar-brac">[</code><code class="grammar-literal">Bb</code><code class="grammar-brac">]</code> <code class="grammar-brac">[</code><code class="grammar-literal">Aa</code><code class="grammar-brac">]</code> <code class="grammar-brac">[</code><code class="grammar-literal">Ss</code><code class="grammar-brac">]</code> <code class="grammar-brac">[</code><code class="grammar-literal">Ee</code><code class="grammar-brac">]</code></td>
254
214
  </tr>
255
- <tr id="grammar-production-WS">
215
+ <tr id="grammar-OpenStruct-WS">
256
216
  <td>[161s]</td>
257
- <td><code>WS</code></td>
258
217
  <td>::=</td>
259
- <td><code class="grammar-char-escape"><abbr title="space">#x20</abbr></code> <code>|</code> <code class="grammar-char-escape"><abbr title="horizontal tab">#x09</abbr></code> <code>|</code> <code class="grammar-char-escape"><abbr title="carriage return">#x0D</abbr></code> <code>|</code> <code class="grammar-char-escape"><abbr title="new line">#x0A</abbr></code></td>
218
+ <td><code class="grammar-char-escape"><abbr title="space">#x20</abbr></code> <code class="grammar-alt">|</code> <code class="grammar-char-escape"><abbr title="horizontal tab">#x09</abbr></code> <code class="grammar-alt">|</code> <code class="grammar-char-escape"><abbr title="carriage return">#x0D</abbr></code> <code class="grammar-alt">|</code> <code class="grammar-char-escape"><abbr title="new line">#x0A</abbr></code></td>
260
219
  </tr>
261
- <tr id="grammar-production-ANON">
220
+ <tr id="grammar-OpenStruct-ANON">
262
221
  <td>[162s]</td>
263
- <td><code>ANON</code></td>
264
222
  <td>::=</td>
265
- <td>"<code class="grammar-literal">[</code>" <a href="#grammar-production-WS">WS</a><code>*</code> "<code class="grammar-literal">]</code>"</td>
223
+ <td>"<code class="grammar-literal">[</code>" <a href="#grammar-production-WS">WS</a><code class="grammar-star">*</code> "<code class="grammar-literal">]</code>"</td>
266
224
  </tr>
267
225
  <tr id="grammar-production-PN_CHARS_BASE">
268
226
  <td>[163s]</td>
269
- <td><code>PN_CHARS_BASE</code></td>
270
227
  <td>::=</td>
271
- <td><code>[</code><code class="grammar-literal">A-Z</code><code>]</code></td>
228
+ <td><code class="grammar-brac">[</code><code class="grammar-literal">A-Z</code><code class="grammar-brac">]</code></td>
272
229
  </tr>
273
230
  <tr>
274
231
  <td colspan=2></td>
275
- <td>|</td>
276
- <td><code>[</code><code class="grammar-literal">a-z</code><code>]</code></td>
232
+ <td><code class="grammar-alt">|</code></td>
233
+ <td><code class="grammar-brac">[</code><code class="grammar-literal">a-z</code><code class="grammar-brac">]</code></td>
277
234
  </tr>
278
235
  <tr>
279
236
  <td colspan=2></td>
280
- <td>|</td>
281
- <td><code>[</code><code class="grammar-char-escape"><abbr title="extended ascii '#xC0'">#xC0</abbr></code><code class="grammar-literal">-</code><code class="grammar-char-escape"><abbr title="extended ascii '#xD6'">#xD6</abbr></code><code>]</code></td>
237
+ <td><code class="grammar-alt">|</code></td>
238
+ <td><code class="grammar-brac">[</code><code class="grammar-char-escape"><abbr title="extended ascii '#xC0'">#xC0</abbr></code><code class="grammar-literal">-</code><code class="grammar-char-escape"><abbr title="extended ascii '#xD6'">#xD6</abbr></code><code class="grammar-brac">]</code></td>
282
239
  </tr>
283
240
  <tr>
284
241
  <td colspan=2></td>
285
- <td>|</td>
286
- <td><code>[</code><code class="grammar-char-escape"><abbr title="extended ascii '#xD8'">#xD8</abbr></code><code class="grammar-literal">-</code><code class="grammar-char-escape"><abbr title="extended ascii '#xF6'">#xF6</abbr></code><code>]</code></td>
242
+ <td><code class="grammar-alt">|</code></td>
243
+ <td><code class="grammar-brac">[</code><code class="grammar-char-escape"><abbr title="extended ascii '#xD8'">#xD8</abbr></code><code class="grammar-literal">-</code><code class="grammar-char-escape"><abbr title="extended ascii '#xF6'">#xF6</abbr></code><code class="grammar-brac">]</code></td>
287
244
  </tr>
288
245
  <tr>
289
246
  <td colspan=2></td>
290
- <td>|</td>
291
- <td><code>[</code><code class="grammar-char-escape"><abbr title="extended ascii '#xF8'">#xF8</abbr></code><code class="grammar-literal">-</code><code class="grammar-char-escape"><abbr title="unicode 'Graphic'">#x02FF</abbr></code><code>]</code></td>
247
+ <td><code class="grammar-alt">|</code></td>
248
+ <td><code class="grammar-brac">[</code><code class="grammar-char-escape"><abbr title="extended ascii '#xF8'">#xF8</abbr></code><code class="grammar-literal">-</code><code class="grammar-char-escape"><abbr title="unicode 'Graphic'">#x02FF</abbr></code><code class="grammar-brac">]</code></td>
292
249
  </tr>
293
250
  <tr>
294
251
  <td colspan=2></td>
295
- <td>|</td>
296
- <td><code>[</code><code class="grammar-char-escape"><abbr title="unicode 'Graphic'">#x0370</abbr></code><code class="grammar-literal">-</code><code class="grammar-char-escape"><abbr title="unicode 'Graphic'">#x037D</abbr></code><code>]</code></td>
252
+ <td><code class="grammar-alt">|</code></td>
253
+ <td><code class="grammar-brac">[</code><code class="grammar-char-escape"><abbr title="unicode 'Graphic'">#x0370</abbr></code><code class="grammar-literal">-</code><code class="grammar-char-escape"><abbr title="unicode 'Graphic'">#x037D</abbr></code><code class="grammar-brac">]</code></td>
297
254
  </tr>
298
255
  <tr>
299
256
  <td colspan=2></td>
300
- <td>|</td>
301
- <td><code>[</code><code class="grammar-char-escape"><abbr title="unicode 'Graphic'">#x037F</abbr></code><code class="grammar-literal">-</code><code class="grammar-char-escape"><abbr title="unicode 'Reserved'">#x1FFF</abbr></code><code>]</code></td>
257
+ <td><code class="grammar-alt">|</code></td>
258
+ <td><code class="grammar-brac">[</code><code class="grammar-char-escape"><abbr title="unicode 'Graphic'">#x037F</abbr></code><code class="grammar-literal">-</code><code class="grammar-char-escape"><abbr title="unicode 'Reserved'">#x1FFF</abbr></code><code class="grammar-brac">]</code></td>
302
259
  </tr>
303
260
  <tr>
304
261
  <td colspan=2></td>
305
- <td>|</td>
306
- <td><code>[</code><code class="grammar-char-escape"><abbr title="unicode 'Format'">#x200C</abbr></code><code class="grammar-literal">-</code><code class="grammar-char-escape"><abbr title="unicode 'Format'">#x200D</abbr></code><code>]</code></td>
262
+ <td><code class="grammar-alt">|</code></td>
263
+ <td><code class="grammar-brac">[</code><code class="grammar-char-escape"><abbr title="unicode 'Format'">#x200C</abbr></code><code class="grammar-literal">-</code><code class="grammar-char-escape"><abbr title="unicode 'Format'">#x200D</abbr></code><code class="grammar-brac">]</code></td>
307
264
  </tr>
308
265
  <tr>
309
266
  <td colspan=2></td>
310
- <td>|</td>
311
- <td><code>[</code><code class="grammar-char-escape"><abbr title="unicode 'Graphic'">#x2070</abbr></code><code class="grammar-literal">-</code><code class="grammar-char-escape"><abbr title="unicode 'Reserved'">#x218F</abbr></code><code>]</code></td>
267
+ <td><code class="grammar-alt">|</code></td>
268
+ <td><code class="grammar-brac">[</code><code class="grammar-char-escape"><abbr title="unicode 'Graphic'">#x2070</abbr></code><code class="grammar-literal">-</code><code class="grammar-char-escape"><abbr title="unicode 'Reserved'">#x218F</abbr></code><code class="grammar-brac">]</code></td>
312
269
  </tr>
313
270
  <tr>
314
271
  <td colspan=2></td>
315
- <td>|</td>
316
- <td><code>[</code><code class="grammar-char-escape"><abbr title="unicode 'Graphic'">#x2C00</abbr></code><code class="grammar-literal">-</code><code class="grammar-char-escape"><abbr title="unicode 'Reserved'">#x2FEF</abbr></code><code>]</code></td>
272
+ <td><code class="grammar-alt">|</code></td>
273
+ <td><code class="grammar-brac">[</code><code class="grammar-char-escape"><abbr title="unicode 'Graphic'">#x2C00</abbr></code><code class="grammar-literal">-</code><code class="grammar-char-escape"><abbr title="unicode 'Reserved'">#x2FEF</abbr></code><code class="grammar-brac">]</code></td>
317
274
  </tr>
318
275
  <tr>
319
276
  <td colspan=2></td>
320
- <td>|</td>
321
- <td><code>[</code><code class="grammar-char-escape"><abbr title="unicode 'Graphic'">#x3001</abbr></code><code class="grammar-literal">-</code><code class="grammar-char-escape"><abbr title="unicode 'Reserved'">#xD7FF</abbr></code><code>]</code></td>
277
+ <td><code class="grammar-alt">|</code></td>
278
+ <td><code class="grammar-brac">[</code><code class="grammar-char-escape"><abbr title="unicode 'Graphic'">#x3001</abbr></code><code class="grammar-literal">-</code><code class="grammar-char-escape"><abbr title="unicode 'Reserved'">#xD7FF</abbr></code><code class="grammar-brac">]</code></td>
322
279
  </tr>
323
280
  <tr>
324
281
  <td colspan=2></td>
325
- <td>|</td>
326
- <td><code>[</code><code class="grammar-char-escape"><abbr title="unicode 'Graphic'">#xF900</abbr></code><code class="grammar-literal">-</code><code class="grammar-char-escape"><abbr title="unicode 'Graphic'">#xFDCF</abbr></code><code>]</code></td>
282
+ <td><code class="grammar-alt">|</code></td>
283
+ <td><code class="grammar-brac">[</code><code class="grammar-char-escape"><abbr title="unicode 'Graphic'">#xF900</abbr></code><code class="grammar-literal">-</code><code class="grammar-char-escape"><abbr title="unicode 'Graphic'">#xFDCF</abbr></code><code class="grammar-brac">]</code></td>
327
284
  </tr>
328
285
  <tr>
329
286
  <td colspan=2></td>
330
- <td>|</td>
331
- <td><code>[</code><code class="grammar-char-escape"><abbr title="unicode 'Graphic'">#xFDF0</abbr></code><code class="grammar-literal">-</code><code class="grammar-char-escape"><abbr title="unicode 'Graphic'">#xFFFD</abbr></code><code>]</code></td>
287
+ <td><code class="grammar-alt">|</code></td>
288
+ <td><code class="grammar-brac">[</code><code class="grammar-char-escape"><abbr title="unicode 'Graphic'">#xFDF0</abbr></code><code class="grammar-literal">-</code><code class="grammar-char-escape"><abbr title="unicode 'Graphic'">#xFFFD</abbr></code><code class="grammar-brac">]</code></td>
332
289
  </tr>
333
290
  <tr>
334
291
  <td colspan=2></td>
335
- <td>|</td>
336
- <td><code>[</code><code class="grammar-char-escape"><abbr title="unicode 'Graphic'">#x00010000</abbr></code><code class="grammar-literal">-</code><code class="grammar-char-escape"><abbr title="unicode 'Noncharacter'">#x000EFFFF</abbr></code><code>]</code></td>
292
+ <td><code class="grammar-alt">|</code></td>
293
+ <td><code class="grammar-brac">[</code><code class="grammar-char-escape"><abbr title="unicode 'Graphic'">#x00010000</abbr></code><code class="grammar-literal">-</code><code class="grammar-char-escape"><abbr title="unicode 'Noncharacter'">#x000EFFFF</abbr></code><code class="grammar-brac">]</code></td>
337
294
  </tr>
338
- <tr id="grammar-production-PN_CHARS_U">
295
+ <tr id="grammar-OpenStruct-PN_CHARS_U">
339
296
  <td>[164s]</td>
340
- <td><code>PN_CHARS_U</code></td>
341
297
  <td>::=</td>
342
- <td><a href="#grammar-production-PN_CHARS_BASE">PN_CHARS_BASE</a> <code>|</code> "<code class="grammar-literal">_</code>"</td>
298
+ <td><a href="#grammar-production-PN_CHARS_BASE">PN_CHARS_BASE</a> <code class="grammar-alt">|</code> "<code class="grammar-literal">_</code>"</td>
343
299
  </tr>
344
- <tr id="grammar-production-PN_CHARS">
300
+ <tr id="grammar-OpenStruct-PN_CHARS">
345
301
  <td>[166s]</td>
346
- <td><code>PN_CHARS</code></td>
347
302
  <td>::=</td>
348
- <td><a href="#grammar-production-PN_CHARS_U">PN_CHARS_U</a> <code>|</code> "<code class="grammar-literal">-</code>" <code>|</code> <code>[</code><code class="grammar-literal">0-9</code><code>]</code> <code>|</code> <code class="grammar-char-escape"><abbr title="extended ascii '#xB7'">#xB7</abbr></code> <code>|</code> <code>[</code><code class="grammar-char-escape"><abbr title="unicode 'Graphic'">#x0300</abbr></code><code class="grammar-literal">-</code><code class="grammar-char-escape"><abbr title="unicode 'Graphic'">#x036F</abbr></code><code>]</code> <code>|</code> <code>[</code><code class="grammar-char-escape"><abbr title="unicode 'Graphic'">#x203F</abbr></code><code class="grammar-literal">-</code><code class="grammar-char-escape"><abbr title="unicode 'Graphic'">#x2040</abbr></code><code>]</code></td>
303
+ <td><a href="#grammar-production-PN_CHARS_U">PN_CHARS_U</a> <code class="grammar-alt">|</code> "<code class="grammar-literal">-</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-char-escape"><abbr title="extended ascii '#xB7'">#xB7</abbr></code> <code class="grammar-alt">|</code> <code class="grammar-brac">[</code><code class="grammar-char-escape"><abbr title="unicode 'Graphic'">#x0300</abbr></code><code class="grammar-literal">-</code><code class="grammar-char-escape"><abbr title="unicode 'Graphic'">#x036F</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 'Graphic'">#x203F</abbr></code><code class="grammar-literal">-</code><code class="grammar-char-escape"><abbr title="unicode 'Graphic'">#x2040</abbr></code><code class="grammar-brac">]</code></td>
349
304
  </tr>
350
- <tr id="grammar-production-PN_PREFIX">
305
+ <tr id="grammar-OpenStruct-PN_PREFIX">
351
306
  <td>[167s]</td>
352
- <td><code>PN_PREFIX</code></td>
353
307
  <td>::=</td>
354
- <td><a href="#grammar-production-PN_CHARS_BASE">PN_CHARS_BASE</a> <code>(</code><code>(</code><a href="#grammar-production-PN_CHARS">PN_CHARS</a> <code>|</code> "<code class="grammar-literal">.</code>"<code>)</code><code>*</code> <a href="#grammar-production-PN_CHARS">PN_CHARS</a><code>)</code><code>?</code></td>
308
+ <td><a href="#grammar-production-PN_CHARS_BASE">PN_CHARS_BASE</a> <code class="grammar-paren">(</code><code class="grammar-paren">(</code><a href="#grammar-production-PN_CHARS">PN_CHARS</a> <code class="grammar-alt">|</code> "<code class="grammar-literal">.</code>"<code class="grammar-paren">)</code><code class="grammar-star">*</code> <a href="#grammar-production-PN_CHARS">PN_CHARS</a><code class="grammar-paren">)</code><code class="grammar-opt">?</code></td>
355
309
  </tr>
356
- <tr id="grammar-production-PN_LOCAL">
310
+ <tr id="grammar-OpenStruct-PN_LOCAL">
357
311
  <td>[168s]</td>
358
- <td><code>PN_LOCAL</code></td>
359
312
  <td>::=</td>
360
- <td><code>(</code><a href="#grammar-production-PN_CHARS_U">PN_CHARS_U</a> <code>|</code> "<code class="grammar-literal">:</code>" <code>|</code> <code>[</code><code class="grammar-literal">0-9</code><code>]</code> <code>|</code> <a href="#grammar-production-PLX">PLX</a><code>)</code> <code>(</code><code>(</code><a href="#grammar-production-PN_CHARS">PN_CHARS</a> <code>|</code> "<code class="grammar-literal">.</code>" <code>|</code> "<code class="grammar-literal">:</code>" <code>|</code> <a href="#grammar-production-PLX">PLX</a><code>)</code><code>*</code> <code>(</code><a href="#grammar-production-PN_CHARS">PN_CHARS</a> <code>|</code> "<code class="grammar-literal">:</code>" <code>|</code> <a href="#grammar-production-PLX">PLX</a><code>)</code><code>)</code><code>?</code></td>
313
+ <td><code class="grammar-paren">(</code><a href="#grammar-production-PN_CHARS_U">PN_CHARS_U</a> <code class="grammar-alt">|</code> "<code class="grammar-literal">:</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> <a href="#grammar-production-PLX">PLX</a><code class="grammar-paren">)</code> <code class="grammar-paren">(</code><code class="grammar-paren">(</code><a href="#grammar-production-PN_CHARS">PN_CHARS</a> <code class="grammar-alt">|</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-PLX">PLX</a><code class="grammar-paren">)</code><code class="grammar-star">*</code> <code class="grammar-paren">(</code><a href="#grammar-production-PN_CHARS">PN_CHARS</a> <code class="grammar-alt">|</code> "<code class="grammar-literal">:</code>" <code class="grammar-alt">|</code> <a href="#grammar-production-PLX">PLX</a><code class="grammar-paren">)</code><code class="grammar-paren">)</code><code class="grammar-opt">?</code></td>
361
314
  </tr>
362
- <tr id="grammar-production-PLX">
315
+ <tr id="grammar-OpenStruct-PLX">
363
316
  <td>[169s]</td>
364
- <td><code>PLX</code></td>
365
317
  <td>::=</td>
366
- <td><a href="#grammar-production-PERCENT">PERCENT</a> <code>|</code> <a href="#grammar-production-PN_LOCAL_ESC">PN_LOCAL_ESC</a></td>
318
+ <td><a href="#grammar-production-PERCENT">PERCENT</a> <code class="grammar-alt">|</code> <a href="#grammar-production-PN_LOCAL_ESC">PN_LOCAL_ESC</a></td>
367
319
  </tr>
368
- <tr id="grammar-production-PERCENT">
320
+ <tr id="grammar-OpenStruct-PERCENT">
369
321
  <td>[170s]</td>
370
- <td><code>PERCENT</code></td>
371
322
  <td>::=</td>
372
323
  <td>"<code class="grammar-literal">%</code>" <a href="#grammar-production-HEX">HEX</a> <a href="#grammar-production-HEX">HEX</a></td>
373
324
  </tr>
374
- <tr id="grammar-production-HEX">
325
+ <tr id="grammar-OpenStruct-HEX">
375
326
  <td>[171s]</td>
376
- <td><code>HEX</code></td>
377
327
  <td>::=</td>
378
- <td><code>[</code><code class="grammar-literal">0-9A-Fa-f</code><code>]</code></td>
328
+ <td><code class="grammar-brac">[</code><code class="grammar-literal">0-9A-Fa-f</code><code class="grammar-brac">]</code></td>
379
329
  </tr>
380
- <tr id="grammar-production-PN_LOCAL_ESC">
330
+ <tr id="grammar-OpenStruct-PN_LOCAL_ESC">
381
331
  <td>[172s]</td>
382
- <td><code>PN_LOCAL_ESC</code></td>
383
332
  <td>::=</td>
384
- <td>"<code class="grammar-literal">\</code>" <code>(</code>"<code class="grammar-literal">_</code>" <code>|</code> "<code class="grammar-literal">~</code>" <code>|</code> "<code class="grammar-literal">.</code>" <code>|</code> "<code class="grammar-literal">-</code>" <code>|</code> "<code class="grammar-literal">!</code>" <code>|</code> "<code class="grammar-literal">$</code>" <code>|</code> "<code class="grammar-literal">&amp;</code>" <code>|</code> "<code class="grammar-literal">&apos;</code>" <code>|</code> "<code class="grammar-literal">(</code>" <code>|</code> "<code class="grammar-literal">)</code>" <code>|</code> "<code class="grammar-literal">*</code>" <code>|</code> "<code class="grammar-literal">+</code>" <code>|</code> "<code class="grammar-literal">,</code>" <code>|</code> "<code class="grammar-literal">;</code>" <code>|</code> "<code class="grammar-literal">=</code>" <code>|</code> "<code class="grammar-literal">/</code>" <code>|</code> "<code class="grammar-literal">?</code>" <code>|</code> "<code class="grammar-literal">#</code>" <code>|</code> "<code class="grammar-literal">@</code>" <code>|</code> "<code class="grammar-literal">%</code>"<code>)</code></td>
333
+ <td>"<code class="grammar-literal">\</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> "<code class="grammar-literal">.</code>" <code class="grammar-alt">|</code> "<code class="grammar-literal">-</code>" <code class="grammar-alt">|</code> "<code class="grammar-literal">!</code>" <code class="grammar-alt">|</code> "<code class="grammar-literal">$</code>" <code class="grammar-alt">|</code> "<code class="grammar-literal">&amp;</code>" <code class="grammar-alt">|</code> "<code class="grammar-literal">&apos;</code>" <code class="grammar-alt">|</code> "<code class="grammar-literal">(</code>" <code class="grammar-alt">|</code> "<code class="grammar-literal">)</code>" <code class="grammar-alt">|</code> "<code class="grammar-literal">*</code>" <code class="grammar-alt">|</code> "<code class="grammar-literal">+</code>" <code class="grammar-alt">|</code> "<code class="grammar-literal">,</code>" <code class="grammar-alt">|</code> "<code class="grammar-literal">;</code>" <code class="grammar-alt">|</code> "<code class="grammar-literal">=</code>" <code class="grammar-alt">|</code> "<code class="grammar-literal">/</code>" <code class="grammar-alt">|</code> "<code class="grammar-literal">?</code>" <code class="grammar-alt">|</code> "<code class="grammar-literal">#</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></td>
385
334
  </tr>
386
335
  </tbody>
387
336
  </table>
@@ -201,7 +201,7 @@ module EBNF::LL1
201
201
  # @param [Array[Symbol]] types Optional set of types for restricting terminals examined
202
202
  # @return [Token]
203
203
  def recover(*types)
204
- until scanner.eos? || tok = match_token(*types)
204
+ until scanner.eos? || tok = match_token(*types)
205
205
  if scanner.skip_until(@whitespace || /\s+/m).nil? # Skip past current "token"
206
206
  # No whitespace at the end, must be and end of string
207
207
  scanner.terminate
data/lib/ebnf/writer.rb CHANGED
@@ -133,7 +133,8 @@ module EBNF
133
133
  formatted_rules = rules.map do |rule|
134
134
  if rule.kind == :terminals || rule.kind == :pass
135
135
  OpenStruct.new(id: ("@#{rule.kind}"),
136
- sym: nil,
136
+ class: :declaration,
137
+ sym: rule.kind,
137
138
  assign: nil,
138
139
  formatted: (
139
140
  rule.kind == :terminals ?
@@ -150,17 +151,18 @@ module EBNF
150
151
  split(/\s*--rule-extensions--\s*/).each_with_index do |formatted, ndx|
151
152
  assign = case format
152
153
  when :ebnf
153
- formatted.sub!(%r{\s*<code>\|</code>\s*}, '')
154
- (ndx > 0 ? (rule.alt? ? '|' : '') : '::=')
154
+ formatted.sub!(%r{\s*<code[^>]*>\|</code>\s*}, '')
155
+ (ndx > 0 ? (rule.alt? ? '<code class="grammar-alt">|</code>' : '') : '::=')
155
156
  when :abnf
156
- formatted.sub!(%r{\s*<code>/</code>\s*}, '')
157
- (ndx > 0 ? '=/' : '=')
157
+ formatted.sub!(%r{\s*<code[^>]>/</code>\s*}, '')
158
+ (ndx > 0 ? '<code class="grammar-alt">=/</code>' : '=')
158
159
  else
159
- formatted.sub!(%r{\s*<code>\|</code>\s*}, '')
160
- (ndx > 0 ? (rule.alt? ? '|' : '') : '=')
160
+ formatted.sub!(%r{\s*<code[^>]>\|</code>\s*}, '')
161
+ (ndx > 0 ? (rule.alt? ? '<code class="grammar-alt">|</code>' : '') : '=')
161
162
  end
162
163
  lines << OpenStruct.new(id: ((ndx == 0 ? "[#{rule.id}]" : "") if rule.id),
163
164
  sym: (rule.sym if ndx == 0 || format == :abnf),
165
+ class: :production,
164
166
  assign: assign,
165
167
  formatted: formatted)
166
168
  end
@@ -170,6 +172,7 @@ module EBNF
170
172
  lines
171
173
  else
172
174
  OpenStruct.new(id: ("[#{rule.id}]" if rule.id),
175
+ class: :production,
173
176
  sym: rule.sym,
174
177
  assign: (format == :ebnf ? '::=' : '='),
175
178
  formatted: (formatted_expr + (format == :isoebnf ? ' ;' : '')))
@@ -351,8 +354,8 @@ module EBNF
351
354
  end
352
355
  end
353
356
 
354
- res = "#{quote}#{string}#{quote}"
355
- @options[:html] ? @coder.encode(res) : res
357
+ res = @options[:html] ? %(<code class="grammar-literal">#{@coder.encode(string)}</code>) : string
358
+ res = "#{quote}#{res}#{quote}"
356
359
  end
357
360
 
358
361
  def escape_ebnf_hex(u)
@@ -708,17 +711,16 @@ module EBNF
708
711
  chars.length == 1 ? chars.last.inspect : chars.unshift(:alt)
709
712
  end
710
713
 
711
- ERB_DESC = %q(
712
- <!-- Generated with ebnf version #{EBNF::VERSION}. See https://github.com/dryruby/ebnf. -->
713
- <table class="grammar">
714
+ ERB_DESC = %(<!-- Generated with ebnf version #{EBNF::VERSION}. See https://github.com/dryruby/ebnf. -->\n) +
715
+ %q(<table class="grammar">
714
716
  <tbody id="grammar-productions" class="<%= @format %>">
715
717
  <% for rule in @rules %>
716
- <tr<%= %{ id="grammar-production-#{rule.sym}"} unless %w(=/ |).include?(rule.assign) || rule.sym.nil?%>>
718
+ <tr<%= %{ id="grammar-#{rule[:class]}-#{rule.sym}"} unless %w(=/ |).include?(rule.assign) || rule.sym.nil?%>>
717
719
  <% if rule.id %>
718
720
  <td<%= " colspan=2" unless rule.sym %>><%= rule.id %></td>
719
721
  <% end %>
720
722
  <% if rule.sym %>
721
- <td><code><%== rule.sym %></code></td>
723
+ <td><code><%== (rule.sym unless rule.class == :declaration) %></code></td>
722
724
  <% end %>
723
725
  <td><%= rule.assign %></td>
724
726
  <td><%= rule.formatted %></td>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ebnf
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.3
4
+ version: 2.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregg Kellogg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-02 00:00:00.000000000 Z
11
+ date: 2023-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sxp
@@ -300,7 +300,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
300
300
  - !ruby/object:Gem::Version
301
301
  version: '0'
302
302
  requirements: []
303
- rubygems_version: 3.4.6
303
+ rubygems_version: 3.4.10
304
304
  signing_key:
305
305
  specification_version: 4
306
306
  summary: EBNF parser and parser generator in Ruby.