SPARQL smith: removes Debug derives

Unused because we already use Display to properly print the query
pull/354/head
Tpt 2 years ago committed by Thomas Tanon
parent 1fa0633db3
commit 9fe5436f94
  1. 162
      lib/sparql-smith/src/lib.rs

@ -38,7 +38,7 @@ pub struct Query {
values_clause: ValuesClause, values_clause: ValuesClause,
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
enum QueryVariant { enum QueryVariant {
Select(SelectQuery), Select(SelectQuery),
//TODO: Other variants! //TODO: Other variants!
@ -59,7 +59,7 @@ impl Debug for Query {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct SelectQuery { struct SelectQuery {
// [7] SelectQuery ::= SelectClause DatasetClause* WhereClause SolutionModifier // [7] SelectQuery ::= SelectClause DatasetClause* WhereClause SolutionModifier
select_clause: SelectClause, select_clause: SelectClause,
@ -77,7 +77,7 @@ impl fmt::Display for SelectQuery {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct SubSelect { struct SubSelect {
// [8] SubSelect ::= SelectClause WhereClause SolutionModifier ValuesClause // [8] SubSelect ::= SelectClause WhereClause SolutionModifier ValuesClause
select_clause: SelectClause, select_clause: SelectClause,
@ -96,20 +96,20 @@ impl fmt::Display for SubSelect {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct SelectClause { struct SelectClause {
// [9] SelectClause ::= 'SELECT' ( 'DISTINCT' | 'REDUCED' )? ( ( Var | ( '(' Expression 'AS' Var ')' ) )+ | '*' ) // [9] SelectClause ::= 'SELECT' ( 'DISTINCT' | 'REDUCED' )? ( ( Var | ( '(' Expression 'AS' Var ')' ) )+ | '*' )
option: Option<SelectOption>, option: Option<SelectOption>,
values: SelectValues, values: SelectValues,
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
enum SelectOption { enum SelectOption {
Distinct, Distinct,
Reduced, Reduced,
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
enum SelectValues { enum SelectValues {
Star, Star,
Projection { Projection {
@ -118,7 +118,7 @@ enum SelectValues {
}, },
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
enum SelectProjection { enum SelectProjection {
Variable(Var), Variable(Var),
Projection(Expression, Var), Projection(Expression, Var),
@ -148,7 +148,7 @@ impl fmt::Display for SelectClause {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct WhereClause { struct WhereClause {
// [17] WhereClause ::= 'WHERE'? GroupGraphPattern // [17] WhereClause ::= 'WHERE'? GroupGraphPattern
with_where: bool, with_where: bool,
@ -164,7 +164,7 @@ impl fmt::Display for WhereClause {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct SolutionModifier { struct SolutionModifier {
// [18] SolutionModifier ::= GroupClause? HavingClause? OrderClause? LimitOffsetClauses? // [18] SolutionModifier ::= GroupClause? HavingClause? OrderClause? LimitOffsetClauses?
group: Option<GroupClause>, group: Option<GroupClause>,
@ -191,7 +191,7 @@ impl fmt::Display for SolutionModifier {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct GroupClause { struct GroupClause {
// [19] GroupClause ::= 'GROUP' 'BY' GroupCondition+ // [19] GroupClause ::= 'GROUP' 'BY' GroupCondition+
start: GroupCondition, start: GroupCondition,
@ -208,7 +208,7 @@ impl fmt::Display for GroupClause {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
enum GroupCondition { enum GroupCondition {
// [20] GroupCondition ::= BuiltInCall | FunctionCall | '(' Expression ( 'AS' Var )? ')' | Var // [20] GroupCondition ::= BuiltInCall | FunctionCall | '(' Expression ( 'AS' Var )? ')' | Var
BuiltInCall(BuiltInCall), BuiltInCall(BuiltInCall),
@ -234,7 +234,7 @@ impl fmt::Display for GroupCondition {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct HavingClause { struct HavingClause {
// [21] HavingClause ::= 'HAVING' HavingCondition+ // [21] HavingClause ::= 'HAVING' HavingCondition+
start: HavingCondition, start: HavingCondition,
@ -254,7 +254,7 @@ impl fmt::Display for HavingClause {
// [22] HavingCondition ::= Constraint // [22] HavingCondition ::= Constraint
type HavingCondition = Constraint; type HavingCondition = Constraint;
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct OrderClause { struct OrderClause {
// [23] OrderClause ::= 'ORDER' 'BY' OrderCondition+ // [23] OrderClause ::= 'ORDER' 'BY' OrderCondition+
start: OrderCondition, start: OrderCondition,
@ -271,7 +271,7 @@ impl fmt::Display for OrderClause {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
enum OrderCondition { enum OrderCondition {
// [24] OrderCondition ::= ( ( 'ASC' | 'DESC' ) BrackettedExpression ) | ( Constraint | Var ) // [24] OrderCondition ::= ( ( 'ASC' | 'DESC' ) BrackettedExpression ) | ( Constraint | Var )
BrackettedExpression { BrackettedExpression {
@ -298,7 +298,7 @@ impl fmt::Display for OrderCondition {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
enum LimitOffsetClauses { enum LimitOffsetClauses {
// [25] LimitOffsetClauses ::= LimitClause OffsetClause? | OffsetClause LimitClause? // [25] LimitOffsetClauses ::= LimitClause OffsetClause? | OffsetClause LimitClause?
LimitOffset(LimitClause, Option<OffsetClause>), LimitOffset(LimitClause, Option<OffsetClause>),
@ -316,7 +316,7 @@ impl fmt::Display for LimitOffsetClauses {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct LimitClause { struct LimitClause {
// [26] LimitClause ::= 'LIMIT' INTEGER // [26] LimitClause ::= 'LIMIT' INTEGER
value: u8, value: u8,
@ -328,7 +328,7 @@ impl fmt::Display for LimitClause {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct OffsetClause { struct OffsetClause {
// [27] OffsetClause ::= 'OFFSET' INTEGER // [27] OffsetClause ::= 'OFFSET' INTEGER
value: u8, value: u8,
@ -340,7 +340,7 @@ impl fmt::Display for OffsetClause {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct ValuesClause { struct ValuesClause {
// [28] ValuesClause ::= ( 'VALUES' DataBlock )? // [28] ValuesClause ::= ( 'VALUES' DataBlock )?
value: Option<DataBlock>, value: Option<DataBlock>,
@ -356,7 +356,7 @@ impl fmt::Display for ValuesClause {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
enum GroupGraphPattern { enum GroupGraphPattern {
// [53] GroupGraphPattern ::= '{' ( SubSelect | GroupGraphPatternSub ) '}' // [53] GroupGraphPattern ::= '{' ( SubSelect | GroupGraphPatternSub ) '}'
GroupGraphPatternSub(GroupGraphPatternSub), GroupGraphPatternSub(GroupGraphPatternSub),
@ -374,14 +374,14 @@ impl fmt::Display for GroupGraphPattern {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct GroupGraphPatternSub { struct GroupGraphPatternSub {
// [54] GroupGraphPatternSub ::= TriplesBlock? ( GraphPatternNotTriples '.'? TriplesBlock? )* // [54] GroupGraphPatternSub ::= TriplesBlock? ( GraphPatternNotTriples '.'? TriplesBlock? )*
start: Option<TriplesBlock>, start: Option<TriplesBlock>,
others: Vec<GroupGraphPatternSubOtherBlock>, others: Vec<GroupGraphPatternSubOtherBlock>,
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct GroupGraphPatternSubOtherBlock { struct GroupGraphPatternSubOtherBlock {
start: GraphPatternNotTriples, start: GraphPatternNotTriples,
with_dot: bool, with_dot: bool,
@ -406,7 +406,7 @@ impl fmt::Display for GroupGraphPatternSub {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct TriplesBlock { struct TriplesBlock {
// [55] TriplesBlock ::= TriplesSameSubjectPath ( '.' TriplesBlock? )? // [55] TriplesBlock ::= TriplesSameSubjectPath ( '.' TriplesBlock? )?
start: TriplesSameSubjectPath, start: TriplesSameSubjectPath,
@ -426,7 +426,7 @@ impl fmt::Display for TriplesBlock {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
enum GraphPatternNotTriples { enum GraphPatternNotTriples {
// [56] GraphPatternNotTriples ::= GroupOrUnionGraphPattern | OptionalGraphPattern | MinusGraphPattern | GraphGraphPattern | ServiceGraphPattern | Filter | Bind | InlineData // [56] GraphPatternNotTriples ::= GroupOrUnionGraphPattern | OptionalGraphPattern | MinusGraphPattern | GraphGraphPattern | ServiceGraphPattern | Filter | Bind | InlineData
GroupOrUnion(GroupOrUnionGraphPattern), GroupOrUnion(GroupOrUnionGraphPattern),
@ -456,7 +456,7 @@ impl fmt::Display for GraphPatternNotTriples {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct OptionalGraphPattern { struct OptionalGraphPattern {
// [57] OptionalGraphPattern ::= 'OPTIONAL' GroupGraphPattern // [57] OptionalGraphPattern ::= 'OPTIONAL' GroupGraphPattern
inner: GroupGraphPattern, inner: GroupGraphPattern,
@ -468,7 +468,7 @@ impl fmt::Display for OptionalGraphPattern {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct LateralGraphPattern { struct LateralGraphPattern {
// [] LateralGraphPattern ::= 'LATERAL' GroupGraphPattern // [] LateralGraphPattern ::= 'LATERAL' GroupGraphPattern
inner: GroupGraphPattern, inner: GroupGraphPattern,
@ -480,7 +480,7 @@ impl fmt::Display for LateralGraphPattern {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct GraphGraphPattern { struct GraphGraphPattern {
// [58] GraphGraphPattern ::= 'GRAPH' VarOrIri GroupGraphPattern // [58] GraphGraphPattern ::= 'GRAPH' VarOrIri GroupGraphPattern
graph: VarOrIri, graph: VarOrIri,
@ -493,7 +493,7 @@ impl fmt::Display for GraphGraphPattern {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct Bind { struct Bind {
// [60] Bind ::= 'BIND' '(' Expression 'AS' Var ')' // [60] Bind ::= 'BIND' '(' Expression 'AS' Var ')'
expression: Expression, expression: Expression,
@ -506,7 +506,7 @@ impl fmt::Display for Bind {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct InlineData { struct InlineData {
// [61] InlineData ::= 'VALUES' DataBlock // [61] InlineData ::= 'VALUES' DataBlock
inner: DataBlock, inner: DataBlock,
@ -518,7 +518,7 @@ impl fmt::Display for InlineData {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
enum DataBlock { enum DataBlock {
// [62] DataBlock ::= InlineDataOneVar | InlineDataFull // [62] DataBlock ::= InlineDataOneVar | InlineDataFull
OneVar(InlineDataOneVar), OneVar(InlineDataOneVar),
@ -534,7 +534,7 @@ impl fmt::Display for DataBlock {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct InlineDataOneVar { struct InlineDataOneVar {
// [63] InlineDataOneVar ::= Var '{' DataBlockValue* '}' // [63] InlineDataOneVar ::= Var '{' DataBlockValue* '}'
var: Var, var: Var,
@ -551,7 +551,6 @@ impl fmt::Display for InlineDataOneVar {
} }
} }
#[derive(Debug)]
struct InlineDataFull { struct InlineDataFull {
// [64] InlineDataFull ::= ( NIL | '(' Var* ')' ) '{' ( '(' DataBlockValue* ')' | NIL )* '}' // [64] InlineDataFull ::= ( NIL | '(' Var* ')' ) '{' ( '(' DataBlockValue* ')' | NIL )* '}'
vars: Vec<Var>, vars: Vec<Var>,
@ -599,7 +598,7 @@ impl fmt::Display for InlineDataFull {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
enum DataBlockValue { enum DataBlockValue {
// [65] DataBlockValue ::= iri | RDFLiteral | NumericLiteral | BooleanLiteral | 'UNDEF' // [65] DataBlockValue ::= iri | RDFLiteral | NumericLiteral | BooleanLiteral | 'UNDEF'
Iri(Iri), Iri(Iri),
@ -617,7 +616,7 @@ impl fmt::Display for DataBlockValue {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct MinusGraphPattern { struct MinusGraphPattern {
// [66] MinusGraphPattern ::= 'MINUS' GroupGraphPattern // [66] MinusGraphPattern ::= 'MINUS' GroupGraphPattern
inner: GroupGraphPattern, inner: GroupGraphPattern,
@ -629,7 +628,7 @@ impl fmt::Display for MinusGraphPattern {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct GroupOrUnionGraphPattern { struct GroupOrUnionGraphPattern {
// [67] GroupOrUnionGraphPattern ::= GroupGraphPattern ( 'UNION' GroupGraphPattern )* // [67] GroupOrUnionGraphPattern ::= GroupGraphPattern ( 'UNION' GroupGraphPattern )*
start: GroupGraphPattern, start: GroupGraphPattern,
@ -646,7 +645,7 @@ impl fmt::Display for GroupOrUnionGraphPattern {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct Filter { struct Filter {
// [68] Filter ::= 'FILTER' Constraint // [68] Filter ::= 'FILTER' Constraint
constraint: Constraint, constraint: Constraint,
@ -658,7 +657,7 @@ impl fmt::Display for Filter {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
enum Constraint { enum Constraint {
// [69] Constraint ::= BrackettedExpression | BuiltInCall | FunctionCall // [69] Constraint ::= BrackettedExpression | BuiltInCall | FunctionCall
BrackettedExpression(BrackettedExpression), BrackettedExpression(BrackettedExpression),
@ -676,7 +675,7 @@ impl fmt::Display for Constraint {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct FunctionCall { struct FunctionCall {
// [70] FunctionCall ::= iri ArgList // [70] FunctionCall ::= iri ArgList
iri: Iri, iri: Iri,
@ -689,7 +688,7 @@ impl fmt::Display for FunctionCall {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
enum ArgList { enum ArgList {
// [71] ArgList ::= NIL | '(' 'DISTINCT'? Expression ( ',' Expression )* ')' // [71] ArgList ::= NIL | '(' 'DISTINCT'? Expression ( ',' Expression )* ')'
Nil, Nil,
@ -713,7 +712,7 @@ impl fmt::Display for ArgList {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct ExpressionList { struct ExpressionList {
// [72] ExpressionList ::= NIL | '(' Expression ( ',' Expression )* ')' // [72] ExpressionList ::= NIL | '(' Expression ( ',' Expression )* ')'
inner: Vec<Expression>, inner: Vec<Expression>,
@ -732,7 +731,7 @@ impl fmt::Display for ExpressionList {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct PropertyListNotEmpty { struct PropertyListNotEmpty {
// [77] PropertyListNotEmpty ::= Verb ObjectList ( ';' ( Verb ObjectList )? )* // [77] PropertyListNotEmpty ::= Verb ObjectList ( ';' ( Verb ObjectList )? )*
start_predicate: Verb, start_predicate: Verb,
@ -740,7 +739,7 @@ struct PropertyListNotEmpty {
others: Vec<Option<PropertyListElement>>, others: Vec<Option<PropertyListElement>>,
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct PropertyListElement { struct PropertyListElement {
predicate: Verb, predicate: Verb,
object: ObjectList, object: ObjectList,
@ -759,7 +758,7 @@ impl fmt::Display for PropertyListNotEmpty {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
enum Verb { enum Verb {
// [78] Verb ::= VarOrIri | 'a' // [78] Verb ::= VarOrIri | 'a'
VarOrIri(VarOrIri), VarOrIri(VarOrIri),
@ -775,7 +774,7 @@ impl fmt::Display for Verb {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct ObjectList { struct ObjectList {
// [79] ObjectList ::= Object ( ',' Object )* // [79] ObjectList ::= Object ( ',' Object )*
start: Object, start: Object,
@ -796,7 +795,7 @@ impl fmt::Display for ObjectList {
// [80] Object ::= GraphNode // [80] Object ::= GraphNode
type Object = GraphNode; type Object = GraphNode;
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
enum TriplesSameSubjectPath { enum TriplesSameSubjectPath {
// [81] TriplesSameSubjectPath ::= VarOrTerm PropertyListPathNotEmpty | TriplesNodePath PropertyListPath // [81] TriplesSameSubjectPath ::= VarOrTerm PropertyListPathNotEmpty | TriplesNodePath PropertyListPath
Atomic { Atomic {
@ -828,7 +827,7 @@ impl fmt::Display for TriplesSameSubjectPath {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct PropertyListPath { struct PropertyListPath {
// [82] PropertyListPath ::= PropertyListPathNotEmpty? // [82] PropertyListPath ::= PropertyListPathNotEmpty?
inner: Option<PropertyListPathNotEmpty>, inner: Option<PropertyListPathNotEmpty>,
@ -844,7 +843,7 @@ impl fmt::Display for PropertyListPath {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct PropertyListPathNotEmpty { struct PropertyListPathNotEmpty {
// [83] PropertyListPathNotEmpty ::= ( VerbPath | VerbSimple ) ObjectListPath ( ';' ( ( VerbPath | VerbSimple ) ObjectList )? )* // [83] PropertyListPathNotEmpty ::= ( VerbPath | VerbSimple ) ObjectListPath ( ';' ( ( VerbPath | VerbSimple ) ObjectList )? )*
start_predicate: PropertyListPathNotEmptyVerb, start_predicate: PropertyListPathNotEmptyVerb,
@ -852,13 +851,13 @@ struct PropertyListPathNotEmpty {
others: Vec<Option<PropertyListPathElement>>, others: Vec<Option<PropertyListPathElement>>,
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
enum PropertyListPathNotEmptyVerb { enum PropertyListPathNotEmptyVerb {
VerbPath(VerbPath), VerbPath(VerbPath),
VerbSimple(VerbSimple), VerbSimple(VerbSimple),
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct PropertyListPathElement { struct PropertyListPathElement {
predicate: PropertyListPathNotEmptyVerb, predicate: PropertyListPathNotEmptyVerb,
object: ObjectList, object: ObjectList,
@ -891,7 +890,7 @@ type VerbPath = Path;
// [85] VerbSimple ::= Var // [85] VerbSimple ::= Var
type VerbSimple = Var; type VerbSimple = Var;
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct ObjectListPath { struct ObjectListPath {
// [86] ObjectListPath ::= ObjectPath ( ',' ObjectPath )* // [86] ObjectListPath ::= ObjectPath ( ',' ObjectPath )*
start: ObjectPath, start: ObjectPath,
@ -914,7 +913,7 @@ type ObjectPath = GraphNodePath;
// [88] Path ::= PathAlternative // [88] Path ::= PathAlternative
type Path = PathAlternative; type Path = PathAlternative;
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct PathAlternative { struct PathAlternative {
// [89] PathAlternative ::= PathSequence ( '|' PathSequence )* // [89] PathAlternative ::= PathSequence ( '|' PathSequence )*
start: PathSequence, start: PathSequence,
@ -931,7 +930,7 @@ impl fmt::Display for PathAlternative {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct PathSequence { struct PathSequence {
// [90] PathSequence ::= PathEltOrInverse ( '/' PathEltOrInverse )* // [90] PathSequence ::= PathEltOrInverse ( '/' PathEltOrInverse )*
start: PathEltOrInverse, start: PathEltOrInverse,
@ -948,7 +947,7 @@ impl fmt::Display for PathSequence {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct PathElt { struct PathElt {
// [91] PathElt ::= PathPrimary PathMod? // [91] PathElt ::= PathPrimary PathMod?
path: PathPrimary, path: PathPrimary,
@ -965,7 +964,7 @@ impl fmt::Display for PathElt {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
enum PathEltOrInverse { enum PathEltOrInverse {
// [92] PathEltOrInverse ::= PathElt | '^' PathElt // [92] PathEltOrInverse ::= PathElt | '^' PathElt
PathElt(PathElt), PathElt(PathElt),
@ -981,7 +980,7 @@ impl fmt::Display for PathEltOrInverse {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
enum PathMod { enum PathMod {
// [93] PathMod ::= '?' | '*' | '+' // [93] PathMod ::= '?' | '*' | '+'
ZeroOrOne, ZeroOrOne,
@ -999,7 +998,7 @@ impl fmt::Display for PathMod {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
enum PathPrimary { enum PathPrimary {
// [94] PathPrimary ::= iri | 'a' | '!' PathNegatedPropertySet | '(' Path ')' // [94] PathPrimary ::= iri | 'a' | '!' PathNegatedPropertySet | '(' Path ')'
Iri(Iri), Iri(Iri),
@ -1019,7 +1018,7 @@ impl fmt::Display for PathPrimary {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
enum PathNegatedPropertySet { enum PathNegatedPropertySet {
// [95] PathNegatedPropertySet ::= PathOneInPropertySet | '(' ( PathOneInPropertySet ( '|' PathOneInPropertySet )* )? ')' // [95] PathNegatedPropertySet ::= PathOneInPropertySet | '(' ( PathOneInPropertySet ( '|' PathOneInPropertySet )* )? ')'
Single(PathOneInPropertySet), Single(PathOneInPropertySet),
@ -1044,7 +1043,7 @@ impl fmt::Display for PathNegatedPropertySet {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
enum PathOneInPropertySet { enum PathOneInPropertySet {
// [96] PathOneInPropertySet ::= iri | 'a' | '^' ( iri | 'a' ) // [96] PathOneInPropertySet ::= iri | 'a' | '^' ( iri | 'a' )
Iri(Iri), Iri(Iri),
@ -1064,7 +1063,7 @@ impl fmt::Display for PathOneInPropertySet {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
enum TriplesNode { enum TriplesNode {
// [98] TriplesNode ::= Collection | BlankNodePropertyList // [98] TriplesNode ::= Collection | BlankNodePropertyList
Collection(Collection), Collection(Collection),
@ -1080,7 +1079,7 @@ impl fmt::Display for TriplesNode {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct BlankNodePropertyList { struct BlankNodePropertyList {
// [99] BlankNodePropertyList ::= '[' PropertyListNotEmpty ']' // [99] BlankNodePropertyList ::= '[' PropertyListNotEmpty ']'
inner: PropertyListNotEmpty, inner: PropertyListNotEmpty,
@ -1092,7 +1091,7 @@ impl fmt::Display for BlankNodePropertyList {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
enum TriplesNodePath { enum TriplesNodePath {
// [100] TriplesNodePath ::= CollectionPath | BlankNodePropertyListPath // [100] TriplesNodePath ::= CollectionPath | BlankNodePropertyListPath
CollectionPath(CollectionPath), CollectionPath(CollectionPath),
@ -1108,7 +1107,7 @@ impl fmt::Display for TriplesNodePath {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct BlankNodePropertyListPath { struct BlankNodePropertyListPath {
// [101] BlankNodePropertyListPath ::= '[' PropertyListPathNotEmpty ']' // [101] BlankNodePropertyListPath ::= '[' PropertyListPathNotEmpty ']'
inner: PropertyListPathNotEmpty, inner: PropertyListPathNotEmpty,
@ -1120,7 +1119,7 @@ impl fmt::Display for BlankNodePropertyListPath {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct Collection { struct Collection {
// [102] Collection ::= '(' GraphNode+ ')' // [102] Collection ::= '(' GraphNode+ ')'
start: Box<GraphNode>, start: Box<GraphNode>,
@ -1137,7 +1136,7 @@ impl fmt::Display for Collection {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct CollectionPath { struct CollectionPath {
// [103] CollectionPath ::= '(' GraphNodePath+ ')' // [103] CollectionPath ::= '(' GraphNodePath+ ')'
start: Box<GraphNodePath>, start: Box<GraphNodePath>,
@ -1154,7 +1153,7 @@ impl fmt::Display for CollectionPath {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
enum GraphNode { enum GraphNode {
// [104] GraphNode ::= VarOrTerm | TriplesNode // [104] GraphNode ::= VarOrTerm | TriplesNode
VarOrTerm(VarOrTerm), VarOrTerm(VarOrTerm),
@ -1170,7 +1169,7 @@ impl fmt::Display for GraphNode {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
enum GraphNodePath { enum GraphNodePath {
// [105] GraphNodePath ::= VarOrTerm | TriplesNodePath // [105] GraphNodePath ::= VarOrTerm | TriplesNodePath
VarOrTerm(VarOrTerm), VarOrTerm(VarOrTerm),
@ -1186,7 +1185,7 @@ impl fmt::Display for GraphNodePath {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
enum VarOrTerm { enum VarOrTerm {
// [106] VarOrTerm ::= Var | GraphTerm // [106] VarOrTerm ::= Var | GraphTerm
Var(Var), Var(Var),
@ -1202,7 +1201,7 @@ impl fmt::Display for VarOrTerm {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
enum VarOrIri { enum VarOrIri {
// [107] VarOrIri ::= Var | iri // [107] VarOrIri ::= Var | iri
Var(Var), Var(Var),
@ -1218,7 +1217,6 @@ impl fmt::Display for VarOrIri {
} }
} }
#[derive(Debug)]
struct Var { struct Var {
// [108] Var ::= VAR1 | VAR2 // [108] Var ::= VAR1 | VAR2
value: u8, value: u8,
@ -1242,7 +1240,7 @@ impl fmt::Display for Var {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
enum GraphTerm { enum GraphTerm {
// [109] GraphTerm ::= iri | RDFLiteral | NumericLiteral | BooleanLiteral | BlankNode | NIL // [109] GraphTerm ::= iri | RDFLiteral | NumericLiteral | BooleanLiteral | BlankNode | NIL
Iri(Iri), Iri(Iri),
@ -1264,7 +1262,7 @@ impl fmt::Display for GraphTerm {
// [110] Expression ::= ConditionalOrExpression // [110] Expression ::= ConditionalOrExpression
type Expression = ConditionalOrExpression; type Expression = ConditionalOrExpression;
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct ConditionalOrExpression { struct ConditionalOrExpression {
// [111] ConditionalOrExpression ::= ConditionalAndExpression ( '||' ConditionalAndExpression )* // [111] ConditionalOrExpression ::= ConditionalAndExpression ( '||' ConditionalAndExpression )*
start: ConditionalAndExpression, start: ConditionalAndExpression,
@ -1281,7 +1279,7 @@ impl fmt::Display for ConditionalOrExpression {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct ConditionalAndExpression { struct ConditionalAndExpression {
// [112] ConditionalAndExpression ::= ValueLogical ( '&&' ValueLogical )* // [112] ConditionalAndExpression ::= ValueLogical ( '&&' ValueLogical )*
start: ValueLogical, start: ValueLogical,
@ -1301,7 +1299,7 @@ impl fmt::Display for ConditionalAndExpression {
// [113] ValueLogical ::= RelationalExpression // [113] ValueLogical ::= RelationalExpression
type ValueLogical = RelationalExpression; type ValueLogical = RelationalExpression;
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
enum RelationalExpression { enum RelationalExpression {
// [114] RelationalExpression ::= NumericExpression ( '=' NumericExpression | '!=' NumericExpression | '<' NumericExpression | '>' NumericExpression | '<=' NumericExpression | '>=' NumericExpression | 'IN' ExpressionList | 'NOT' 'IN' ExpressionList )? // [114] RelationalExpression ::= NumericExpression ( '=' NumericExpression | '!=' NumericExpression | '<' NumericExpression | '>' NumericExpression | '<=' NumericExpression | '>=' NumericExpression | 'IN' ExpressionList | 'NOT' 'IN' ExpressionList )?
Base(NumericExpression), Base(NumericExpression),
@ -1334,7 +1332,7 @@ impl fmt::Display for RelationalExpression {
// [115] NumericExpression ::= AdditiveExpression // [115] NumericExpression ::= AdditiveExpression
type NumericExpression = AdditiveExpression; type NumericExpression = AdditiveExpression;
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
enum AdditiveExpression { enum AdditiveExpression {
// [116] AdditiveExpression ::= MultiplicativeExpression ( '+' MultiplicativeExpression | '-' MultiplicativeExpression | ( NumericLiteralPositive | NumericLiteralNegative ) ( ( '*' UnaryExpression ) | ( '/' UnaryExpression ) )* )* // [116] AdditiveExpression ::= MultiplicativeExpression ( '+' MultiplicativeExpression | '-' MultiplicativeExpression | ( NumericLiteralPositive | NumericLiteralNegative ) ( ( '*' UnaryExpression ) | ( '/' UnaryExpression ) )* )*
Base(MultiplicativeExpression), Base(MultiplicativeExpression),
@ -1352,7 +1350,7 @@ impl fmt::Display for AdditiveExpression {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
enum MultiplicativeExpression { enum MultiplicativeExpression {
// [117] MultiplicativeExpression ::= UnaryExpression ( '*' UnaryExpression | '/' UnaryExpression )* // [117] MultiplicativeExpression ::= UnaryExpression ( '*' UnaryExpression | '/' UnaryExpression )*
Base(UnaryExpression), Base(UnaryExpression),
@ -1370,7 +1368,7 @@ impl fmt::Display for MultiplicativeExpression {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
enum UnaryExpression { enum UnaryExpression {
// [118] UnaryExpression ::= '!' PrimaryExpression | '+' PrimaryExpression | '-' PrimaryExpression | PrimaryExpression // [118] UnaryExpression ::= '!' PrimaryExpression | '+' PrimaryExpression | '-' PrimaryExpression | PrimaryExpression
Not(PrimaryExpression), Not(PrimaryExpression),
@ -1390,7 +1388,7 @@ impl fmt::Display for UnaryExpression {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
enum PrimaryExpression { enum PrimaryExpression {
// [119] PrimaryExpression ::= BrackettedExpression | BuiltInCall | iriOrFunction | RDFLiteral | NumericLiteral | BooleanLiteral | Var // [119] PrimaryExpression ::= BrackettedExpression | BuiltInCall | iriOrFunction | RDFLiteral | NumericLiteral | BooleanLiteral | Var
Bracketted(BrackettedExpression), Bracketted(BrackettedExpression),
@ -1412,7 +1410,7 @@ impl fmt::Display for PrimaryExpression {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct BrackettedExpression { struct BrackettedExpression {
// [120] BrackettedExpression ::= '(' Expression ')' // [120] BrackettedExpression ::= '(' Expression ')'
inner: Box<Expression>, inner: Box<Expression>,
@ -1424,7 +1422,7 @@ impl fmt::Display for BrackettedExpression {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
enum BuiltInCall { enum BuiltInCall {
// [121] BuiltInCall ::= Aggregate // [121] BuiltInCall ::= Aggregate
// | 'STR' '(' Expression ')' // | 'STR' '(' Expression ')'
@ -1496,7 +1494,7 @@ impl fmt::Display for BuiltInCall {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct ExistsFunc { struct ExistsFunc {
// [125] ExistsFunc ::= 'EXISTS' GroupGraphPattern // [125] ExistsFunc ::= 'EXISTS' GroupGraphPattern
pattern: GroupGraphPattern, pattern: GroupGraphPattern,
@ -1508,7 +1506,7 @@ impl fmt::Display for ExistsFunc {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct NotExistsFunc { struct NotExistsFunc {
// [126] NotExistsFunc ::= 'NOT' 'EXISTS' GroupGraphPattern // [126] NotExistsFunc ::= 'NOT' 'EXISTS' GroupGraphPattern
pattern: GroupGraphPattern, pattern: GroupGraphPattern,
@ -1520,7 +1518,7 @@ impl fmt::Display for NotExistsFunc {
} }
} }
#[derive(Debug, Arbitrary)] #[derive(Arbitrary)]
struct IriOrFunction { struct IriOrFunction {
// [128] iriOrFunction ::= iri ArgList? // [128] iriOrFunction ::= iri ArgList?
iri: Iri, iri: Iri,
@ -1537,7 +1535,6 @@ impl fmt::Display for IriOrFunction {
} }
} }
#[derive(Debug)]
struct Literal { struct Literal {
// [129] RDFLiteral ::= String ( LANGTAG | ( '^^' iri ) )? // [129] RDFLiteral ::= String ( LANGTAG | ( '^^' iri ) )?
// [130] NumericLiteral ::= NumericLiteralUnsigned | NumericLiteralPositive | NumericLiteralNegative // [130] NumericLiteral ::= NumericLiteralUnsigned | NumericLiteralPositive | NumericLiteralNegative
@ -1566,7 +1563,6 @@ impl fmt::Display for Literal {
} }
} }
#[derive(Debug)]
struct Iri { struct Iri {
// [136] iri ::= IRIREF | PrefixedName // [136] iri ::= IRIREF | PrefixedName
value: u8, value: u8,

Loading…
Cancel
Save