Hi!
I have been developing the rule sets for some time now and never had problems using universal class. For the first time now I need to use ** in the middle of the pattern and I am experiencing problems.
My pattern:
*T | ** | ^ | / | ^ | F
T= Street type
F = Floor
I am trying to identify the floor here (operand [3], [4], [5] and [6]), and I am not interested in operand [2] as this can either be empty (null) or contain some tokens.
The pattern it is not being recognized by QS. I would expect this to work just fine, but nothing happens.
I changed my pattern to
*T | ** (1:1)| ^ | / | ^ | F
and it worked. But then I need to have at least one token between T and first ^,and that is not always the case.
Anyone familiar with this issue and knows what causes it? Could this bee a bug?
Amra
QS-Use of universal class (**) in pattern action code - Bug?
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 527
- Joined: Thu Apr 19, 2007 1:25 am
- Location: Melbourne
I would have expected your original pattern to work, but how about using 2 floating specifiers?
*T | *^ | / | ^ | F
Or, as Ray said, why not just look for the ^ | / | ^ | F at the end?
The only reason you would need something as specific as the full pattern for something like floors is if the preceding tokens somehow changed the context of the part you're actually looking for and you needed to parse differently for that specific situation.
*T | *^ | / | ^ | F
Or, as Ray said, why not just look for the ^ | / | ^ | F at the end?
The only reason you would need something as specific as the full pattern for something like floors is if the preceding tokens somehow changed the context of the part you're actually looking for and you needed to parse differently for that specific situation.