Posted 20 years ago
by Steven Liu
I defined following end scope pattern:
PatternValue="\n" LookAhead="(( *\n)|(#IF.*\n))*SECTION"
Basically I want to look ahead to next SECTION keyword and possibly one or multiple #IF lines, to terminate current scope.
I can load the syntax file in Language designer, but cannot load a document. It throws an exception box:
InvalidRegexPatternException: Unquoted string did not contain any characters
Complete text:
************** Exception Text **************
ActiproSoftware.SyntaxEditor.InvalidRegexPatternException: Unquoted string did not contain any characters.
at ᐩ.ᐁ(Int32 )
at ᐩ.ᐁ(Int32 , Int32 , Boolean )
at ᐩ.ᐁ(Int32 , Int32 , Boolean )
at ᐩ.ᐁ(Int32 , Int32 , Boolean )
at ActiproSoftware.SyntaxEditor.LexicalPatternGroup.ᐁ()
at ActiproSoftware.SyntaxEditor.LexicalPattern.ᐁ(TextStream )
at ᐚ.ᐁ(SyntaxLanguage , TextStream , ᐙ , Token , Int32 )
at ActiproSoftware.SyntaxEditor.Document.ᐁ(DocumentModification )
at ActiproSoftware.SyntaxEditor.Document.ᐁ(DocumentModificationType , Int32 , Int32 , String )
at ActiproSoftware.SyntaxEditor.Document.UndoableInsert(DocumentModificationType type, Int32 offset, Int32 length, String text)
at ActiproSoftware.SyntaxEditor.EditorView.ᐁ(DocumentModificationType , String )
at ActiproSoftware.SyntaxEditor.EditorView.ᐁ(String )
at ActiproSoftware.SyntaxEditor.EditorView.InsertText(String text)
at ActiproSoftware.SyntaxEditor.Document.ᐁ(Char )
at ActiproSoftware.SyntaxEditor.SyntaxEditor.OnKeyPress(KeyPressEventArgs e)
at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
at System.Windows.Forms.Control.WmKeyChar(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.UserControl.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
PatternValue="\n" LookAhead="(( *\n)|(#IF.*\n))*SECTION"
Basically I want to look ahead to next SECTION keyword and possibly one or multiple #IF lines, to terminate current scope.
I can load the syntax file in Language designer, but cannot load a document. It throws an exception box:
InvalidRegexPatternException: Unquoted string did not contain any characters
Complete text:
************** Exception Text **************
ActiproSoftware.SyntaxEditor.InvalidRegexPatternException: Unquoted string did not contain any characters.
at ᐩ.ᐁ(Int32 )
at ᐩ.ᐁ(Int32 , Int32 , Boolean )
at ᐩ.ᐁ(Int32 , Int32 , Boolean )
at ᐩ.ᐁ(Int32 , Int32 , Boolean )
at ActiproSoftware.SyntaxEditor.LexicalPatternGroup.ᐁ()
at ActiproSoftware.SyntaxEditor.LexicalPattern.ᐁ(TextStream )
at ᐚ.ᐁ(SyntaxLanguage , TextStream , ᐙ , Token , Int32 )
at ActiproSoftware.SyntaxEditor.Document.ᐁ(DocumentModification )
at ActiproSoftware.SyntaxEditor.Document.ᐁ(DocumentModificationType , Int32 , Int32 , String )
at ActiproSoftware.SyntaxEditor.Document.UndoableInsert(DocumentModificationType type, Int32 offset, Int32 length, String text)
at ActiproSoftware.SyntaxEditor.EditorView.ᐁ(DocumentModificationType , String )
at ActiproSoftware.SyntaxEditor.EditorView.ᐁ(String )
at ActiproSoftware.SyntaxEditor.EditorView.InsertText(String text)
at ActiproSoftware.SyntaxEditor.Document.ᐁ(Char )
at ActiproSoftware.SyntaxEditor.SyntaxEditor.OnKeyPress(KeyPressEventArgs e)
at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
at System.Windows.Forms.Control.WmKeyChar(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.UserControl.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)