
Hello - just another question
I am trying to modify the SQL XML language definition
I have replaced the SystemVariableToken RegexPatternGroup with an explicit list of system variables - so that, @@TEST, for example, is not recognised as a system variable
However, @@TEST then gets recognised as a single @ and then a VariableToken @@
I wanted to create a lookBehind macro that would stop the VariableToken from allowing things that start with @@ from being highlighted as a variable.
So I tried LookBehind="(?<!@@)" in the VariableToken declaration in the XML - but this complained about the < character in XML. So I tried LookBehind="(?<!@@)". This let the XML be loaded, but as soon as an '@' was typed in the document, would raise an ApplicationException with the message 'Op code not implemented: 12'.
So - can anyone help me modify the following XML so that variable tokens do not match on items with two @@ at the start?
I am trying to modify the SQL XML language definition
I have replaced the SystemVariableToken RegexPatternGroup with an explicit list of system variables - so that, @@TEST, for example, is not recognised as a system variable
However, @@TEST then gets recognised as a single @ and then a VariableToken @@
I wanted to create a lookBehind macro that would stop the VariableToken from allowing things that start with @@ from being highlighted as a variable.
So I tried LookBehind="(?<!@@)" in the VariableToken declaration in the XML - but this complained about the < character in XML. So I tried LookBehind="(?<!@@)". This let the XML be loaded, but as soon as an '@' was typed in the document, would raise an ApplicationException with the message 'Op code not implemented: 12'.
So - can anyone help me modify the following XML so that variable tokens do not match on items with two @@ at the start?
<!-- System Variables -->
<ExplicitPatternGroup TokenKey="SystemVariableToken" Style="SystemVariableStyle" LookAhead="{NonWordMacro}|\z">
<ExplicitPatterns>
@@CONNECTIONS @@CPU_BUSY @@CURSOR_ROWS @@DATEFIRST @@DBTS @@ERROR @@FETCH_STATUS @@IDENTITY @@IDLE
@@IO_BUSY @@LANGID @@LANGUAGE @@LOCK_TIMEOUT @@MAX_CONNECTIONS @@MAX_PRECISION @@NESTLEVEL @@OPTIONS
@@PACK_RECEIVED @@PACK_SENT @@PACKET_ERRORS @@PROCID @@REMSERVER @@ROWCOUNT @@SERVERNAME @@SERVICENAME
@@SPID @@TEXTSIZE @@TIMETICKS @@TOTAL_ERRORS @@TOTAL_READ @@TOTAL_WRITE @@TRANCOUNT @@VERSION
</ExplicitPatterns>
</ExplicitPatternGroup>
<!-- Variables -->
<RegexPatternGroup TokenKey="VariableToken" Style="VariableStyle" PatternValue="@ {WordMacro}+" LookAhead="{NonWordMacro}|\z" LookBehind="(?<!@@)" />