6 / 6
May 2008

I wanted to know whether the blank string can appear at the left hand side of a replacement instruction. For example:

...
((->SOMETHING
))->SOMETHING_ELSE
->I_WONDER
...

will this work?

Thanks.

~
musically_ut

  • created

    May '08
  • last reply

    May '08
  • 5

    replies

  • 805

    views

  • 5

    users

No, that isn't possible. But empty string can appear on the right side of the rule.

Even if you could do this, you wouldn't want to. Such a rule would always apply, leading to a never-ending cycle. Example using your rules:

()()((()))
()()SOMETHING()))
()()SOMETHING(SOMETHING_ELSE)
I_WONDER()()SOMETHING(SOMETHING_ELSE)
I_WONDERI_WONDER()()SOMETHING(SOMETHING_ELSE)
I_WONDERI_WONDERI_WONDER()()SOMETHING(SOMETHING_ELSE)
...

If you want a rule that only applies when the whole string is blank, that doesn't appear to be possible from my understanding of the problem. So never go to a blank string smiley

Yeah .. thinking of reg ex reminded me of that property. wink
Thanks.

~
musically_ut

The problem statement does say that if a rule is applied that doesn't change the string then the procedure should halt, but this is not true on the tester.

If after check all the rules string doesn't change then tester halt.