ietf-822
[Top] [All Lists]

Re: ABNF, and miscellany

2005-05-13 08:51:31

On 5/12/05, Frank Ellermann <nobody(_at_)xyzzy(_dot_)claranet(_dot_)de> 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