anchor.diff:          setLexbufState(tokenLexbufState)
           prevWasAtomicEnd <- isAtomicExprEndToken(tok)
           tok
  +    
  +    let rec suffixExists p l = match l with [] -> false | _::t -> p t || suffixExists p t
  +
  +    let tokenBalancesHeadContext token stack = 
  +        match token,stack with 
  +        | END, (CtxtWithAsAugment(_)  :: _)
  +        | (ELSE | ELIF), (CtxtIf _ :: _)
  +        | DONE         , (CtxtDo _ :: _)
  +        // WITH balances except in the following contexts.... Phew - an overused keyword! 
  +        | WITH         , (  ((CtxtMatch _ | CtxtException _ | CtxtMemberHead _ | CtxtInterfaceHead _ | CtxtTry _ | CtxtTypeDefns _ | CtxtMemberBody _)  :: _)
  +                                // This is the nasty record/object-expression case 
  +                                | (CtxtSeqBlock _ :: CtxtParen(LBRACE,_)  :: _) )
  +        | FINALLY      , (CtxtTry _  :: _) -> 
  +            true
  +
  +        // for x in ienum ... 
  +        // let x = ... in
  +        | IN           , ((CtxtFor _ | CtxtLetDecl _) :: _) ->
  +            true
  +        // 'query { join x in ys ... }'
  +        // 'query { ... 
  +        //          join x in ys ... }'
  +        // 'query { for ... do
  +        //          join x in ys ... }'
  +        | IN           , stack when detectJoinInCtxt stack ->
  +            true
  +
  +        // NOTE: ;; does not terminate a 'namespace' body. 
  +        | SEMICOLON_SEMICOLON, (CtxtSeqBlock _ :: CtxtNamespaceBody _ :: _) -> 
  +            true
  +
  +        | SEMICOLON_SEMICOLON, (CtxtSeqBlock _ :: CtxtModuleBody (_,true) :: _) -> 
  +            true
  +
  +        | t2           , (CtxtParen(t1,_) :: _) -> 
  +            parenTokensBalance t1  t2
  +
  +        | _ -> 
  +            false
                 
       //----------------------------------------------------------------------------
       // Parse and transform the stream of tokens coming from popNextTokenTup, pushing
  
positive.code:         let tokenLexbufState = getLexbufState()
          savedLexbufState <- tokenLexbufState
          haveLexbufState <- true
          TokenTup(token,tokenLexbufState,(lastTokenStart,lastTokenEnd))
  
      //----------------------------------------------------------------------------
      // Fetch a raw token, either from the old lexer or from our delayedStack
  
negative.code:             //           with ... 
              //           end 
              | CtxtWithAsAugment _,((CtxtInterfaceHead _ | CtxtMemberHead _ | CtxtException _ | CtxtTypeDefns _) as limitCtxt  :: _rest)
                        -> PositionWithColumn (limitCtxt.StartPos,limitCtxt.StartCol) 
  
              // Permit unindentation via parentheses (or begin/end) following a 'then', 'else' or 'do':
              //        if nr > 0 then (  
  