Hi,
I have a question about the scope of two specific operators in XLE: shuffle and Kleene closure.
Say I have an expression like the following:
XP --> X* , Y.
Depending on how the scope of the operators is interpreted, my guess is that there are different types of possible behavior:
1) XLE interprets the expression as [X,Y]*. XLE will accept strings of the following type:
XY YX XYXY XYYX
2) XLE interprets the expression as [X]*,Y. XLE will accept strings of the following type:
XY XXY YX YXXX
(Only a single Y in each string.)
The XLE documentation states that if two operators (* + # ~ - \ / , < >) occur next to each other, it disambiguates possible ambiguities by giving the left-hand operator wider scope than the right-hand operator (if I am not mistaken, this is behavior 1).
My questions are these:
- Is there scope ambiguity in my expression?
- If there is scope ambiguity in my expression, how do you suggest it be resolved towards behavior 2 (which is the behavior I want)?
I have implemented my expression in XLE, and the behavior is the desired one, but I'd like to understand why.
Thanks, Jani