anchor.diff:                                          {{msg,identifier_name('$2')},'$4'}.
   
   msg_elems -> msg_elem msg_elems:        ['$1' | '$2'].
  +msg_elems -> ';' msg_elems:             '$2'.
   msg_elems -> '$empty':                  [].
   
   msg_elem -> cardinality type identifier '=' dec_lit ';':
  
positive.code:                                "enum    e1 { a = 17; }"]),
      ["a/b/c.proto", "d/e/f.proto"] = fetch_imports(Elems).
  
  %% helper
  parse_lines(Lines) ->
      S = binary_to_list(iolist_to_binary([[L,"\n"] || L <- Lines])),
      case gpb_scan:string(S) of
  
negative.code:                                         {{service,identifier_name('$2')},'$4'}.
  
  rpc_defs -> rpc_def rpc_defs:           ['$1' | '$2'].
  rpc_defs -> ';' rpc_defs:               '$2'.
  rpc_defs -> '$empty':                   [].
  
  rpc_def -> rpc identifier '(' name ')' returns '(' name ')' ';':
                                          {identifier_name('$2'), '$4', '$8'}.
  rpc_def -> rpc identifier '(' name ')' returns '(' name ')' '{' m_opts '}' ';':
                                          {identifier_name('$2'), '$4', '$8'}.
  
  m_opts -> ';' m_opts:                   '$2'.
  m_opts -> '$empty':                     [].
  
  Erlang code.
  
  