anchor.diff:      /// - The start of a choice.
       /// - The end of a choice (permits condition).
       /// - Some text (permits condition).
  -    let rec private parseFunctionInner (tokens:AttributedTokenizedLine list) =
  -        
  +    let rec private parseSequentialOrChoiceInner makeNode output (tokens:AttributedTokenizedLine list) =
  +        match tokens with
  +        | [] ->
  +            if output |> List.length = 1 then output.[0]
  +            else makeNode (output |> List.rev |> Array.ofList)
  +        | line::t ->
  +            match line.Tokens.[0].Token with
  +            | FunctionName functionName ->
  +                if line.Tokens.Length = 1 then
  +                    parseSequentialOrChoiceInner makeNode (ParsedFunctionInvocation(functionName, ParsedUnconditional)::output) t
  +                else if line.Tokens.[1].Token <> OpenBrace then
  +                    ParseErrors([|(makeParseError line.LineNumber line.Tokens.[1].TokenStartLocation line.Tokens.[1].TokenEndLocation "Invalid token")|])
  +                else
  +                    let condition = ConditionParser.parseCondition line.LineNumber false (line.Tokens |> List.skip 1)
  +                    if condition.HasErrors then
  +                        match condition.Condition with
  +                        | ParsedCondition.ParsedConditionError errors -> ParseErrors errors
  +                        | _ -> failwith "Internal error"
  +                    else
  +                        parseSequentialOrChoiceInner makeNode (ParsedFunctionInvocation(functionName, condition.Condition)::output) t
  +            | Break ->
  +                if line.Tokens.Length = 1 then
  +                    parseSequentialOrChoiceInner makeNode (ParsedParagraphBreak(ParsedUnconditional)::output) t
  +                else if line.Tokens.[1].Token <> OpenBrace then
  +                    ParseErrors([|(makeParseError line.LineNumber line.Tokens.[1].TokenStartLocation line.Tokens.[1].TokenEndLocation "Invalid token")|])
  +                else
  +                    let condition = ConditionParser.parseCondition line.LineNumber false (line.Tokens |> List.skip 1)
  +                    if condition.HasErrors then
  +                        match condition.Condition with
  +                        | ParsedCondition.ParsedConditionError errors -> ParseErrors errors
  +                        | _ -> failwith "Internal error"
  +                    else
  +                        parseSequentialOrChoiceInner makeNode (ParsedParagraphBreak(condition.Condition)::output) t
  +            | Sequential ->
  +                let (toSkip, result) = findEndOfSeqOrChoice ParsedSeq line t
  +                match result with
  +                | ParseErrors _ -> result
  +                | _ ->
  +                    let contLines = t |> List.skip toSkip
  +                    parseSequentialOrChoiceInner makeNode (result::output) contLines
  +            | Choice ->
  +                let (toSkip, result) = findEndOfSeqOrChoice ParsedSeq line t
  +                match result with
  +                | ParseErrors _ -> result
  +                | _ ->
  +                    let contLines = t |> List.skip toSkip
  +                    parseSequentialOrChoiceInner makeNode (result::output) contLines
  +            | _ ->
  +                // Try to find a condition.
  +                let conditionIndex = line.Tokens |> List.tryFindIndex (fun attToken -> attToken.Token = OpenBrace)
  +                if conditionIndex |> Option.isNone then
  +                    let sentenceNode = parseSimpleSequentialInner line.LineNumber [] line.Tokens
  +                    match sentenceNode with
  +                    | ParsedSentenceErrors errors -> ParseErrors errors
  +                    | _ -> parseSequentialOrChoiceInner makeNode ((ParsedSentence(sentenceNode, ParsedUnconditional))::output) t
  +                else
  +                    let conditionIndex = conditionIndex.Value
  +                    let condition = line.Tokens |> List.skip conditionIndex |> ConditionParser.parseCondition line.LineNumber false
  +                    match condition.Condition with
  +                    | ParsedConditionError errors -> ParseErrors errors
  +                    | _ ->
  +                        let sentenceNode = parseSimpleSequentialInner line.LineNumber [] line.Tokens
  +                        match sentenceNode with
  +                        | ParsedSentenceErrors errors -> ParseErrors errors
  +                        | _ -> parseSequentialOrChoiceInner makeNode ((ParsedSentence(sentenceNode, condition.Condition))::output) t
  +    and findEndOfSeqOrChoice makeNode line remainingLines =
           failwith ""
   
       /// Parse the CategorizedAttributedTokenSet for a function definition into a tree.
  
positive.code:                             else if tokenSet.Tokens.[1].Tokens.Length > 1 || tokenSet.Tokens.[1].Tokens.[0].Token <> OpenCurly then
                                  (name, true, (ParseErrors [|(makeParseError tokens.[1].LineNumber tokens.[1].Tokens.[0].TokenStartLocation tokens.[1].Tokens.[0].TokenEndLocation "Invalid token")|]))
                              else
                                  let tree = tokenSet.Tokens |> List.skip 2 |> List.take (tokenSet.Tokens.Length - 3) |> parseFunctionInner
                                  let hasErrors = match tree with | ParseErrors _ -> true | _ -> false
                                  (name, hasErrors, tree)
                          else if firstLine.[2].Token <> OpenCurly then
                              (name, true, (ParseErrors [|(makeParseError fl.LineNumber firstLine.[2].TokenStartLocation firstLine.[2].TokenEndLocation "Invalid token")|]))
                          else
                              let tree = tokenSet.Tokens |> List.skip 1 |> List.take (tokenSet.Tokens.Length - 2) |> parseFunctionInner
                              let hasErrors = match tree with | ParseErrors _ -> true | _ -> false
                              (name, hasErrors, tree)
          {   File = tokenSet.File
  
negative.code:                 if endIndex |> Option.isNone then
                      ParsedSentenceErrors [|(makeParseError line h.TokenStartLocation ((t |> List.tryLast |> defaultArg <| h).TokenEndLocation) "Unmatched open curly")|]
                  else
                      let parsedChoice = parseSimpleChoiceInner line (t |> List.take endIndex.Value)
                      match parsedChoice with
                      | ParsedSentenceErrors errors -> parsedChoice
                      | _ -> parseSimpleSequentialInner line (parsedChoice::output) (t |> List.skip (endIndex.Value + 1))
              | RawText text -> parseSimpleSequentialInner line ((ParsedStringValue text)::output) t
              | VariableName name -> parseSimpleSequentialInner line ((ParsedVariable name)::output) t
              | _ -> ParsedSentenceErrors [|(makeParseError line h.TokenStartLocation h.TokenEndLocation "Invalid token")|]
      and private parseSimpleChoiceInner line (tokens:AttributedToken list) =
          // Find '|' tokens at curly count 0.
          let li =
              tokens
  