LookBehind and OR (‘|’) regular expression bug.

SyntaxEditor for Windows Forms Forum

Posted 14 years ago by mbren
Avatar
There seems to be a bug regarding having OR regular expressions in the LookBehind attribute of a pattern.

While
LookBehind="cat|dog"
will work,
LookBehind="cat|dog|tiger"
will produce the following error and stacktrace.
Stack empty.
   at System.Collections.Stack.Pop()
   at _28._1()
   at _28._1(Int32 , _30 , Int32 )
   at _28._1(_30 )
   at _28._1(_30 , Boolean )
   at ActiproSoftware.SyntaxEditor.LexicalPatternGroup._1()
   at ActiproSoftware.SyntaxEditor.LexicalState._1()
   at ActiproSoftware.SyntaxEditor.LexicalState._1(StringBuilder , Int32& , Int32 , LexicalPattern& )
   at _19._1(SyntaxLanguage , StringBuilder , Int32& , Int32 , _18 , Token , Int32 )
   at ActiproSoftware.SyntaxEditor.Document.Reparse()
   at ActiproSoftware.SyntaxEditor.Document.set_Language(SyntaxLanguage value)
   at ActiproSoftware.SyntaxEditor.Document.LoadLanguageFromXml(String filename, Int32 encryptionKey)
It is worth noting that
LookAhead="cat|dog|tiger"
produces no such error and behaves correctly.

Comments (3)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Thanks... we'll get this fixed.


Actipro Software Support

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
This is fixed for the upcoming maintenance release by the way.


Actipro Software Support

Posted 14 years ago by mbren
Avatar
Thanks
The latest build of this product (v2018.1 build 0341) was released 6 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.