Posted 16 years ago
by Barry Ahrens
-
Member of Technical Staff,
Teledyne Scientific
Version: 4.0.0274
![Avatar](https://secure.gravatar.com/avatar/c462da62248f4ad8a3ea5054a0b1ac38.jpg?s=64&d=identicon&r=g)
Do I have an infinite loop or something in my language that I have implemented? When using the editor with the following rules, the editor hangs/locks up when I type something like
"KEYWORD1 veryveryveryveryveryverylongstringvariable , F"
As soon as I hit the "F" key, the application hangs. I have narrowed it down to the 2nd rule below. The 1st rule is NOT causing the problem. As you are experts in the parsing rules, do you see a problem in the 2nd rule?
Thanks very much!
1st rule: This works fine.......2nd rule: This is Not OK:
"KEYWORD1 veryveryveryveryveryverylongstringvariable , F"
As soon as I hit the "F" key, the application hangs. I have narrowed it down to the 2nd rule below. The 1st rule is NOT causing the problem. As you are experts in the parsing rules, do you see a problem in the 2nd rule?
Thanks very much!
1st rule: This works fine.......
<!-- Flags F -->
<ExplicitPatternGroup TokenKey="Token1" Style="Style1" LookBehind="(KEYWORD1) {WhitespaceMacro}+ " LookAhead="{NonWordMacro}" CaseSensitivity="Sensitive">
<ExplicitPatterns>
F0 F1 F2 F3 F4 F5 F6
</ExplicitPatterns>
</ExplicitPatternGroup>
<ExplicitPatternGroup TokenKey="Token2" Style="Style2" LookBehind="(KEYWORD2) {WhitespaceMacro}+ ({WordMacro}+ {WhitespaceMacro}*)+ [,]+ {WhitespaceMacro}* " LookAhead="{NonWordMacro}" CaseSensitivity="Sensitive">
<ExplicitPatterns>
F7 F8 F9
</ExplicitPatterns>
</ExplicitPatternGroup>