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

Bjoern Hoehrmann derhoermi at gmx.net
Fri Jan 30 21:36:55 PST 2015

* 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/ 

More information about the rfc-interest mailing list