Neil Conway <[EMAIL PROTECTED]> writes:
> Considering that the Bison manual suggests that it implements 
> mid-rule actions by introducing an implicit bogus non-terminal ([1]),

Indeed ... and the reason that they bothered to do that is that mid-rule
actions are more understandable ;-).  A nonterminal that is not intended
to represent any real input, ever, is just plain weird.

> Unless we want two contiguous mid-rule actions 
> (which is even _less_ readable), we'll need to futz with adding another 
> member to %union to hold the two varnos the mid-rule action will 
> produce.

Not at all.  The right way to do this, I think, is for the mid-rule
action to palloc the PLpgSQL_exception_block, fill the variables into
that, and return the block as its semantic value.  The end-of-rule
action then picks up the block and adds what it needs to.

One reason this is cleaner is that it scales to more SQLERRx variables
without further renumbering of the rule components.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to