anchor.diff:  literalExclusion : '-' literal STEM_MARK? ;
   languageRange   : LANGTAG (STEM_MARK languageExclusion*)? ;
   languageExclusion : '-' LANGTAG STEM_MARK? ;
  +include			: '&' tripleExprLabel ;
  +annotation      : '//' predicate (iri | literal) ;
  +				semanticActions	: codeDecl* ;
  +codeDecl		: '%' iri (CODE | '%') ;
   literal         : rdfLiteral
   				| numericLiteral
   				| booleanLiteral
   				;
  -shapeOrRef      : shapeDefinition
  -				| shapeRef
  -				;
  -inlineShapeOrRef : inlineShapeDefinition
  -				| shapeRef
  -				;
  -shapeRef 		: ATPNAME_LN
  -				| ATPNAME_NS
  -				| '@' shapeExprLabel
  -				;
  -include			: '&' tripleExprLabel ;
  -semanticActions	: codeDecl* ;
  -annotation      : '//' predicate (iri | literal) ;
   // BNF: predicate ::= iri | RDF_TYPE
   predicate       : iri
   				| rdfType
   				;
   rdfType			: RDF_TYPE ;
   datatype        : iri ;
  -cardinality     :  '*'         # starCardinality
  -				| '+'          # plusCardinality
  -				| '?'          # optionalCardinality
  -				| repeatRange  # repeatCardinality
  -				;
  -// BNF: REPEAT_RANGE ::= '{' INTEGER (',' (INTEGER | '*')?)? '}'
  -repeatRange     : '{' INTEGER '}'							  # exactRange
  -				| '{' INTEGER ',' (INTEGER | UNBOUNDED)? '}'  # minMaxRange
  -				;
   shapeExprLabel  : iri
   				| blankNode
   				;
  
positive.code: 				| KW_NONLITERAL
  				;
  xsFacet			: stringFacet
  				| numericFacet;
  stringFacet     : stringLength INTEGER
  				| REGEXP REGEXP_FLAGS?
  				;
  
negative.code: numericLength   : KW_TOTALDIGITS
  				| KW_FRACTIONDIGITS
  				;
  shapeDefinition : inlineShapeDefinition annotation* semanticActions ;
  inlineShapeDefinition : qualifier* '{' tripleExpression? '}' ;
  qualifier       : extension | extraPropertySet | KW_CLOSED ;
  extraPropertySet : KW_EXTRA predicate+ ;
  tripleExpression : oneOfTripleExpr ;
  oneOfTripleExpr : groupTripleExpr
  				| multiElementOneOf
  				;
  multiElementOneOf : groupTripleExpr ( '|' groupTripleExpr )+ ;
  innerTripleExpr : multiElementGroup
  				| multiElementOneOf
  				;
  groupTripleExpr : singleElementGroup
  				| multiElementGroup
  				;
  singleElementGroup : unaryTripleExpr ';'? ;
  multiElementGroup : unaryTripleExpr (';' unaryTripleExpr)+ ';'? ;
  unaryTripleExpr : ('$' tripleExprLabel)? (tripleConstraint | bracketedTripleExpr)
  				| include
  				;
  bracketedTripleExpr : '(' innerTripleExpr ')' cardinality? onShapeExpr? annotation* semanticActions ;
  tripleConstraint : senseFlags? predicate inlineShapeExpression cardinality? onShapeExpr? annotation* semanticActions ;
  cardinality     :  '*'         # starCardinality
  				| '+'          # plusCardinality
  				| '?'          # optionalCardinality
  				| repeatRange  # repeatCardinality
  				;
  // BNF: REPEAT_RANGE ::= '{' INTEGER (',' (INTEGER | '*')?)? '}'
  repeatRange     : '{' INTEGER '}'							  # exactRange
  				| '{' INTEGER ',' (INTEGER | UNBOUNDED)? '}'  # minMaxRange
  				;
  senseFlags      : '^ ' ;
  valueSet		: '[' valueSetValue* ']' ;
  valueSetValue   : iriRange
  				| literalRange
  