13.1 Component Patterns
Query Module – Component Patterns
procedure
(comparitor-match? comp val) → pattern-component?
comp : comparitor? val : object?
'ignore – .
'compare – .
'variable – .
struct
(struct component-pattern (kind inner))
kind : component-pattern-kind/c
inner :
(or/c false? comparitor? variable-name-string?)
constructor
(ignore) → pattern-component?
constructor
(compare fn val) → component-pattern?
fn : (-> any/c any/c boolean?) val : object?
constructor
(compare/equal? val) → component-pattern?
val : object?
constructor
(variable name) → pattern-component?
name : variable-name-string?
From [SPARQL11QL], section 19.8 Grammar:
[108] Var ::= VAR1 | VAR2
:
[143] VAR1 ::= '?' VARNAME
[144] VAR2 ::= '$' VARNAME
:
[164] PN_CHARS_BASE ::= [A-Z] | [a-z] | [#x00C0-#x00D6] | [#x00D8-#x00F6]
| [#x00F8-#x02FF] | [#x0370-#x037D] | [#x037F-#x1FFF]
| [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF]
| [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD]
| [#x10000-#xEFFFF]
[165] PN_CHARS_U ::= PN_CHARS_BASE | '_'
[166] VARNAME ::= ( PN_CHARS_U | [0-9] )
( PN_CHARS_U | [0-9] | #x00B7 | [#x0300-#x036F]
| [#x203F-#x2040] )*
procedure
(component-pattern-match pattern val)
→ (or/c boolean? result-cell?) pattern : component-pattern? val : object?
predicate
(variable-string? val) → boolean?
val : any/c
predicate
(variable-name-string? val) → boolean?
val : any/c