|
|
Experienced member
Total posts: 82
Joined: Feb 23, 2015
|
At compile time, I got “bad number” warning for every ^reuse() call accessing a rule label, as shown in the scree shot.
They are getting annoying as the script size grows. How can I avoid them? Many thanks.
Image Attachments
Click thumbnail to see full-size image
|
|
|
|
|
Posted: Aug 19, 2015 |
[ # 1 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
I’d need to see source to see what was happening. The source around 10 lines of book.top at 85 would probably do
|
|
|
|
|
Posted: Aug 20, 2015 |
[ # 2 ]
|
|
Experienced member
Total posts: 82
Joined: Feb 23, 2015
|
Please see the attached screen copy. Thanks.
Image Attachments
Click thumbnail to see full-size image
|
|
|
|
|
Posted: Aug 20, 2015 |
[ # 3 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
Nope, not enough data to regenerate the error. Maybe I need the file.
Also, rather than (why do not) and such, you are better off with “why do not” when you want a phrase. And
{to see if it be on the shelf} does not work. You are saying ignore any 1 of those words, not the phrase. Because phrases are limited to 5 long, you’d need to do {"to see if it be"} {"on the shelf"}
|
|
|
|
|
Posted: Aug 20, 2015 |
[ # 4 ]
|
|
Experienced member
Total posts: 82
Joined: Feb 23, 2015
|
Thanks for the “why do not” phrasing comment. Will certainly do that.
I actually know the {....} issue. Probably not tested at that spot. Thanks anyway.
I’ll see how I can send enough data to reproduce the symptom.
|
|
|
|
|
Posted: Aug 20, 2015 |
[ # 5 ]
|
|
Experienced member
Total posts: 82
Joined: Feb 23, 2015
|
I can close this one now. As I just moved to 5.53, there are no such compile-time warnings any longer.
Many thanks.
|
|
|
|
|
Posted: Aug 20, 2015 |
[ # 6 ]
|
|
Experienced member
Total posts: 82
Joined: Feb 23, 2015
|
That said, as I’m trying to use ” ” instead of ( ) inside { } as you reminded, in some circumstances only ( ) will work, like illustrated in the screen copy attached.
But other times, quoted phrases do work. This is sort of annoying though, and maybe that’s why I learned to use parenthesis instead of quotes…
Thanks.
Image Attachments
Click thumbnail to see full-size image
|
|
|
|
|
Posted: Aug 20, 2015 |
[ # 7 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
Quoted phrase checking has an overhead applied to all rules (lookiing at all sequences of 5 words in a row throughout a sentence) so since phrases are usually small, I don’t widen it. It costs more on the rule to use ( ) for the same thing, but it is not a cost applied to all rules as a consequence, and I doubt performance is an issue for you so ( ) makes fine sense as well.
I’d have to check further, but I really think will have really substituted away so matching the “” will not work unless you remove the substitution. Why (I really think) works I dont know yet.
|
|
|
|
|
Posted: Aug 22, 2015 |
[ # 8 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
Having checked further, using the current system I cannot get your 2nd pattern to match. Which is what I would expect as the word “really” disappears from input unless you have a different substitutions file from me
|
|
|
|
|
Posted: Aug 23, 2015 |
[ # 9 ]
|
|
Experienced member
Total posts: 82
Joined: Feb 23, 2015
|
In my case I have the noise.txt disabled for my requirement, so the word “really” is not substituted away.
I wonder if it could be my token control setting which is like the following:
$cs_token = #DO_SUBSTITUTE_SYSTEM | #DO_DATE_MERGE | #DO_PARSE
Thanks.
|
|
|
|
|
Posted: Aug 23, 2015 |
[ # 10 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
Did you remove the noise.txt file (since you are using DO_SUBSTITUTE_SYSTEM you did not turn it off at the token control).
|
|
|
|
|
Posted: Aug 23, 2015 |
[ # 11 ]
|
|
Moderator
Total posts: 2372
Joined: Jan 12, 2010
|
I took your token control, added this:
$cs_token -= #DO_NOISE
then ran the 1st test pattern with the quotes in my simple bot and it worked fine.
|
|
|
|
|
Posted: Aug 24, 2015 |
[ # 12 ]
|
|
Experienced member
Total posts: 82
Joined: Feb 23, 2015
|
Yes, I got it now. Will fix it in that way. Many thanks.
|
|
|
|