ietf-mta-filters
[Top] [All Lists]

Re: "extensible" grammar

1998-01-21 02:59:36
Date: Wed, 21 Jan 1998 01:10:02 -0800 (PST)
From: Ned Freed <Ned(_dot_)Freed(_at_)innosoft(_dot_)com>
Cc: ietf-mta-filters(_at_)imc(_dot_)org

Out of curiosity, I put together a grammar for the "extensible" grammar
being discussed.  If there are any conflicts, let me know.

How do you do an if-then-else in this grammar?

if is a control-structure that takes a test and a block, evaluating only if
the block is true.

else is a control-structure that takes a block.  It is only valid If the
preceeding command was an if control-structure AND it was in the same
block.  (Error if not.)  If the preceeding if was false, the else's block
is evaluated.

... I'm not sure I like this at all.  It took me more than one try to
explain that, and if/else can be done too easily in the parser to be
messing around with this.

I think the limitation is one block per control-structure.  This is
problematic at best; I believe it has problems again when I consider the
right way to do a cond (without having lots of bogus crap like I've just
suggested for else).

I still sort of like this grammar, but the control-structure rule seems to
be a lose.

-- 
                                          Tim Showalter 
tjs+(_at_)andrew(_dot_)cmu(_dot_)edu


<Prev in Thread] Current Thread [Next in Thread>