anchor.diff:                                          {{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 ')' ';':
  +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.
   
  
positive.code:                                         {{enum,identifier_name('$2')},'$4'}.
  
  enum_fields -> enum_field enum_fields:  ['$1' | '$2'].
  enum_fields -> enum_field:              ['$1'].
  
  enum_field -> identifier '=' integer ';':
                                          {identifier_name('$1'), '$3'}.
  
negative.code:                       absolutify_names(Defs)))))))).
  
  
  parses_service_ignores_empty_method_option_braces_test() ->
      {ok,Defs} = parse_lines(["message m1 {required uint32 f1=1;}",
                               "message m2 {required uint32 f2=1;}",
                               "service s1 {",
                               "  rpc req(m1) returns (m2) {};",
                               "}"]),
      [{{msg,m1}, _},
       {{msg,m2}, _},
       {{service,s1},[{req,m1,m2}]}] = do_process_sort_defs(Defs).
  
  
  parses_empty_toplevel_statement_test() ->
      {ok,Defs} = parse_lines(["; message m1 { required uint32 f1=1; }; ; "]),
      [{{msg,m1}, _}] = do_process_sort_defs(Defs).
  
  parses_empty_message_statement_test() ->
      {ok,Defs} = parse_lines(["message m1 { ; ; required uint32 f1=1;;; }"]),
      [{{msg,m1}, [#field{name=f1}]}] = do_process_sort_defs(Defs).
  
  parses_empty_enum_statement_test() ->
      {ok,Defs} = parse_lines(["enum e1 { ; ; ee1=1;;; }"]),
      [{{enum,e1}, [{ee1,1}]}] = do_process_sort_defs(Defs).
  
  parses_empty_service_statement_test() ->
      {ok,Defs} = parse_lines(["message m1 { required uint32 f1=1; }",
                               "service s1 { ; ; rpc r1(m1) returns (m1);;; }"]),
      [{{msg,m1}, _},
       {{service,s1},[{r1,m1,m1}]}] = do_process_sort_defs(Defs).
  
  parses_empty_service_statement_method_options_test() ->
      {ok,Defs} = parse_lines(["message m1 { required uint32 f1=1; }",
                               "service s1 { rpc r1(m1) returns (m1){;;;}; }"]),
      [{{msg,m1}, _},
       {{service,s1},[{r1,m1,m1}]}] = do_process_sort_defs(Defs).
  
  fetches_imports_test() ->
      {ok, Elems} = parse_lines(["package p1;"
  