def getaddress(self):
self.commentlist = []<EOL>self.gotonext()<EOL>oldpos = self.pos<EOL>oldcl = self.commentlist<EOL>plist = self.getphraselist()<EOL>self.gotonext()<EOL>returnlist = []<EOL>if self.pos >= len(self.field):<EOL><INDENT>if plist:<EOL><INDENT>returnlist = [('<STR_LIT:U+0020>'.join(self.commentlist), plist[<NUM_LIT:0>])]<EOL><DEDENT><DEDENT>elif self.field[self.pos] in '<STR_LIT>':<EOL><INDENT>self.pos = oldpos<EOL>self.commentlist = oldcl<EOL>addrspec = self.getaddrspec()<EOL>returnlist = [('<STR_LIT:U+0020>'.join(self.commentlist), addrspec)]<EOL><DEDENT>elif self.field[self.pos] == '<STR_LIT::>':<EOL><INDENT>returnlist = []<EOL>fieldlen = len(self.field)<EOL>self.pos += <NUM_LIT:1><EOL>while self.pos < len(self.field):<EOL><INDENT>self.gotonext()<EOL>if self.pos < fieldlen and self.field[self.pos] == '<STR_LIT:;>':<EOL><INDENT>self.pos += <NUM_LIT:1><EOL>break<EOL><DEDENT>returnlist = returnlist + self.getaddress()<EOL><DEDENT><DEDENT>elif self.field[self.pos] == '<STR_LIT:<>':<EOL><INDENT>routeaddr = self.getrouteaddr()<EOL>if self.commentlist:<EOL><INDENT>returnlist = [('<STR_LIT:U+0020>'.join(plist) + '<STR_LIT>' +'<STR_LIT:U+0020>'.join(self.commentlist) + '<STR_LIT:)>', routeaddr)]<EOL><DEDENT>else: returnlist = [('<STR_LIT:U+0020>'.join(plist), routeaddr)]<EOL><DEDENT>else:<EOL><INDENT>if plist:<EOL><INDENT>returnlist = [('<STR_LIT:U+0020>'.join(self.commentlist), plist[<NUM_LIT:0>])]<EOL><DEDENT>elif self.field[self.pos] in self.specials:<EOL><INDENT>self.pos += <NUM_LIT:1><EOL><DEDENT><DEDENT>self.gotonext()<EOL>if self.pos < len(self.field) and self.field[self.pos] == '<STR_LIT:U+002C>':<EOL><INDENT>self.pos += <NUM_LIT:1><EOL><DEDENT>return returnlist<EOL>
Parse the next address.