Documentation
¶
Overview ¶
Package tmql implements decoding TMQL queries.
Index ¶
- func Parse(r io.Reader, v interface{}) error
- func ParseBytes(b []byte, v interface{}) error
- func ParseString(s string, v interface{}) error
- type Anchor
- type Atom
- type Axis
- type BindingSet
- type BooleanExpression
- type BooleanPrimitive
- type CompositeContent
- type Constant
- type Content
- type ExistsClause
- type ExistsQuantifier
- type ForallClause
- type ItemReference
- type Keyword
- type OpContent
- type PathExpression
- type Postfix
- type PostfixedExpression
- type QName
- type QueryExpression
- type SimpleContent
- type Step
- type StepDirection
- type TupleExpression
- type VariableAssignment
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseBytes ¶
func ParseString ¶
Types ¶
type Atom ¶
type Atom struct {
Keyword Keyword `( @"undef" | @"true" | @"false" )`
Number *int `| @Int`
String *string `| @String`
}
TMQL [2] atom
type BindingSet ¶
type BindingSet struct {
VariableAssignments []*VariableAssignment `@@ ( "," @@ )*`
}
TMQL [45] binding-set
type BooleanExpression ¶
type BooleanExpression struct {
BooleanPrimitive *BooleanPrimitive `@@`
}
TMQL [38] boolean-expression
http://www.isotopicmaps.org/tmql/tmql.html#boolean-expression
type BooleanPrimitive ¶
type BooleanPrimitive struct {
Negated *BooleanPrimitive ` "not" @@`
ForallClause *ForallClause `| @@`
ExistsClause *ExistsClause `| @@`
}
TMQL [39] boolean-primitive
http://www.isotopicmaps.org/tmql/tmql.html#boolean-primitive
type CompositeContent ¶
type Constant ¶
type Constant struct {
Atom *Atom ` @@`
ItemReference *ItemReference `| @@`
}
TMQL [1] constant
type Content ¶
type Content struct {
QueryExpression *QueryExpression ` "{" @@ "}"`
PathExpression *PathExpression `| @@`
}
TMQL [23] content
type ExistsClause ¶
type ExistsClause struct {
ExistsQuantifier *ExistsQuantifier `( @@`
BindingSet *BindingSet ` @@`
BooleanExpression *BooleanExpression ` "satisfies" @@ )`
ExistsContent *CompositeContent `| "exists"? @@`
}
TMQL [40] exists-clause
type ExistsQuantifier ¶
type ExistsQuantifier struct {
Some bool ` @"some"`
Least int `| "at" ( "least" @Int`
Most int ` | "most" @Int )`
}
TMQL [41] exists-quantifier
http://www.isotopicmaps.org/tmql/tmql.html#exists-quantifier
type ForallClause ¶
type ForallClause struct {
BindingSet *BindingSet `"every" @@`
BooleanExpression *BooleanExpression `"satisfies" @@`
}
TMQL [42] forall-clause
type ItemReference ¶
TMQL [17] item-reference
type PathExpression ¶
type PathExpression struct {
PostfixedExpression *PostfixedExpression `@@`
}
TMQL [53] path-expression
type Postfix ¶
type Postfix struct {
// TMQL [56] filter-postfix
//
// http://www.isotopicmaps.org/tmql/tmql.html#filter-postfix
FilterPostfix *BooleanPrimitive `"[" @@ "]"`
}
TMQL [55] postfix
type PostfixedExpression ¶
type PostfixedExpression struct {
TupleExpression *TupleExpression `( @@`
SimpleContent *SimpleContent `| @@ )`
Postfix []*Postfix `@@*`
}
TMQL [54] postfixed-expression
http://www.isotopicmaps.org/tmql/tmql.html#postfixed-expression
type QueryExpression ¶
type QueryExpression struct {
PathExpression *PathExpression `@@`
}
TMQL [46] query-expression
type Step ¶
type Step struct {
Direction StepDirection `( @">>" | @"<<" )`
Axis Axis `` /* 248-byte string literal not displayed */
Anchor *Anchor `@@?`
}
TMQL [18] step
type StepDirection ¶
type StepDirection int
const ( StepForward StepDirection = iota StepBackward )
func (*StepDirection) Capture ¶
func (sd *StepDirection) Capture(s []string) error
type VariableAssignment ¶
type VariableAssignment struct {
Variable string `@Variable`
CompositeContent *CompositeContent `"in" @@`
}
TMQL [44] variable-assignment
http://www.isotopicmaps.org/tmql/tmql.html#variable-assignment