Apologies for butting in where my opinion is not asked for, but ...

> statement: A! | B! | C | D
> 
> is so easy to understand: At least A and B, optionally C and/or D
> but without ORDER, in comparison to action codes and greps and maps
> and line noise.

At what point does "A!" become mandatory?  In the
        block: statement(s)  /* A or B must be part of block */
construct?  Or in the
        program: block(s)    /* A or B must be part of program */
        block: statement(s)
construct?  There are times whem both forms are useful -- but defining 
"mandatory" as part of the syntax for the singular "statement" 
construct is limitting.

Also, what if the programmer wants a more complicated logical function 
on the set of statements that comprises a "minimal" block?

It seems to me, P:RD already has the functionality you desire, in a
much more flexible form.  What's wrong with:

        statement: A | B | C | D
        block: "{" statements(s) "}" 
            {
                /* some code to test for the presense of A and B,
                   else return undef */
            }

I'd hate to see P:RD fall into same trap as regexps: P:RD doesn't need
to be a complete programming language.  P:RD is fine as a perl
accessory.

jm.


Reply via email to