parse_Name_Addr_Header method

dynamic parse_Name_Addr_Header()

Implementation

dynamic parse_Name_Addr_Header() {
  var $$;
  switch (_ch >= 0 && _ch <= 1114111
      ? 0
      : _ch == -1
          ? 2
          : 1) {
    case 0:
    case 2:
      var ch0 = _ch, pos0 = _cursor, startPos0 = _startPos;
      _startPos = _cursor;
      while (true) {
        var testing0 = _testing;
        for (var reps = [];;) {
          _testing = _cursor;
          switch (_ch >= 0 && _ch <= 1114111
              ? 0
              : _ch == -1
                  ? 2
                  : 1) {
            case 0:
            case 2:
              var startPos1 = _startPos;
              _startPos = _cursor;
              $$ = _parse_display_name();
              _startPos = startPos1;
              break;
            case 1:
              $$ = null;
              success = false;
              break;
          }
          if (!success && _cursor > _testing) {
            _failure(_expect82);
          }
          if (success) {
            reps.add($$);
          } else {
            success = true;
            _testing = testing0;
            $$ = reps;
            break;
          }
        }
        if (!success) break;
        var seq = List<dynamic>.filled(5, null, growable: false)..[0] = $$;
        $$ = _parse_LAQUOT();
        if (!success) break;
        seq[1] = $$;
        $$ = _parse_SIP_URI();
        if (!success) break;
        seq[2] = $$;
        $$ = _parse_RAQUOT();
        if (!success) break;
        seq[3] = $$;
        var testing1 = _testing;
        for (var reps = [];;) {
          _testing = _cursor;
          switch (_ch >= 0 && _ch <= 1114111
              ? 0
              : _ch == -1
                  ? 2
                  : 1) {
            case 0:
            case 2:
              var ch1 = _ch, pos1 = _cursor, startPos2 = _startPos;
              _startPos = _cursor;
              while (true) {
                $$ = _parse_SEMI();
                if (!success) break;
                var seq = List<dynamic>.filled(2, null, growable: false)
                  ..[0] = $$;
                $$ = _parse_generic_param();
                if (!success) break;
                seq[1] = $$;
                $$ = seq;
                break;
              }
              if (!success) {
                _ch = ch1;
                _cursor = pos1;
              }
              _startPos = startPos2;
              break;
            case 1:
              $$ = null;
              success = false;
              break;
          }
          if (!success && _cursor > _testing) {
            _failure(_expect30);
          }
          if (success) {
            reps.add($$);
          } else {
            success = true;
            _testing = testing1;
            $$ = reps;
            break;
          }
        }
        if (!success) break;
        seq[4] = $$;
        $$ = seq;
        if (success) {
          final $1 = seq[0];
          final $2 = seq[1];
          final $3 = seq[2];
          final $4 = seq[3];
          final $5 = seq[4];
          final $start = startPos0;
          var pos0 = _startPos, offset = $start;
          {
            ///CODE_START
            try {
              $$ = NameAddrHeader(data.uri, data.display_name, data.params);
            } catch (e) {
              $$ == -1;
            }

            ///CODE_END
          }
        }
        break;
      }
      if (!success) {
        _ch = ch0;
        _cursor = pos0;
      }
      _startPos = startPos0;
      break;
    case 1:
      $$ = null;
      success = false;
      break;
  }
  if (!success && _cursor > _testing) {
    _failure(_expect28);
  }
  return $$;
}