anchor.diff:        | ref(token, '|');
   
     formalParameterList() =>
  -        ref(token, '(') ref(namedFormalParameters).optional() ref(token, ')')
  -      | ref(token, '(') normalFormalParameter ref(normalFormalParameterTail).optional() ref(token, ')')
  -      ;
  +        ref(token, '(') & ref(namedFormalParameters).optional() & ref(token, ')')
  +      | ref(token, '(') & ref(normalFormalParameter) & ref(normalFormalParameterTail).optional() & ref(token, ')');
   
     normalFormalParameterTail() =>
  -       ref(token, ',') namedFormalParameters
  -      | ref(token, ',') normalFormalParameter ref(normalFormalParameterTail).optional()
  -      ;
  +        ref(token, ',') & ref(namedFormalParameters)
  +      | ref(token, ',') & ref(normalFormalParameter) & ref(normalFormalParameterTail).optional();
   
     normalFormalParameter() =>
  -       functionDeclaration
  -      | fieldFormalParameter
  -      | simpleFormalParameter
  -      ;
  +        ref(functionDeclaration)
  +      | ref(fieldFormalParameter)
  +      | ref(simpleFormalParameter);
   
     simpleFormalParameter() =>
  -       declaredIdentifier
  -      | identifier
  -      ;
  +        ref(declaredIdentifier)
  +      | ref(identifier);
   
     fieldFormalParameter() =>
  -       ref(finalVarOrType).optional() THIS ref(token, '.') identifier
  -     ;
  +        ref(finalVarOrType).optional() & ref(THIS) & ref(token, '.') & ref(identifier);
   
     namedFormalParameters() =>
  -       ref(token, '[') defaultFormalParameter (ref(token, ',') defaultFormalParameter).star() ref(token, ']')
  -      ;
  +        ref(token, '[') & ref(defaultFormalParameter) & (ref(token, ',') & ref(defaultFormalParameter)).star() & ref(token, ']');
   
     defaultFormalParameter() =>
  -       normalFormalParameter (ref(token, '=') constantExpression).optional()
  -      ;
  +        ref(normalFormalParameter) & (ref(token, '=') & ref(constantExpression)).optional();
   
     returnType() =>
  -       VOID
  -      | type
  -      ;
  +        ref(VOID)
  +      | ref(type);
   
     finalVarOrType() =>
  -       FINAL ref(type).optional()
  -      | VAR
  -      | type
  +        ref(FINAL) & ref(type).optional()
  +      | ref(VAR)
  +      | ref(type)
         ;
   
     // We have to introduce a separate rule for 'declared' identifiers to
  
positive.code:   // final is a type or an identifier. Before this change, we used the
    // production 'finalVarOrType identifier' in numerous places.
    declaredIdentifier() =>
         FINAL ref(type).optional() identifier
        | VAR identifier
        | type identifier
        ;
  
    identifier() =>
         IDENTIFIER_NO_DOLLAR
        | IDENTIFIER
        | ABSTRACT
        | ASSERT
        | CLASS
        | EXTENDS
        | FACTORY
        | GET
        | IMPLEMENTS
        | IMPORT
        | INTERFACE
        | IS
        | LIBRARY
        | NATIVE
        | NEGATE
        | OPERATOR
        | SET
        | SOURCE
        | STATIC
        | TYPEDEF
        ;
  
    qualified() =>
         identifier (ref(token, '.') identifier).optional()
        ;
  
    type() =>
         qualified ref(typeArguments).optional()
        ;
  
    typeArguments() =>
         ref(token, '<') typeList ref(token, '>')
        ;
  
    typeList() =>
         type (ref(token, ',') type).star()
        ;
  
    block() =>
         ref(token, '{') statements ref(token, '}')
        ;
  
    statements() =>
         ref(statement).star()
        ;
  
    statement() =>
         ref(label).star() nonLabelledStatement
        ;
  
    nonLabelledStatement() =>
         (ref(token, '{'))=> block // Guard to break tie with map literal.
        | initializedVariableDeclaration ref(token, ';')
        | iterationStatement
        | selectionStatement
        | tryStatement
        | BREAK ref(identifier).optional() ref(token, ';')
        | CONTINUE ref(identifier).optional() ref(token, ';')
        | RETURN ref(expression).optional() ref(token, ';')
        | THROW ref(expression).optional() ref(token, ';')
        | ref(expression).optional() ref(token, ';')
        | ASSERT ref(token, '(') conditionalExpression ref(token, ')') ref(token, ';')
        | functionDeclaration functionBody
        ;
  
    label() =>
         identifier ref(token, ':')
        ;
  
    iterationStatement() =>
         WHILE ref(token, '(') expression ref(token, ')') statement
        | DO statement WHILE ref(token, '(') expression ref(token, ')') ref(token, ';')
        | FOR ref(token, '(') forLoopParts ref(token, ')') statement
        ;
  
    forLoopParts() =>
         forInitializerStatement ref(expression).optional() ref(token, ';') ref(expressionList).optional()
        | declaredIdentifier IN expression
        | identifier IN expression
        ;
  
    forInitializerStatement() =>
         initializedVariableDeclaration ref(token, ';')
        | ref(expression).optional() ref(token, ';')
        ;
  
    selectionStatement() =>
         IF ref(token, '(') expression ref(token, ')') statement ((ELSE)=> ELSE statement).optional()
        | SWITCH ref(token, '(') expression ref(token, ')') ref(token, '{') ref(switchCase).star() ref(defaultCase).optional() ref(token, '}')
        ;
  
    switchCase() =>
         ref(label).optional() (CASE expression ref(token, ':')).plus() statements
        ;
  
    defaultCase() =>
         ref(label).optional() (CASE expression ref(token, ':')).star() DEFAULT ref(token, ':') statements
        ;
  
    tryStatement() =>
         TRY block (ref(catchPart).plus() ref(finallyPart).optional() | finallyPart)
        ;
  
    catchPart() =>
         CATCH ref(token, '(') declaredIdentifier (ref(token, ',') declaredIdentifier).optional() ref(token, ')') block
        ;
  
    finallyPart() =>
         FINALLY block
        ;
  
    variableDeclaration() =>
         declaredIdentifier (ref(token, ',') identifier).star()
        ;
  
    initializedVariableDeclaration() =>
         declaredIdentifier (ref(token, '=') expression).optional() (ref(token, ',') initializedIdentifier).star()
        ;
  
    initializedIdentifierList() =>
         initializedIdentifier (ref(token, ',') initializedIdentifier).star()
        ;
  
    initializedIdentifier() =>
         identifier (ref(token, '=') expression).optional()
        ;
  
    constInitializedVariableDeclaration() =>
         declaredIdentifier (ref(token, '=') constantExpression).optional()
          (ref(token, ',') constInitializedIdentifier).star()
        ;
  
    constInitializedIdentifier() =>
         identifier (ref(token, '=') constantExpression).optional()
        ;
  
    // The constant expression production is used to mark certain expressions
  
negative.code:   // express these restrictions (yet), so this will have to be enforced by a
    // separate analysis phase.
    constantExpression() =>
          ref(expression)
        ;
  
    expression() =>
          ref(assignableExpression) & ref(assignmentOperator) & ref(expression)
        | ref(conditionalExpression)
        ;
  
    expressionList() =>
          ref(expression) & (ref(token, ',') & ref(expression)).star()
        ;
  
    arguments() =>
          ref(token, '(') & ref(argumentList).optional() & ref(token, ')')
        ;
  
    argumentList() =>
          ref(namedArgument) & (ref(token, ',') & namedArgument).star()
        | ref(expressionList) & (ref(token, ',') & namedArgument).star()
        ;
  
    namedArgument() =>
          ref(label) & ref(expression)
        ;
  
    assignableExpression() =>
          ref(primary) & (ref(arguments).star() & ref(assignableSelector)).plus()
        | ref(SUPER) & ref(assignableSelector)
        | ref(identifier)
        ;
  
    conditionalExpression() =>
          ref(logicalOrExpression) & (ref(token, '?') & ref(expression) & ref(token, ':') & ref(expression)).optional()
        ;
  
    logicalOrExpression() =>
  