anchor.diff:  				;
   baseDecl 		: KW_BASE  IRIREF ;
   prefixDecl		: KW_PREFIX PNAME_NS IRIREF ;
  -notStartAction  : start
  -			    | shape
  -			    ;
  -start           : KW_START '=' shapeExpression semanticActions ;
  +notStartAction  : start | shapeExprDecl ;
  +start           : KW_START '=' shapeExpression ;
   startActions	: codeDecl+ ;
  -statement		: directive
  -				| notStartAction
  -				;
  -shape           : shapeLabel (stringFacet* shapeExpression | KW_EXTERNAL) semanticActions ;
  +statement 		: directive | notStartAction ;
  +shapeExprDecl   : shapeLabel (shapeExpression | KW_EXTERNAL) ;
   shapeExpression : shapeOr ;
   shapeOr  		: shapeAnd (KW_OR shapeAnd)* ;
   shapeAnd		: shapeNot (KW_AND shapeNot)* ;
   shapeNot	    : (KW_NOT | '!')? shapeAtom ;
  -shapeDefinition : (includeSet | extraPropertySet | KW_CLOSED)* '{' someOfShape? '}' ;
  +inlineShapeExpression : inlineShapeOr ;
  +inlineShapeOr   : inlineShapeAnd (KW_OR inlineShapeAnd)* ;
  +inlineShapeAnd  : inlineShapeNot (KW_AND inlineShapeNot)* ;
  +inlineShapeNot  : (KW_NOT | '!')? inlineShapeAtom ;
  +shapeDefinition : (includeSet | extraPropertySet | KW_CLOSED)* '{' someOfShape? '}' annotation* semanticActions ;
  +inlineShapeDefinition : (includeSet | extraPropertySet | KW_CLOSED)* '{' someOfShape? '}' ;
   extraPropertySet : KW_EXTRA predicate+ ;
   someOfShape     : groupShape
   				| multiElementSomeOf
  
positive.code: numericLength   : KW_TOTALDIGITS
  				| KW_FRACTIONDIGITS
  				;
  tripleConstraint : senseFlags? predicate shapeExpression cardinality? annotation* semanticActions;
  senseFlags      : '!' '^'?
  				| '^' '!'?		// inverse not
  				;
  // BNF: REPEAT_RANGE ::= '{' INTEGER (',' (INTEGER | '*')?)? '}'
  repeatRange     : '{' min_range (',' max_range?)? '}' ;
  min_range       : INTEGER ;
  max_range       : INTEGER
  				| '*'
  				;
  valueSet		: '[' valueSetValue* ']' ;
  valueSetValue   : iriRange
  
negative.code: // May 24, 2016 - EGP20150424
  // Aug 11, 2016 - EGP20160708
  // Sep 14, 2016 - Revised to match Eric's latest reshuffle
  // Sep 24, 2016 - Switched to TT grammar (vs inner and outer shapes)
  // Sep 26, 2016 - Refactored to match https://raw.githubusercontent.com/shexSpec/shex.js/7eb770fe2b5bab9edfe9558dc07bb6f6dcdf5d23/doc/bnf
  
  grammar ShExDoc;
  
  shExDoc 		: directive* ((notStartAction | startActions) statement*)? EOF;  // leading CODE
  directive       : baseDecl
  