> Date: Mon, 29 Apr 2002 23:13:30 -0400 (EDT)
> From: Glenn Fowler <yyy@xxxxxxxxxxxxxxxx>
>
> > But isn't this begging the question? These grammar rules are
> > recursive: to deduce what they mean, we need to reason recursively.
> > We can't reliably transform them into iterative rules until we first
> > know what they mean as written.
>
> if you start off thinking 'parse tree' then you will bring in another
> recursive component to traverse the parse tree,
But I must start off thinking 'parse tree', since that's how the POSIX
standard defines ERE syntax. Any interpretation that says "don't look
at the POSIX grammar's parse trees, they're merely an artifact" is a
bit suspect, as it is all too tempting to ignore what POSIX actually
said in favor of one's intuition for what POSIX ought to have said.
> if /[a-z0-9]/ is a part then /*/ must also be a part
My point (perhaps poorly stated) was that informal terminology like
"part" is so loosely worded that many answers are possible, and it's
unlikely that we'll gain further insight about the standard by talking
that way. If you want /*/ to count as a "part" too, then your
definition of "part" doesn't agree with mine -- but we are so far away
from what the standard actually says that I don't think it matters.
If you were genuinely puzzled by what RE-ASSOC(1a) or (1b) meant, then
that would be a different matter; but I sense that by now you
understand them, even if you don't agree with them. You prefer the
behavior of RE-ASSOC(1b), though you prefer a different (and to my
mind a less plausible) explanation for that behavior. At this point I
doubt whether either of us is likely to convince the other as to which
explanation is better.
|