Received: from localhost by CS.UTK.EDU with SMTP (cf v2.9s-UTK) id KAA04065; Mon, 5 Jun 1995 10:36:18 -0400 X-Resent-To: drums@CS.UTK.EDU ; Mon, 5 Jun 1995 10:36:17 EDT Errors-to: owner-drums@CS.UTK.EDU Received: from po8.andrew.cmu.edu by CS.UTK.EDU with ESMTP (cf v2.9s-UTK) id KAA04056; Mon, 5 Jun 1995 10:36:15 -0400 Received: (from postman@localhost) by po8.andrew.cmu.edu (8.6.12/8.6.12) id KAA06961 for drums@cs.utk.edu; Mon, 5 Jun 1995 10:36:09 -0400 Received: via switchmail; Mon, 5 Jun 1995 10:36:07 -0400 (EDT) Received: from hogtown.andrew.cmu.edu via qmail ID ; Mon, 5 Jun 1995 10:34:16 -0400 (EDT) Received: from hogtown.andrew.cmu.edu via qmail ID ; Mon, 5 Jun 1995 10:34:13 -0400 (EDT) Received: from BatMail.robin.v2.14.CUILIB.3.45.SNAP.NOT.LINKED.hogtown.andrew.cmu.edu.sun4c.411 via MS.5.6.hogtown.andrew.cmu.edu.sun4c_411; Mon, 5 Jun 1995 10:34:07 -0400 (EDT) Message-ID: Date: Mon, 5 Jun 1995 10:34:07 -0400 (EDT) From: John Gardiner Myers To: drums@CS.UTK.EDU Subject: Re: address syntax In-Reply-To: <1786.802222517@munnari.OZ.AU> References: <1786.802222517@munnari.OZ.AU> Beak: is Not Robert Elz writes: > The example you gave is what was intended by "heuristic" I > suspect, that is, shortcut parsing, not looking at the syntax > in detail There is nothing heuristic about such parsers. Given any route-addr, it will in all cases correctly determine which part is the route and which part is the addr-spec. It is a correct parser because a colon cannot exist in a domain, so the first colon after a "<@" must be the terminating colon of the route. The fact that it does not do a detailed parse of the route is irrelevant. This is a top-down parsing approach, the program can further parse the route as it needs. > In any case, any stripping code that doesn't ensure that the final > '@' remains in the address, which seems to be what might go wrong > in the example you gave seems terribly fragile to me, similarly > any stripping without determining that the address is syntactically > correct first. Take a modification of Harald's example: <@[ip:v:6]:user@final.host.com> This is syntactically illegal, so one can parse it as one wishes. One way to parse this would be: <@[ip:v:6]:user@final.host.com> ^-^ ^-------^ ^-------------^ domain | domain local-part ^---^^-----------------------^ route addr-spec and that's what the top-down parsing approach will produce. -- _.John G. Myers Internet: jgm+@CMU.EDU LoseNet: ...!seismo!ihnp4!wiscvm.wisc.edu!give!up