anchor.diff:          | PSome body -> PSome <| replace body
           | POpt body  -> POpt  <| replace body
           | PMany body -> PMany <| replace body
  +        | PAlt (l, r) -> PAlt(replace l, replace r)
  +        | PLiteral _ as literal -> literal
  +        | PToken _ as token -> token
           | PRef(name, attrs) as prev ->
               prev |> tryReplaceActual formalToAct (Source.toString name)
  -        | PAlt (l, r) -> PAlt(replace l, replace r)
           | PSeq (ruleList, actionCode, l) ->
               PSeq (ruleList |> List.map (fun x ->  {x with rule = replace x.rule})
                       , actionCode, l)
  -        | PLiteral _ as literal -> literal
  -        | PToken _ as token -> token
           | PMetaRef (name, attrs, metaArgs) -> 
               if metaArgs.IsEmpty then
                   PRef(name, attrs) |> tryReplaceActual formalToAct (Source.toString name)
  
positive.code: /// if rule has metaArgs then it is a metarule
  let private isMetaRule (r:Rule.t<Source.t,Source.t>) = r.metaArgs <> []
  
  /// hash table for metarules
  let private metaRulesTbl grammar =
  
      /// Map: using_module -> (rule_name -> (decl_module, rule_body));
      let collectMeta grammar = 
          let rulesMap = getRulesMap grammar
          let publicRules = new Dictionary<_,_>(getPublicRules grammar)
          /// Only public meta-rules present here
          let publicMeta =
              let map = new Dictionary<string,Rule.t<Source.t, Source.t> list>()
              publicRules |> Seq.iter (fun item ->
                  map.[item.Key] <- List.filter isMetaRule item.Value
              )
              map
  
          grammar
          |> List.map (fun m ->
              let res = new Dictionary<_,_>()
              m.openings
              |> List.iter (fun op ->
                  publicMeta.[op.text]
                  |> List.iter (fun rule ->
                      res.[rule.name.text] <- (op.text, rule)
                  )
              )
              m.rules
              |> List.filter isMetaRule
              |> List.iter (fun rule ->
                  res.[rule.name.text] <- (getModuleName m, rule)
              )
              getModuleName m, res
          )
          |> dict
      
      collectMeta grammar
  
  (** grammar processing:
   *  - collect metarules
  
negative.code:     inherit Conversion()
          override this.Name = "ExpandMeta"
          override this.ConvertGrammar (grammar,_) = expandMetaRules grammar
  