Commit 04edb1ed authored by Milian Wolff's avatar Milian Wolff

Optimize: use non-capturing regexp groups.

parent 4af7198c
......@@ -189,12 +189,12 @@
<!-- Match numbers -->
<!-- ATTENTION Builtin number detectors have strange behaviour and definitely lack of required features -->
<!-- NOTE Order is important! -->
<RegExpr attribute="Hex" context="#stay" String="[\+\-]?0x[0-9A-Fa-f]('?[0-9A-Fa-f]+)*([Uu][Ll]{0,2}|[Ll]{0,2}[Uu]?|_[_0-9A-Za-z]*)?\b" />
<RegExpr attribute="Binary" context="#stay" String="0[Bb][01]('?[01]+)*([Uu][Ll]{0,2}|[Ll]{0,2}[Uu]?|_[_0-9A-Za-z]*)?\b" />
<RegExpr attribute="Float" context="#stay" String="[\+\-]?([0-9]+[Ee][\+\-]?[0-9]+|([0-9]+\.|\.[0-9]+|[0-9]+\.[0-9]+)([Ee][\+\-]?[0-9]+)?)[FfLl]?" />
<RegExpr attribute="Octal" context="#stay" String="[\+\-]?0'?[0-7]('?[0-7]+)*([Uu][Ll]{0,2}|[Ll]{0,2}[Uu]?|_[_0-9A-Za-z]*)?\b" />
<RegExpr attribute="Decimal" context="#stay" String="[\+\-]?(0|[1-9]('?[0-9]+)*)([Uu][Ll]{0,2}|[Ll]{0,2}[Uu]?|_[_0-9A-Za-z]*)?\b" />
<RegExpr attribute="Error" context="#stay" String="[\+\-]?(0x?|[1-9][0-9]*)[0-9A-Za-z][_0-9A-Za-z]*\b" />
<RegExpr attribute="Hex" context="#stay" String="[\+\-]?0x[0-9A-Fa-f](?:'?[0-9A-Fa-f]+)*(?:[Uu][Ll]{0,2}|[Ll]{0,2}[Uu]?|_[_0-9A-Za-z]*)?\b" />
<RegExpr attribute="Binary" context="#stay" String="0[Bb][01](?:'?[01]+)*(?:[Uu][Ll]{0,2}|[Ll]{0,2}[Uu]?|_[_0-9A-Za-z]*)?\b" />
<RegExpr attribute="Float" context="#stay" String="[\+\-]?(?:[0-9]+[Ee][\+\-]?[0-9]+|([0-9]+\.|\.[0-9]+|[0-9]+\.[0-9]+)(?:[Ee][\+\-]?[0-9]+)?)[FfLl]?" />
<RegExpr attribute="Octal" context="#stay" String="[\+\-]?0'?[0-7](?:'?[0-7]+)*(?:[Uu][Ll]{0,2}|[Ll]{0,2}[Uu]?|_[_0-9A-Za-z]*)?\b" />
<RegExpr attribute="Decimal" context="#stay" String="[\+\-]?(?:0|[1-9](?:'?[0-9]+)*)(?:[Uu][Ll]{0,2}|[Ll]{0,2}[Uu]?|_[_0-9A-Za-z]*)?\b" />
<RegExpr attribute="Error" context="#stay" String="[\+\-]?(?:0x?|[1-9][0-9]*)[0-9A-Za-z][_0-9A-Za-z]*\b" />
<!-- Match string literals -->
<DetectChar attribute="String" context="String" char="&quot;" />
<Detect2Chars attribute="String" context="String" char="U" char1="&quot;" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment