[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

the grammar



The recently-posted grammar had some constructs in it (such as ``&'', ``...'')
for which I am unclear as to precedence. (I proved that ``&'' was associate,
which helps.)

I am *assuming* that ``...'' takes the *shortest* construct to the left as its
operand and that ``&'' binds more tightly than ``|''; also that ``#'' is
effectively just a non-terminal name (ie it could have been a rule called
``possible-frees'').

Since ``[foo ...]'' seems to mean ``zero or more foo's'', could one have
defined a suffix operator ``*'' for this? (Then ``#'' becomes ``free*''.)

If I have time, I may stuff this grammar through my I-don't-care-two-hoots-
whether-it's-ambiguous-I'll-just-give-you-all-the-parses parser.
(Unfortunately it doesn't handle null productions, so a little re-working
would be needed.)

Regards,    | It's strange how you suddenly discover bizarre and dangerous
Kers.       | holes in your knowledge.  I fell down one today. - Steve Knight