On this page:
comparitor
comparitor-match?
component-pattern-kind/  c
component-pattern
ignore
compare
compare/  equal?
variable
component-pattern-match
variable-string?
variable-name-string?

13.1 Component Patterns🔗ℹ

Query Module – Component Patterns

struct

(struct comparitor (fn value))

  fn : (-> any/c any/c boolean?)
  value : object?
TBD

procedure

(comparitor-match? comp val)  pattern-component?

  comp : comparitor?
  val : object?
TBD

TBD

struct

(struct component-pattern (kind inner))

  kind : component-pattern-kind/c
  inner : 
(or/c false?
comparitor?
variable-name-string?)
TBD

constructor

(ignore)  pattern-component?

TBD

constructor

(compare fn val)  component-pattern?

  fn : (-> any/c any/c boolean?)
  val : object?
TBD

constructor

(compare/equal? val)  component-pattern?

  val : object?
TBD

constructor

(variable name)  pattern-component?

  name : variable-name-string?
TBD

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?
TBD

predicate

(variable-string? val)  boolean?

  val : any/c
Returns #t if val is a string that corresponds to the SPARQL Var production.

predicate

(variable-name-string? val)  boolean?

  val : any/c
Returns #t if val is a string that corresponds to the SPARQL VARNAME production.