PSL operator precedence: repetition > composition?


Subject: PSL operator precedence: repetition > composition?
From: Yum, Sunny (Sunny_Yum@mentorg.com)
Date: Tue Aug 19 2003 - 13:39:57 PDT


In v1.01 of the PSL LRM, the table defining the operator precedence for the
various PSL operators (section 4.2.2) states that all SERE construction
operators have the same precedence.

The specified operators include:

        ; concatenation
        [* ] consecutive repetition
        [= ] non-consecutive repetition
        [-> ] non-consecutive, goto repetition

It seems to me, however, that the precedence of the repetition operators
should be higher than that of the concatenation operator.

Take the following sequence as an example:

        { a; b[*3]; c }

If the ";" and "[* ]" operators have the same precedence, then an equivalent
sequence would be:

        { {{{a}; b}[*3]}; {c} }
        or
        { {a; b}[*3]; c }

In most cases (and in many of the examples provided by the LRM), the LRM
implies that the ";" operator has lower precedence than the repetition
operators. As a result, the original example sequence should be interpreted
as:

        { {{a}; {b[*3}}; {c} }
        or
        { a; {b[*3]}; c }

Any comments?

Regards,
Sunny



This archive was generated by hypermail 2b28 : Tue Aug 19 2003 - 13:40:35 PDT