[rfc-i] v3imp #8 Fragment tagging on sourcecode

derhoermi at gmx.net (Bjoern Hoehrmann) Sat, 31 January 2015 05:36 UTC

From: "derhoermi at gmx.net"
Date: Sat, 31 Jan 2015 06:36:55 +0100
Subject: [rfc-i] v3imp #8 Fragment tagging on sourcecode
In-Reply-To: <54C7FAD7.7040500@alum.mit.edu>
References: <54C20F92.4090400@seantek.com> <54C232FC.1000604@gmx.de> <54C275BC.1040905@alum.mit.edu> <20150123175511.GI2350@localhost> <54C28E3F.4040901@alum.mit.edu> <E378C876-5217-4274-86B6-1DBFB653DE24@vpnc.org> <54C29891.6040101@alum.mit.edu> <54C3576A.9030206@greenbytes.de> <54C3BE06.8010707@alum.mit.edu> <54C3C6A3.6080003@seantek.com> <54C3CF7F.6090901@seantek.com> <54C4AFF1.6030608@gmx.de> <54C7FAD7.7040500@alum.mit.edu>
Message-ID: <lipocap8e9vj6fd630h36l5vccesjsvjr0@hive.bjoern.hoehrmann.de>

* Paul Kyzivat wrote:
>To verify the using ABNF, you need to import at least the rule defining 
>the symbol in question. But that rule may well refer to other rules in 
>the referenced document. Should you:
>
>- selectively import rules that are needed, one by one, until there
>   are no more undefined symbols?
>
>- OR, simply import the full set of rules from the referenced document?
>
>Either way, there may then be conflicts between rules defined in the new 
>document and those imported from the old document. The potential is 
>greater if you have imported all the ABNF from the referenced document.

If you have RFC XXXX with

  A = B C

and RFC YYYY with

  X = <RFC:A>
  B = ...

then any implementation should be clever enough to distinguish between
RFCXXXX:B and RFCYYYY:B, so I do not think that is a problem.

>*Many* uses of ABNF reuse rules defined in the Core Rules. When doing 
>so, it would probably be fine to import the full set of Core Rules, but 
>it would probably be inappropriate to also import the rules defining the 
>ABNF of ABNF, and it certainly would be inappropriate to also import all 
>the fragments.

You would only ever import rules used on the right-hand side in your own
grammar. If you do not actually use `RFC5234:rulename` directly or indi-
rectly, it does not even matter that RFC 5234 has multiple definitions
for the `rulename` production (some used as examples, some meant to be
"exports" in API parlance).
-- 
Bj?rn H?hrmann ? mailto:bjoern at hoehrmann.de ? http://bjoern.hoehrmann.de
D-10243 Berlin ? PGP Pub. KeyID: 0xA4357E78 ? http://www.bjoernsworld.de
 Available for hire in Berlin (early 2015)  ? http://www.websitedev.de/