Coverage report: /development/source/library/org/datagraph/spocq-shard/src/core/encoding/ssf-sparql-1-0.lisp
| Kind | Covered | All | % |
| expression | 302 | 681 | 44.3 |
| branch | 16 | 58 | 27.6 |
Key
Not instrumented
Conditionalized out
Executed
Not executed
Both branches taken
One branch taken
Neither branch taken
1
;;; -*- Mode: lisp; Syntax: ansi-common-lisp; Base: 10; Package: org.datagraph.spocq.sparql-1-0; -*-
3
(in-package :org.datagraph.spocq.sparql-1-0)
6
;;; reduction operators
8
(defun |AdditiveExpression-Constructor| (|AddedMultiplicative*|
9
|MultiplicativeExpression|)
10
(if |AddedMultiplicative*|
11
(let ((a-expression |MultiplicativeExpression|))
12
(loop for (op . m-expression) in (reverse |AddedMultiplicative*|)
13
do (setf a-expression `(,op ,a-expression ,m-expression)))
15
|MultiplicativeExpression|))
17
(defun |AddedMultiplicative-Constructor| (AdditiveOperator |MultiplicativeExpression|)
18
(cons AdditiveOperator |MultiplicativeExpression|))
20
(defun |AdditiveOperator-Constructor| (item)
21
(if (eq (symbol-package item) *syntax-package*)
22
(or (find-builtin-operator item)
23
(error "Invalid built-in operator: '~a'." item))
26
(defun |ANON-Constructor| ()
29
(defun |ArgList-Constructor| (Expression* nillist)
30
(declare (ignore nillist))
32
(reverse Expression*)))
34
(defun |AskQuery-Constructor| (|DatasetClause| |WhereClause|)
35
(update-dataset-graphs |DatasetClause| :query)
36
`(spocq.a:|ask| ,|WhereClause|))
38
(defun |BaseDecl-Constructor| (IRI_REF)
39
(setf (base-iri) IRI_REF))
41
(defun |BLANK_NODE_LABEL-Constructor| (PN_LOCAL)
44
(defun |BlankNode-Constructor| (ANON BLANK_NODE_LABEL)
46
(ecase *nondistinguished-marker-type*
47
(:blank-node (cons-blank-node "b"))
48
(:variable (cons-variable))))
50
(intern-blank-node BLANK_NODE_LABEL))
52
(error "One of (ANON BLANK_NODE_LABEL) is required."))))
54
(defun |BlankNodePropertyList-Constructor| (PropertyListNotEmpty)
55
(let ((subject (ecase *nondistinguished-marker-type*
56
(:blank-node (cons-blank-node "b"))
57
(:variable (cons-variable)))))
58
(loop for (verb object) in PropertyListNotEmpty
59
append (if (consp object) ; a blank node property list
60
(if (spocq.i::triple-form-p (first object))
61
(let* ((first-triple (first object))
62
(blank-node (second first-triple)))
63
(assert-argument-type |BlankNodePropertyList-Constructor|
64
blank-node (or spocq:blank-node undistinguished-variable))
65
(list* `(spocq.a:|triple| ,subject ,verb ,blank-node)
67
;; otherwise build a collection
68
(loop for object in object
69
collect `(spocq.a:|triple| ,subject ,verb object)))
70
`((spocq.a:|triple| ,subject ,verb ,object))))))
73
(defun |BooleanLiteral-Constructor| (item)
75
(SPOCQ.S:|true| spocq.a:|true|)
76
(SPOCQ.S:|false| spocq.a:|false|)
77
(t (warn "anomalous boolean value: ~s." item)
80
(defun |BOUND-Constructor| (item)
81
`(spocq.a:|bound| ,item))
83
(defun |BrackettedExpression-Constructor| (|Expression|)
86
(defun |BuiltinBinaryCall-Constructor| (|BuiltinBinaryOperator| |Expression*|)
87
(cons |BuiltinBinaryOperator| (reverse |Expression*|)))
89
(defun |BuiltinBinaryOperator-Constructor| (item)
90
(if (eq (symbol-package item) *syntax-package*)
91
(or (find-builtin-operator item)
92
(error "Invalid built-in operator: '~a'." item))
95
(defun |BuiltInCall-Constructor| (|BuiltinBinaryCall| |BuiltinUnaryCall| |RegexExpression|)
96
(or |BuiltinBinaryCall| |BuiltinUnaryCall| |RegexExpression|))
98
(defun |BuiltinUnaryCall-Constructor| (|BuiltinUnaryOperator| |Expression|)
99
(list |BuiltinUnaryOperator| |Expression|))
101
(defun |BuiltinUnaryOperator-Constructor| (item)
102
(if (eq (symbol-package item) *syntax-package*)
103
(or (find-builtin-operator item)
104
(error "Invalid built-in operator: '~a'." item))
107
(defun |Collection-Constructor| (DottedNode &rest rest) ; allow older bnf
108
(let* ((GraphNode+ (if rest (first rest) DottedNode))
109
(tail (if rest (or DottedNode '|rdf|:|nil|) '|rdf|:|nil|))
111
(dolist (node GraphNode+)
112
(let ((cell (ecase *nondistinguished-marker-type*
113
(:blank-node (cons-blank-node "b"))
114
(:variable (cons-variable)))))
116
(setf triples (append node triples))
117
(setf node (second (first node))))
118
(push (list 'spocq.a:|triple| cell '|rdf|:|rest| tail) triples)
119
(push (list 'spocq.a:|triple| cell '|rdf|:|first| node) triples)
122
;;; (pprint (|Collection-Constructor| `( 3 2 ,(|Collection-Constructor| '(b a)))))
124
(defun |ConditionalAndExpression-Constructor| (|ValueLogical*|)
125
(destructuring-bind (value . rest-values) (reverse |ValueLogical*|)
127
`(spocq.a:|&&| ,value ,(|ConditionalAndExpression-Constructor| rest-values))
130
(defun |ConditionalOrExpression-Constructor| (|ValueLogical*|)
131
(destructuring-bind (value . rest-values) (reverse |ValueLogical*|)
133
`(spocq.a:\|\| ,value ,(|ConditionalOrExpression-Constructor| rest-values))
136
(defun |Constraint-Constructor| (|BrackettedExpression| |BuiltInCall| |FunctionCall|)
137
(or |BrackettedExpression| |BuiltInCall| |FunctionCall|))
139
(defun |ConstructQuery-Constructor| (ConstructTemplate DatasetClause* |SolutionModifier| Var+ |WhereClause| Wild)
140
(update-dataset-graphs DatasetClause* :query)
141
(when |SolutionModifier|
142
(destructuring-bind (&key limit offset order group-by) |SolutionModifier|
143
(declare (ignore group-by))
145
(setf |WhereClause| `(spocq.a:|order| ,|WhereClause| ,order)))
146
(when (or limit offset)
147
(setf |WhereClause| `(spocq.a:|slice| ,|WhereClause|
148
,@(when offset `(:offset ,offset))
149
,@(when limit `(:count ,limit)))))))
150
(cond (Wild ; build a construct pattern from all statements
151
(setf ConstructTemplate (let ((statements ()))
152
(flet ((collect-statements (expression)
153
(if (bgp-form-p expression)
154
(dolist (statement (rest expression) t)
155
(when (triple-form-p statement)
156
(pushnew statement statements :test #'equalp)))
158
(declare (dynamic-extent #'collect-statements))
159
(map-tree #'collect-statements |WhereClause|))
160
(reverse statements))))
161
(Var+ ; build a construct pattern from all statements which intersect
162
(setf ConstructTemplate (let ((statements ()))
163
(flet ((collect-statements (expression)
164
(if (bgp-form-p expression)
165
(dolist (statement (rest expression) t)
166
(when (and (triple-form-p statement)
167
(intersection statement Var+))
168
(pushnew statement statements :test #'equalp)))
170
(declare (dynamic-extent #'collect-statements))
171
(map-tree #'collect-statements |WhereClause|))
172
(reverse statements)))))
173
`(spocq.a:|construct| ,|WhereClause| ,ConstructTemplate))
175
(defun |ConstructTemplate-Constructor| (ConstructTriples)
178
(defun |ConstructTriples-Constructor| (ConstructTriples TriplesSameSubject)
179
(append TriplesSameSubject ConstructTriples))
181
(defun |DatasetClause-Constructor| (DefaultGraphClause NamedGraphClause)
182
(cond (DefaultGraphClause
183
`(:default-graph ,DefaultGraphClause))
185
`(:named-graph ,NamedGraphClause))
187
(error "one of DefaultGraphClause NamedGraphClause is required."))))
189
(defun |DefaultGraphClause-Constructor| (item)
192
(defun |DescribeQuery-Constructor| (|DatasetClause|* |SolutionModifier| |VarOrIRIref| |WhereClause|)
193
(update-dataset-graphs |DatasetClause|* :query)
194
(when |SolutionModifier|
195
(unless |WhereClause|
196
;; if the where clause is empty, the modifier has no effect. retain the
197
;; the structure in any case by inserting a unit table
198
(setf |WhereClause| '(spocq.a:|table| spocq.a:|unit|)))
199
(destructuring-bind (&key limit offset order group-by) |SolutionModifier|
200
(declare (ignore group-by))
202
(setf |WhereClause| `(spocq.a:|order| ,|WhereClause| ,order)))
203
(when (or limit offset)
204
(setf |WhereClause| `(spocq.a:|slice| ,|WhereClause|
205
,@(when offset `(:offset ,offset))
206
,@(when limit `(:count ,limit)))))))
207
;; null implies that a '*' was specified
208
(unless |VarOrIRIref|
209
(setf |VarOrIRIref| (expression-variables |WhereClause|)))
210
`(spocq.a:|describe| ,|WhereClause| ,|VarOrIRIref|))
212
(defun |Distinctness-Constructor| (item)
213
"Returns distinctness as an operator. When it appears in a select form, it is applied as such.
214
When is qualifies an aggregation form, it is interpreted as a boolean."
215
(or (find-builtin-operator item)
216
(error "Invalid built-in operator: '~a'." item)))
218
(defun |Expression-Constructor| (Expression)
221
(defun |Filter-Constructor| (Constraint)
222
;; return a tagged constraint for later combination
223
`(:filter ,Constraint))
225
(defun |FunctionCall-Constructor| (ArgList IRIref)
226
(cond ((and (symbolp IRIref) (fboundp IRIref) (spocq.i::symbol-term-id IRIRef))
227
;; compile static definions as simple function invocations
228
;; require that the iri is fbound _and_ a known term
229
(cons IRIref ArgList))
231
;; this would be the place to otherwise expect a task-local binding
232
;; for a repository-specific library function
233
(spocq.e:resource-not-found-error :identifier IRIref))))
236
(defun |GraphGraphPattern-Constructor| (GroupGraphPattern VarOrIRIref)
237
`(spocq.a:|graph| ,VarOrIRIref ,GroupGraphPattern))
239
(defun |GraphNode-Constructor| (TriplesNode VarOrTerm)
240
(or TriplesNode VarOrTerm))
242
(defun |GraphPatternNotTriples-Constructor| (OptionalGraphPattern GroupOrUnionGraphPattern GraphGraphPattern)
243
(or OptionalGraphPattern GroupOrUnionGraphPattern GraphGraphPattern))
245
(defun |GraphTerm-Constructor| (|BlankNode| |BooleanLiteral| |IRIref| NILLIST |NumericLiteral| |RDFLiteral|)
246
(or |BlankNode| |BooleanLiteral| |IRIref| NILLIST |NumericLiteral| |RDFLiteral|))
248
(defun |GroupGraphPattern-Constructor| (GroupGraphPatternRest* TriplesBlock)
249
;; filter scope is the entire group, optional is left associated and
250
;; an optional treats a missing intial triple block as a unit table
251
(let ((unit '(spocq.a:|table| spocq.a:|unit|)))
252
(cond (GroupGraphPatternRest*
253
(let ((group TriplesBlock)
255
(dolist (ggp-element (reverse GroupGraphPatternRest*))
256
(destructuring-bind (gpnt-or-filter triples-block) ggp-element
257
(case (first gpnt-or-filter)
259
(push (second gpnt-or-filter) filters))
261
;; as per 6.1 the optional may have no predecessor
262
(let* ((optional-group (second gpnt-or-filter))
263
(optional-filter (when (eq (first optional-group) 'spocq.a:|filter|)
264
(second optional-group))))
265
(when optional-filter
266
(setf optional-group (third optional-group)))
268
`(spocq.a:|leftjoin| ,(or group unit) ,optional-group
269
,@(when optional-filter (list :test optional-filter))))))
273
`(spocq.a:|join| ,group ,gpnt-or-filter)
277
(if group `(spocq.a:|join| ,group ,triples-block) triples-block)))))
279
`(spocq.a:|filter| ,(or group unit)
281
`(spocq.a:|exprlist| ,@(reverse filters))
287
(defun |GroupGraphPatternRest-Constructor| (Filter GraphPatternNotTriples TriplesBlock)
288
(list (or Filter GraphPatternNotTriples) TriplesBlock))
290
(defun |GroupOrUnionGraphPattern-Constructor| (GroupGraphPattern*)
291
(if (rest GroupGraphPattern*)
292
(labels ((construct-union (rest)
293
(destructuring-bind (first . rest) rest
294
`(spocq.a:|union| ,first
295
,(if (rest rest) (construct-union rest) (first rest))))))
296
(construct-union (reverse GroupGraphPattern*)))
297
(first GroupGraphPattern*)))
299
(defun |INTEGER-Constructor| (item)
302
(defun |IRI_NAMESTRING-Constructor| (item)
303
"as per http://www.w3.org/TR/2013/REC-sparql11-query-20130321/#relIRIs, _no_ iri normalization occurs,
307
(defun |IRI_REF-Constructor| (item)
308
"Return the designated iri given its namestring."
309
(spocq.e:iri (or item "")))
312
(defun |IRIref-Constructor| (IRI_REF |PrefixedName|)
313
(or IRI_REF |PrefixedName|))
316
(defun |IRIrefOrFunction-Constructor| (|ArgList| |IRIref|)
318
(cons |IRIref| (when (consp |ArgList|) |ArgList|))
321
(defun |IRIrefOrFunction-Constructor| (|FunctionCall| |IRIref|)
322
(or |FunctionCall| |IRIref|))
325
(defun |LANGTAG-Constructor| (item)
326
(intern (string-upcase (subseq item 1)) :spocq.a))
328
(defun |LimitClause-Constructor| (integer)
331
(defun |LimitOffsetClauses-Constructor| (LimitClause OffsetClause)
332
(append LimitClause OffsetClause))
334
(defun |MultiplicativeExpression-Constructor| (|MultipliedUnary*| |UnaryExpression|)
335
(if |MultipliedUnary*|
336
(let ((m-expression |UnaryExpression|))
337
(loop for (op . u-expression) in (reverse |MultipliedUnary*|)
338
do (setf m-expression `(,op ,m-expression ,u-expression)))
342
(defun |MultipliedUnary-Constructor| (MultiplicativeOperator UnaryExpression)
343
(cons MultiplicativeOperator UnaryExpression))
345
(defun |MultiplicativeOperator-Constructor| (item)
346
(if (eq (symbol-package item) *syntax-package*)
347
(or (find-builtin-operator item)
348
(error "Invalid built-in operator: '~a'." item))
351
(defun |NamedGraphClause-Constructor| (SourceSelector)
354
(defun |NAMESPACE_REF-Constructor| (item)
355
"Return the actual namespace namestring, not the designated iri.
356
Iff there is a base-uri, delegate merging to the IRI_REF constructor, but coerce back to a string."
357
(spocq.i:term-lexical-form (|IRI_REF-Constructor| item))
358
#+(or) ; there is always a base iri
360
(spocq.i:term-lexical-form (|IRI_REF-Constructor| item))
363
(defun |NILLIST-Constructor| ()
366
(defun |NumericExpression-Constructor| (AdditiveExpression)
369
(defun |NumericLiteral-Constructor| (item)
372
(defun |NumericLiteralNegative-Constructor| (item)
375
(defun |NumericLiteralPositive-Constructor| (item)
378
(defun |Object-Constructor| (|GraphNode|)
381
(defun |ObjectList-Constructor| (|Object*|)
384
(defun |OrderDirection-Constructor| (item)
385
(or (find-builtin-operator item)
386
(error "Invalid order direction: '~a'." item)))
388
(defun |OffsetClause-Constructor| (integer)
391
(defun |OptionalGraphPattern-Constructor| (GroupGraphPattern)
392
;; return a tagged pattern for later combination
393
`(:optional ,GroupGraphPattern))
395
(defun |OrderClause-Constructor| (OrderCondition*)
396
(list :order (reverse OrderCondition*)))
398
(defun |OrderCondition-Constructor| (|BrackettedExpression| |Constraint| |OrderDirection| |Var|)
399
(cond (|OrderDirection|
400
`(,|OrderDirection| ,|BrackettedExpression|))
404
(defun |PN_LOCAL-Constructor| (item)
405
;; remove \ but leave %xx
406
(when item (remove #\\ (string item))))
408
(defun |PNAME_NS-Constructor| (item)
409
(assert (eql (position #\: item) (1- (length item))) ()
410
"Invalid pname_ls syntax: ~s." item)
413
(subseq item 0 (1- (length item)))))
415
(defun |PNAME_LN-Constructor| (item)
416
;; remove \ but leave %xx
417
(spocq.i:construct-prefixed-name (remove #\\ item)))
419
(defun |PN_PREFIX-Constructor| (item)
420
(when item (string item)))
422
(defun |PrefixedName-Constructor| (item)
423
(spocq.i:construct-prefixed-name item))
425
(defun |PrefixDecl-Constructor| (NAMESPACE_REF PNAME_NS)
426
(list PNAME_NS NAMESPACE_REF))
428
(defun |PrimaryExpression-Constructor| (|BooleanLiteral| |BrackettedExpression| |BuiltInCall|
429
|IRIrefOrFunction| |NumericLiteral| |RDFLiteral| |Var|)
430
(or |BooleanLiteral| |BrackettedExpression| |BuiltInCall|
431
|IRIrefOrFunction| |NumericLiteral| |RDFLiteral| |Var|))
433
(defun |Prologue-Constructor| (BaseDecl? PrefixDecl*)
435
(setf (base-iri) BaseDecl?))
436
(loop for (PNAME_NS IRI_REF) in PrefixDecl*
437
do (setf (prefix-namespace PNAME_NS) IRI_REF))
438
(list BaseDecl? PrefixDecl*))
440
(defun |PropertyList-Constructor| (PropertyListNotEmpty?)
441
PropertyListNotEmpty?)
443
(defun |PropertyListNotEmpty-Constructor| (VerbObjectList*)
444
(reduce #'append (reverse VerbObjectList*) :from-end t))
446
(defun |Query-Constructor| (AskQuery ConstructQuery DescribeQuery Prologue SelectQuery)
447
(declare (ignore Prologue))
448
(or AskQuery ConstructQuery DescribeQuery SelectQuery))
450
(defun |RDFLiteral-Constructor| (IRIRef LANG_TAG String)
451
;; need to ensure that the string is unique as the parser may reparse token sequences
453
(intern-literal (copy-seq String) IRIRef))
455
(intern-plain-literal (copy-seq String) LANG_TAG))
459
(defun |RegexExpression-Constructor| (Expression++?)
460
`(spocq.a:|regex| ,@(reverse Expression++?)))
462
(defun |RelatedNumeric-Constructor| (NumericExpression RelationalOperator)
463
(list RelationalOperator NumericExpression))
465
(defun |RelationalExpression-Constructor| (NumericExpression RelatedNumeric)
467
`(,(first RelatedNumeric) ,NumericExpression ,(second RelatedNumeric))
470
(defun |RelationalOperator-Constructor| (item)
471
(if (eq (symbol-package item) *syntax-package*)
472
(or (find-builtin-operator item)
473
(error "Invalid built-in operator: '~a'." item))
476
(defun |SelectQuery-Constructor| (|DatasetClause| |Distinctness| |SolutionModifier| |Var*| |WhereClause|)
477
(update-dataset-graphs |DatasetClause| :query)
478
(destructuring-bind (&key limit offset order group-by) |SolutionModifier|
479
(declare (ignore group-by))
481
(setf |WhereClause| `(spocq.a:|order| ,|WhereClause| ,order)))
484
(setf |WhereClause| `(,|Distinctness| (spocq.a:|project| ,|WhereClause| ,|Var*|)))
485
(setf |WhereClause| `(,|Distinctness| ,|WhereClause|))))
486
(when (or limit offset)
487
(setf |WhereClause| `(spocq.a:|slice| ,|WhereClause|
488
,@(when offset `(:offset ,offset))
489
,@(when limit `(:count ,limit))))))
490
`(spocq.a:|select| ,|WhereClause|
492
;; allow either a terminal, or a category value
493
((nil spocq.s:*) (reverse *variables*))
496
(defun |SolutionModifier-Constructor| (OrderClause? LimitOffsetClauses?)
497
(append OrderClause? LimitOffsetClauses?))
499
(defun |SourceSelector-Constructor| (|IRIref|)
502
(defun |STR-Constructor| (expression)
503
`(spocq.a:|str| ,expression))
505
(defun |String-Constructor| (item)
508
(defun |TriplesBlock-Constructor| (TriplesBlock? TriplesSameSubject)
509
(cons 'spocq.a:|bgp| (append TriplesSameSubject (rest TriplesBlock?))))
511
(defun |TriplesNode-Constructor| (BlankNodePropertyList Collection)
512
(or BlankNodePropertyList Collection))
514
(defun |TriplesSameSubject-Constructor| (PropertyList PropertyListNotEmpty TriplesNode VarOrTerm)
515
;; PropertyList PropertyListNotEmpty are different non-terminals for the same form in different contexts
516
(flet ((generate-triples (subject verb-object-list)
517
(loop for (verb object) in verb-object-list
518
append (if (consp object)
519
(cons `(spocq.a:|triple| ,subject ,verb ,(second (first object)))
521
`((spocq.a:|triple| ,subject ,verb ,object))))))
523
(if (eq TriplesNode '|rdf|:|nil|)
524
(loop for (verb object) in PropertyList
525
collect `(spocq.a:|triple| ,TriplesNode ,verb ,object))
527
(append (generate-triples (second (first TriplesNode)) PropertyList)
531
;; expand the property lists. these will be either simple verb object, or verb with nested object
532
(generate-triples VarOrTerm PropertyListNotEmpty))
534
(error "One of |TriplesNode| |VarOrTerm| is required.")))))
536
(defun |UnaryExpression-Constructor| (PrimaryExpression UnaryOperator)
538
(list UnaryOperator PrimaryExpression)
541
(defun |UnaryOperator-Constructor| (item)
542
(if (eq (symbol-package item) *syntax-package*)
543
(or (find-builtin-operator item)
544
(error "Invalid built-in operator: '~a'." item))
547
(defun |ValueLogical-Constructor| (RelationalExpression)
548
RelationalExpression)
550
(defun |Var-Constructor| (var)
551
(pushnew var *variables*)
554
(defun |VarOrIRIref-Constructor| (|IRIref| |Var|)
557
(defun |VarOrTerm-Constructor| (|GraphTerm| |Var|)
558
(or |GraphTerm| |Var|))
560
(defun |Verb-Constructor| (item)
561
(or item |http://www.w3.org/1999/02/22-rdf-syntax-ns#|:|type|))
563
(defun |VerbObjectList-Constructor| (ObjectList Verb)
564
;; (list Verb ObjectList)
565
(loop for object in ObjectList
566
collect (list Verb object)))
567
;;; (sparql-1-0-4::|VerbObjectList-Constructor| '( 1 2) <http://test>)
569
(defun |WhereClause-Constructor| (GroupGraphPattern)
572
(defun |Wild-Constructor| (item)
576
;;; to compile the parser state machine manually
577
(load (compile-file #p"LIBRARY:org;datagraph;spocq;src;parser;sparql.lisp"))
579
;;; to translate the bnf into lisp
580
;;; requires the de.setf.atn-parser system
581
(let ((bnfp:*class.atn* bnfp:*class.atn*)
582
(bnfp:*class.atn-node* bnfp:*class.atn-node*)
583
(bnfp:*class.cat-atn-edge* bnfp:*class.cat-atn-edge*)
584
(bnfp:*class.pop-atn-edge* bnfp:*class.pop-atn-edge*)
585
(bnfp:*class.push-atn-edge* bnfp:*class.push-atn-edge*)
586
(bnfp:*class.test-atn-edge* bnfp:*class.test-atn-edge*))
587
(bnfp:compile-atn-system #p"P-LIBRARY:org;datagraph;spocq;src;core;encoding;sparql-1-0.bnf"
588
:execute t :compile nil
589
:token-package (find-package :spocq.s)
590
:source-package (find-package :sparql-1-0)
591
:source-pathname "P-LIBRARY:org;datagraph;spocq;src;core;encoding;sparql-1-0.lisp"
592
:input-function 'input-reference
593
:input-eof-function 'input-eof?
597
;;; generate the grammar's atn definition
598
(let ((bnfp:*class.atn* bnfp:*class.atn*)
599
(bnfp:*class.atn-node* bnfp:*class.atn-node*)
600
(bnfp:*class.cat-atn-edge* bnfp:*class.cat-atn-edge*)
601
(bnfp:*class.pop-atn-edge* bnfp:*class.pop-atn-edge*)
602
(bnfp:*class.push-atn-edge* bnfp:*class.push-atn-edge*)
603
(bnfp:*class.test-atn-edge* bnfp:*class.test-atn-edge*))
604
(atnp::print-atn-system #p"LIBRARY:org;datagraph;spocq;src;core;encoding;sparql-1-0.bnf"
605
:source-package (find-package :sparql-1-0)))
607
(let ((bnfp:*class.atn* bnfp:*class.atn*)
608
(bnfp:*class.atn-node* bnfp:*class.atn-node*)
609
(bnfp:*class.cat-atn-edge* bnfp:*class.cat-atn-edge*)
610
(bnfp:*class.pop-atn-edge* bnfp:*class.pop-atn-edge*)
611
(bnfp:*class.push-atn-edge* bnfp:*class.push-atn-edge*)
612
(bnfp:*class.test-atn-edge* bnfp:*class.test-atn-edge*))
613
(atnp::graph-atn-system #p"LIBRARY:org;datagraph;spocq;src;core;encoding;sparql-1-0.bnf"
614
:source-package (find-package :sparql-1-0)))