anchor.diff:  blankNode       : BLANK_NODE_LABEL ;
   codeDecl		: '%' iri (CODE | '%') ;
   startActions	: codeDecl+ ;
  -semanticActions	: codeDecl* ;
  +semanticActions	: (codeDecl | productionLabel)* ;
  +productionLabel : '$' (iri | blankNode) ;
   rdfType			: RDF_TYPE ;
   
   
  
positive.code: statement		: directive | notStartAction ;
  notStartAction  : start
  			    | shape
  			    | valueExprDefinition
  			    ;
  directive       : baseDecl
  				| prefixDecl
  				;
  valueExprDefinition : valueExprLabel ('=' valueClassExpr semanticActions | KW_EXTERNAL) ;
  valueClassExpr  : valueClass valueClassJuncts?
  				| '(' valueClass valueClassJuncts? ')' ;
  valueClassJuncts : (KW_OR valueClass)+
  				|  (KW_AND valueClass)+
  				;
  valueExprLabel  : '$' (iri | blankNode) ;
  baseDecl 		: KW_BASE  IRIREF ;
  prefixDecl		: KW_PREFIX PNAME_NS IRIREF ;
  start           : KW_START '=' ( shapeLabel |
   								 shapeDefinition semanticActions)  ;
  shape           : shapeLabel nonLiteralKind? stringFacet* shapeDefinition (KW_AND shapeDefinition)* semanticActions ;
  shapeDefinition : (includeSet | inclPropertySet | KW_CLOSED)* '{' someOfShape? '}' ;
  includeSet      : '&' shapeLabel+ ;
  inclPropertySet : KW_EXTRA predicate+ ;
  
negative.code: // Dec 30 - update to match http://www.w3.org/2005/01/yacker/uploads/ShEx2/bnf with last change "EGP 20151120"
  // May 23, 2016 - Update to match http://www.w3.org/2005/01/yacker/uploads/ShEx2/bnf with last change "EGP20160520" AND ';' separator and '//' for annotations
  // May 24, 2016 - EGP20150424
  // Aug 11, 2016 - EGP20160708
  
  grammar ShExDoc;
  
  