anchor.diff:      let rec printProduction (production:Production.t<Source.t,Source.t>) = 
           let printElem (elem:elem<Source.t,Source.t>) = 
               let binding = function
  -                | Some(x) when String.forall System.Char.IsLetter (Source.toString x) -> (Source.toString x) + "="
  -                | Some(x) -> "<"+(Source.toString x)+">="
  +                | Some x when String.forall System.Char.IsLetter (Source.toString x) -> (Source.toString x) + "="
  +                | Some x  -> "<" + Source.toString x + ">="
                   | None -> ""
  -            [Str((if elem.omit then "-" else "") + (binding elem.binding))]@(bracketsIf ((match elem.binding with Some(_) -> true | None -> priority elem.rule=1) && priority elem.rule<50) (printProduction elem.rule))
  +            let omit = if elem.omit then "-" else ""
  +            let needBrackets =  let prio = priority elem.rule in if elem.binding.IsSome then prio < 50 else prio = 1
  +            seq { yield Str(omit + binding elem.binding); yield! bracketsIf  needBrackets (printProduction elem.rule) }
           match production with
  -        | PAlt(alt1, alt2) -> [Tabbed(printProduction alt1); Line([Str("| ")]@(printProduction alt2))] //Альтернатива
  -        | PSeq(elem_list,attr_option) -> (List.collect printElem elem_list)@[Str(printAttr(attr_option))] //Последовательность * атрибут.(атрибут всегда применяется к последовательности) 
  -        | PToken(source) -> [Str(Source.toString source)] //собственно токен
  -        | PRef(source, attr_option) -> [Str((Source.toString source) + printArg(attr_option))] //Vanilla rule reference with an optional args list.
  -        | PMany(many) -> (bracketsIf (priority many<50) (printProduction many))@[Str("*")] //expr*
  -        | PMetaRef(rule_name, opt_arg, metaArgs) -> [Str((Source.toString rule_name)+(printMetaArgs metaArgs)+(printArg opt_arg))] // Metarule reference like in "a: mr<x> y z"
  -        | PLiteral(source) -> [Str(Source.toString source)] //Литерал. Хочется в правилах явно писать ,например, .."if" expr "then" expr...
  +        | PAlt(alt1, alt2) -> seq {yield Tabbed(printProduction alt1); yield Line (seq {yield Str ("| "); yield! printProduction alt2})} //Альтернатива
  +        | PSeq(elem_seq,attr_option) -> seq {yield! (Seq.collect printElem elem_seq); yield Str(printAttr attr_option)} //Последовательность * атрибут.(атрибут всегда применяется к последовательности) 
  +        | PToken(source) -> to_seq <| Str (Source.toString source) //собственно токен
  +        | PRef(source, attr_option) -> to_seq <| Str (Source.toString source + printArg attr_option)  //Vanilla rule reference with an optional args list.
  +        | PMany(many) -> seq { yield! bracketsIf (priority many < 50) (printProduction many) ; yield Str "*"} //expr*
  +        | PMetaRef(rule_name, opt_arg, metaArgs) -> to_seq <| Str((Source.toString rule_name)+(printMetaArgs metaArgs)+(printArg opt_arg)) // Metarule reference like in "a: mr<x> y z"
  +        | PLiteral(source) -> to_seq <| Str (Source.toString source) //Литерал. Хочется в правилах явно писать ,например, .."if" expr "then" expr...
   //        |PRepet   of (t<'patt,'expr>) * int option * int option  //extended regexp repetition, "man egrep" for details
   //        |PPerm    of (t<'patt,'expr>) list //permutation (A || B || C)   
   ///// The following are obsolete and reduction to PRepet should be discussed.
  -        | PSome(some) -> (bracketsIf (priority some<50) (printProduction some))@[Str("+")] //expr+
  -        | POpt(opt) -> (bracketsIf (priority opt<50) (printProduction opt))@[Str("?")] //expr?
  -        | _ -> [Str("ERROR")]
  +        | PSome(some) -> seq {yield! (bracketsIf (priority some<50) (printProduction some)); yield Str("+")} //expr+
  +        | POpt(opt) -> seq {yield! (bracketsIf (priority opt<50) (printProduction opt)); yield Str("?")} //expr?
  +        | _ -> to_seq <| Str("ERROR")
   
  -    [Line([Str(startSign+rule.name+(printMetaArgs rule.metaArgs)+(printArgs rule.args)+": ")]); Tabbed(printProduction rule.body@[Str(";")])]
  +    seq {yield Line(to_seq <| Str(startSign+rule.name+(printMetaArgs rule.metaArgs)+(printArgs rule.args)+": "));
  +        yield Tabbed(seq{yield! printProduction rule.body; yield Str(";")})}
   
   let generate (input_grammar:Definition.t<Source.t,Source.t>) =
  -    let tbList = List.collect (fun rule -> printRule rule) input_grammar.grammar
  -    printSourceOpt(input_grammar.head)+(printTextBox 4 4 80 tbList)+printSourceOpt(input_grammar.foot)
  +    let tbSeq = Seq.collect (fun rule -> printRule rule) input_grammar.grammar
  +    printSourceOpt(input_grammar.head)+(printTextBox 4 4 80 tbSeq)+printSourceOpt(input_grammar.foot)
  
positive.code:                     (str_acc+word, true, 0)
              else
                  let spaces_count = if newline then ident else 2
                  if (String.length word<=windowSize-chars_in_line-spaces_count) then
                      let appended = (String.replicate spaces_count " ")+word
                      (str_acc+appended,false, chars_in_line+(String.length appended))
                  else
                      let newlineStr = (String.replicate (ident+splitTabSize) " ")+word
                      (str_acc+"\n"+newlineStr,false, String.length newlineStr)
              ) ("", true, 0) strList
      text
  
  let printRule (rule:Rule.t<Source.t,Source.t>) = 
      let bracketsIf cond s = if cond then [Str("(")]@s@[Str(")")] else s
      let startSign = if rule._public then "+" else ""
      let printAttr = function
          | Some(attr) -> "{"+(Source.toString attr)+"}"
  
negative.code:     let printArg = function
          | Some(attr) -> "["+(Source.toString attr)+"]"
          | None -> ""
      let printListBrackets  l_br r_br metaArgs =
          if (List.isEmpty metaArgs) then ""
          else l_br + (String.concat " " (List.map Source.toString metaArgs)) + r_br
      let printMetaArgs = printListBrackets "<<" ">>"
      let printArgs = printListBrackets "[" "]"
      let rec priority = function 
  