ebnf 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,417 +1,102 @@
1
- ((rule turtleDoc "1" (star statement))
2
- (rule
3
- statement
4
- "2"
5
- (alt directive (seq triples "."))
6
- )
7
- (rule
8
- directive
9
- "3"
10
- (alt
11
- prefixID
12
- base
13
- sparqlPrefix
14
- sparqlBase
15
- )
16
- )
17
- (rule
18
- prefixID
19
- "4"
20
- (seq "@prefix" PNAME_NS IRIREF ".")
21
- )
1
+
2
+ (
3
+ (rule turtleDoc "1" (star statement))
4
+ (rule statement "2" (alt directive (seq triples ".")))
5
+ (rule directive "3" (alt prefixID base sparqlPrefix sparqlBase))
6
+ (rule prefixID "4" (seq "@prefix" PNAME_NS IRIREF "."))
22
7
  (rule base "5" (seq "@base" IRIREF "."))
23
- (rule
24
- triples
25
- "6"
26
- (alt
27
- (seq subject predicateObjectList)
28
- (seq
29
- blankNodePropertyList
30
- (opt predicateObjectList)
31
- )
32
- )
33
- )
34
- (rule
35
- predicateObjectList
36
- "7"
37
- (seq
38
- verb
39
- objectList
40
- (star (seq ";" (opt (seq verb objectList))))
41
- )
42
- )
43
- (rule
44
- objectList
45
- "8"
46
- (seq object (star (seq "," object)))
47
- )
8
+ (rule triples "6"
9
+ (alt
10
+ (seq subject predicateObjectList)
11
+ (seq blankNodePropertyList (opt predicateObjectList))))
12
+ (rule predicateObjectList "7"
13
+ (seq verb objectList (star (seq ";" (opt (seq verb objectList))))))
14
+ (rule objectList "8" (seq object (star (seq "," object))))
48
15
  (rule verb "9" (alt predicate "a"))
49
- (rule
50
- subject
51
- "10"
52
- (alt iri BlankNode collection)
53
- )
16
+ (rule subject "10" (alt iri BlankNode collection))
54
17
  (rule predicate "11" (seq iri))
55
- (rule
56
- object
57
- "12"
58
- (alt
59
- iri
60
- BlankNode
61
- collection
62
- blankNodePropertyList
63
- literal
64
- )
65
- )
66
- (rule
67
- literal
68
- "13"
69
- (alt
70
- RDFLiteral
71
- NumericLiteral
72
- BooleanLiteral
73
- )
74
- )
75
- (rule
76
- blankNodePropertyList
77
- "14"
78
- (seq "[" predicateObjectList "]")
79
- )
80
- (rule
81
- collection
82
- "15"
83
- (seq "(" (star object) ")")
84
- )
85
- (rule
86
- NumericLiteral
87
- "16"
88
- (alt INTEGER DECIMAL DOUBLE)
89
- )
90
- (rule
91
- String
92
- "17"
93
- (alt
94
- STRING_LITERAL_QUOTE
95
- STRING_LITERAL_SINGLE_QUOTE
96
- STRING_LITERAL_LONG_SINGLE_QUOTE
97
- STRING_LITERAL_LONG_QUOTE
98
- )
99
- )
100
- (terminal
101
- IRIREF
102
- "18"
103
- (seq
104
- "<"
105
- (star
106
- (alt (range "^#x00-#x20<>\"{}|^`\\") UCHAR)
107
- )
108
- ">"
109
- )
110
- )
111
- (terminal
112
- INTEGER
113
- "19"
114
- (seq (opt (range "+-")) (plus (range "0-9")))
115
- )
116
- (terminal
117
- DECIMAL
118
- "20"
119
- (seq
120
- (opt (range "+-"))
121
- (seq
122
- (star (range "0-9"))
123
- "."
124
- (plus (range "0-9"))
125
- )
126
- )
127
- )
128
- (terminal
129
- DOUBLE
130
- "21"
131
- (seq
132
- (opt (range "+-"))
18
+ (rule object "12" (alt iri BlankNode collection blankNodePropertyList literal))
19
+ (rule literal "13" (alt RDFLiteral NumericLiteral BooleanLiteral))
20
+ (rule blankNodePropertyList "14" (seq "[" predicateObjectList "]"))
21
+ (rule collection "15" (seq "(" (star object) ")"))
22
+ (rule NumericLiteral "16" (alt INTEGER DECIMAL DOUBLE))
23
+ (rule String "17"
133
24
  (alt
134
- (seq
135
- (plus (range "0-9"))
136
- "."
137
- (star (range "0-9"))
138
- EXPONENT
139
- )
140
- (seq "." (plus (range "0-9")) EXPONENT)
141
- (seq (plus (range "0-9")) EXPONENT)
142
- )
143
- )
144
- )
145
- (terminal
146
- STRING_LITERAL_QUOTE
147
- "22"
148
- (seq
149
- "\""
150
- (star
151
- (alt (range "^#x22#x5C#xA#xD") ECHAR UCHAR)
152
- )
153
- "\""
154
- )
155
- )
156
- (terminal
157
- STRING_LITERAL_SINGLE_QUOTE
158
- "23"
159
- (seq
160
- "'"
161
- (star
162
- (alt (range "^#x27#x5C#xA#xD") ECHAR UCHAR)
163
- )
164
- "'"
165
- )
166
- )
167
- (terminal
168
- STRING_LITERAL_LONG_SINGLE_QUOTE
169
- "24"
170
- (seq
171
- "'''"
172
- (star
173
- (seq
174
- (opt (alt "'" "''"))
175
- (alt (range "^'\\") ECHAR UCHAR)
176
- )
177
- )
178
- "'''"
179
- )
180
- )
181
- (terminal
182
- STRING_LITERAL_LONG_QUOTE
183
- "25"
184
- (seq
185
- "\"\"\""
186
- (star
187
- (seq
188
- (opt (alt "\"" "\"\""))
189
- (alt (range "^\"\\") ECHAR UCHAR)
190
- )
191
- )
192
- "\"\"\""
193
- )
194
- )
195
- (terminal
196
- UCHAR
197
- "26"
198
- (alt
199
- (seq "\\u" HEX HEX HEX HEX)
200
- (seq
201
- "\\U"
202
- HEX
203
- HEX
204
- HEX
205
- HEX
206
- HEX
207
- HEX
208
- HEX
209
- HEX
210
- )
211
- )
212
- )
213
- (rule
214
- sparqlPrefix
215
- "28s"
216
- (seq SPARQL_PREFIX PNAME_NS IRIREF)
217
- )
218
- (terminal
219
- SPARQL_PREFIX
220
- "28t"
221
- (seq
222
- (range "Pp")
223
- (range "Rr")
224
- (range "Ee")
225
- (range "Ff")
226
- (range "Ii")
227
- (range "Xx")
228
- )
229
- )
230
- (rule
231
- sparqlBase
232
- "29s"
233
- (seq SPARQL_BASE IRIREF)
234
- )
235
- (terminal
236
- SPARQL_BASE
237
- "29t"
238
- (seq
239
- (range "Bb")
240
- (range "Aa")
241
- (range "Ss")
242
- (range "Ee")
243
- )
244
- )
245
- (rule
246
- RDFLiteral
247
- "128s"
248
- (seq String (opt (alt LANGTAG (seq "^^" iri))))
249
- )
250
- (rule
251
- BooleanLiteral
252
- "133s"
253
- (alt "true" "false")
254
- )
25
+ STRING_LITERAL_QUOTE STRING_LITERAL_SINGLE_QUOTE STRING_LITERAL_LONG_SINGLE_QUOTE STRING_LITERAL_LONG_QUOTE ))
26
+ (terminal IRIREF "18" (seq "<" (star (alt (range "^#x00-#x20<>\"{}|^`\\") UCHAR)) ">"))
27
+ (terminal INTEGER "19" (seq (opt (range "+-")) (plus (range "0-9"))))
28
+ (terminal DECIMAL "20"
29
+ (seq (opt (range "+-")) (seq (star (range "0-9")) "." (plus (range "0-9")))))
30
+ (terminal DOUBLE "21"
31
+ (seq
32
+ (opt (range "+-"))
33
+ (alt
34
+ (seq (plus (range "0-9")) "." (star (range "0-9")) EXPONENT)
35
+ (seq "." (plus (range "0-9")) EXPONENT)
36
+ (seq (plus (range "0-9")) EXPONENT))))
37
+ (terminal STRING_LITERAL_QUOTE "22"
38
+ (seq "\"" (star (alt (range "^#x22#x5C#xA#xD") ECHAR UCHAR)) "\""))
39
+ (terminal STRING_LITERAL_SINGLE_QUOTE "23"
40
+ (seq "'" (star (alt (range "^#x27#x5C#xA#xD") ECHAR UCHAR)) "'"))
41
+ (terminal STRING_LITERAL_LONG_SINGLE_QUOTE "24"
42
+ (seq "'''" (star (seq (opt (alt "'" "''")) (alt (range "^'\\") ECHAR UCHAR))) "'''"))
43
+ (terminal STRING_LITERAL_LONG_QUOTE "25"
44
+ (seq "\"\"\"" (star (seq (opt (alt "\"" "\"\"")) (alt (range "^\"\\") ECHAR UCHAR))) "\"\"\""))
45
+ (terminal UCHAR "26"
46
+ (alt (seq "\\u" HEX HEX HEX HEX) (seq "\\U" HEX HEX HEX HEX HEX HEX HEX HEX)))
47
+ (rule sparqlPrefix "28s" (seq SPARQL_PREFIX PNAME_NS IRIREF))
48
+ (terminal SPARQL_PREFIX "28t"
49
+ (seq (range "Pp") (range "Rr") (range "Ee") (range "Ff") (range "Ii") (range "Xx")))
50
+ (terminal SPARQL_BASE "29t" (seq (range "Bb") (range "Aa") (range "Ss") (range "Ee")))
51
+ (rule sparqlBase "29s" (seq SPARQL_BASE IRIREF))
52
+ (rule RDFLiteral "128s" (seq String (opt (alt LANGTAG (seq "^^" iri)))))
53
+ (rule BooleanLiteral "133s" (alt "true" "false"))
255
54
  (rule iri "135s" (alt IRIREF PrefixedName))
256
- (rule
257
- PrefixedName
258
- "136s"
259
- (alt PNAME_LN PNAME_NS)
260
- )
261
- (rule
262
- BlankNode
263
- "137s"
264
- (alt BLANK_NODE_LABEL ANON)
265
- )
266
- (terminal
267
- PNAME_NS
268
- "139s"
269
- (seq (opt PN_PREFIX) ":")
270
- )
271
- (terminal
272
- PNAME_LN
273
- "140s"
274
- (seq PNAME_NS PN_LOCAL)
275
- )
276
- (terminal
277
- BLANK_NODE_LABEL
278
- "141s"
279
- (seq
280
- "_:"
281
- (alt PN_CHARS_U (range "0-9"))
282
- (opt (seq (star (alt PN_CHARS ".")) PN_CHARS))
283
- )
284
- )
285
- (terminal
286
- LANGTAG
287
- "144s"
288
- (seq
289
- "@"
290
- (plus (range "a-zA-Z"))
291
- (star (seq "-" (plus (range "a-zA-Z0-9"))))
292
- )
293
- )
294
- (terminal
295
- EXPONENT
296
- "154s"
297
- (seq
298
- (range "eE")
299
- (opt (range "+-"))
300
- (plus (range "0-9"))
301
- )
302
- )
303
- (terminal
304
- ECHAR
305
- "159s"
306
- (seq "\\" (range "tbnrf\\\"'"))
307
- )
308
- (terminal
309
- WS
310
- "161s"
311
- (alt
312
- (hex "#x20")
313
- (hex "#x9")
314
- (hex "#xD")
315
- (hex "#xA")
316
- )
317
- )
55
+ (rule PrefixedName "136s" (alt PNAME_LN PNAME_NS))
56
+ (rule BlankNode "137s" (alt BLANK_NODE_LABEL ANON))
57
+ (terminal PNAME_NS "139s" (seq (opt PN_PREFIX) ":"))
58
+ (terminal PNAME_LN "140s" (seq PNAME_NS PN_LOCAL))
59
+ (terminal BLANK_NODE_LABEL "141s"
60
+ (seq "_:" (alt PN_CHARS_U (range "0-9")) (opt (seq (star (alt PN_CHARS ".")) PN_CHARS))))
61
+ (terminal LANGTAG "144s"
62
+ (seq "@" (plus (range "a-zA-Z")) (star (seq "-" (plus (range "a-zA-Z0-9"))))))
63
+ (terminal EXPONENT "154s" (seq (range "eE") (opt (range "+-")) (plus (range "0-9"))))
64
+ (terminal ECHAR "159s" (seq "\\" (range "tbnrf\\\"'")))
65
+ (terminal WS "161s" (alt (hex "#x20") (hex "#x9") (hex "#xD") (hex "#xA")))
318
66
  (terminal ANON "162s" (seq "[" (star WS) "]"))
319
- (terminal
320
- PN_CHARS_BASE
321
- "163s"
322
- (alt
323
- (range "A-Z")
324
- (range "a-z")
325
- (range "#x00C0-#x00D6")
326
- (range "#x00D8-#x00F6")
327
- (range "#x00F8-#x02FF")
328
- (range "#x0370-#x037D")
329
- (range "#x037F-#x1FFF")
330
- (range "#x200C-#x200D")
331
- (range "#x2070-#x218F")
332
- (range "#x2C00-#x2FEF")
333
- (range "#x3001-#xD7FF")
334
- (range "#xF900-#xFDCF")
335
- (range "#xFDF0-#xFFFD")
336
- (range "#x10000-#xEFFFF")
337
- )
338
- )
339
- (terminal
340
- PN_CHARS_U
341
- "164s"
342
- (alt PN_CHARS_BASE "_")
343
- )
344
- (terminal
345
- PN_CHARS
346
- "166s"
347
- (alt
348
- PN_CHARS_U
349
- "-"
350
- (range "0-9")
351
- (hex "#x00B7")
352
- (range "#x0300-#x036F")
353
- (range "#x203F-#x2040")
354
- )
355
- )
356
- (terminal
357
- PN_PREFIX
358
- "167s"
359
- (seq
360
- PN_CHARS_BASE
361
- (opt (seq (star (alt PN_CHARS ".")) PN_CHARS))
362
- )
363
- )
364
- (terminal
365
- PN_LOCAL
366
- "168s"
367
- (seq
368
- (alt PN_CHARS_U ":" (range "0-9") PLX)
369
- (opt
370
- (seq
371
- (star (alt PN_CHARS "." ":" PLX))
372
- (alt PN_CHARS ":" PLX)
373
- )
374
- )
375
- )
376
- )
377
- (terminal
378
- PLX
379
- "169s"
380
- (alt PERCENT PN_LOCAL_ESC)
381
- )
67
+ (terminal PN_CHARS_BASE "163s"
68
+ (alt
69
+ (range "A-Z")
70
+ (range "a-z")
71
+ (range "#x00C0-#x00D6")
72
+ (range "#x00D8-#x00F6")
73
+ (range "#x00F8-#x02FF")
74
+ (range "#x0370-#x037D")
75
+ (range "#x037F-#x1FFF")
76
+ (range "#x200C-#x200D")
77
+ (range "#x2070-#x218F")
78
+ (range "#x2C00-#x2FEF")
79
+ (range "#x3001-#xD7FF")
80
+ (range "#xF900-#xFDCF")
81
+ (range "#xFDF0-#xFFFD")
82
+ (range "#x10000-#xEFFFF")))
83
+ (terminal PN_CHARS_U "164s" (alt PN_CHARS_BASE "_"))
84
+ (terminal PN_CHARS "166s"
85
+ (alt PN_CHARS_U "-"
86
+ (range "0-9")
87
+ (hex "#x00B7")
88
+ (range "#x0300-#x036F")
89
+ (range "#x203F-#x2040")))
90
+ (terminal PN_PREFIX "167s"
91
+ (seq PN_CHARS_BASE (opt (seq (star (alt PN_CHARS ".")) PN_CHARS))))
92
+ (terminal PN_LOCAL "168s"
93
+ (seq
94
+ (alt PN_CHARS_U ":" (range "0-9") PLX)
95
+ (opt (seq (star (alt PN_CHARS "." ":" PLX)) (alt PN_CHARS ":" PLX)))))
96
+ (terminal PLX "169s" (alt PERCENT PN_LOCAL_ESC))
382
97
  (terminal PERCENT "170s" (seq "%" HEX HEX))
383
- (terminal
384
- HEX
385
- "171s"
386
- (alt (range "0-9") (range "A-F") (range "a-f"))
387
- )
388
- (terminal
389
- PN_LOCAL_ESC
390
- "172s"
391
- (seq
392
- "\\"
393
- (alt
394
- "_"
395
- "~"
396
- "."
397
- "-"
398
- "!"
399
- "$"
400
- "&"
401
- "'"
402
- "("
403
- ")"
404
- "*"
405
- "+"
406
- ","
407
- ";"
408
- "="
409
- "/"
410
- "?"
411
- "#"
412
- "@"
413
- "%"
414
- )
415
- )
416
- )
417
- )
98
+ (terminal HEX "171s" (alt (range "0-9") (range "A-F") (range "a-f")))
99
+ (terminal PN_LOCAL_ESC "172s"
100
+ (seq "\\"
101
+ (alt
102
+ "_" "~" "." "-" "!" "$" "&" "'" "(" ")" "*" "+" "," ";" "=" "/" "?" "#" "@" "%" ))))