Re: ABNF, and miscellany

Bill Fenner <[email protected]>
Newsgroups gmane.ietf.rfc822
Message-ID <[email protected]>
On 5/12/05, Frank Ellermann <[email protected]> wrote:
> 
> Bruce Lilly wrote:
> > e.g. the unused
> >   3*5[foo]
> > construct.  After some thought, you may realize that that's
> > equivalent to *5foo
> 
> I'd expect 0, 3, 4, or 5 foo.  If what you say is true it has
> "a high astonishing factor", one of the taboos in my religion.
...
> 
> Same idea for 3*5*1(foo) => 3*5(*1(foo)) => 0, 3, 4, or 5 foo.
> That's what I expected, how do you get *5(foo) ?  I don't see
> 1*2(foo).  But I love syntax puzzles ;-)


Frank,

  I get *5foo too - it's one of the "canonicalizations" that my parser does.

mango% ./bap
a = 3*5[foo]
; foo UNDEFINED
a = *5foo

I think of it this way: you're saying you have between 3 and 5 [foo]s.
 Each [foo] may be empty or may be a foo.  So, you can get any number
between 0 and 3 inclusive by having some empty [foo]s and some
non-empty [foo]s.

If I wanted 0, 3, 4 or 5 foos I think I'd say [3*5foo].

  Bill
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.