skylighting-core 0.13 → 0.13.1
raw patch · 43 files changed
+1449/−587 lines, 43 files
Files
- changelog.md +19/−0
- skylighting-core.cabal +2/−2
- src/Skylighting/Tokenizer.hs +6/−6
- test/expected/abc.c.native +36/−7
- test/expected/life.lua.native +245/−171
- test/test-skylighting.hs +1/−1
- xml/asn1.xml +46/−8
- xml/bash.xml +277/−107
- xml/c.xml +323/−55
- xml/cmake.xml +2/−1
- xml/cpp.xml +4/−7
- xml/cs.xml +2/−2
- xml/d.xml +2/−2
- xml/elixir.xml +22/−7
- xml/fortran-fixed.xml +2/−2
- xml/gcc.xml +13/−9
- xml/glsl.xml +1/−1
- xml/go.xml +2/−2
- xml/html.xml +1/−1
- xml/java.xml +2/−2
- xml/javascript.xml +2/−2
- xml/lex.xml +4/−4
- xml/lua.xml +20/−16
- xml/markdown.xml +7/−2
- xml/mediawiki.xml +3/−4
- xml/noweb.xml +1/−1
- xml/ocaml.xml +2/−2
- xml/orgmode.xml +2/−3
- xml/php.xml +2/−2
- xml/powershell.xml +3/−4
- xml/prolog.xml +2/−6
- xml/python.xml +33/−4
- xml/r.xml +2/−1
- xml/ruby.xml +3/−1
- xml/rust.xml +2/−2
- xml/scheme.xml +16/−8
- xml/sql-postgresql.xml +1/−2
- xml/typescript.xml +3/−3
- xml/vhdl.xml +150/−51
- xml/xml.xml +1/−1
- xml/yacc.xml +5/−5
- xml/yaml.xml +2/−3
- xml/zsh.xml +175/−67
changelog.md view
@@ -1,5 +1,24 @@ # Revision history for skylighting and skylighting-core +## 0.13.1++ * `getCapture`: fail instead of throwing error if dynamic match not found.+ I believe this is the intended behavior for StringDetect, judging+ from examples in the KDE documentation.++ * Update xml syntax definitions:+ asn1, bash, c, cmake, cpp, cs, d, elixir, fortran-fixed, gcc, glsl,+ go, html, java, javascript, lex, lua, markdown, mediawiki, noweb,+ ocaml, orgmode, php, powershell, prolog, python, r, ruby, rust,+ scheme, sql-postgresql, typescript, vhdl, xml, yacc, yaml, zsh++ * Replace a lambda with pointfree notation (shaving off some RAM usage)+ (0xd34df00d).++ * Use `newtype` for `TokenizerM`, giving about 5-10% boost on benchmark+ (0xd34df00d).++ ## 0.13 * Update syntax definitions from upstream: bash, cmake, diff,
skylighting-core.cabal view
@@ -1,5 +1,5 @@ name: skylighting-core-version: 0.13+version: 0.13.1 synopsis: syntax highlighting library description: Skylighting is a syntax highlighting library. It derives its tokenizers from XML syntax@@ -176,7 +176,7 @@ filepath, text, containers,- criterion >= 1.0 && < 1.6+ criterion >= 1.0 Ghc-Options: -rtsopts -Wall -fno-warn-unused-do-bind if impl(ghc >= 8.4) ghc-options: -fhide-source-paths
src/Skylighting/Tokenizer.hs view
@@ -68,9 +68,9 @@ deriving instance (Show a, Show e) => Show (Result e a) -data TokenizerM a = TM { runTokenizerM :: TokenizerConfig- -> TokenizerState- -> (TokenizerState, Result String a) }+newtype TokenizerM a = TM { runTokenizerM :: TokenizerConfig+ -> TokenizerState+ -> (TokenizerState, Result String a) } mapsnd :: (a -> b) -> (c, a) -> (c, b) mapsnd f (x, y) = (x, f y)@@ -121,7 +121,7 @@ instance MonadReader TokenizerConfig TokenizerM where ask = TM (\c s -> (s, Success c))- local f (TM x) = TM (\c s -> x (f c) s)+ local f (TM x) = TM (x . f) instance MonadState TokenizerState TokenizerM where get = TM (\_ s -> (s, Success s))@@ -536,7 +536,7 @@ case matchRegex regex' inp of Just (matchedBytes, capts) -> do unless (null capts) $- modify $ \st -> st{ captures =+ modify $ \st -> st{ captures = IntMap.map (toSlice inp) capts } takeChars (UTF8.length matchedBytes) _ -> mzero@@ -585,7 +585,7 @@ getCapture capnum = do capts <- gets captures case IntMap.lookup capnum capts of- Nothing -> throwError $ "Capture " <> show capnum <> " not defined!"+ Nothing -> mzero Just x -> decodeBS x keyword :: KeywordAttr -> WordSet Text -> ByteString -> TokenizerM Text
test/expected/abc.c.native view
@@ -38,9 +38,40 @@ , ( OperatorTok , ");" ) ] , []-, [ ( PreprocessorTok- , "#define SWAP(a, b) if (a != b) { char * tmp = a; a = b; b = tmp; }"- )+, [ ( PreprocessorTok , "#define SWAP" )+ , ( OperatorTok , "(" )+ , ( PreprocessorTok , "a" )+ , ( OperatorTok , "," )+ , ( PreprocessorTok , " b" )+ , ( OperatorTok , ")" )+ , ( PreprocessorTok , " " )+ , ( ControlFlowTok , "if" )+ , ( PreprocessorTok , " " )+ , ( OperatorTok , "(" )+ , ( PreprocessorTok , "a " )+ , ( OperatorTok , "!=" )+ , ( PreprocessorTok , " b" )+ , ( OperatorTok , ")" )+ , ( PreprocessorTok , " " )+ , ( OperatorTok , "{" )+ , ( PreprocessorTok , " " )+ , ( DataTypeTok , "char" )+ , ( PreprocessorTok , " " )+ , ( OperatorTok , "*" )+ , ( PreprocessorTok , " tmp " )+ , ( OperatorTok , "=" )+ , ( PreprocessorTok , " a" )+ , ( OperatorTok , ";" )+ , ( PreprocessorTok , " a " )+ , ( OperatorTok , "=" )+ , ( PreprocessorTok , " b" )+ , ( OperatorTok , ";" )+ , ( PreprocessorTok , " b " )+ , ( OperatorTok , "=" )+ , ( PreprocessorTok , " tmp" )+ , ( OperatorTok , ";" )+ , ( PreprocessorTok , " " )+ , ( OperatorTok , "}" ) ] , [] , [ ( NormalTok , " " )@@ -322,10 +353,8 @@ ] , [ ( NormalTok , " printf" ) , ( OperatorTok , "(" )- , ( StringTok , "\"%s" )- , ( SpecialCharTok , "\\t" )- , ( StringTok , "%d" )- , ( SpecialCharTok , "\\n" )+ , ( StringTok , "\"" )+ , ( SpecialCharTok , "%s\\t%d\\n" ) , ( StringTok , "\"" ) , ( OperatorTok , "," ) , ( NormalTok , " " )
test/expected/life.lua.native view
@@ -10,7 +10,8 @@ , [ ( CommentTok , "-- modified to use for instead of while" ) ] , [] , [ ( KeywordTok , "local" )- , ( NormalTok , " write" )+ , ( NormalTok , " " )+ , ( VariableTok , "write" ) , ( OperatorTok , "=" ) , ( FunctionTok , "io.write" ) ]@@ -42,7 +43,8 @@ ] , [ ( NormalTok , " " ) , ( ControlFlowTok , "for" )- , ( NormalTok , " i" )+ , ( NormalTok , " " )+ , ( VariableTok , "i" ) , ( OperatorTok , "=" ) , ( DecValTok , "1" ) , ( OperatorTok , "," )@@ -62,38 +64,43 @@ , [ ( KeywordTok , "function" ) , ( NormalTok , " ARRAY2D" ) , ( OperatorTok , "(" )- , ( NormalTok , "w" )+ , ( VariableTok , "w" ) , ( OperatorTok , "," )- , ( NormalTok , "h" )+ , ( VariableTok , "h" ) , ( OperatorTok , ")" ) ] , [ ( NormalTok , " " ) , ( KeywordTok , "local" )- , ( NormalTok , " t " )+ , ( NormalTok , " " )+ , ( VariableTok , "t" )+ , ( NormalTok , " " ) , ( OperatorTok , "=" ) , ( NormalTok , " " ) , ( OperatorTok , "{" )- , ( NormalTok , "w" )+ , ( VariableTok , "w" ) , ( OperatorTok , "=" )- , ( NormalTok , "w" )+ , ( VariableTok , "w" ) , ( OperatorTok , "," )- , ( NormalTok , "h" )+ , ( VariableTok , "h" ) , ( OperatorTok , "=" )- , ( NormalTok , "h" )+ , ( VariableTok , "h" ) , ( OperatorTok , "}" ) ] , [ ( NormalTok , " " ) , ( ControlFlowTok , "for" )- , ( NormalTok , " y" )+ , ( NormalTok , " " )+ , ( VariableTok , "y" ) , ( OperatorTok , "=" ) , ( DecValTok , "1" ) , ( OperatorTok , "," )- , ( NormalTok , "h " )+ , ( VariableTok , "h" )+ , ( NormalTok , " " ) , ( ControlFlowTok , "do" ) ]-, [ ( NormalTok , " t" )+, [ ( NormalTok , " " )+ , ( VariableTok , "t" ) , ( OperatorTok , "[" )- , ( NormalTok , "y" )+ , ( VariableTok , "y" ) , ( OperatorTok , "]" ) , ( NormalTok , " " ) , ( OperatorTok , "=" )@@ -102,18 +109,21 @@ ] , [ ( NormalTok , " " ) , ( ControlFlowTok , "for" )- , ( NormalTok , " x" )+ , ( NormalTok , " " )+ , ( VariableTok , "x" ) , ( OperatorTok , "=" ) , ( DecValTok , "1" ) , ( OperatorTok , "," )- , ( NormalTok , "w " )+ , ( VariableTok , "w" )+ , ( NormalTok , " " ) , ( ControlFlowTok , "do" ) ]-, [ ( NormalTok , " t" )+, [ ( NormalTok , " " )+ , ( VariableTok , "t" ) , ( OperatorTok , "[" )- , ( NormalTok , "y" )+ , ( VariableTok , "y" ) , ( OperatorTok , "][" )- , ( NormalTok , "x" )+ , ( VariableTok , "x" ) , ( OperatorTok , "]=" ) , ( DecValTok , "0" ) ]@@ -121,7 +131,8 @@ , [ ( NormalTok , " " ) , ( ControlFlowTok , "end" ) ] , [ ( NormalTok , " " ) , ( ControlFlowTok , "return" )- , ( NormalTok , " t" )+ , ( NormalTok , " " )+ , ( VariableTok , "t" ) ] , [ ( KeywordTok , "end" ) ] , []@@ -142,22 +153,23 @@ , ( OperatorTok , ":" ) , ( NormalTok , "spawn" ) , ( OperatorTok , "(" )- , ( NormalTok , "shape" )+ , ( VariableTok , "shape" ) , ( OperatorTok , "," )- , ( NormalTok , "left" )+ , ( VariableTok , "left" ) , ( OperatorTok , "," )- , ( NormalTok , "top" )+ , ( VariableTok , "top" ) , ( OperatorTok , ")" ) ] , [ ( NormalTok , " " ) , ( ControlFlowTok , "for" )- , ( NormalTok , " y" )+ , ( NormalTok , " " )+ , ( VariableTok , "y" ) , ( OperatorTok , "=" ) , ( DecValTok , "0" ) , ( OperatorTok , "," )- , ( NormalTok , "shape" )+ , ( VariableTok , "shape" ) , ( OperatorTok , "." )- , ( NormalTok , "h" )+ , ( VariableTok , "h" ) , ( OperatorTok , "-" ) , ( DecValTok , "1" ) , ( NormalTok , " " )@@ -165,39 +177,42 @@ ] , [ ( NormalTok , " " ) , ( ControlFlowTok , "for" )- , ( NormalTok , " x" )+ , ( NormalTok , " " )+ , ( VariableTok , "x" ) , ( OperatorTok , "=" ) , ( DecValTok , "0" ) , ( OperatorTok , "," )- , ( NormalTok , "shape" )+ , ( VariableTok , "shape" ) , ( OperatorTok , "." )- , ( NormalTok , "w" )+ , ( VariableTok , "w" ) , ( OperatorTok , "-" ) , ( DecValTok , "1" ) , ( NormalTok , " " ) , ( ControlFlowTok , "do" ) ]-, [ ( NormalTok , " self" )+, [ ( NormalTok , " " )+ , ( VariableTok , "self" ) , ( OperatorTok , "[" )- , ( NormalTok , "top" )+ , ( VariableTok , "top" ) , ( OperatorTok , "+" )- , ( NormalTok , "y" )+ , ( VariableTok , "y" ) , ( OperatorTok , "][" )- , ( NormalTok , "left" )+ , ( VariableTok , "left" ) , ( OperatorTok , "+" )- , ( NormalTok , "x" )+ , ( VariableTok , "x" ) , ( OperatorTok , "]" ) , ( NormalTok , " " ) , ( OperatorTok , "=" )- , ( NormalTok , " shape" )+ , ( NormalTok , " " )+ , ( VariableTok , "shape" ) , ( OperatorTok , "[" )- , ( NormalTok , "y" )+ , ( VariableTok , "y" ) , ( OperatorTok , "*" )- , ( NormalTok , "shape" )+ , ( VariableTok , "shape" ) , ( OperatorTok , "." )- , ( NormalTok , "w" )+ , ( VariableTok , "w" ) , ( OperatorTok , "+" )- , ( NormalTok , "x" )+ , ( VariableTok , "x" ) , ( OperatorTok , "+" ) , ( DecValTok , "1" ) , ( OperatorTok , "]" )@@ -221,33 +236,36 @@ ] , [ ( NormalTok , " " ) , ( KeywordTok , "local" )- , ( NormalTok , " ym1" )+ , ( NormalTok , " " )+ , ( VariableTok , "ym1" ) , ( OperatorTok , "," )- , ( NormalTok , "y" )+ , ( VariableTok , "y" ) , ( OperatorTok , "," )- , ( NormalTok , "yp1" )+ , ( VariableTok , "yp1" ) , ( OperatorTok , "," )- , ( NormalTok , "yi" )+ , ( VariableTok , "yi" ) , ( OperatorTok , "=" )- , ( NormalTok , "self" )+ , ( VariableTok , "self" ) , ( OperatorTok , "." )- , ( NormalTok , "h" )+ , ( VariableTok , "h" ) , ( OperatorTok , "-" ) , ( DecValTok , "1" ) , ( OperatorTok , "," )- , ( NormalTok , "self" )+ , ( VariableTok , "self" ) , ( OperatorTok , "." )- , ( NormalTok , "h" )+ , ( VariableTok , "h" ) , ( OperatorTok , "," ) , ( DecValTok , "1" ) , ( OperatorTok , "," )- , ( NormalTok , "self" )+ , ( VariableTok , "self" ) , ( OperatorTok , "." )- , ( NormalTok , "h" )+ , ( VariableTok , "h" ) ] , [ ( NormalTok , " " ) , ( ControlFlowTok , "while" )- , ( NormalTok , " yi " )+ , ( NormalTok , " " )+ , ( VariableTok , "yi" )+ , ( NormalTok , " " ) , ( OperatorTok , ">" ) , ( NormalTok , " " ) , ( DecValTok , "0" )@@ -256,33 +274,36 @@ ] , [ ( NormalTok , " " ) , ( KeywordTok , "local" )- , ( NormalTok , " xm1" )+ , ( NormalTok , " " )+ , ( VariableTok , "xm1" ) , ( OperatorTok , "," )- , ( NormalTok , "x" )+ , ( VariableTok , "x" ) , ( OperatorTok , "," )- , ( NormalTok , "xp1" )+ , ( VariableTok , "xp1" ) , ( OperatorTok , "," )- , ( NormalTok , "xi" )+ , ( VariableTok , "xi" ) , ( OperatorTok , "=" )- , ( NormalTok , "self" )+ , ( VariableTok , "self" ) , ( OperatorTok , "." )- , ( NormalTok , "w" )+ , ( VariableTok , "w" ) , ( OperatorTok , "-" ) , ( DecValTok , "1" ) , ( OperatorTok , "," )- , ( NormalTok , "self" )+ , ( VariableTok , "self" ) , ( OperatorTok , "." )- , ( NormalTok , "w" )+ , ( VariableTok , "w" ) , ( OperatorTok , "," ) , ( DecValTok , "1" ) , ( OperatorTok , "," )- , ( NormalTok , "self" )+ , ( VariableTok , "self" ) , ( OperatorTok , "." )- , ( NormalTok , "w" )+ , ( VariableTok , "w" ) ] , [ ( NormalTok , " " ) , ( ControlFlowTok , "while" )- , ( NormalTok , " xi " )+ , ( NormalTok , " " )+ , ( VariableTok , "xi" )+ , ( NormalTok , " " ) , ( OperatorTok , ">" ) , ( NormalTok , " " ) , ( DecValTok , "0" )@@ -291,101 +312,112 @@ ] , [ ( NormalTok , " " ) , ( KeywordTok , "local" )- , ( NormalTok , " sum " )+ , ( NormalTok , " " )+ , ( VariableTok , "sum" )+ , ( NormalTok , " " ) , ( OperatorTok , "=" )- , ( NormalTok , " self" )+ , ( NormalTok , " " )+ , ( VariableTok , "self" ) , ( OperatorTok , "[" )- , ( NormalTok , "ym1" )+ , ( VariableTok , "ym1" ) , ( OperatorTok , "][" )- , ( NormalTok , "xm1" )+ , ( VariableTok , "xm1" ) , ( OperatorTok , "]" ) , ( NormalTok , " " ) , ( OperatorTok , "+" )- , ( NormalTok , " self" )+ , ( NormalTok , " " )+ , ( VariableTok , "self" ) , ( OperatorTok , "[" )- , ( NormalTok , "ym1" )+ , ( VariableTok , "ym1" ) , ( OperatorTok , "][" )- , ( NormalTok , "x" )+ , ( VariableTok , "x" ) , ( OperatorTok , "]" ) , ( NormalTok , " " ) , ( OperatorTok , "+" )- , ( NormalTok , " self" )+ , ( NormalTok , " " )+ , ( VariableTok , "self" ) , ( OperatorTok , "[" )- , ( NormalTok , "ym1" )+ , ( VariableTok , "ym1" ) , ( OperatorTok , "][" )- , ( NormalTok , "xp1" )+ , ( VariableTok , "xp1" ) , ( OperatorTok , "]" ) , ( NormalTok , " " ) , ( OperatorTok , "+" ) ]-, [ ( NormalTok , " self" )+, [ ( NormalTok , " " )+ , ( VariableTok , "self" ) , ( OperatorTok , "[" )- , ( NormalTok , "y" )+ , ( VariableTok , "y" ) , ( OperatorTok , "][" )- , ( NormalTok , "xm1" )+ , ( VariableTok , "xm1" ) , ( OperatorTok , "]" ) , ( NormalTok , " " ) , ( OperatorTok , "+" )- , ( NormalTok , " self" )+ , ( NormalTok , " " )+ , ( VariableTok , "self" ) , ( OperatorTok , "[" )- , ( NormalTok , "y" )+ , ( VariableTok , "y" ) , ( OperatorTok , "][" )- , ( NormalTok , "xp1" )+ , ( VariableTok , "xp1" ) , ( OperatorTok , "]" ) , ( NormalTok , " " ) , ( OperatorTok , "+" ) ]-, [ ( NormalTok , " self" )+, [ ( NormalTok , " " )+ , ( VariableTok , "self" ) , ( OperatorTok , "[" )- , ( NormalTok , "yp1" )+ , ( VariableTok , "yp1" ) , ( OperatorTok , "][" )- , ( NormalTok , "xm1" )+ , ( VariableTok , "xm1" ) , ( OperatorTok , "]" ) , ( NormalTok , " " ) , ( OperatorTok , "+" )- , ( NormalTok , " self" )+ , ( NormalTok , " " )+ , ( VariableTok , "self" ) , ( OperatorTok , "[" )- , ( NormalTok , "yp1" )+ , ( VariableTok , "yp1" ) , ( OperatorTok , "][" )- , ( NormalTok , "x" )+ , ( VariableTok , "x" ) , ( OperatorTok , "]" ) , ( NormalTok , " " ) , ( OperatorTok , "+" )- , ( NormalTok , " self" )+ , ( NormalTok , " " )+ , ( VariableTok , "self" ) , ( OperatorTok , "[" )- , ( NormalTok , "yp1" )+ , ( VariableTok , "yp1" ) , ( OperatorTok , "][" )- , ( NormalTok , "xp1" )+ , ( VariableTok , "xp1" ) , ( OperatorTok , "]" ) ] , [ ( NormalTok , " " ) , ( FunctionTok , "next" ) , ( OperatorTok , "[" )- , ( NormalTok , "y" )+ , ( VariableTok , "y" ) , ( OperatorTok , "][" )- , ( NormalTok , "x" )+ , ( VariableTok , "x" ) , ( OperatorTok , "]" ) , ( NormalTok , " " ) , ( OperatorTok , "=" ) , ( NormalTok , " " ) , ( OperatorTok , "((" )- , ( NormalTok , "sum" )+ , ( VariableTok , "sum" ) , ( OperatorTok , "==" ) , ( DecValTok , "2" ) , ( OperatorTok , ")" ) , ( NormalTok , " " ) , ( KeywordTok , "and" )- , ( NormalTok , " self" )+ , ( NormalTok , " " )+ , ( VariableTok , "self" ) , ( OperatorTok , "[" )- , ( NormalTok , "y" )+ , ( VariableTok , "y" ) , ( OperatorTok , "][" )- , ( NormalTok , "x" )+ , ( VariableTok , "x" ) , ( OperatorTok , "])" ) , ( NormalTok , " " ) , ( KeywordTok , "or" ) , ( NormalTok , " " ) , ( OperatorTok , "((" )- , ( NormalTok , "sum" )+ , ( VariableTok , "sum" ) , ( OperatorTok , "==" ) , ( DecValTok , "3" ) , ( OperatorTok , ")" )@@ -399,44 +431,50 @@ , ( NormalTok , " " ) , ( DecValTok , "0" ) ]-, [ ( NormalTok , " xm1" )+, [ ( NormalTok , " " )+ , ( VariableTok , "xm1" ) , ( OperatorTok , "," )- , ( NormalTok , "x" )+ , ( VariableTok , "x" ) , ( OperatorTok , "," )- , ( NormalTok , "xp1" )+ , ( VariableTok , "xp1" ) , ( OperatorTok , "," )- , ( NormalTok , "xi " )+ , ( VariableTok , "xi" )+ , ( NormalTok , " " ) , ( OperatorTok , "=" )- , ( NormalTok , " x" )+ , ( NormalTok , " " )+ , ( VariableTok , "x" ) , ( OperatorTok , "," )- , ( NormalTok , "xp1" )+ , ( VariableTok , "xp1" ) , ( OperatorTok , "," )- , ( NormalTok , "xp1" )+ , ( VariableTok , "xp1" ) , ( OperatorTok , "+" ) , ( DecValTok , "1" ) , ( OperatorTok , "," )- , ( NormalTok , "xi" )+ , ( VariableTok , "xi" ) , ( OperatorTok , "-" ) , ( DecValTok , "1" ) ] , [ ( NormalTok , " " ) , ( ControlFlowTok , "end" ) ]-, [ ( NormalTok , " ym1" )+, [ ( NormalTok , " " )+ , ( VariableTok , "ym1" ) , ( OperatorTok , "," )- , ( NormalTok , "y" )+ , ( VariableTok , "y" ) , ( OperatorTok , "," )- , ( NormalTok , "yp1" )+ , ( VariableTok , "yp1" ) , ( OperatorTok , "," )- , ( NormalTok , "yi " )+ , ( VariableTok , "yi" )+ , ( NormalTok , " " ) , ( OperatorTok , "=" )- , ( NormalTok , " y" )+ , ( NormalTok , " " )+ , ( VariableTok , "y" ) , ( OperatorTok , "," )- , ( NormalTok , "yp1" )+ , ( VariableTok , "yp1" ) , ( OperatorTok , "," )- , ( NormalTok , "yp1" )+ , ( VariableTok , "yp1" ) , ( OperatorTok , "+" ) , ( DecValTok , "1" ) , ( OperatorTok , "," )- , ( NormalTok , "yi" )+ , ( VariableTok , "yi" ) , ( OperatorTok , "-" ) , ( DecValTok , "1" ) ]@@ -453,7 +491,8 @@ ] , [ ( NormalTok , " " ) , ( KeywordTok , "local" )- , ( NormalTok , " out" )+ , ( NormalTok , " " )+ , ( VariableTok , "out" ) , ( OperatorTok , "=" ) , ( StringTok , "\"\"" ) , ( NormalTok , " " )@@ -461,35 +500,40 @@ ] , [ ( NormalTok , " " ) , ( ControlFlowTok , "for" )- , ( NormalTok , " y" )+ , ( NormalTok , " " )+ , ( VariableTok , "y" ) , ( OperatorTok , "=" ) , ( DecValTok , "1" ) , ( OperatorTok , "," )- , ( NormalTok , "self" )+ , ( VariableTok , "self" ) , ( OperatorTok , "." )- , ( NormalTok , "h " )+ , ( VariableTok , "h" )+ , ( NormalTok , " " ) , ( ControlFlowTok , "do" ) ] , [ ( NormalTok , " " ) , ( ControlFlowTok , "for" )- , ( NormalTok , " x" )+ , ( NormalTok , " " )+ , ( VariableTok , "x" ) , ( OperatorTok , "=" ) , ( DecValTok , "1" ) , ( OperatorTok , "," )- , ( NormalTok , "self" )+ , ( VariableTok , "self" ) , ( OperatorTok , "." )- , ( NormalTok , "w " )+ , ( VariableTok , "w" )+ , ( NormalTok , " " ) , ( ControlFlowTok , "do" ) ]-, [ ( NormalTok , " out" )+, [ ( NormalTok , " " )+ , ( VariableTok , "out" ) , ( OperatorTok , "=" )- , ( NormalTok , "out" )+ , ( VariableTok , "out" ) , ( OperatorTok , "..(((" )- , ( NormalTok , "self" )+ , ( VariableTok , "self" ) , ( OperatorTok , "[" )- , ( NormalTok , "y" )+ , ( VariableTok , "y" ) , ( OperatorTok , "][" )- , ( NormalTok , "x" )+ , ( VariableTok , "x" ) , ( OperatorTok , "]>" ) , ( DecValTok , "0" ) , ( OperatorTok , ")" )@@ -505,9 +549,10 @@ , ( OperatorTok , ")" ) ] , [ ( NormalTok , " " ) , ( ControlFlowTok , "end" ) ]-, [ ( NormalTok , " out" )+, [ ( NormalTok , " " )+ , ( VariableTok , "out" ) , ( OperatorTok , "=" )- , ( NormalTok , "out" )+ , ( VariableTok , "out" ) , ( OperatorTok , ".." ) , ( StringTok , "\"" ) , ( SpecialCharTok , "\\n" )@@ -517,7 +562,7 @@ , [ ( NormalTok , " " ) , ( FunctionTok , "write" ) , ( OperatorTok , "(" )- , ( NormalTok , "out" )+ , ( VariableTok , "out" ) , ( OperatorTok , ")" ) ] , [ ( KeywordTok , "end" ) ]@@ -526,52 +571,61 @@ , [ ( KeywordTok , "function" ) , ( NormalTok , " CELLS" ) , ( OperatorTok , "(" )- , ( NormalTok , "w" )+ , ( VariableTok , "w" ) , ( OperatorTok , "," )- , ( NormalTok , "h" )+ , ( VariableTok , "h" ) , ( OperatorTok , ")" ) ] , [ ( NormalTok , " " ) , ( KeywordTok , "local" )- , ( NormalTok , " c " )+ , ( NormalTok , " " )+ , ( VariableTok , "c" )+ , ( NormalTok , " " ) , ( OperatorTok , "=" ) , ( NormalTok , " ARRAY2D" ) , ( OperatorTok , "(" )- , ( NormalTok , "w" )+ , ( VariableTok , "w" ) , ( OperatorTok , "," )- , ( NormalTok , "h" )+ , ( VariableTok , "h" ) , ( OperatorTok , ")" ) ]-, [ ( NormalTok , " c" )+, [ ( NormalTok , " " )+ , ( VariableTok , "c" ) , ( OperatorTok , "." )- , ( NormalTok , "spawn " )+ , ( VariableTok , "spawn" )+ , ( NormalTok , " " ) , ( OperatorTok , "=" ) , ( NormalTok , " " ) , ( ConstantTok , "_CELLS" ) , ( OperatorTok , "." )- , ( NormalTok , "spawn" )+ , ( VariableTok , "spawn" ) ]-, [ ( NormalTok , " c" )+, [ ( NormalTok , " " )+ , ( VariableTok , "c" ) , ( OperatorTok , "." )- , ( NormalTok , "evolve " )+ , ( VariableTok , "evolve" )+ , ( NormalTok , " " ) , ( OperatorTok , "=" ) , ( NormalTok , " " ) , ( ConstantTok , "_CELLS" ) , ( OperatorTok , "." )- , ( NormalTok , "evolve" )+ , ( VariableTok , "evolve" ) ]-, [ ( NormalTok , " c" )+, [ ( NormalTok , " " )+ , ( VariableTok , "c" ) , ( OperatorTok , "." )- , ( NormalTok , "draw " )+ , ( VariableTok , "draw" )+ , ( NormalTok , " " ) , ( OperatorTok , "=" ) , ( NormalTok , " " ) , ( ConstantTok , "_CELLS" ) , ( OperatorTok , "." )- , ( NormalTok , "draw" )+ , ( VariableTok , "draw" ) ] , [ ( NormalTok , " " ) , ( ControlFlowTok , "return" )- , ( NormalTok , " c" )+ , ( NormalTok , " " )+ , ( VariableTok , "c" ) ] , [ ( KeywordTok , "end" ) ] , []@@ -605,11 +659,12 @@ , ( OperatorTok , "," ) , ( DecValTok , "1" ) , ( OperatorTok , ";" )- , ( NormalTok , " w" )+ , ( NormalTok , " " )+ , ( VariableTok , "w" ) , ( OperatorTok , "=" ) , ( DecValTok , "3" ) , ( OperatorTok , "," )- , ( NormalTok , "h" )+ , ( VariableTok , "h" ) , ( OperatorTok , "=" ) , ( DecValTok , "3" ) , ( NormalTok , " " )@@ -639,11 +694,12 @@ , ( OperatorTok , "," ) , ( DecValTok , "1" ) , ( OperatorTok , ";" )- , ( NormalTok , " w" )+ , ( NormalTok , " " )+ , ( VariableTok , "w" ) , ( OperatorTok , "=" ) , ( DecValTok , "3" ) , ( OperatorTok , "," )- , ( NormalTok , "h" )+ , ( VariableTok , "h" ) , ( OperatorTok , "=" ) , ( DecValTok , "3" ) , ( NormalTok , " " )@@ -679,11 +735,12 @@ , ( OperatorTok , "," ) , ( DecValTok , "0" ) , ( OperatorTok , ";" )- , ( NormalTok , " w" )+ , ( NormalTok , " " )+ , ( VariableTok , "w" ) , ( OperatorTok , "=" ) , ( DecValTok , "3" ) , ( OperatorTok , "," )- , ( NormalTok , "h" )+ , ( VariableTok , "h" ) , ( OperatorTok , "=" ) , ( DecValTok , "4" ) , ( NormalTok , " " )@@ -735,11 +792,12 @@ , ( OperatorTok , "," ) , ( DecValTok , "0" ) , ( OperatorTok , ";" )- , ( NormalTok , " w" )+ , ( NormalTok , " " )+ , ( VariableTok , "w" ) , ( OperatorTok , "=" ) , ( DecValTok , "5" ) , ( OperatorTok , "," )- , ( NormalTok , "h" )+ , ( VariableTok , "h" ) , ( OperatorTok , "=" ) , ( DecValTok , "4" ) , ( NormalTok , " " )@@ -801,11 +859,12 @@ , ( OperatorTok , "," ) , ( DecValTok , "1" ) , ( OperatorTok , ";" )- , ( NormalTok , " w" )+ , ( NormalTok , " " )+ , ( VariableTok , "w" ) , ( OperatorTok , "=" ) , ( DecValTok , "5" ) , ( OperatorTok , "," )- , ( NormalTok , "h" )+ , ( VariableTok , "h" ) , ( OperatorTok , "=" ) , ( DecValTok , "5" ) , ( NormalTok , " " )@@ -816,9 +875,9 @@ , [ ( KeywordTok , "function" ) , ( NormalTok , " LIFE" ) , ( OperatorTok , "(" )- , ( NormalTok , "w" )+ , ( VariableTok , "w" ) , ( OperatorTok , "," )- , ( NormalTok , "h" )+ , ( VariableTok , "h" ) , ( OperatorTok , ")" ) ] , [ ( NormalTok , " " )@@ -826,24 +885,28 @@ ] , [ ( NormalTok , " " ) , ( KeywordTok , "local" )- , ( NormalTok , " thisgen " )+ , ( NormalTok , " " )+ , ( VariableTok , "thisgen" )+ , ( NormalTok , " " ) , ( OperatorTok , "=" ) , ( NormalTok , " CELLS" ) , ( OperatorTok , "(" )- , ( NormalTok , "w" )+ , ( VariableTok , "w" ) , ( OperatorTok , "," )- , ( NormalTok , "h" )+ , ( VariableTok , "h" ) , ( OperatorTok , ")" ) ] , [ ( NormalTok , " " ) , ( KeywordTok , "local" )- , ( NormalTok , " nextgen " )+ , ( NormalTok , " " )+ , ( VariableTok , "nextgen" )+ , ( NormalTok , " " ) , ( OperatorTok , "=" ) , ( NormalTok , " CELLS" ) , ( OperatorTok , "(" )- , ( NormalTok , "w" )+ , ( VariableTok , "w" ) , ( OperatorTok , "," )- , ( NormalTok , "h" )+ , ( VariableTok , "h" ) , ( OperatorTok , ")" ) ] , []@@ -853,7 +916,8 @@ , "-- about 1000 generations of fun, then a glider steady-state" ) ]-, [ ( NormalTok , " thisgen" )+, [ ( NormalTok , " " )+ , ( VariableTok , "thisgen" ) , ( OperatorTok , ":" ) , ( NormalTok , "spawn" ) , ( OperatorTok , "(" )@@ -864,7 +928,8 @@ , ( DecValTok , "4" ) , ( OperatorTok , ")" ) ]-, [ ( NormalTok , " thisgen" )+, [ ( NormalTok , " " )+ , ( VariableTok , "thisgen" ) , ( OperatorTok , ":" ) , ( NormalTok , "spawn" ) , ( OperatorTok , "(" )@@ -875,7 +940,8 @@ , ( DecValTok , "10" ) , ( OperatorTok , ")" ) ]-, [ ( NormalTok , " thisgen" )+, [ ( NormalTok , " " )+ , ( VariableTok , "thisgen" ) , ( OperatorTok , ":" ) , ( NormalTok , "spawn" ) , ( OperatorTok , "(" )@@ -890,7 +956,8 @@ , [ ( NormalTok , " " ) , ( CommentTok , "-- run until break" ) ] , [ ( NormalTok , " " ) , ( KeywordTok , "local" )- , ( NormalTok , " gen" )+ , ( NormalTok , " " )+ , ( VariableTok , "gen" ) , ( OperatorTok , "=" ) , ( DecValTok , "1" ) ]@@ -911,20 +978,24 @@ , ( NormalTok , " " ) , ( ControlFlowTok , "do" ) ]-, [ ( NormalTok , " thisgen" )+, [ ( NormalTok , " " )+ , ( VariableTok , "thisgen" ) , ( OperatorTok , ":" ) , ( NormalTok , "evolve" ) , ( OperatorTok , "(" )- , ( NormalTok , "nextgen" )+ , ( VariableTok , "nextgen" ) , ( OperatorTok , ")" ) ]-, [ ( NormalTok , " thisgen" )+, [ ( NormalTok , " " )+ , ( VariableTok , "thisgen" ) , ( OperatorTok , "," )- , ( NormalTok , "nextgen " )+ , ( VariableTok , "nextgen" )+ , ( NormalTok , " " ) , ( OperatorTok , "=" )- , ( NormalTok , " nextgen" )+ , ( NormalTok , " " )+ , ( VariableTok , "nextgen" ) , ( OperatorTok , "," )- , ( NormalTok , "thisgen" )+ , ( VariableTok , "thisgen" ) ] , [ ( NormalTok , " " ) , ( FunctionTok , "write" )@@ -936,7 +1007,8 @@ , ( NormalTok , "\t" ) , ( CommentTok , "-- ANSI home cursor" ) ]-, [ ( NormalTok , " thisgen" )+, [ ( NormalTok , " " )+ , ( VariableTok , "thisgen" ) , ( OperatorTok , ":" ) , ( NormalTok , "draw" ) , ( OperatorTok , "()" )@@ -946,22 +1018,24 @@ , ( OperatorTok , "(" ) , ( StringTok , "\"Life - generation \"" ) , ( OperatorTok , "," )- , ( NormalTok , "gen" )+ , ( VariableTok , "gen" ) , ( OperatorTok , "," ) , ( StringTok , "\"" ) , ( SpecialCharTok , "\\n" ) , ( StringTok , "\"" ) , ( OperatorTok , ")" ) ]-, [ ( NormalTok , " gen" )+, [ ( NormalTok , " " )+ , ( VariableTok , "gen" ) , ( OperatorTok , "=" )- , ( NormalTok , "gen" )+ , ( VariableTok , "gen" ) , ( OperatorTok , "+" ) , ( DecValTok , "1" ) ] , [ ( NormalTok , " " ) , ( ControlFlowTok , "if" )- , ( NormalTok , " gen" )+ , ( NormalTok , " " )+ , ( VariableTok , "gen" ) , ( OperatorTok , ">" ) , ( DecValTok , "2000" ) , ( NormalTok , " " )
test/test-skylighting.hs view
@@ -170,7 +170,7 @@ ] @=? tokenize defConfig cpp "ng_or" , testCase "c '\\0' (#82)" $ Right- [ [ (CharTok,"'\\0'") ]+ [ [ (CharTok,"'"),(SpecialCharTok,"\\0"),(CharTok,"'") ] ] @=? tokenize defConfig c "'\\0'" , testCase "c very long integer (#81)" $ Right
xml/asn1.xml view
@@ -13,12 +13,10 @@ You'll find the "Writing a Kate Highlighting XML File HOWTO" at http://kate.kde.org/doc/hlhowto.php -->-<language name="ASN.1" section="Markup" version="5" kateversion="5.0" extensions="*.asn;*.asn1" mimetype="" author="Philippe Rigault" license="GPL">+<language name="ASN.1" section="Markup" version="6" kateversion="5.0" extensions="*.asn;*.asn1" mimetype="" author="Philippe Rigault" license="GPL"> <highlighting> <list name="keywords"> <item>DEFINITIONS</item>- <item>BEGIN</item>- <item>END</item> <item>EXPORTS</item> <item>IMPORTS</item> <item>FROM</item>@@ -29,6 +27,11 @@ <item>OPTIONAL</item> <item>FALSE</item> <item>TRUE</item>+ <item>AUTOMATIC</item>+ <item>CLASS</item>+ <item>WITH</item>+ <item>SIZE</item>+ <item>TAGS</item> </list> <list name="types"> <item>BOOLEAN</item>@@ -42,32 +45,67 @@ <item>SET</item> <item>CHOICE</item> <item>OF</item>- <item>VisibleString</item>+ <item>UNION</item> <item>StringStore</item>+ <item>GeneralString</item>+ <item>IA5String</item>+ <item>ISO64String</item>+ <item>NumericString</item>+ <item>PrintableString</item>+ <item>T61String</item>+ <item>TeletexString</item>+ <item>UniversalString</item>+ <item>UTF8String</item>+ <item>VideotexString</item>+ <item>VisibleString</item>+ <item>DATE</item>+ <item>DATE-TIME</item>+ <item>DURATION</item>+ <item>GeneralizedTime</item>+ <item>UTCTime</item> </list> <contexts> <context name="Normal Text" attribute="Normal Text" lineEndContext="#stay"> <keyword attribute="Keyword" context="#stay" String="keywords" />+ <StringDetect attribute="Keyword" context="#stay" String="BEGIN" beginRegion="Block"/>+ <StringDetect attribute="Keyword" context="#stay" String="END" endRegion="Block"/> <keyword attribute="Data Type" context="#stay" String="types" />- <Detect2Chars attribute="Comment" context="Comment" char="-" char1="-"/> + <Detect2Chars attribute="Comment" context="Comment" char="-" char1="-"/>+ <Detect2Chars attribute="Comment" context="Multiline Comment" char="/" char1="*" beginRegion="Comment"/>+ <DetectChar attribute="Normal Text" context="#stay" char="{" beginRegion="BraceBlock"/>+ <DetectChar attribute="Normal Text" context="#stay" char="}" endRegion="BraceBlock"/>++ <Int attribute="Decimal" context="#stay"/>+ <DetectChar attribute="String" context="ctxString" char="""/> </context> <context attribute="Comment" lineEndContext="#pop" name="Comment"> <IncludeRules context="##Comments" /> </context>+ <context attribute="Comment" lineEndContext="#stay" name="Multiline Comment">+ <Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="Comment"/>+ <IncludeRules context="##Comments"/>+ </context>++ <context attribute="String" lineEndContext="#stay" name="ctxString">+ <DetectChar attribute="String" context="#pop" char="""/>+ </context> </contexts> <itemDatas>- <itemData name="Normal Text" defStyleNum="dsNormal"/>- <itemData name="Keyword" defStyleNum="dsKeyword"/>+ <itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false"/>+ <itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false"/> <itemData name="Comment" defStyleNum="dsComment"/>- <itemData name="Data Type" defStyleNum="dsDataType"/>+ <itemData name="Data Type" defStyleNum="dsDataType" spellChecking="false"/>+ <itemData name="Decimal" defStyleNum="dsDecVal"/>+ <itemData name="String" defStyleNum="dsString"/> </itemDatas> </highlighting> <general> <comments> <comment name="singleLine" start="--"/>+ <comment name="multiLine" start="/*" end="*/" region="Comment"/> </comments> </general> </language>
xml/bash.xml view
@@ -1,45 +1,80 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE language SYSTEM "language.dtd" [- <!ENTITY tab "	">- <!ENTITY funcname "([^&_fragpathseps;}=#$]|[+!@](?!\())([^&_fragpathseps;}=$]*+([+!@](?!\())?+)*+">- <!ENTITY varname "[A-Za-z_][A-Za-z0-9_]*">- <!ENTITY eos "(?=$|[ &tab;])"> <!-- eol or space following -->- <!ENTITY eoexpr "(?=$|[ &tab;<>|&;)])">+ <!ENTITY tab "	">+ <!ENTITY funcname "([^&_fragpathseps;}=#$]|[+!@](?!\())([^&_fragpathseps;}=$]*+([+!@](?!\())?+)*+">+ <!ENTITY varname "[A-Za-z_][A-Za-z0-9_]*">+ <!ENTITY eos "(?=$|[ &tab;])"> <!-- eol or space following -->+ <!ENTITY eoexpr "(?=$|[ &tab;<>|&;)])"> - <!ENTITY substseps "${'"`\\">- <!ENTITY symbolseps "<>|&;()"> <!-- see man bash -->- <!ENTITY wordseps " &tab;&symbolseps;"> <!-- see man bash -->+ <!ENTITY substseps "${'"`\\">+ <!ENTITY symbolseps "<>|&;()"> <!-- see man bash -->+ <!ENTITY wordseps " &tab;&symbolseps;"> <!-- see man bash --> - <!ENTITY _fragpathseps "*?+!@&wordseps;&substseps;">- <!ENTITY _fragpathnosep "(?:[+!@](?!\()|\\.|&_brace_noexpansion;)?+">- <!ENTITY path "(?:[^&_fragpathseps;]*+&_fragpathnosep;)*+">- <!ENTITY fragpath "(?:[^&_fragpathseps;/]*+&_fragpathnosep;)*+">- <!ENTITY opt "(?:[^&_fragpathseps;=/]*+&_fragpathnosep;)*+">- <!ENTITY pathpart "(?:~|\.\.?|&fragpath;)(?:/&path;|(?=[*?]|[+!@]\(|&fragpath;(?:[/*?]|[+!@]\()))|(?:~|\.\.?)(?=[&wordseps;]|$)">+ <!ENTITY bq_string "`[^`]*+`">+ <!ENTITY sq_string "'[^']*+'">+ <!ENTITY dq_string ""(?:[^"\\`]*+|&bq_string;|\\.)*+"">+ <!ENTITY strings "(?:&sq_string;|&dq_string;|&bq_string;)"> - <!ENTITY _fragpathseps_alt "*?+!@&substseps;}">- <!ENTITY _fragpathnosep_alt "(?:[+!@](?!\()|\\.)?+">- <!ENTITY path_alt "(?:[^&_fragpathseps_alt;]*+&_fragpathnosep_alt;)*+">- <!ENTITY fragpath_alt "(?:[^&_fragpathseps_alt;/]*+&_fragpathnosep_alt;)*+">- <!ENTITY opt_alt "(?:[^&_fragpathseps_alt;=/]*+&_fragpathnosep_alt;)*+">- <!ENTITY pathpart_alt "(?:~|\.\.?|&fragpath_alt;)(?:/&path_alt;|(?=[*?]|[+!@]\(|&fragpath_alt;(?:[/*?]|[+!@]\()))|(?:~|\.\.?)(?=\}|$)">+ <!ENTITY globany "\[(?:[^&wordseps;"'`\\\[\]]+|\\.|&strings;|\[:\w+:\]|\[)*\]"> - <!ENTITY _braceexpansion_spe " &tab;<>|&;{}\\`'"$">- <!ENTITY _brace_noexpansion "\{[^&_braceexpansion_spe;,]*+\}">- <!ENTITY _braceexpansion_var "\$(?:\{[^\[\]&_braceexpansion_spe;]*+(?:\[[*@a-zA-Z0-9]\])\})?">- <!ENTITY _braceexpansion_string "'[^']*'|"([^"\`]*+|`[^`]*`)*+"">- <!ENTITY _braceexpansion_elems "\\.|`[^`]*`|&_braceexpansion_string;|&_braceexpansion_var;|&_brace_noexpansion;">- <!ENTITY _braceexpansion_consume "&_braceexpansion_elems;|{(?:[^&_braceexpansion_spe;,]++|&_braceexpansion_elems;)*?}|(?R)?+">- <!ENTITY _braceexpansion "(?:[^&_braceexpansion_spe;,]++|&_braceexpansion_consume;)*?,(?:[^&_braceexpansion_spe;]++|&_braceexpansion_consume;)*?}">- <!ENTITY braceexpansion "{&_braceexpansion;">+ <!ENTITY next_is_globany "(?:\^?\]\]|(?:\^?\]?)?(?:\\.|[^'" &tab;<>|&;()\\[\]]+|&strings;|\[:\w+:\])+\])">+ <!ENTITY bracket_noglobany "\[(?!&next_is_globany;)"> - <!ENTITY heredocq "(?|"([^"]+)"|'([^']+)'|\\(.[^&wordseps;&substseps;]*))">+ <!ENTITY _fragpathseps "*?+!@&wordseps;&substseps;">+ <!ENTITY _fragpathnosep "(?:[+!@](?!\()|\\.|&_brace_noexpansion;)?+">+ <!ENTITY path "(?:[^&_fragpathseps;\[]*+&_fragpathnosep;)*+">+ <!ENTITY fragpath "(?:[^&_fragpathseps;\[/]*+&_fragpathnosep;)*+">+ <!ENTITY opt "(?:[^&_fragpathseps;\[=/]*+&_fragpathnosep;)*+">+ <!ENTITY pathpart "(?:~|\.\.?|&fragpath;)(?:/&path;|(?=[*?]|[+!@]\(|&fragpath;(?:[/*?]|\[&next_is_globany;|[+!@]\()))|(?:~|\.\.?)(?=[&wordseps;]|$)"> - <!ENTITY arithmetic_as_subshell "\(((?:[^`'"()$]++|\$\{[^`'"(){}$]+\}|\$(?=[^{`'"()])|`[^`]*+`|\((?1)(?:[)]|(?=['"])))++)(?:[)](?=$|[^)])|["'])">+ <!ENTITY _fragpathseps_alt "*?+!@&substseps;}">+ <!ENTITY _fragpathnosep_alt "(?:[+!@](?!\()|\\.)?+">+ <!ENTITY path_alt "(?:[^&_fragpathseps_alt;]*+&_fragpathnosep_alt;)*+">+ <!ENTITY fragpath_alt "(?:[^&_fragpathseps_alt;/]*+&_fragpathnosep_alt;)*+">+ <!ENTITY opt_alt "(?:[^&_fragpathseps_alt;=/]*+&_fragpathnosep_alt;)*+">+ <!ENTITY pathpart_alt "(?:~|\.\.?|&fragpath_alt;)(?:/&path_alt;|(?=[*?]|[+!@]\(|&fragpath_alt;(?:[/*?]|[+!@]\()))|(?:~|\.\.?)(?=\}|$)">++ <!-- Path only with / -->+ <!ENTITY path_with_sep_text "[^?*+!@&wordseps;'"`\\/]">+ <!ENTITY path_with_sep_text2 "[^?*+!@()'"`\\/]">+ <!ENTITY path_with_sep_expr "\\.|&strings;|&globany;|[?*+](?!\()">+ <!ENTITY path_with_sep_spe "(~|\.\.?)($|[/ &tab;<>|&;)])">+ <!ENTITY path_with_sep_sub "[?*+!@]\((&path_with_sep_text2;++|&path_with_sep_expr;)*+(\)|(?=/))">+ <!ENTITY path_with_sep "/|&path_with_sep_spe;|(&path_with_sep_text;++|&path_with_sep_expr;|&path_with_sep_sub;)*+/">++ <!ENTITY _braceexpansion_spe " &tab;<>|&;{}\\`'"$">+ <!ENTITY _brace_noexpansion "\{[^&_braceexpansion_spe;,]*+\}">+ <!ENTITY _braceexpansion_var "\$(?:\{[^\[\]&_braceexpansion_spe;]*+(?:\[[*@a-zA-Z0-9]\])\})?">+ <!ENTITY _braceexpansion_string "'[^']*'|"([^"\`]*+|`[^`]*`)*+"">+ <!ENTITY _braceexpansion_elems "\\.|`[^`]*`|&_braceexpansion_string;|&_braceexpansion_var;|&_brace_noexpansion;">+ <!ENTITY _braceexpansion_consume "&_braceexpansion_elems;|{(?:[^&_braceexpansion_spe;,]++|&_braceexpansion_elems;)*?}|(?R)?+">+ <!ENTITY _braceexpansion "(?:[^&_braceexpansion_spe;,]++|&_braceexpansion_consume;)*?,(?:[^&_braceexpansion_spe;]++|&_braceexpansion_consume;)*?}">+ <!ENTITY braceexpansion "{&_braceexpansion;">++ <!ENTITY heredocq "(?|"([^"]+)"|'([^']+)'|\\(.[^&wordseps;&substseps;]*))">++ <!ENTITY arithmetic_as_subshell "\(((?:[^`'"()$]++|\$\{[^`'"(){}$]+\}|\$(?=[^{`'"()])|`[^`]*+`|\((?1)(?:[)]|(?=['"])))++)(?:[)](?=$|[^)])|["'])">++ <!ENTITY unary_operators "-[abcdefghkprstuwxGLNOSovRnz]&eos;">+ <!ENTITY binary_operators "(?:-(?:e[fq]|[nolg]t|[nlg]e)|==?|!=)&eos;">++ <!ENTITY dblbracket_close "\]\](?=($|[ &tab;;|&)]))">++ <!ENTITY weakDeliminatorSymbols "^%#[]$.{}:-/"> ]> -<language name="Bash" version="40" kateversion="5.79" section="Scripts" extensions="*.sh;*.bash;*.ebuild;*.eclass;*.exlib;*.exheres-0;.bashrc;.bash_profile;.bash_login;.profile;PKGBUILD;APKBUILD" mimetype="application/x-shellscript" casesensitive="1" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL">+<language+ name="Bash"+ version="45"+ kateversion="5.79"+ section="Scripts"+ extensions="*.sh;*.bash;*.ebuild;*.eclass;*.exlib;*.exheres-0;.bashrc;.bash_profile;.bash_login;.profile;PKGBUILD;APKBUILD"+ mimetype="application/x-shellscript"+ casesensitive="1"+ author="Wilbert Berendsen (wilbert@kde.nl)"+ license="LGPL"+ > <!-- (c) 2004 by Wilbert Berendsen (wilbert@kde.nl) Changes by Matthew Woehlke (mw_triad@users.sourceforge.net)@@ -544,6 +579,8 @@ <keyword attribute="Builtin" context="VarName" String="builtins_var" lookAhead="1"/> <!-- mark function definitions without function keyword --> <RegExpr attribute="Function" context="#stay" String="&funcname;[ &tab;]*\(\)"/>+ <!-- Special case for `: << '#BLOCK-COMMENT' form of "multiline" comments-->+ <RegExpr attribute="Normal Text" context="PreHereDocMLComment" String="^:[ &tab;]+<<[ &tab;]*'#([^']+)'$" lookAhead="1" column="0"/> <keyword attribute="Builtin" context="CommandArgs" String="builtins"/> <keyword attribute="Command" context="CommandArgs" String="unixcommands"/> @@ -620,8 +657,12 @@ <Detect2Chars attribute="String Transl." context="#pop!StringDQ" char="$" char1="""/> </context> <context attribute="Command" lineEndContext="#pop#pop" name="DispatchVarnameVariables">- <RegExpr attribute="Variable" context="#pop" String="\$(?:&varname;|[*@#?$!0-9-])"/>+ <RegExpr attribute="Dollar Prefix" context="#pop!VarNamePrefixedWithDollar" String="\$(?=&varname;|[*@#?$!0-9-])"/> </context>+ <context attribute="Variable" lineEndContext="#pop" name="VarNamePrefixedWithDollar">+ <DetectIdentifier attribute="Variable" context="#pop"/>+ <AnyChar attribute="Variable" context="#pop" String="*@#?$!0123456789-"/>+ </context> <context attribute="OtherCommand" lineEndContext="#pop#pop" name="CommandName"> <DetectSpaces attribute="Normal Text" context="#pop#pop!CommandArgs"/> <DetectIdentifier attribute="OtherCommand" context="#stay"/>@@ -693,17 +734,24 @@ <IncludeRules context="FindWord"/> <IncludeRules context="FindGlobAndPop"/> <DetectChar context="OptionMaybeBraceExpansion" char="{" lookAhead="1"/>+ <DetectChar context="LongOptionMaybeGlobAny" char="[" lookAhead="1"/> <RegExpr attribute="Option" context="#stay" String="&opt;"/> </context>+ <context attribute="Option" lineEndContext="#pop#pop" name="LongOptionMaybeGlobAny" fallthroughContext="#pop">+ <IncludeRules context="FindGlobAny"/>+ <DetectChar attribute="Option" context="#pop" char="["/>+ </context> <context attribute="Normal Text" lineEndContext="#pop" name="NormalOption" fallthroughContext="#pop"> <AnyChar context="#pop" String="&wordseps;`" lookAhead="1"/> <IncludeRules context="FindWord"/> <DetectChar context="NormalMaybeBraceExpansion" char="{" lookAhead="1"/>- <IncludeRules context="FindPathThenPop"/>- <IncludeRules context="FindNormalTextOption"/>+ <IncludeRules context="FindNormalText"/> </context>- <context attribute="Normal Text" lineEndContext="#stay" name="FindNormalTextOption">- <RegExpr attribute="Normal Text" context="#stay" String="[^&wordseps;&substseps;]+"/>+ <context attribute="Normal Text" lineEndContext="#stay" name="FindNormalText">+ <IncludeRules context="FindGlobAndPop"/>+ <RegExpr attribute="Path" context="PathThenPop" String="&pathpart;"/>+ <DetectChar context="FindPathThenPopMaybeGlobAny" char="[" lookAhead="1"/>+ <RegExpr attribute="Normal Text" context="#stay" String="[^&wordseps;&substseps;\[]+"/> </context> <context attribute="Normal Text" lineEndContext="#pop" name="OptionMaybeBraceExpansion"> <IncludeRules context="DispatchBraceExpansion"/>@@ -735,18 +783,15 @@ <RegExpr attribute="Escape" context="#pop!SequenceExpression" String="{(?=([-+]?[0-9]+\.\.[-+]?[0-9]+|[a-zA-Z]\.\.[a-zA-Z])(\.\.[-+]?[0-9]+)?\})"/> </context> - <!-- FindPathThenPop consumes path -->- <context attribute="Normal Text" lineEndContext="#pop" name="FindPathThenPop">- <IncludeRules context="FindGlobAndPop"/>- <RegExpr attribute="Path" context="PathThenPop" String="&pathpart;"/>+ <!-- FindPathThenPopMaybeGlobAny consumes path -->+ <context attribute="Normal Text" lineEndContext="#pop#pop" name="FindPathThenPopMaybeGlobAny" fallthroughContext="#pop!PathThenPop">+ <IncludeRules context="FindGlobAny"/>+ <DetectChar attribute="Normal Text" context="#pop" char="["/> </context> <context attribute="Path" lineEndContext="#pop" name="FindGlobAndPop">- <IncludeRules context="FindExtGlobAndPop"/>- <AnyChar attribute="Glob" context="PathThenPop" String="?*"/>- </context>- <context attribute="Path" lineEndContext="#pop" name="FindExtGlobAndPop"> <Detect2Chars attribute="Glob" context="ExtGlobAndPop" char="?" char1="("/> <Detect2Chars attribute="Glob" context="ExtGlobAndPop" char="*" char1="("/>+ <AnyChar attribute="Glob" context="PathThenPop" String="?*"/> <Detect2Chars attribute="Glob" context="ExtGlobAndPop" char="+" char1="("/> <Detect2Chars attribute="Glob" context="ExtGlobAndPop" char="@" char1="("/> <Detect2Chars attribute="Glob" context="ExtGlobAndPop" char="!" char1="("/>@@ -768,8 +813,10 @@ <DetectChar attribute="Glob" context="#pop" char=")"/> <IncludeRules context="FindWord"/> <IncludeRules context="IncExtGlob"/>+ <IncludeRules context="PathThenPopMaybeGlobAny"/> </context> <context attribute="Path" lineEndContext="#stay" name="IncExtGlob">+ <DetectIdentifier attribute="Path"/> <IncludeRules context="FindExtGlob"/> <DetectChar context="PathMaybeBraceExpansion" char="{" lookAhead="1"/> </context>@@ -778,13 +825,38 @@ <IncludeRules context="FindWord"/> <IncludeRules context="FindExtGlob"/> <DetectChar context="PathMaybeBraceExpansion" char="{" lookAhead="1"/>+ <DetectChar context="PathThenPopMaybeGlobAny" char="[" lookAhead="1"/> <RegExpr attribute="Path" context="#stay" String="&path;"/> </context>+ <context attribute="Path" lineEndContext="#pop#pop" name="PathThenPopMaybeGlobAny" fallthroughContext="#pop">+ <IncludeRules context="FindGlobAny"/>+ <DetectChar attribute="Path" context="#pop" char="["/>+ </context> <context attribute="Path" lineEndContext="#pop" name="PathMaybeBraceExpansion" fallthroughContext="#pop"> <IncludeRules context="DispatchBraceExpansion"/> <DetectChar attribute="Path" context="#pop" char="{"/> </context> + <context attribute="Glob" lineEndContext="#stay" name="FindGlobAny">+ <RegExpr attribute="Glob" context="GlobAnyFlag" String="\[(?=&next_is_globany;)"/>+ </context>+ <context attribute="Pattern" lineEndContext="#pop" name="GlobAnyFlag" fallthroughContext="#pop!GlobAny">+ <DetectChar attribute="Glob" context="#pop!GlobAny" char="^"/>+ </context>+ <context attribute="Pattern" lineEndContext="#pop" name="GlobAny">+ <DetectIdentifier attribute="Pattern"/>+ <DetectChar context="AssumeEscape" char="\" lookAhead="1"/>+ <DetectChar attribute="Glob" context="#stay" char="-"/>+ <IncludeRules context="FindStrings"/>+ <DetectChar attribute="Glob" context="#pop" char="]"/>+ <Detect2Chars attribute="Glob" context="GlobClass" char="[" char1=":"/>+ </context>+ <context attribute="Glob" lineEndContext="#pop#pop" name="GlobClass">+ <DetectIdentifier attribute="Pattern"/>+ <Detect2Chars attribute="Glob" context="#pop" char=":" char1="]"/>+ <DetectChar attribute="Error" context="#pop" char="]"/>+ </context>+ <!-- FindPathThenPopInAlternateValue consumes path in ${xx:here}--> <context attribute="Normal Text" lineEndContext="#pop" name="FindPathThenPopInAlternateValue"> <Detect2Chars context="#pop!PathThenPopInAlternateValue" char="?" char1="(" lookAhead="1"/>@@ -813,6 +885,7 @@ <IncludeRules context="FindExtGlobInAlternateValue"/> </context> <context attribute="Path" lineEndContext="#stay" name="FindExtGlobInAlternateValue">+ <DetectIdentifier attribute="Path"/> <Detect2Chars attribute="Glob" context="RecursiveExtGlobInAlternateValue" char="?" char1="("/> <Detect2Chars attribute="Glob" context="RecursiveExtGlobInAlternateValue" char="*" char1="("/> <Detect2Chars attribute="Glob" context="RecursiveExtGlobInAlternateValue" char="+" char1="("/>@@ -836,6 +909,7 @@ <AnyChar attribute="Glob" context="#stay" String="?*"/> </context> <context attribute="Pattern" lineEndContext="#stay" name="ExtPattern">+ <DetectIdentifier attribute="Pattern"/> <DetectChar attribute="Glob" context="#stay" char="|"/> <IncludeRules context="FindWord"/> <DetectChar attribute="Glob" context="#pop" char=")"/>@@ -937,6 +1011,7 @@ <context attribute="Normal Text" lineEndContext="#pop" name="StringRedirection2"> <AnyChar context="#pop" String="&wordseps;`" lookAhead="1"/> <IncludeRules context="FindWord"/>+ <DetectIdentifier attribute="Normal Text"/> </context> <context attribute="Normal Text" lineEndContext="#pop" name="CloseFile" fallthroughContext="#pop"> <DetectChar attribute="Keyword" context="#pop" char="-"/>@@ -944,6 +1019,7 @@ <!-- HereDoc consumes Here-documents. It is called at the beginning of the "<<" construct. --> <context attribute="Normal Text" lineEndContext="#stay" name="HereDoc">+ <RegExpr attribute="Redirection" context="HereDocMLComment" String="^[ &tab;]*<<[ &tab;]*'#([^']+)'$" column="0"/> <RegExpr attribute="Redirection" context="HereDocIQ" String="<<-[ &tab;]*&heredocq;(?=[ &tab;]*$)"/> <RegExpr attribute="Redirection" context="HereDocINQ" String="<<-[ &tab;]*([^&wordseps;]+)(?=[ &tab;]*$)"/> <RegExpr attribute="Redirection" context="HereDocQ" String="<<[ &tab;]*&heredocq;(?=[ &tab;]*$)"/>@@ -961,6 +1037,24 @@ <IncludeRules context="Start"/> </context> + <!-- Highlight the builtin `:` (true) and the followed redirection, then fall into `HereDocMLComment` -->+ <context attribute="Comment" lineEndContext="#stay" name="PreHereDocMLComment">+ <DetectChar attribute="Builtin" context="#stay" char=":" column="0"/>+ <RegExpr attribute="Redirection" context="HereDocMLComment" String="<<[ &tab;]*'#([^']+)'$"/>+ </context>++ <context attribute="Comment" lineEndContext="#stay" name="HereDocMLComment" dynamic="true" fallthroughContext="Comment">+ <RegExpr attribute="Redirection" context="#pop#pop" String="^#%1$" column="0" dynamic="true"/>+ <RegExpr attribute="Region Marker" context="RST Documentation" String="^#?\[(=*)\[\.rst:" column="0" beginRegion="RSTDocumentation" />+ <IncludeRules context="Comment"/>+ </context>++ <context attribute="Comment" lineEndContext="#stay" name="RST Documentation" dynamic="true">+ <RegExpr attribute="Redirection" context="#pop#pop#pop" String="^#BLOCK-COMMENT$" column="0"/>+ <RegExpr attribute="Region Marker" context="#pop" String="^#?\]%1\]" dynamic="true" column="0" endRegion="RSTDocumentation" />+ <IncludeRules context="##reStructuredText" />+ </context>+ <context attribute="Here Doc" lineEndContext="#stay" name="HereDocQ" dynamic="true" fallthroughContext="HereDocText"> <RegExpr attribute="Redirection" context="#pop#pop" String="^%1$" dynamic="true" column="0"/> </context>@@ -1001,6 +1095,8 @@ </context> <context attribute="Here Doc" lineEndContext="#pop" name="HereDocSubstitutions">+ <DetectSpaces attribute="Here Doc"/>+ <DetectIdentifier attribute="Here Doc"/> <DetectChar context="HereDocVariables" char="$" lookAhead="1"/> <DetectChar attribute="Backquote" context="CommandBackq" char="`"/> <DetectChar context="AssumeEscape" char="\" lookAhead="1"/>@@ -1086,11 +1182,15 @@ <!-- StringSQ consumes anything till ' --> <context attribute="String SingleQ" lineEndContext="#stay" name="StringSQ">+ <DetectSpaces attribute="String SingleQ"/>+ <DetectIdentifier attribute="String SingleQ"/> <DetectChar attribute="String SingleQ" context="#pop" char="'"/> </context> <!-- StringDQ consumes anything till ", substitutes vars and expressions --> <context attribute="String DoubleQ" lineEndContext="#stay" name="StringDQ">+ <DetectSpaces attribute="String DoubleQ"/>+ <DetectIdentifier attribute="String DoubleQ"/> <DetectChar attribute="String DoubleQ" context="#pop" char="""/> <DetectChar context="StringDQEscape" char="\" lookAhead="1"/> <DetectChar context="StringDQDispatchVariables" char="$" lookAhead="1"/>@@ -1119,6 +1219,8 @@ <!-- StringEsc eats till ', but escaping many characters --> <context attribute="String SingleQ" lineEndContext="#stay" name="StringEsc">+ <DetectSpaces attribute="String SingleQ"/>+ <DetectIdentifier attribute="String SingleQ"/> <DetectChar attribute="String SingleQ" context="#pop" char="'"/> <RegExpr attribute="String Escape" context="#stay" String="\\(?:[abefnrtv\\']|[0-7]{1,3}|x[A-Fa-f0-9]{1,2}|c.)"/> </context>@@ -1214,6 +1316,7 @@ <DetectChar attribute="Parameter Expansion" context="#pop" char="}"/> <IncludeRules context="FindWord"/> <IncludeRules context="FindPathThenPopInAlternateValue"/>+ <DetectIdentifier attribute="Normal Text"/> </context> <!-- called as soon as ${xxx^ are ${xxx, are encoutered -->@@ -1221,6 +1324,7 @@ <DetectChar attribute="Parameter Expansion" context="#pop" char="}"/> <IncludeRules context="FindWord"/> <IncludeRules context="FindPattern"/>+ <DetectIdentifier attribute="Pattern"/> </context> <!-- called as soon as ${xxx/ is encoutered -->@@ -1250,6 +1354,7 @@ <DetectChar context="BraceExpansionVariables" char="$" lookAhead="1"/> <IncludeRules context="FindStrings"/> <IncludeRules context="FindPattern"/>+ <DetectIdentifier attribute="Escape"/> </context> <context attribute="Escape" lineEndContext="#pop" name="EscapeMaybeBraceExpansion"> <IncludeRules context="DispatchBraceExpansion"/>@@ -1305,27 +1410,17 @@ </context> <context attribute="Decimal" lineEndContext="#pop" name="Number">- <Detect2Chars attribute="Hex" context="#pop!Hex" char="0" char1="x"/>- <Detect2Chars attribute="Hex" context="#pop!Hex" char="0" char1="X"/>- <DetectChar context="#pop!Octal" char="0" lookAhead="1"/>+ <HlCHex attribute="Hex" context="#pop" additionalDeliminator="&weakDeliminatorSymbols;"/>+ <HlCOct attribute="Octal" context="#pop!NumberError" additionalDeliminator="&weakDeliminatorSymbols;"/> <RegExpr attribute="Base" context="#pop!BaseN" String="[1-9][0-9]*#"/>- <AnyChar attribute="Decimal" context="#pop!Decimal" String="123456789"/>- </context>- <context attribute="Octal" lineEndContext="#pop" name="Octal" fallthroughContext="#pop!Decimal">- <RegExpr attribute="Octal" context="#pop!NumberError" String="0[0-7]+"/>- <DetectChar attribute="Decimal" context="#pop" char="0"/>- </context>- <context attribute="Decimal" lineEndContext="#pop" name="Decimal" fallthroughContext="#pop">- <AnyChar attribute="Decimal" context="#stay" String="0123456789"/>- </context>- <context attribute="Hex" lineEndContext="#pop" name="Hex" fallthroughContext="#pop">- <RegExpr attribute="Hex" context="#pop" String="[0-9a-fA-F]+"/>+ <DetectChar attribute="Decimal" context="#pop!NumberError" char="0"/>+ <Int attribute="Decimal" context="#pop" additionalDeliminator="&weakDeliminatorSymbols;"/> </context> <context attribute="BaseN" lineEndContext="#pop" name="BaseN" fallthroughContext="#pop"> <RegExpr attribute="BaseN" context="#pop" String="[0-9a-zA-Z@_]+"/> </context> <context attribute="Error" lineEndContext="#pop" name="NumberError" fallthroughContext="#pop">- <AnyChar attribute="Error" context="#stay" String="8901234567"/>+ <Int attribute="Error" context="#pop" additionalDeliminator="0123456789"/> </context> <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblParenSubstOrSubstCommand">@@ -1335,7 +1430,7 @@ <!-- ExprDblParenSubst like ExprDblParen but matches )) as Variable --> <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblParenSubst"> <DetectSpaces attribute="Normal Text" context="#stay"/>- <Detect2Chars attribute="Variable" context="#pop" char=")" char1=")" endRegion="expression"/>+ <Detect2Chars attribute="Parameter Expansion" context="#pop" char=")" char1=")" endRegion="expression"/> <IncludeRules context="FindExprDblParen"/> <!-- $((cmd ) # jump to SubstCommand context -->@@ -1368,8 +1463,7 @@ <AnyChar context="#pop" String=" &tab;" lookAhead="1"/> <IncludeRules context="FindWord"/> <DetectChar context="NormalMaybeBraceExpansion" char="{" lookAhead="1"/>- <IncludeRules context="FindPathThenPop"/>- <IncludeRules context="FindNormalTextOption"/>+ <IncludeRules context="FindNormalText"/> </context> <context attribute="Normal Text" lineEndContext="#stay" name="ExprBracketParam2" fallthroughContext="ExprBracketValue">@@ -1386,6 +1480,7 @@ <context attribute="Normal Text" lineEndContext="#stay" name="ExprBracketFinal" fallthroughContext="ExprBracketValue"> <DetectSpaces attribute="Normal Text" context="#stay"/> <IncludeRules context="FindExprBracketEnd"/>+ <RegExpr attribute="Expression" context="#pop!ExprBracket" String="-[ao]&eos;"/> <RegExpr attribute="Error" context="#pop" String="(?:[^] &tab;]++|\][^ &tab;])++" endRegion="expression"/> </context> @@ -1395,10 +1490,10 @@ </context> <context attribute="Normal Text" lineEndContext="#pop" name="TestMaybeUnary" fallthroughContext="#pop!ExprBracketValue">- <RegExpr attribute="Expression" context="#pop" String="-[abcdefghkprstuwxGLNOSovRnz](?=[ &tab;])"/>+ <RegExpr attribute="Expression" context="#pop#pop!ExprBracketParam2" String="&unary_operators;"/> </context> <context attribute="Normal Text" lineEndContext="#pop" name="TestMaybeBinary" fallthroughContext="#pop!ExprBracketValue">- <RegExpr attribute="Expression" context="#pop" String="(?:-(?:e[fq]|[nolg]t|[nlg]e)|==?|!=)(?=[ &tab;])"/>+ <RegExpr attribute="Expression" context="#pop" String="&binary_operators;"/> </context> @@ -1417,28 +1512,88 @@ <RegExpr attribute="Expression" context="#pop" String="!(?=$|[ &tab;(])"/> </context> - <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblBracketParam1" fallthroughContext="ExprDblBracketValue">+ <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblBracketParam1" fallthroughContext="ExprDblBracketValueText"> <DetectSpaces attribute="Normal Text" context="#pop!ExprDblBracketParam2"/> <DetectChar context="TestMaybeUnary2" char="-" lookAhead="1"/> <AnyChar attribute="Expression" context="#pop!ExprDblBracketParam3Spe" String="<>"/> <IncludeRules context="FindExprDblBracketEnd"/> </context>- <context attribute="Normal Text" lineEndContext="#pop" name="TestMaybeUnary2" fallthroughContext="#pop!ExprDblBracketValue">- <IncludeRules context="TestMaybeUnary"/>+ <context attribute="Normal Text" lineEndContext="#pop" name="TestMaybeUnary2" fallthroughContext="#pop!ExprDblBracketValueText">+ <RegExpr attribute="Expression" context="#pop!ExprDblBracketUnary" String="&unary_operators;(?!\s+(?:=~|&binary_operators;))"/> </context>+ <context attribute="Normal Text" lineEndContext="#pop" name="ExprDblBracketUnary">+ <DetectSpaces attribute="Normal Text" context="#pop!ExprDblBracketValueText"/>+ </context> - <context attribute="Normal Text" lineEndContext="#pop" name="ExprDblBracketValue">+ <context attribute="Normal Text" lineEndContext="#pop" name="ExprDblBracketValueText" fallthroughContext="#pop!ExprDblBracketValueText2">+ <Detect2Chars context="#pop!ExprDblBracketValueTextMaybeEnd" char="]" char1="]" lookAhead="1"/>+ <DetectChar attribute="Error" context="#pop!Comment" char="#"/>+ <IncludeRules context="FindExprDblBracketValueTextPath"/>+ </context>+ <context attribute="Normal Text" lineEndContext="#pop" name="FindExprDblBracketValueTextPath">+ <RegExpr context="#pop!ExprDblBracketValueTextPath" String="&path_with_sep;|" lookAhead="1"/>+ </context>+ <context attribute="Normal Text" lineEndContext="#pop" name="ExprDblBracketValueTextMaybeEnd">+ <RegExpr attribute="Keyword" context="#pop#pop" String="&dblbracket_close;" endRegion="expression"/>+ <IncludeRules context="FindExprDblBracketValueTextPath"/>+ <Detect2Chars context="#pop!ExprDblBracketValueText2" char="]" char1="]" lookAhead="1"/>+ </context>+ <context attribute="Normal Text" lineEndContext="#pop" name="ExprDblBracketValueText2">+ <DetectIdentifier/>+ <AnyChar String="*?+!@~^:%+-/,"/>+ <IncludeRules context="ExprDblBracketValueCommon"/>+ </context>+ <context attribute="Path" lineEndContext="#pop" name="ExprDblBracketValueTextPath">+ <IncludeRules context="ExprDblBracketValueText2"/>+ </context>++ <context attribute="Normal Text" lineEndContext="#pop" name="ExprDblBracketValuePattern" fallthroughContext="#pop!ExprDblBracketValuePattern2">+ <RegExpr context="PathThenPop" String="&path_with_sep;|" lookAhead="1"/>+ </context>+ <context attribute="Normal Text" lineEndContext="#pop" name="ExprDblBracketValuePattern2">+ <DetectIdentifier attribute="Normal Text"/>+ <IncludeRules context="ExprDblBracketValueCommon"/>+ <IncludeRules context="FindExprDblBracketValueExtGlob"/>+ <AnyChar attribute="Glob" String="?*"/>+ </context>+ <context attribute="Glob" lineEndContext="#stay" name="FindExprDblBracketValueExtGlob">+ <Detect2Chars attribute="Glob" context="ExprDblBracketValueExtGlob" char="?" char1="("/>+ <Detect2Chars attribute="Glob" context="ExprDblBracketValueExtGlob" char="*" char1="("/>+ <Detect2Chars attribute="Glob" context="ExprDblBracketValueExtGlob" char="+" char1="("/>+ <Detect2Chars attribute="Glob" context="ExprDblBracketValueExtGlob" char="@" char1="("/>+ <Detect2Chars attribute="Glob" context="ExprDblBracketValueExtGlob" char="!" char1="("/>+ <DetectChar context="ExprDblBracketValueMaybeGlobAny" char="[" lookAhead="1"/>+ </context>+ <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblBracketValueMaybeGlobAny" fallthroughContext="#pop">+ <IncludeRules context="FindGlobAny"/>+ <DetectChar attribute="Normal Text" context="#pop" char="["/>+ </context>+ <context attribute="Normal Text" lineEndContext="#pop#pop" name="ExprDblBracketValueExtGlob">+ <DetectIdentifier attribute="Normal Text"/>+ <DetectChar attribute="Glob" context="#pop" char=")"/>+ <DetectChar attribute="Normal Text" context="ExprDblBracketValueExtGlobNormal" char="("/>+ <IncludeRules context="FindExprDblBracketValueExtGlob"/>+ <AnyChar attribute="Glob" String="|?*"/>+ <IncludeRules context="FindWord"/>+ </context>+ <context attribute="Normal Text" lineEndContext="#pop#pop" name="ExprDblBracketValueExtGlobNormal">+ <DetectIdentifier attribute="Normal Text"/>+ <DetectChar attribute="Normal Text" context="#pop" char=")"/>+ <DetectChar attribute="Normal Text" context="ExprDblBracketValueExtGlobNormal" char="("/>+ <IncludeRules context="FindExprDblBracketValueExtGlob"/>+ <AnyChar attribute="Glob" String="?*"/>+ <IncludeRules context="FindWord"/>+ </context>++ <context attribute="Normal Text" lineEndContext="#pop" name="ExprDblBracketValueCommon"> <Detect2Chars context="ExprDblBracketDblParentOrSubValue" char="(" char1="(" lookAhead="1"/> <DetectChar context="ExprDblBracketSubValue" char="(" lookAhead="1"/> <DetectChar attribute="Operator" context="#pop#pop" char=")"/> <Detect2Chars attribute="Control" context="#pop#pop!ExprDblBracket" char="&" char1="&"/> <Detect2Chars attribute="Control" context="#pop#pop!ExprDblBracket" char="|" char1="|"/>- <AnyChar attribute="Error" context="#stay" String="|&;)"/>+ <AnyChar attribute="Error" context="#stay" String="|&;"/> <AnyChar context="#pop" String=" &tab;<>" lookAhead="1"/> <IncludeRules context="FindWord"/>- <DetectChar context="NormalMaybeBraceExpansion" char="{" lookAhead="1"/>- <IncludeRules context="FindPathThenPop"/>- <IncludeRules context="FindNormalTextOption"/> </context> <context attribute="Normal Text" lineEndContext="#pop" name="ExprDblBracketSubValue" fallthroughContext="#pop"> <DetectChar attribute="Operator" context="ExprDblBracketNot" char="("/>@@ -1453,35 +1608,38 @@ <Detect2Chars attribute="Keyword" context="#pop" char=")" char1=")" endRegion="expression"/> <IncludeRules context="FindExprDblParen"/> <!-- ((cmd- ) # jump to ExprDblBracketValue context -->- <DetectChar attribute="Operator" context="ExprDblBracketValue" char=")" endRegion="expression" beginRegion="subshell"/>+ ) # jump to ExprDblBracketValuePattern context -->+ <DetectChar attribute="Operator" context="ExprDblBracketValuePattern" char=")" endRegion="expression" beginRegion="subshell"/> </context> - <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblBracketParam2" fallthroughContext="ExprDblBracketValue">+ <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblBracketParam2" fallthroughContext="ExprDblBracketValuePattern"> <DetectSpaces attribute="Normal Text" context="#pop!ExprDblBracketParam3"/> <AnyChar context="TestMaybeBinary2" String="-=!" lookAhead="1"/> <AnyChar attribute="Expression" context="#pop!ExprDblBracketParam3Spe" String="<>"/> <IncludeRules context="FindExprDblBracketEnd"/>+ <DetectChar attribute="Comment" context="Comment" char="#"/> </context>- <context attribute="Normal Text" lineEndContext="#pop" name="TestMaybeBinary2" fallthroughContext="#pop!ExprDblBracketValue">+ <context attribute="Normal Text" lineEndContext="#pop" name="TestMaybeBinary2" fallthroughContext="#pop!ExprDblBracketValuePattern"> <IncludeRules context="TestMaybeBinary"/>- <RegExpr attribute="Expression" context="#pop#pop!ExprDblBracketRegex" String="=~(?=[ &tab;(])"/>+ <RegExpr attribute="Expression" context="#pop!ExprDblBracketRegex" String="=~(?=[ &tab;(])"/> </context> <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblBracketParam3Spe" fallthroughContext="#pop!ExprDblBracketParam3"> <DetectSpaces attribute="Normal Text" context="#pop!ExprDblBracketParam3"/> </context> - <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblBracketParam3" fallthroughContext="ExprDblBracketValue">+ <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblBracketParam3" fallthroughContext="ExprDblBracketValuePattern"> <DetectSpaces attribute="Normal Text" context="#pop!ExprDblBracketFinal"/> <IncludeRules context="FindExprDblBracketEnd"/> <AnyChar attribute="Error" context="#stay" String="<>"/>+ <DetectChar attribute="Comment" context="Comment" char="#"/> </context> - <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblBracketFinal" fallthroughContext="ExprDblBracketValue">+ <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblBracketFinal" fallthroughContext="ExprDblBracketValuePattern"> <DetectSpaces attribute="Normal Text" context="#stay"/> <IncludeRules context="FindExprDblBracketEnd"/> <DetectChar attribute="Comment" context="Comment" char="#"/>+ <DetectChar attribute="Operator" context="#pop" char=")"/> <RegExpr attribute="Error" context="#pop" String="(?:[^] &tab;]++|\](?:[^]]|\][^ &tab;]))++" endRegion="expression"/> </context> @@ -1489,13 +1647,17 @@ <LineContinue attribute="Escape" context="#stay"/> <Detect2Chars attribute="Control" context="#pop!ExprDblBracket" char="&" char1="&"/> <Detect2Chars attribute="Control" context="#pop!ExprDblBracket" char="|" char1="|"/>- <RegExpr attribute="Keyword" context="#pop" String="\]\](?=($|[ &tab;;|&)]))" endRegion="expression"/>+ <RegExpr attribute="Keyword" context="#pop" String="&dblbracket_close;" endRegion="expression"/> </context> - <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblBracketRegex">- <DetectSpaces attribute="Normal Text" context="#pop!Regex"/>+ <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblBracketRegex" fallthroughContext="#pop!ExprDblBracketRegexCheck">+ <DetectSpaces attribute="Normal Text" context="#pop!ExprDblBracketRegexCheck"/> </context>+ <context attribute="Normal Text" lineEndContext="#pop" name="ExprDblBracketRegexCheck" fallthroughContext="#pop#pop!Regex">+ <DetectChar attribute="Error" context="Comment" char="#"/>+ </context> <context attribute="Pattern" lineEndContext="#stay" name="Regex">+ <DetectIdentifier attribute="Pattern"/> <DetectSpaces attribute="Normal Text" context="#pop!ExprDblBracketFinal"/> <DetectChar attribute="Operator" context="#pop" char=")"/> <Detect2Chars attribute="Operator" context="RegexChar" char="[" char1="^"/>@@ -1503,6 +1665,7 @@ <IncludeRules context="FindRegex"/> </context> <context attribute="Pattern" lineEndContext="#stay" name="ExprDblBracketSubRegex">+ <DetectIdentifier attribute="Pattern"/> <DetectSpaces attribute="Pattern" context="#stay"/> <DetectChar attribute="Operator" context="#pop" char=")"/> <Detect2Chars attribute="Operator" context="RegexSubChar" char="[" char1="^"/>@@ -1529,7 +1692,7 @@ </context> <context attribute="Normal Text" lineEndContext="#pop" name="RegexDup">- <AnyChar attribute="Decimal" context="#stay" String="0123456789"/>+ <Int attribute="Decimal" additionalDeliminator="{"/> <DetectChar attribute="Parameter Expansion Operator" context="#stay" char=","/> <DetectChar attribute="Parameter Expansion" context="#pop" char="}"/> </context>@@ -1552,6 +1715,7 @@ <DetectChar context="RegexCharClassSelect" char="[" lookAhead="1"/> <DetectChar attribute="Operator" context="#pop" char="]"/> <AnyChar context="#pop" String="() &tab;" lookAhead="1"/>+ <IncludeRules context="FindStrings"/> </context> <context attribute="Operator" lineEndContext="#stay" name="RegexInCharEnd"> <DetectChar attribute="Pattern" context="#stay" char="-"/>@@ -1565,14 +1729,17 @@ </context> <context attribute="Parameter Expansion" lineEndContext="#pop#pop#pop" name="RegexCharClass">+ <DetectIdentifier attribute="Parameter Expansion"/> <Detect2Chars attribute="Parameter Expansion Operator" context="#pop" char=":" char1="]"/> <DetectChar attribute="Error" context="#pop" char="]"/> </context> <context attribute="Parameter Expansion" lineEndContext="#pop#pop#pop" name="RegexCollatingSymbols">+ <DetectIdentifier attribute="Parameter Expansion"/> <Detect2Chars attribute="Parameter Expansion Operator" context="#pop" char="." char1="]"/> <DetectChar attribute="Error" context="#pop" char="]"/> </context> <context attribute="Parameter Expansion" lineEndContext="#pop#pop#pop" name="RegexEquivalenceClass">+ <DetectIdentifier attribute="Parameter Expansion"/> <Detect2Chars attribute="Parameter Expansion Operator" context="#pop" char="=" char1="]"/> <DetectChar attribute="Error" context="#pop" char="]"/> </context>@@ -1617,6 +1784,7 @@ <AnyChar attribute="Decimal" context="#stay" String="0123456789"/> </context> <context attribute="Normal Text" lineEndContext="#stay" name="Subscript2">+ <DetectIdentifier attribute="Normal Text"/> <DetectChar attribute="Parameter Expansion Operator" context="#pop" char="]"/> <IncludeRules context="FindWord"/> <IncludeRules context="FindPattern"/>@@ -1667,43 +1835,45 @@ <itemDatas> <itemData name="Normal Text" defStyleNum="dsNormal"/> <itemData name="Comment" defStyleNum="dsComment"/>- <itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false"/>- <itemData name="Control" defStyleNum="dsKeyword" spellChecking="false"/>- <itemData name="Control Flow" defStyleNum="dsControlFlow" spellChecking="false"/>- <itemData name="Builtin" defStyleNum="dsBuiltIn" spellChecking="false"/>- <itemData name="Command" defStyleNum="dsFunction" spellChecking="false"/>- <itemData name="OtherCommand" defStyleNum="dsExtension" spellChecking="false"/>- <itemData name="Redirection" defStyleNum="dsOperator" spellChecking="false"/>- <itemData name="Escape" defStyleNum="dsDataType" spellChecking="false"/>+ <itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false"/>+ <itemData name="Control" defStyleNum="dsKeyword" spellChecking="false"/>+ <itemData name="Control Flow" defStyleNum="dsControlFlow" spellChecking="false"/>+ <itemData name="Builtin" defStyleNum="dsBuiltIn" spellChecking="false"/>+ <itemData name="Command" defStyleNum="dsFunction" spellChecking="false"/>+ <itemData name="OtherCommand" defStyleNum="dsExtension" spellChecking="false"/>+ <itemData name="Redirection" defStyleNum="dsOperator" spellChecking="false"/>+ <itemData name="Escape" defStyleNum="dsDataType" spellChecking="false"/> <itemData name="String SingleQ" defStyleNum="dsString"/> <itemData name="String DoubleQ" defStyleNum="dsString"/> <itemData name="Here Doc" defStyleNum="dsString"/>- <itemData name="Backquote" defStyleNum="dsKeyword" spellChecking="false"/>+ <itemData name="Backquote" defStyleNum="dsKeyword" spellChecking="false"/> <itemData name="String Transl." defStyleNum="dsString"/> <itemData name="String Escape" defStyleNum="dsDataType"/>- <itemData name="Variable" defStyleNum="dsVariable" spellChecking="false"/>- <itemData name="Expression" defStyleNum="dsOthers" spellChecking="false"/>- <itemData name="Function" defStyleNum="dsFunction" spellChecking="false"/>+ <itemData name="Variable" defStyleNum="dsVariable" spellChecking="false"/>+ <itemData name="Dollar Prefix" defStyleNum="dsVariable" spellChecking="false"/>+ <itemData name="Expression" defStyleNum="dsOthers" spellChecking="false"/>+ <itemData name="Function" defStyleNum="dsFunction" spellChecking="false"/> <itemData name="Pattern" defStyleNum="dsSpecialString" spellChecking="false"/>- <itemData name="Path" defStyleNum="dsNormal" spellChecking="false"/>- <itemData name="Glob" defStyleNum="dsPreprocessor" spellChecking="false"/>- <itemData name="Option" defStyleNum="dsAttribute" spellChecking="false"/>- <itemData name="Hex" defStyleNum="dsBaseN" spellChecking="false"/>- <itemData name="Octal" defStyleNum="dsBaseN" spellChecking="false"/>- <itemData name="Decimal" defStyleNum="dsDecVal" spellChecking="false"/>- <itemData name="Base" defStyleNum="dsDataType" spellChecking="false"/>- <itemData name="BaseN" defStyleNum="dsBaseN" spellChecking="false"/>- <itemData name="File Descriptor" defStyleNum="dsDecVal" spellChecking="false"/>+ <itemData name="Path" defStyleNum="dsNormal" spellChecking="false"/>+ <itemData name="Glob" defStyleNum="dsPreprocessor" spellChecking="false"/>+ <itemData name="Option" defStyleNum="dsAttribute" spellChecking="false"/>+ <itemData name="Hex" defStyleNum="dsBaseN" spellChecking="false"/>+ <itemData name="Octal" defStyleNum="dsBaseN" spellChecking="false"/>+ <itemData name="Decimal" defStyleNum="dsDecVal" spellChecking="false"/>+ <itemData name="Base" defStyleNum="dsDataType" spellChecking="false"/>+ <itemData name="BaseN" defStyleNum="dsBaseN" spellChecking="false"/>+ <itemData name="File Descriptor" defStyleNum="dsDecVal" spellChecking="false"/> <itemData name="Parameter Expansion" defStyleNum="dsVariable" spellChecking="false"/> <itemData name="Parameter Expansion Operator" defStyleNum="dsOperator" spellChecking="false"/>- <itemData name="Operator" defStyleNum="dsOperator" spellChecking="false"/>- <itemData name="Error" defStyleNum="dsError" spellChecking="false"/>+ <itemData name="Operator" defStyleNum="dsOperator" spellChecking="false"/>+ <itemData name="Error" defStyleNum="dsError" spellChecking="false"/>+ <itemData name="Region Marker" defStyleNum="dsRegionMarker" spellChecking="false" /> </itemDatas> </highlighting> <general> <comments> <comment name="singleLine" start="#"/> </comments>- <keywords casesensitive="1" weakDeliminator="^%#[]$._{}:-/" additionalDeliminator="`"/>+ <keywords casesensitive="1" weakDeliminator="_&weakDeliminatorSymbols;" additionalDeliminator="`"/> </general> </language>
xml/c.xml view
@@ -1,16 +1,21 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE language SYSTEM "language.dtd" [- <!ENTITY int "(?:[0-9]++)">- <!ENTITY hex_int "(?:[0-9A-Fa-f]++)">+ <!ENTITY int "(?:[0-9](?:'?[0-9]++)*+)">+ <!ENTITY hex_int "(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f]++)*+)"> <!ENTITY exp_float "(?:[eE][+-]?∫)"> <!ENTITY exp_hexfloat "(?:[pP][-+]?∫)"> + <!ENTITY symbols ":!%&()+,-/.*<=>?[]|~^;">++ <!-- printf-like format strings conversion specifiers -->+ <!ENTITY printf_like "%[-+ #0]*+(?:[0-9]++|\*)?(?:\.(?:[0-9]++|\*))?(?:(?:hh|ll|[hljzt])?[dioxXubn]|wf?(?:[0-9]{0,4})[oxXub]|(?:DD|[lLHD])?[fFeEaAgG]|l?[cs]|[p%])">+ <!ENTITY ispphash "(?:#|%\:|\?\?=)"> <!ENTITY pphash "&ispphash;\s*"> ]> <language name="C" section="Sources"- version="14" kateversion="5.0"+ version="16" kateversion="5.79" indenter="cstyle" extensions="*.c;*.C;*.h" mimetype="text/x-csrc;text/x-c++src;text/x-chdr"@@ -38,13 +43,19 @@ <item>switch</item> <item>while</item> </list>+ <list name="keywords">+ <item>auto</item>+ <item>constexpr</item> <!-- C23 --> <item>enum</item> <item>extern</item> <item>inline</item>+ <item>nullptr</item> <!-- C23 --> <item>sizeof</item> <item>struct</item> <item>typedef</item>+ <item>typeof</item> <!-- C23 -->+ <item>typeof_unqual</item> <!-- C23 --> <item>union</item> <item>_Alignas</item> <item>_Alignof</item>@@ -53,9 +64,22 @@ <item>_Static_assert</item> <item>_Thread_local</item> </list>++ <!-- https://en.cppreference.com/w/c/language/attributes -->+ <list name="attributes">+ <item>noreturn</item>+ <item>deprecated</item>+ <item>fallthrough</item>+ <item>nodiscard</item>+ <item>maybe_unused</item>+ <item>unsequenced</item>+ <item>reproducible</item>+ </list>+ <list name="types">- <item>auto</item> <item>char</item>+ <item>char16_t</item>+ <item>char32_t</item> <item>const</item> <item>double</item> <item>float</item>@@ -103,8 +127,12 @@ <item>ptrdiff_t</item> <item>sig_atomic_t</item> <item>wint_t</item>+ <item>_BitInt</item> <item>_Bool</item> <item>bool</item>+ <item>_Decimal32</item>+ <item>_Decimal64</item>+ <item>_Decimal128</item> <item>_Complex</item> <item>complex</item> <item>_Imaginary</item>@@ -116,41 +144,178 @@ <item>time_t</item> <item>max_align_t</item> </list>++ <list name="preprocessor">+ <item>if</item>+ <item>ifdef</item>+ <item>ifndef</item>+ <item>elif</item>+ <item>elifdef</item> <!-- C23 -->+ <item>elifndef</item> <!-- C23 -->+ <item>else</item>+ <item>endif</item>+ <item>define</item>+ <item>include</item>+ <item>error</item>+ <item>line</item>+ <item>pragma</item>+ <item>undef</item>+ <item>warning</item>+ <item>embed</item>+ </list>+ <contexts> <context attribute="Normal Text" lineEndContext="#stay" name="Normal"> <DetectSpaces />- <RegExpr attribute="Preprocessor" context="Outscoped" String="&pphash;if\s+0\s*$" beginRegion="PP" firstNonSpace="true" />- <RegExpr context="AfterHash" String="&ispphash;" firstNonSpace="true" lookAhead="true" />- <keyword attribute="Control Flow" context="#stay" String="controlflow"/>- <keyword attribute="Keyword" context="#stay" String="keywords"/>- <keyword attribute="Data Type" context="#stay" String="types"/>+ <!-- Match symbols (partial for fast path) -->+ <AnyChar attribute="Symbol" context="#stay" String=":()]+-*=>!|&~^,;" />++ <IncludeRules context="match keywords" />+ <AnyChar context="SelectString" String="UuL"'" lookAhead="1"/> <DetectIdentifier />+ <DetectChar attribute="Symbol" context="#stay" char="{" beginRegion="Brace1" /> <DetectChar attribute="Symbol" context="#stay" char="}" endRegion="Brace1" /> <Detect2Chars attribute="Symbol" context="#stay" char="<" char1="%" beginRegion="Brace1" /> <!-- Digraph: { --> <Detect2Chars attribute="Symbol" context="#stay" char="%" char1=">" endRegion="Brace1" /> <!-- Digraph: } --> + <!-- Detect attributes -->+ <Detect2Chars attribute="Symbol" context="Attribute" char="[" char1="[" />+ <StringDetect attribute="Symbol" context="Attribute" String="<:<:" /> <!-- Digraph: [[ -->+ <!-- Match numbers -->- <RegExpr attribute="Decimal" context="Number" String="\.?[0-9]" lookAhead="true" />+ <RegExpr context="Number" String="\.?[0-9]" lookAhead="1" /> - <HlCChar attribute="Char" context="#stay"/>- <DetectChar attribute="String" context="String" char="""/> <IncludeRules context="FindComments" />- <AnyChar attribute="Symbol" context="#stay" String=":!%&()+,-/.*<=>?[]|~^;"/>+ <RegExpr context="AfterHash" String="&ispphash;|" firstNonSpace="1" lookAhead="1" />+ <AnyChar attribute="Symbol" context="#stay" String="&symbols;"/> </context> - <context attribute="String" lineEndContext="#pop" name="String">- <LineContinue attribute="String" context="#stay"/>- <HlCStringChar attribute="String Char" context="#stay"/>- <DetectChar attribute="String" context="#pop" char="""/>+ <context name="match keywords" attribute="Normal Text" lineEndContext="#pop">+ <keyword attribute="Control Flow" context="#stay" String="controlflow"/>+ <keyword attribute="Keyword" context="#stay" String="keywords"/>+ <keyword attribute="Data Type" context="#stay" String="types"/> </context> ++ <context name="SelectStringPP" attribute="Preprocessor" lineEndContext="#pop">+ <IncludeRules context="SelectString"/>+ </context>+ <context name="SelectString" attribute="Normal Text" lineEndContext="#pop">+ <DetectChar attribute="String" context="#pop!String8" char="""/>+ <DetectChar attribute="Char" context="#pop!Char8" char="'"/>+ <Detect2Chars context="#pop!SelectStringPrefix" char="U" char1=""" lookAhead="1"/>+ <Detect2Chars context="#pop!SelectStringPrefix" char="u" char1=""" lookAhead="1"/>+ <Detect2Chars context="#pop!SelectStringPrefix" char="L" char1=""" lookAhead="1"/>+ <StringDetect context="#pop!SelectStringPrefix" String="u8"" lookAhead="1"/>+ <Detect2Chars context="#pop!SelectCharPrefix" char="U" char1="'" lookAhead="1"/>+ <Detect2Chars context="#pop!SelectCharPrefix" char="u" char1="'" lookAhead="1"/>+ <Detect2Chars context="#pop!SelectCharPrefix" char="L" char1="'" lookAhead="1"/>+ <StringDetect context="#pop!SelectCharPrefix" String="u8'" lookAhead="1"/>++ <!-- match identifier -->+ <keyword attribute="Data Type" context="#pop" String="types"/>+ <DetectIdentifier context="#pop"/>+ </context>+++ <context name="SelectStringPrefix" attribute="String" lineEndContext="#pop">+ <Detect2Chars attribute="String Literal Prefix" context="#pop!StringPrefix8" char="u" char1="8"/>+ <AnyChar attribute="String Literal Prefix" context="#pop!StringPrefix16" String="uL"/>+ <DetectChar attribute="String Literal Prefix" context="#pop!StringPrefix32" char="U"/>+ </context>+ <context name="StringPrefix8" attribute="String" lineEndContext="#pop">+ <DetectChar attribute="String" context="#pop!String8" char="""/>+ </context>+ <context name="StringPrefix16" attribute="String" lineEndContext="#pop">+ <DetectChar attribute="String" context="#pop!String16" char="""/>+ </context>+ <context name="StringPrefix32" attribute="String" lineEndContext="#pop">+ <DetectChar attribute="String" context="#pop!String32" char="""/>+ </context>++ <context name="SelectCharPrefix" attribute="String" lineEndContext="#pop">+ <Detect2Chars attribute="Char Literal Prefix" context="#pop!CharPrefix8" char="u" char1="8"/>+ <AnyChar attribute="Char Literal Prefix" context="#pop!CharPrefix16" String="uL"/>+ <DetectChar attribute="Char Literal Prefix" context="#pop!CharPrefix32" char="U"/>+ </context>+ <context name="CharPrefix8" attribute="Char" lineEndContext="#pop">+ <DetectChar attribute="Char" context="#pop!Char8" char="'"/>+ </context>+ <context name="CharPrefix16" attribute="Char" lineEndContext="#pop">+ <DetectChar attribute="Char" context="#pop!Char16" char="'"/>+ </context>+ <context name="CharPrefix32" attribute="Char" lineEndContext="#pop">+ <DetectChar attribute="Char" context="#pop!Char32" char="'"/>+ </context>+++ <context name="String8" attribute="String" lineEndContext="#pop">+ <IncludeRules context="string normal char" />+ <Detect2Chars context="String8EscapeX" char="\" char1="x" lookAhead="1"/>+ <IncludeRules context="string special char" />+ </context>+ <context name="String8EscapeX" attribute="String" lineEndContext="#pop">+ <HlCStringChar attribute="String Char" context="#pop!StringNoHex"/>+ <Detect2Chars context="#pop" attribute="Error" char="\" char1="x"/>+ </context>++ <context name="String16" attribute="String" lineEndContext="#pop">+ <IncludeRules context="string normal char" />+ <Detect2Chars context="String16EscapeX" char="\" char1="x" lookAhead="1"/>+ <IncludeRules context="string special char" />+ </context>+ <context name="String16EscapeX" attribute="String" lineEndContext="#pop">+ <RegExpr attribute="String Char" context="#pop!StringNoHex" String="\\x[0-9A-Fa-f]{1,4}" />+ <Detect2Chars context="#pop" attribute="Error" char="\" char1="x"/>+ </context>++ <context name="String32" attribute="String" lineEndContext="#pop">+ <IncludeRules context="string normal char" />+ <Detect2Chars context="String32EscapeX" char="\" char1="x" lookAhead="1"/>+ <IncludeRules context="string special char" />+ </context>+ <context name="String32EscapeX" attribute="String" lineEndContext="#pop">+ <RegExpr attribute="String Char" context="#pop!StringNoHex" String="\\x[0-9A-Fa-f]{1,8}" />+ <Detect2Chars context="#pop" attribute="Error" char="\" char1="x"/>+ </context>++ <context name="StringNoHex" attribute="Error" lineEndContext="#pop" fallthroughContext="#pop">+ <RegExpr attribute="Error" context="#pop" String="[0-9A-Fa-f]{1,}" />+ </context>+++ <context name="Char8" attribute="Char" lineEndContext="#pop" fallthroughContext="CharClose">+ <HlCStringChar attribute="String Char" context="CharClose"/>+ <IncludeRules context="FindSingleChar"/>+ </context>++ <context name="Char16" attribute="Char" lineEndContext="#pop" fallthroughContext="CharClose">+ <RegExpr attribute="String Char" context="CharClose" String="\\(?:[tnvbrfa'"\\?]|[0-7]{1,3}|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4})|" />+ <IncludeRules context="FindSingleChar"/>+ </context>++ <context name="Char32" attribute="Char" lineEndContext="#pop" fallthroughContext="CharClose">+ <RegExpr attribute="String Char" context="CharClose" String="\\(?:[tnvbrfa'"\\?]|[0-7]{1,3}|x[0-9A-Fa-f]{1,8}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})|" />+ <IncludeRules context="FindSingleChar"/>+ </context>+++ <context name="FindSingleChar" attribute="Char" lineEndContext="#pop">+ <DetectChar attribute="Error" context="#pop" char="'" />+ <RegExpr attribute="Char" context="CharClose" String="." />+ </context>+ <context name="CharClose" attribute="Error" lineEndContext="#pop#pop">+ <DetectChar attribute="Char" context="#pop#pop" char="'" />+ </context>++ <context name="FindComments" attribute="Normal Text" lineEndContext="#pop"> <Detect2Chars attribute="Comment" context="MatchComment" char="/" char1="/" lookAhead="true" /> <Detect2Chars attribute="Comment" context="MatchComment" char="/" char1="*" lookAhead="true" /> </context> - <context name="MatchComment" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">+ <context name="MatchComment" attribute="Normal Text" lineEndContext="#pop" fallthroughContext="#pop"> <StringDetect attribute="Region Marker" context="#pop!Region Marker" String="//BEGIN" beginRegion="Region1" firstNonSpace="true" /> <StringDetect attribute="Region Marker" context="#pop!Region Marker" String="//END" endRegion="Region1" firstNonSpace="true" /> <IncludeRules context="##Doxygen" />@@ -171,93 +336,194 @@ <IncludeRules context="##Comments" /> </context> - <context attribute="Error" lineEndContext="#pop" name="AfterHash">- <RegExpr attribute="Preprocessor" context="Include" String="&pphash;(?:include|include_next)" insensitive="true" firstNonSpace="true" /> - <!-- define, elif, else, endif, error, if, ifdef, ifndef, line, pragma, undef, warning -->- <RegExpr attribute="Preprocessor" context="Preprocessor" String="&pphash;if(?:def|ndef)?(?=\s+\S)" insensitive="true" beginRegion="PP" firstNonSpace="true" />- <RegExpr attribute="Preprocessor" context="Preprocessor" String="&pphash;endif" insensitive="true" endRegion="PP" firstNonSpace="true" />- <RegExpr attribute="Preprocessor" context="Define" String="&pphash;define.*((?=\\))" insensitive="true" firstNonSpace="true" />+ <context name="string special char" attribute="String" lineEndContext="#pop">+ <HlCStringChar attribute="String Char"/>+ <RegExpr attribute="String Char" String="\\(?:u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})|&printf_like;"/>+ <DetectChar attribute="String" char="%"/>+ <RegExpr attribute="Error" String="\\(?:u[^"]{0,3}|U[^"]{0,7}|.)"/>+ <LineContinue attribute="Symbol"/>+ </context> + <context name="string normal char" attribute="String" lineEndContext="#pop">+ <!-- fast way, can be replaced by a `UntilChars` rule if it exists -->+ <!-- % -> printf format -->+ <RegExpr attribute="String" context="#stay" String="[^%\\"]+" />+ <DetectChar attribute="String" context="#pop" char=""" />+ </context>+++ <context attribute="Error" lineEndContext="#pop" name="AfterHash" fallthroughContext="#pop!LineError">+ <RegExpr attribute="Preprocessor" context="#pop!PreprocessorCmd" String="&pphash;(?=.)|" firstNonSpace="true" />+ </context>++ <context name="LineError" attribute="Error" lineEndContext="#pop">+ <LineContinue attribute="Error" context="#stay" />+ <RegExpr attribute="Error" context="#stay" String="[^\\]+" />+ </context>++ <context attribute="Error" lineEndContext="#pop" name="PreprocessorCmd" fallthroughContext="#pop!LineError">+ <WordDetect attribute="Preprocessor" context="#pop!Include" String="include" insensitive="true" />++ <WordDetect attribute="Preprocessor" context="#pop!Preprocessor" String="ifdef" beginRegion="PP" lookAhead="true" insensitive="true" />+ <WordDetect attribute="Preprocessor" context="#pop!Preprocessor" String="ifndef" beginRegion="PP" lookAhead="true" insensitive="true" />+ <RegExpr attribute="Preprocessor" context="#pop!Outscoped" String="if\s+0\s*$|" beginRegion="PP" />+ <WordDetect attribute="Preprocessor" context="#pop!Preprocessor" String="if" beginRegion="PP" lookAhead="true" insensitive="true" />+ <WordDetect attribute="Preprocessor" context="#pop!Preprocessor" String="elif" endRegion="PP" beginRegion="PP" lookAhead="true" insensitive="true" />+ <WordDetect attribute="Preprocessor" context="#pop!Preprocessor" String="else" endRegion="PP" beginRegion="PP" insensitive="true" />+ <WordDetect attribute="Preprocessor" context="#pop!Preprocessor" String="endif" endRegion="PP" insensitive="true" />+ <WordDetect attribute="Preprocessor" context="#pop!Preprocessor" String="elifdef" endRegion="PP" beginRegion="PP" lookAhead="true" insensitive="true" />+ <WordDetect attribute="Preprocessor" context="#pop!Preprocessor" String="elifndef" endRegion="PP" beginRegion="PP" lookAhead="true" insensitive="true" />++ <WordDetect attribute="Preprocessor" context="#pop!Define" String="define"/>+ <!-- folding for apple style #pragma mark - label -->- <RegExpr attribute="Preprocessor" context="Preprocessor" String="&pphash;pragma\s+mark\s+-\s*$" insensitive="true" firstNonSpace="true" endRegion="pragma_mark" />- <RegExpr attribute="Preprocessor" context="Preprocessor" String="&pphash;pragma\s+mark" insensitive="true" firstNonSpace="true" endRegion="pragma_mark" beginRegion="pragma_mark" />+ <RegExpr attribute="Preprocessor" context="#pop" String="&pphash;pragma\s+mark\s+-\s*|" insensitive="true" endRegion="pragma_mark" />+ <RegExpr attribute="Preprocessor" context="Preprocessor" String="&pphash;pragma\s+mark|" insensitive="true" endRegion="pragma_mark" beginRegion="pragma_mark" /> - <RegExpr attribute="Preprocessor" context="Preprocessor" String="&pphash;(?:el(?:se|if)|define|undef|line|error|warning|pragma)|&ispphash;\s+[0-9]+" insensitive="true" firstNonSpace="true" />+ <keyword attribute="Preprocessor" context="#pop!Preprocessor" String="preprocessor" />+ <!-- GCC extension -->+ <WordDetect attribute="Preprocessor" context="#pop!Include" String="include_next" />+ <Int attribute="Preprocessor" context="#pop!Preprocessor"/> </context> <context attribute="Preprocessor" lineEndContext="#pop" name="Include">- <LineContinue attribute="Preprocessor" context="#stay"/>+ <DetectSpaces /> <RangeDetect attribute="Prep. Lib" context="#stay" char=""" char1="""/> <RangeDetect attribute="Prep. Lib" context="#stay" char="<" char1=">"/> <IncludeRules context="Preprocessor" />+ <DetectIdentifier/> </context> <context attribute="Preprocessor" lineEndContext="#pop" name="Preprocessor">- <LineContinue attribute="Preprocessor" context="#stay"/>+ <LineContinue attribute="Symbol" context="#stay"/> <IncludeRules context="FindComments" /> </context> - <context attribute="Preprocessor" lineEndContext="#pop" name="Define">- <LineContinue attribute="Preprocessor" context="#stay"/>+ <context name="Define" attribute="Preprocessor" lineEndContext="#pop">+ <DetectSpaces/>+ <IncludeRules context="InPreprocessor" />+ <Detect2Chars attribute="Error" context="#pop!LineError" char="/" char1="/" />+ <Detect2Chars attribute="Comment" context="MatchComment" char="/" char1="*" lookAhead="true" />+ <IncludeRules context="GNUMacros##GCCExtensions" />+ <DetectIdentifier attribute="Preprocessor" context="#pop!In Define"/> </context> + <context name="In Define" attribute="Preprocessor" lineEndContext="#pop">+ <DetectSpaces/>+ <LineContinue attribute="Symbol" context="#stay" />+ <!-- Match symbols (partial for fast path) -->+ <AnyChar attribute="Symbol" context="#stay" String="#:(){}]+-*%=>!|&~^,;" />++ <IncludeRules context="match keywords" />+ <AnyChar context="SelectStringPP" String="UuLR"'" lookAhead="1"/>+ <DetectIdentifier />++ <!-- Detect attributes -->+ <Detect2Chars attribute="Symbol" context="Attribute In PP" char="[" char1="[" />+ <StringDetect attribute="Symbol" context="Attribute In PP" String="<:<:" /> <!-- Digraph: [[ -->++ <!-- Match numbers -->+ <RegExpr context="Number" String="\.?\d" lookAhead="1" />++ <IncludeRules context="FindComments" />+ <AnyChar attribute="Symbol" context="#stay" String="#&symbols;"/>+ </context>++ <context name="Attribute In PP" attribute="Attribute" lineEndContext="#pop">+ <IncludeRules context="InPreprocessor" />+ <IncludeRules context="Attribute" />+ </context>++ <context name="InPreprocessor" attribute="Normal Text" lineEndContext="#pop">+ <LineContinue attribute="Symbol" context="#stay" />+ <DetectChar attribute="Error" context="#stay" char="\" />+ </context>+ <context attribute="Comment" lineEndContext="#stay" name="Outscoped" > <DetectSpaces /> <IncludeRules context="##Comments" /> <DetectIdentifier />- <DetectChar attribute="String" context="String" char="""/>+ <DetectChar attribute="String" context="String8" char="""/> <IncludeRules context="FindComments" />- <RegExpr attribute="Comment" context="Outscoped intern" String="&pphash;if" beginRegion="PP" firstNonSpace="true" />- <RegExpr attribute="Preprocessor" context="#pop" String="&pphash;el(?:se|if)" firstNonSpace="true" />- <RegExpr attribute="Preprocessor" context="#pop" String="&pphash;endif" endRegion="PP" firstNonSpace="true" />+ <RegExpr attribute="Comment" context="Outscoped intern" String="&pphash;if|" beginRegion="PP" firstNonSpace="true" />+ <RegExpr attribute="Preprocessor" context="#pop" String="&pphash;el(?:se|if(n?def)?)|" firstNonSpace="true" />+ <RegExpr attribute="Preprocessor" context="#pop" String="&pphash;endif|" endRegion="PP" firstNonSpace="true" /> </context> <context attribute="Comment" lineEndContext="#stay" name="Outscoped intern"> <DetectSpaces /> <IncludeRules context="##Comments" /> <DetectIdentifier />- <DetectChar attribute="String" context="String" char="""/>+ <DetectChar attribute="String" context="String8" char="""/> <IncludeRules context="FindComments" />- <RegExpr attribute="Comment" context="Outscoped intern" String="&pphash;if" beginRegion="PP" firstNonSpace="true" />- <RegExpr attribute="Comment" context="#pop" String="&pphash;endif" endRegion="PP" firstNonSpace="true" />+ <RegExpr attribute="Comment" context="Outscoped intern" String="&pphash;if|" beginRegion="PP" firstNonSpace="true" />+ <RegExpr attribute="Comment" context="#pop" String="&pphash;endif|" endRegion="PP" firstNonSpace="true" /> </context> - <context name="Number" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">++ <context name="Number" attribute="Normal Text" lineEndContext="#pop" fallthroughContext="#pop">+ <WordDetect attribute="Decimal" context="IntSuffix" String="0" weakDeliminator="."/> <RegExpr attribute="Float" context="FloatSuffix" String="\.∫&exp_float;?|0[xX](?:\.&hex_int;&exp_hexfloat;?|&hex_int;(?:&exp_hexfloat;|\.&hex_int;?&exp_hexfloat;?))|∫(?:&exp_float;|\.∫?&exp_float;?)" /> <IncludeRules context="Integer" /> </context> - <context name="Integer" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">- <RegExpr attribute="Hex" context="IntSuffix" String="0[xX]&hex_int;" />- <RegExpr attribute="Binary" context="IntSuffix" String="0[Bb][01]++" />- <RegExpr attribute="Octal" context="IntSuffix" String="0[0-7]++" />- <RegExpr attribute="Decimal" context="IntSuffix" String="0(?![xXbB0-9])|[1-9][0-9]*+" />+ <context name="Integer" attribute="Normal Text" lineEndContext="#pop">+ <DetectChar context="#pop!IntStartsWith0" char="0" lookAhead="1"/>+ <RegExpr attribute="Decimal" context="IntSuffix" String="∫" /> <RegExpr attribute="Error" context="#pop" String="[._0-9A-Za-z']++" /> </context>+ <context name="IntStartsWith0" attribute="Normal Text" lineEndContext="#pop">+ <RegExpr attribute="Hex" context="IntSuffix" String="0[xX]&hex_int;" />+ <RegExpr attribute="Binary" context="IntSuffix" String="0[Bb][01](?:'?[01]++)*+" />+ <RegExpr attribute="Octal" context="IntSuffix" String="0(?:'?[0-7]++)++" />+ <DetectChar attribute="Decimal" context="IntSuffix" char="0"/>+ </context> - <context name="IntSuffix" attribute="Error" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="NumericSuffixError">+ <context name="IntSuffix" attribute="Error" lineEndContext="#pop#pop" fallthroughContext="NumericSuffixError"> <DetectChar attribute="Error" context="#stay" char="'" />- <AnyChar attribute="Error" context="#pop!IntSuffixPattern" String="uUlLimunshyd_" lookAhead="true" />+ <!-- https://en.cppreference.com/w/c/language/integer_constant#The_type_of_the_integer_constant -->+ <RegExpr attribute="Standard Suffix" context="NumericSuffixError" String="([Uu](LL?|ll?)?|(LL?|ll?)[Uu]?|wb|WB)\b"/> </context> - <context name="IntSuffixPattern" attribute="Error" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="NumericSuffixError">- <RegExpr attribute="Standard Suffix" context="NumericSuffixError" String="[Uu][Ll]{0,2}|[Ll]{0,2}[Uu]?" />+ <context name="FloatSuffix" attribute="Error" lineEndContext="#pop#pop" fallthroughContext="NumericSuffixError">+ <DetectChar attribute="Error" context="#stay" char="'" />+ <!-- https://en.cppreference.com/w/c/language/floating_constant#Suffixes -->+ <AnyChar attribute="Standard Suffix" context="NumericSuffixError" String="fFlL"/>+ <Detect2Chars attribute="Standard Suffix" context="NumericSuffixError" char="d" char1="f"/>+ <Detect2Chars attribute="Standard Suffix" context="NumericSuffixError" char="D" char1="F"/>+ <Detect2Chars attribute="Standard Suffix" context="NumericSuffixError" char="d" char1="d"/>+ <Detect2Chars attribute="Standard Suffix" context="NumericSuffixError" char="D" char1="D"/>+ <Detect2Chars attribute="Standard Suffix" context="NumericSuffixError" char="d" char1="l"/>+ <Detect2Chars attribute="Standard Suffix" context="NumericSuffixError" char="D" char1="L"/> </context> - <context name="FloatSuffix" attribute="Error" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="NumericSuffixError">- <AnyChar attribute="Standard Suffix" context="NumericSuffixError" String="fFlL" />+ <context name="NumericSuffixError" attribute="Error" lineEndContext="#pop#pop#pop" fallthroughContext="#pop#pop#pop">+ <AnyChar attribute="Error" String=".'0123456789"/>+ <DetectIdentifier attribute="Error"/> </context> - <context name="NumericSuffixError" attribute="Error" lineEndContext="#pop#pop#pop" fallthrough="true" fallthroughContext="#pop#pop#pop">- <RegExpr attribute="Error" context="#pop#pop#pop" String="\.[_0-9A-Za-z]*|[_0-9A-Za-z]+" />+ <context name="Attribute" attribute="Attribute" lineEndContext="#stay">+ <DetectSpaces/>+ <keyword attribute="Standard Attribute" context="#stay" String="attributes" />+ <Detect2Chars attribute="Symbol" context="#pop" char="]" char1="]" />+ <StringDetect attribute="Symbol" context="#pop" String=":>:>" /> <!-- Digraph: ]] -->+ <AnyChar attribute="Symbol" context="#stay" String="&symbols;" />+ <!-- Attributes may contain some text: [[deprecated("Reason text")]] -->+ <DetectChar attribute="String" context="String8" char=""" />+ <AnyChar attribute="Decimal" context="Integer" String="0123456789" lookAhead="true" />+ <IncludeRules context="DetectGccAttributes##GCCExtensions" />+ <DetectIdentifier /> </context>+ </contexts> <itemDatas> <itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false"/> <itemData name="Control Flow" defStyleNum="dsControlFlow" spellChecking="false"/> <itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false"/> <itemData name="Data Type" defStyleNum="dsDataType" spellChecking="false"/>+ <itemData name="Attribute" defStyleNum="dsAttribute" spellChecking="false"/>+ <itemData name="Standard Attribute" defStyleNum="dsAttribute" spellChecking="false"/> <itemData name="Decimal" defStyleNum="dsDecVal" spellChecking="false"/> <itemData name="Octal" defStyleNum="dsBaseN" spellChecking="false"/> <itemData name="Hex" defStyleNum="dsBaseN" spellChecking="false"/>@@ -265,8 +531,10 @@ <itemData name="Float" defStyleNum="dsFloat" spellChecking="false"/> <itemData name="Standard Suffix" defStyleNum="dsBuiltIn" spellChecking="false" /> <itemData name="Char" defStyleNum="dsChar" spellChecking="false"/>+ <itemData name="Char Literal Prefix" defStyleNum="dsChar" spellChecking="false" /> <itemData name="String" defStyleNum="dsString"/>- <itemData name="String Char" defStyleNum="dsSpecialChar"/>+ <itemData name="String Char" defStyleNum="dsSpecialChar" spellChecking="false"/>+ <itemData name="String Literal Prefix" defStyleNum="dsString" spellChecking="true" /> <itemData name="Comment" defStyleNum="dsComment"/> <itemData name="Symbol" defStyleNum="dsOperator" spellChecking="false"/> <itemData name="Preprocessor" defStyleNum="dsPreprocessor" spellChecking="false"/>@@ -277,10 +545,10 @@ </highlighting> <general> <comments>- <comment name="singleLine" start="//" />+ <comment name="singleLine" start="//" position="afterwhitespace" /> <comment name="multiLine" start="/*" end="*/" region="Comment" /> </comments>- <keywords casesensitive="1" additionalDeliminator="'"" />+ <keywords casesensitive="1" additionalDeliminator="#'"" /> </general> </language> <!-- kate: replace-tabs on; tab-width 2; indent-width 2; -->
xml/cmake.xml view
@@ -25,7 +25,7 @@ <language name="CMake"- version="39"+ version="40" kateversion="5.0" section="Other" extensions="CMakeLists.txt;*.cmake;*.cmake.in"@@ -3609,6 +3609,7 @@ </list> <list name="deprecated-or-internal-variables">+ <item>CMAKE_FILES_DIRECTORY</item> <item>CMAKE_HOME_DIRECTORY</item> <item>CMAKE_INTERNAL_PLATFORM_ABI</item> <item>CMAKE_NOT_USING_CONFIG_FLAGS</item>
xml/cpp.xml view
@@ -11,8 +11,8 @@ <language name="C++" section="Sources"- version="13"- kateversion="5.0"+ version="15"+ kateversion="5.79" indenter="cstyle" style="C++" mimetype="text/x-c++src;text/x-c++hdr;text/x-chdr"@@ -2006,6 +2006,7 @@ <item>QStringListModel</item> <item>QStringMatcher</item> <item>QStringRef</item>+ <item>QStringTokenizer</item> <item>QStringView</item> <item>QStyle</item> <item>QStyledItemDelegate</item>@@ -2387,10 +2388,6 @@ </context> <context attribute="Qt Classes" lineEndContext="#pop" name="Qt5ClassMember">- <IncludeRules context="DetectNSEnd" />- </context>-- <context lineEndContext="#pop" name="DetectNSEnd" attribute="Normal Text"> <DetectIdentifier context="#stay" /> <AnyChar context="#pop" String="&ns_punctuators;" lookAhead="true" /> </context>@@ -2408,7 +2405,7 @@ <general> <comments>- <comment name="singleLine" start="//" />+ <comment name="singleLine" start="//" position="afterwhitespace"/> <comment name="multiLine" start="/*" end="*/" /> </comments> <keywords casesensitive="1" />
xml/cs.xml view
@@ -1,5 +1,5 @@ <!DOCTYPE language SYSTEM "language.dtd">-<language name="C#" version="11" kateversion="5.0" section="Sources" extensions="*.cs" mimetype="text/x-csharp-src;text/x-csharp-hde" indenter="cstyle" style="C++">+<language name="C#" version="13" kateversion="5.0" section="Sources" extensions="*.cs;*.ashx" mimetype="text/x-csharp-src;text/x-csharp-hde" indenter="cstyle" style="C++"> <highlighting> <list name="keywords"> <item>abstract</item>@@ -160,7 +160,7 @@ </highlighting> <general> <comments>- <comment name="singleLine" start="//" />+ <comment name="singleLine" start="//" position="afterwhitespace"/> <comment name="multiLine" start="/*" end="*/" region="BlockComment" /> </comments> <keywords casesensitive="1" />
xml/d.xml view
@@ -105,7 +105,7 @@ ======================================================================== --> -<language name="D" version="12" kateversion="5.0" section="Sources" extensions="*.d;*.D;*.di;*.DI;" mimetype="text/x-dsrc" casesensitive="true" author="Diggory Hardy (diggory.hardy@gmail.com), Aziz Köksal (aziz.koeksal@gmail.com), Jari-Matti Mäkelä (jmjm@iki.fi), Simon J Mackenzie (project.katedxml@smackoz.fastmail.fm)" license="LGPL">+<language name="D" version="13" kateversion="5.0" section="Sources" extensions="*.d;*.D;*.di;*.DI;" mimetype="text/x-dsrc" casesensitive="true" author="Diggory Hardy (diggory.hardy@gmail.com), Aziz Köksal (aziz.koeksal@gmail.com), Jari-Matti Mäkelä (jmjm@iki.fi), Simon J Mackenzie (project.katedxml@smackoz.fastmail.fm)" license="LGPL"> <highlighting> <!-- User-defined keywords (add identifiers you'd like highlighted here) --> <list name="userkeywords">@@ -926,7 +926,7 @@ </highlighting> <general> <comments>- <comment name="singleLine" start="//"/>+ <comment name="singleLine" start="//" position="afterwhitespace"/> <comment name="multiLine" start="/+" end="+/" region="CommentNested"/> </comments> <keywords casesensitive="true"/>
xml/elixir.xml view
@@ -33,7 +33,7 @@ name="Elixir" section="Sources" style="elixir"- version="11">+ version="13"> <highlighting> <list name="control-flow"> <item>catch</item>@@ -47,8 +47,6 @@ <item>unless</item> </list> <list name="keywords">- <item>do</item>- <item>end</item> <item>case</item> <item>bc</item> <item>lc</item>@@ -74,7 +72,6 @@ <item>false</item> </list> <list name="definitions">- <item>fn</item> <item>defmodule</item> <item>def</item> <item>defp</item>@@ -101,6 +98,25 @@ <!-- "shebang" line --> <RegExpr String="^#!\/.*" attribute="Keyword" column="0" context="#stay"/> + <!-- End terminated blocks -->+ <!-- can be started by do or fn, but not by do: -->+ <RegExpr String="\bdo\b(?!:)" attribute="Keyword" beginRegion="doend_block"/>+ <WordDetect String="fn" attribute="Keyword" beginRegion="doend_block"/>+ <WordDetect String="end" attribute="Keyword" endRegion="doend_block"/>++ <!-- Lists -->+ <DetectChar char="[" beginRegion="list" attribute="Separator Array"/>+ <DetectChar char="]" endRegion="list" attribute="Separator Array"/>++ <!-- Maps and Structs and tuples -->+ <DetectChar char="{" beginRegion="map_or_struct_or_tuple" attribute="Separator Pair"/>+ <DetectChar char="}" endRegion="map_or_struct_or_tuple" attribute="Separator Pair"/>++ <!-- Function calls and definitions -->+ <DetectChar char="(" beginRegion="parameters" attribute="Separator Pair"/>+ <DetectChar char=")" endRegion="parameters" attribute="Separator Pair"/>++ <!-- Defined words --> <keyword String="keywords" attribute="Keyword" context="#stay"/> <keyword String="control-flow" attribute="Control Flow" context="#stay"/>@@ -135,10 +151,8 @@ <DetectChar attribute="Raw String" char="'" context="Apostrophed String"/> <Detect2Chars char="?" char1="#" attribute="Normal Text" context="#stay"/> <DetectChar attribute="Comment" char="#" context="General Comment"/>- <AnyChar attribute="Delimiter" String="[]" context="#stay"/> <RegExpr String="@[a-zA-Z_0-9]+" attribute="Attribute" context="#stay"/> <!-- handle the different regular expression formats -->- <DetectChar attribute="Normal Text" char=")" context="#stay"/> <DetectIdentifier attribute="Normal Text" context="#stay"/> </context> <context attribute="DocComment" lineEndContext="#stay" name="Documentation">@@ -206,8 +220,9 @@ <itemData defStyleNum="dsOthers" name="Attribute"/> <itemData defStyleNum="dsComment" name="Comment"/> <itemData defStyleNum="dsComment" name="DocComment"/>+ <itemData defStyleNum="dsFunction" name="Separator Pair"/>+ <itemData defStyleNum="dsOthers" name="Separator Array"/> <!-- use these to mark errors and alerts things -->- <itemData color="#FF9FEC" defStyleNum="dsNormal" name="Delimiter"/> <itemData defStyleNum="dsOperator" name="Operator"/> <itemData name="MarkdownHead" defStyleNum="dsFunction" bold="true"/> <itemData name="MarkdownBullet" defStyleNum="dsFunction"/>
xml/fortran-fixed.xml view
@@ -9,7 +9,7 @@ <!ENTITY float2 "\b[0-9]++\.[0-9]*+(?:[de][+-]?[0-9]+)?(?:[_](?:[0-9]++|[a-z][\w_]*))?(?![a-z])"> <!ENTITY float3 "\b[0-9]++[de][+-]?[0-9]++(?:[_](?:[0-9]++|[a-z][\w_]*))?"> ]>-<language name="Fortran (Fixed Format)" version="10" kateversion="5.44" section="Sources" extensions="*.f;*.F;*.for;*.FOR;*.fpp;*.FPP;" mimetype="text/x-fortran-src" casesensitive="0" author="Franchin Matteo (fnch@libero.it)" license="MIT" priority="9">+<language name="Fortran (Fixed Format)" version="11" kateversion="5.44" section="Sources" extensions="*.f;*.F;*.for;*.FOR;*.fpp;*.FPP;" mimetype="text/x-fortran-src" casesensitive="0" author="Franchin Matteo (fnch@libero.it)" license="MIT" priority="9"> <!-- by Franchin Matteo, fnch@libero.it --> <!-- NOTE: Keep in sync with the "Fortran (Free Format)" highlighter! (fortran-free.xml) --> <highlighting>@@ -411,7 +411,7 @@ <Detect2Chars attribute="Operator" context="#stay" char="/" char1="="/> <Detect2Chars attribute="Operator" context="#stay" char="<" char1="="/> <Detect2Chars attribute="Operator" context="#stay" char=">" char1="="/>- <AnyChar attribute="Operator" context="#stay" String="<>"/>+ <AnyChar attribute="Operator" context="#stay" String="<>%"/> </context> <!-- This context highlights comments -->
xml/gcc.xml view
@@ -13,7 +13,7 @@ --> <language name="GCCExtensions"- version="4"+ version="5" kateversion="5.0" section="Sources" extensions="*.c++;*.cxx;*.cpp;*.cc;*.C;*.h;*.hh;*.H;*.h++;*.hxx;*.hpp;*.hcc;"@@ -528,23 +528,27 @@ </list> <contexts> <context name="DetectGccExtensions" attribute="Normal Text" lineEndContext="#stay">- <keyword attribute="GNU Macros" context="#stay" String="GNUMacros" />- <keyword attribute="GNU Functions" context="#stay" String="GNUFunctions" />- <keyword attribute="GNU Types" context="#stay" String="GNUTypes" />+ <IncludeRules context="DetectGccExtensionsCommon"/> <WordDetect attribute="GNU Extensions" context="AttrArgs" String="__attribute__" /> <WordDetect attribute="GNU Extensions" context="AttrArgs" String="__declspec" />- <keyword attribute="GNU Extensions" context="#stay" String="GNUKeywords" />- <RegExpr attribute="GNU Functions" context="#stay" String="__builtin_[a-zA-Z0-9_]+" /> </context> <context name="DetectGccExtensionsInPP" attribute="Normal Text" lineEndContext="#stay">+ <IncludeRules context="DetectGccExtensionsCommon"/>+ <WordDetect attribute="GNU Extensions" context="AttrArgsInPP" String="__attribute__" />+ <WordDetect attribute="GNU Extensions" context="AttrArgsInPP" String="__declspec" />+ </context>++ <context name="DetectGccExtensionsCommon" attribute="Normal Text" lineEndContext="#stay"> <keyword attribute="GNU Macros" context="#stay" String="GNUMacros" /> <keyword attribute="GNU Functions" context="#stay" String="GNUFunctions" /> <keyword attribute="GNU Types" context="#stay" String="GNUTypes" />- <WordDetect attribute="GNU Extensions" context="AttrArgsInPP" String="__attribute__" />- <WordDetect attribute="GNU Extensions" context="AttrArgsInPP" String="__declspec" /> <keyword attribute="GNU Extensions" context="#stay" String="GNUKeywords" />- <RegExpr attribute="GNU Functions" context="#stay" String="__builtin_[a-zA-Z0-9_]+" />+ <StringDetect attribute="GNU Functions" context="GNUFunctions" String="__builtin_" />+ </context>++ <context name="GNUFunctions" attribute="Normal Text" lineEndContext="#stay" fallthrough="1" fallthroughContext="#pop">+ <DetectIdentifier attribute="GNU Functions" context="#pop"/> </context> <context name="GNUMacros" attribute="Normal Text" lineEndContext="#stay">
xml/glsl.xml view
@@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE language SYSTEM "language.dtd">-<language name="GLSL" section="3D" extensions="*.glsl;*.vert;*.vs;*.frag;*.fs;*.geom;*.gs;*.tcs;*.tes" mimetype="text/x-glslsrc" version="10" kateversion="5.0" author="Oliver Richers (o.richers@tu-bs.de)" license="LGPL">+<language name="GLSL" section="3D" extensions="*.glsl;*.vert;*.vs;*.frag;*.fs;*.geom;*.gs;*.tcs;*.tes" mimetype="text/x-glslsrc" version="11" kateversion="5.0" author="Oliver Richers (o.richers@tu-bs.de)" license="LGPL" indenter="cstyle"> <!-- Based on GLSLangSpec.4.60.pdf https://www.khronos.org/registry/OpenGL/specs/gl/
xml/go.xml view
@@ -26,7 +26,7 @@ --> -<language name="Go" version="8" kateversion="5.0" section="Sources" indenter="cstyle" extensions="*.go" author="Miquel Sabaté (mikisabate@gmail.com)" license="GPLv2+">+<language name="Go" version="9" kateversion="5.0" section="Sources" indenter="cstyle" extensions="*.go" author="Miquel Sabaté (mikisabate@gmail.com)" license="GPLv2+"> <highlighting> <list name="keywords"> <!-- Keywords have been taken from The Go Programming Language Specification -> Keywords section -->@@ -171,7 +171,7 @@ </highlighting> <general> <comments>- <comment name="singleLine" start="//" />+ <comment name="singleLine" start="//" position="afterwhitespace" /> <comment name="multiLine" start="/*" end="*/" region="Comment"/> </comments> <keywords casesensitive="1" additionalDeliminator="'"" />
xml/html.xml view
@@ -5,7 +5,7 @@ <!ENTITY attributeName "[A-Za-z_:*#\(\[][\)\]\w.:_-]*"> <!ENTITY entref "&(?:#[0-9]+|#[xX][0-9A-Fa-f]+|&name;);"> ]>-<language name="HTML" version="14" kateversion="5.53" section="Markup" extensions="*.htm;*.html;*.shtml;*.shtm" mimetype="text/html" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL" priority="10">+<language name="HTML" version="15" kateversion="5.53" section="Markup" extensions="*.htm;*.html;*.shtml;*.shtm;*.aspx" mimetype="text/html" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL" priority="10"> <highlighting> <contexts>
xml/java.xml view
@@ -7,7 +7,7 @@ <!ENTITY float "(\b∫(\.((∫&exp;?+|&exp;)[fFdD]?\b|[fFdD]\b)?|&exp;[fFdD]?\b|[fFdD]\b)|\.∫&exp;?[fFdD]?\b)"> <!ENTITY hexfloat "\b0[xX](&hex;\.?+&hex;?+|\.&hex;?)[pP][-+]?∫[fFdD]?\b"> ]>-<language name="Java" version="10" kateversion="5.62" section="Sources" extensions="*.java" mimetype="text/x-java" license="LGPL" author="Alfredo Luiz Foltran Fialho (alfoltran@ig.com.br)">+<language name="Java" version="11" kateversion="5.62" section="Sources" extensions="*.java" mimetype="text/x-java" license="LGPL" author="Alfredo Luiz Foltran Fialho (alfoltran@ig.com.br)"> <highlighting> <list name="java15"> <item>ACTIVE</item>@@ -3909,7 +3909,7 @@ </highlighting> <general> <comments>- <comment name="singleLine" start="//"/>+ <comment name="singleLine" start="//" position="afterwhitespace"/> <comment name="multiLine" start="/*" end="*/" region="Comment"/> </comments> <keywords casesensitive="1"/>
xml/javascript.xml view
@@ -23,7 +23,7 @@ * QML * CoffeeScript (embedded) -->-<language name="JavaScript" version="20" kateversion="5.53" section="Scripts" extensions="*.js;*.kwinscript;*.julius"+<language name="JavaScript" version="22" kateversion="5.53" section="Scripts" extensions="*.js;*.mjs;*.cjs;*.kwinscript;*.julius" mimetype="text/x-javascript;application/x-javascript;application/javascript;text/javascript" indenter="cstyle" author="Anders Lund (anders@alweb.dk), Joseph Wenninger (jowenn@kde.org), Whitehawk Stormchaser (zerokode@gmx.net)" license=""> @@ -2042,7 +2042,7 @@ <general> <comments>- <comment name="singleLine" start="//" />+ <comment name="singleLine" start="//" position="afterwhitespace"/> <comment name="multiLine" start="/*" end="*/" region="Comment" /> </comments> <keywords casesensitive="1" />
xml/lex.xml view
@@ -20,7 +20,7 @@ ======================================================================== -->-<language name="Lex/Flex" version="7" kateversion="5.0" section="Sources" extensions="*.l;*.lex;*.flex" author="Jan Villat (jan.villat@net2000.ch)" license="LGPL">+<language name="Lex/Flex" version="7" kateversion="5.79" section="Sources" extensions="*.l;*.lex;*.flex" author="Jan Villat (jan.villat@net2000.ch)" license="LGPL"> <highlighting> <contexts>@@ -34,7 +34,7 @@ <Detect2Chars attribute="Comment" context="Comment" char="/" char1="*" column="0" beginRegion="BlockComment"/> <RegExpr attribute="Definition" context="Definition RegExpr" String="^[A-Za-z_]\w*\s+" column="0"/> </context>- <context name="Rules" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="Rule RegExpr">+ <context name="Rules" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="Rule RegExpr"> <IncludeRules context="Detect C" /> <Detect2Chars attribute="Content-Type Delimiter" context="User Code" char="%" char1="%" beginRegion="code" endRegion="rules" /> </context>@@ -89,12 +89,12 @@ <DetectChar attribute="RegExpr" context="RegExpr Q" char=""" /> </context> - <context name="Start Conditions Scope" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="Rule RegExpr">+ <context name="Start Conditions Scope" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="Rule RegExpr"> <RegExpr attribute="Content-Type Delimiter" context="#pop" String="\s*\}" endRegion="SCscope" /> <DetectSpaces attribute="Normal Text" context="Rule RegExpr" /> </context> - <context name="Action" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="Action C">+ <context name="Action" attribute="Normal Text" lineEndContext="#pop" fallthroughContext="Action C"> <RegExpr attribute="Directive" context="#stay" String="\|\s*$" /> <Detect2Chars attribute="Content-Type Delimiter" context="Lex Rule C Bloc" char="%" char1="{" beginRegion="lexCbloc" /> </context>
xml/lua.xml view
@@ -48,7 +48,7 @@ - NOTE, FIXME, TODO alerts added on comments - improved highlighting -->-<language name="Lua" version="15" indenter="lua" kateversion="5.0" section="Scripts" extensions="*.lua" mimetype="text/x-lua">+<language name="Lua" version="18" indenter="lua" kateversion="5.79" section="Scripts" extensions="*.lua;*.rockspec" mimetype="text/x-lua"> <highlighting> <list name="keywords"> <item>and</item>@@ -57,7 +57,9 @@ <item>local</item> <item>not</item> <item>or</item>- <!-- pseudo-variables -->+ </list>++ <list name="specialvars"> <item>nil</item> <item>false</item> <item>true</item>@@ -459,13 +461,9 @@ </list> <contexts>- <context name="Shebang" attribute="Comment" lineEndContext="Normal" lineEmptyContext="Normal" fallthrough="true" fallthroughContext="Normal">+ <context name="Normal" attribute="Normal Text" lineEndContext="#stay"> <Detect2Chars attribute="Comment" context="ShebangLine" char="#" char1="!" column="0"/>- </context> - <context name="ShebangLine" attribute="Comment" lineEndContext="#pop!Normal" />-- <context name="Normal" attribute="Normal Text" lineEndContext="#stay"> <DetectSpaces /> <keyword attribute="Deprecated" context="#stay" String="deprecated" /> <Detect2Chars attribute="Comment" context="MatchComment" char="-" char1="-" lookAhead="true"/>@@ -480,6 +478,8 @@ <WordDetect attribute="Keyword" context="Function" beginRegion="chunk" String="function" /> <WordDetect attribute="Keyword" context="Local" String="local" /> <keyword attribute="Keyword" context="#stay" String="keywords" />+ <keyword attribute="Special Variable" context="#stay" String="specialvars" additionalDeliminator="."/>+ <WordDetect attribute="Self Variable" context="#stay" String="self" additionalDeliminator="." /> <keyword attribute="Control" context="StartControl" beginRegion="chunk" String="startcontrol" /> <keyword attribute="Control" context="#stay" String="control" /> @@ -500,21 +500,23 @@ <AnyChar attribute="Symbols" context="#stay" String=":[]().,=~+-*/%&|^><#;" /> </context> - <context name="MatchComment" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">+ <context name="ShebangLine" attribute="Comment" lineEndContext="#pop" />++ <context name="MatchComment" attribute="Normal Text" lineEndContext="#pop" fallthroughContext="#pop"> <IncludeRules context="##DoxygenLua" /> <RegExpr attribute="Comment" context="#pop!BlockComment" String="--\[(=*)\[" beginRegion="BlockComment" /> <Detect2Chars attribute="Comment" context="#pop!Comment" char="-" char1="-" /> </context> <context name="BlockComment" attribute="Comment" lineEndContext="#stay" dynamic="true">- <RegExpr attribute="Comment" context="#stay" String="[^\]]*" />+ <IncludeRules context="Comment" /> <StringDetect attribute="Comment" context="#pop" String="]%1]" dynamic="true" endRegion="BlockComment" />- <IncludeRules context="##Comments" /> </context> - <context name="Comment" attribute="Comment" lineEndContext="#pop">+ <context name="Comment" attribute="Comment" lineEndContext="#pop"> <DetectSpaces /> <IncludeRules context="##Comments" />+ <DetectIdentifier /> </context> <context name="StartControl" attribute="Normal Text" lineEndContext="#stay">@@ -523,12 +525,12 @@ <IncludeRules context="Normal" /> </context> - <context name="NumberSuffix" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">+ <context name="NumberSuffix" attribute="Normal Text" lineEndContext="#pop" fallthroughContext="#pop"> <!-- some syntax like a=32print(a) are valid, but ugly --> <DetectIdentifier attribute="Error" context="#pop" /> </context> - <context name="Local" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">+ <context name="Local" attribute="Normal Text" lineEndContext="#pop" fallthroughContext="#pop"> <DetectSpaces /> <WordDetect attribute="Keyword" context="#pop!Function" beginRegion="chunk" String="function" /> <Detect2Chars attribute="Comment" context="MatchComment" char="-" char1="-" lookAhead="true"/>@@ -536,7 +538,7 @@ <DetectIdentifier attribute="Variable" context="LocalVariable" /> </context> - <context name="LocalVariable" attribute="Normal Text" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="#pop#pop">+ <context name="LocalVariable" attribute="Normal Text" lineEndContext="#pop#pop" fallthroughContext="#pop#pop"> <DetectSpaces /> <Detect2Chars attribute="Comment" context="MatchComment" char="-" char1="-" lookAhead="true"/> <DetectChar attribute="Symbols" context="#pop" char="," />@@ -590,16 +592,18 @@ <itemData name="BVar" defStyleNum="dsVariable" spellChecking="false"/> <itemData name="Comment" defStyleNum="dsComment"/> <itemData name="Constant" defStyleNum="dsConstant" spellChecking="false"/>- <itemData name="Control" defStyleNum="dsControlFlow" color="#A1A100" selColor="#ffffff" bold="0" italic="0" spellChecking="false"/>+ <itemData name="Control" defStyleNum="dsControlFlow" spellChecking="false"/> <itemData name="Error" defStyleNum="dsError" spellChecking="false"/> <itemData name="Deprecated" defStyleNum="dsError" spellChecking="false"/> <itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false"/>+ <itemData name="Special Variable" defStyleNum="dsKeyword" spellChecking="false"/> <itemData name="Numbers" defStyleNum="dsDecVal" spellChecking="false"/> <itemData name="Special Char" defStyleNum="dsSpecialChar" spellChecking="false"/> <itemData name="Strings" defStyleNum="dsString"/> <itemData name="RawStrings" defStyleNum="dsVerbatimString"/> <itemData name="Symbols" defStyleNum="dsOperator" spellChecking="false"/>- <itemData name="Variable" defStyleNum="dsNormal" /> <!-- JGM -->+ <itemData name="Variable" defStyleNum="dsVariable" spellChecking="false"/>+ <itemData name="Self Variable" defStyleNum="dsVariable" spellChecking="false"/> <itemData name="Attribute" defStyleNum="dsAttribute" spellChecking="false"/> </itemDatas> </highlighting>
xml/markdown.xml view
@@ -90,7 +90,7 @@ <!ENTITY checkbox "\[[ x]\](?=\s)"> ]> -<language name="Markdown" version="21" kateversion="5.79" section="Markup" extensions="*.md;*.mmd;*.markdown" priority="15" author="Darrin Yeager, Claes Holmerson" license="GPL,BSD">+<language name="Markdown" version="22" kateversion="5.79" section="Markup" extensions="*.md;*.mmd;*.markdown" priority="15" author="Darrin Yeager, Claes Holmerson" license="GPL,BSD"> <highlighting> <contexts> <!-- Start of the Markdown document: find metadata or code block -->@@ -314,7 +314,8 @@ <context name="find-lang-fenced-code" attribute="Normal Text" lineEndContext="#pop"> <!-- Apply syntax highlighting to fenced code blocks for some languages --> <RegExpr attribute="Fenced Code" context="#pop!code" String="&fcode;&end;"/>- <RegExpr attribute="Fenced Code" context="#pop!bash-code" String="&fcode;\s*(?:bash(?:rc|_profile|_login|_logout)?|shell|sh|zsh|profile|PKGBUILD|APKBUILD|ebuild|eclass|nix)&end;" insensitive="true"/>+ <RegExpr attribute="Fenced Code" context="#pop!bash-code" String="&fcode;\s*(?:bash(?:rc|_profile|_login|_logout)?|shell|sh|profile|PKGBUILD|APKBUILD|ebuild|eclass|nix)&end;" insensitive="true"/>+ <RegExpr attribute="Fenced Code" context="#pop!zsh-code" String="&fcode;\s*(?:zsh)&end;" insensitive="true"/> <RegExpr attribute="Fenced Code" context="#pop!cpp-code" String="&fcode;\s*(?:[ch]pp|[ch]\+\+|[ch]xx|h?cc|hh|cuh?|ino|pde|moc)&end;" insensitive="true"/> <RegExpr attribute="Fenced Code" context="#pop!csharp-code" String="&fcode;\s*(?:cs|csharp|c\#)&end;" insensitive="true"/> <RegExpr attribute="Fenced Code" context="#pop!cmake-code" String="&fcode;\s*(?:cmake|CMakeLists(?:\.txt)?)&end;" insensitive="true"/>@@ -353,6 +354,10 @@ <context attribute="Normal Text" lineEndContext="#stay" name="bash-code" fallthroughContext="Command##Bash"> <IncludeRules context="code"/> <IncludeRules context="##Bash" includeAttrib="true"/>+ </context>+ <context attribute="Normal Text" lineEndContext="#stay" name="zsh-code" fallthroughContext="Command##Zsh">+ <IncludeRules context="code"/>+ <IncludeRules context="##Zsh" includeAttrib="true"/> </context> <context attribute="Normal Text" lineEndContext="#stay" name="cmake-code"> <IncludeRules context="code"/>
xml/mediawiki.xml view
@@ -7,7 +7,7 @@ <!ENTITY wikiLinkWithDescription "\[\[[^]|]*\|[^]]*\]\]"> <!ENTITY wikiLinkWithoutDescription "\[\[[^]|]*\]\]"> ]>-<language name="MediaWiki" section="Markup" version="12" kateversion="5.53" extensions="*.mediawiki" mimetype="" license="FDL" >+<language name="MediaWiki" section="Markup" version="13" kateversion="5.53" extensions="*.mediawiki" mimetype="" license="FDL" > <highlighting> <contexts> <context attribute="Normal" lineEndContext="#stay" name="normal" >@@ -532,11 +532,11 @@ <context attribute="Normal" lineEndContext="#stay" name="FindUrl" > <RegExpr String="\[&url;" attribute="WikiTag" context="DelimitedURL" lookAhead="true" />- <RegExpr String="&url;" attribute="URL" context="LooseURL" lookAhead="true" />+ <RegExpr String="&url;" context="LooseURL" lookAhead="true" /> </context> <context attribute="Normal" lineEndContext="#stay" name="FindUrlWithinTemplate" > <RegExpr String="\[&url;" attribute="WikiTag" context="DelimitedURL" lookAhead="true" />- <RegExpr String="&url;" attribute="URL" context="LooseURLWithinTemplate" lookAhead="true" />+ <RegExpr String="&url;" context="LooseURLWithinTemplate" lookAhead="true" /> </context> <context name="FindWikiLink" attribute="Normal" lineEndContext="#stay">@@ -582,7 +582,6 @@ <itemData name="LinkBoldUnderlined" defStyleNum="dsOthers" bold="true" underline="true" /> <itemData name="LinkItalicUnderlined" defStyleNum="dsOthers" italic="true" underline="true" /> <itemData name="LinkBoldItalicUnderlined" defStyleNum="dsOthers" bold="true" italic="true" underline="true" />- <itemData name="URL" defStyleNum="dsOthers" /> <itemData name="Comment" defStyleNum="dsComment" /> <itemData name="Section" defStyleNum="dsKeyword" /> <itemData name="DefinitionListHeader" defStyleNum="dsKeyword" />
xml/noweb.xml view
@@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE language SYSTEM "language.dtd">-<language name="noweb" version="5" kateversion="5.53" section="Sources" extensions="*.w;*.nw" author="Scott Collins (scc@scottcollins.net)">+<language name="noweb" version="5" kateversion="5.79" section="Sources" extensions="*.w;*.nw" author="Scott Collins (scc@scottcollins.net)"> <!-- ######################################################################### # First version added to repository was 0.4, added as 1.0 .
xml/ocaml.xml view
@@ -17,9 +17,9 @@ extensions="*.ml;*.mli" mimetype="text/x-ocaml" section="Sources"- version="9"+ version="10" priority="10"- kateversion="5.0"+ kateversion="5.79" author="Glyn Webster (glynwebster@orcon.net.nz) and Vincent Hugot (vincent.hugot@gmail.com)" license="LGPL" >
xml/orgmode.xml view
@@ -33,7 +33,7 @@ <!-- org syntax spec: https://orgmode.org/worg/dev/org-syntax.html --> <!-- syntax highlight: https://docs.kde.org/stable5/en/kate/katepart/highlight.html -->-<language name="Org Mode" version="3" kateversion="5.79" section="Markup" extensions="*.org" priority="15" author="Gary Wang" license="MIT">+<language name="Org Mode" version="4" kateversion="5.79" section="Markup" extensions="*.org" priority="15" author="Gary Wang" license="MIT"> <highlighting> <list name="org-todo-keywords-todo"> <item>TODO</item>@@ -60,7 +60,7 @@ <RegExpr attribute="Normal Text: Link" String="&implicitlink;"/> </context> <context name="find-header" attribute="Normal Text" lineEndContext="#pop">- <RegExpr attribute="Keyword" context="parse-header" String="^(?:\*){1,}\s+(?:([A-Z]+)\s+){0,1}(?:(\[#(?:[A-Z\d]+)\])\s+){0,1}(.*)\s*(\[[\d/%]+\]){0,1}\s*$" column="0" lookAhead="true"/>+ <RegExpr context="parse-header" String="^(?:\*){1,}\s+(?:([A-Z]+)\s+){0,1}(?:(\[#(?:[A-Z\d]+)\])\s+){0,1}(.*)\s*(\[[\d/%]+\]){0,1}\s*$" column="0" lookAhead="true"/> </context> <context name="parse-header" attribute="Heading" lineEndContext="#pop"> <RegExpr attribute="Heading" String="(?:\*){1,}\s+" lookAhead="false"/>@@ -122,7 +122,6 @@ <itemData name="Underline Text" defStyleNum="dsNormal" underline="true"/> <itemData name="Italic Text" defStyleNum="dsNormal" italic="true"/> <itemData name="Strikethrough Text" defStyleNum="dsNormal" strikeOut="true"/>- <itemData name="Keyword" defStyleNum="dsBuiltIn" spellChecking="false"/> <itemData name="Keyword Done" defStyleNum="dsInformation" spellChecking="false"/> <itemData name="Keyword Todo" defStyleNum="dsAlert" spellChecking="false"/> <itemData name="Cookie: Priority" defStyleNum="dsInformation" spellChecking="false"/>
xml/php.xml view
@@ -77,7 +77,7 @@ <!ENTITY float "\b&LNUM;(\.(&LNUM;)?(&EXPONENT;)?|&EXPONENT;)|\.&LNUM;(&EXPONENT;)?"> ]> -<language name="PHP/PHP" indenter="cstyle" version="23" kateversion="5.53" section="Scripts" extensions="" priority="5" mimetype="" hidden="true">+<language name="PHP/PHP" indenter="cstyle" version="24" kateversion="5.53" section="Scripts" extensions="" priority="5" mimetype="" hidden="true"> <highlighting> <!-- https://php.watch/versions --> <!-- Based on 8.1 -->@@ -11291,7 +11291,7 @@ </highlighting> <general> <comments>- <comment name="singleLine" start="//" />+ <comment name="singleLine" start="//" position="afterwhitespace" /> <comment name="multiLine" start="/*" end="*/" region="Comment" /> </comments> <keywords casesensitive="0" weakDeliminator="" additionalDeliminator="@" />
xml/powershell.xml view
@@ -1,7 +1,7 @@ <!DOCTYPE language SYSTEM "language.dtd"> <language name="PowerShell"- version="11"+ version="12" kateversion="5.0" extensions="*.ps1;*.psm1;*.psd1" section="Scripts"@@ -913,7 +913,7 @@ <Detect2Chars attribute="Comment" context="#pop" char="#" char1=">" endRegion="CommentRegion"/> <IncludeRules context="##Comments"/> </context>- <context attribute="Cmdlets" lineEndContext="#stay" name="Cmdlet">+ <context attribute="Normal Text" lineEndContext="#stay" name="Cmdlet"> <keyword attribute="Function" context="#stay" String="cmdlets"/> </context> </contexts>@@ -924,9 +924,8 @@ <itemData name="Data Type" defStyleNum="dsDataType" spellChecking="false"/> <itemData name="String" defStyleNum="dsString"/> <itemData name="String Char" defStyleNum="dsChar" spellChecking="false"/>- <itemData name="HereString" defStyleNum="dsVerbatimString"/>+ <itemData name="HereString" defStyleNum="dsVerbatimString"/> <itemData name="Comment" defStyleNum="dsComment"/>- <itemData name="Cmdlets" defStyleNum="dsBuiltIn" spellChecking="false"/> <itemData name="Symbol" defStyleNum="dsOperator" spellChecking="false"/> <itemData name="Variable" defStyleNum="dsVariable" spellChecking="false"/> <itemData name="Special Variable" defStyleNum="dsVariable" bold="1" spellChecking="false"/>
xml/prolog.xml view
@@ -105,7 +105,7 @@ <!ENTITY bs "\"> ]> <language name="Prolog" section="Sources"- version="16" kateversion="5.62"+ version="17" kateversion="5.62" mimetype="text/x-prolog" extensions="*.prolog;*.dcg;*.pro" author="Torsten Eichstädt (torsten.eichstaedt@web.de)"@@ -597,14 +597,10 @@ "atomic" and "operator" below with context="#stay" (two or three occurrences) --> <context name="arith_expr" lineEndContext="#stay" attribute="Syntax Error" noIndentationBasedFolding="true" > <DetectChar char="(" context="nested_expr" beginRegion="nested" attribute="( ) [ ]" />- <DetectChar lookAhead="true" char=")" context="#pop" attribute="( ) [ ]" />- <DetectChar lookAhead="true" char="}" context="#pop" attribute="{ DCG }" />- <DetectChar lookAhead="true" char="]" context="#pop" attribute="( ) [ ]" /> <!-- FIXME check if cut may be an op, else (and in any case 99.9% likely) it's a usual cut here -->- <AnyChar lookAhead="true" String="&cut;," context="#pop" attribute="Logic & Control" /> <!-- bar & dot could be a user-def'd op, pre-def'd ops could be redef'd; but let's assume the default and just end the expr -->- <DetectChar lookAhead="true" char="&bar;" context="#pop" attribute="other built-in operator" />+ <AnyChar lookAhead="true" String=")}]&bar;&cut;,&bar;" context="#pop"/> <RegExpr lookAhead="true" String="&fullstop_iso;|&logic_control_ops_iso;" context="#pop" attribute="Logic & Control" /> <IncludeRules context="arith_expr_common" /> </context>
xml/python.xml view
@@ -52,7 +52,7 @@ <!-- v2.07 add support for %prog and co, see bug 142832 --> <!-- v2.08 add missing overloaders, new Python 3 statements, builtins, and keywords --> <!-- v2.29 recognize escape sequenzes correctly -->-<language name="Python" version="23" style="python" indenter="python" kateversion="5.0" section="Scripts" extensions="*.py;*.pyw;SConstruct;SConscript;*.FCMacro" mimetype="application/x-python;text/x-python;text/x-python3" casesensitive="1" author="Michael Bueker" license="">+<language name="Python" version="25" style="python" indenter="python" kateversion="5.0" section="Scripts" extensions="*.py;*.pyw;SConstruct;SConscript;*.FCMacro" mimetype="application/x-python;text/x-python;text/x-python3" casesensitive="1" author="Michael Bueker" license=""> <highlighting> <list name="import"> <item>import</item>@@ -106,9 +106,12 @@ <item>case</item> </list> <list name="builtinfuncs">+ <!-- https://docs.python.org/3.11/library/functions.html#built-in-funcs --> <item>__import__</item> <item>abs</item>+ <item>aiter</item> <item>all</item>+ <item>anext</item> <item>any</item> <item>apply</item> <item>ascii</item>@@ -201,6 +204,7 @@ <item>__debug__</item> <item>__file__</item> <item>__name__</item>+ <item>__qualname__</item> </list> <list name="bindings"> <item>SIGNAL</item>@@ -208,6 +212,7 @@ <item>connect</item> </list> <list name="overloaders">+ <!-- https://docs.python.org/3.10/reference/datamodel.html#special-method-names --> <item>__new__</item> <item>__init__</item> <item>__del__</item>@@ -222,6 +227,7 @@ <item>__cmp__</item> <item>__rcmp__</item> <item>__hash__</item>+ <item>__bool__</item> <item>__nonzero__</item> <item>__unicode__</item> <item>__getattr__</item>@@ -233,9 +239,11 @@ <item>__delete__</item> <item>__call__</item> <item>__len__</item>+ <item>__length_hint__</item> <item>__getitem__</item> <item>__setitem__</item> <item>__delitem__</item>+ <item>__missing__</item> <item>__iter__</item> <item>__reversed__</item> <item>__contains__</item>@@ -245,6 +253,7 @@ <item>__add__</item> <item>__sub__</item> <item>__mul__</item>+ <item>__matmul__</item> <item>__floordiv__</item> <item>__mod__</item> <item>__divmod__</item>@@ -259,6 +268,7 @@ <item>__radd__</item> <item>__rsub__</item> <item>__rmul__</item>+ <item>__rmatmul__</item> <item>__rdiv__</item> <item>__rtruediv__</item> <item>__rfloordiv__</item>@@ -273,6 +283,7 @@ <item>__iadd__</item> <item>__isub__</item> <item>__imul__</item>+ <item>__imatmul__</item> <item>__idiv__</item> <item>__itruediv__</item> <item>__ifloordiv__</item>@@ -294,9 +305,14 @@ <item>__oct__</item> <item>__hex__</item> <item>__index__</item>+ <item>__round__</item>+ <item>__trunc__</item>+ <item>__floor__</item>+ <item>__ceil__</item> <item>__coerce__</item> <item>__enter__</item> <item>__exit__</item>+ <item>__match_args__</item> <item>__bytes__</item> <item>__format__</item> <item>__next__</item>@@ -306,12 +322,19 @@ <item>__anext__</item> <item>__aenter__</item> <item>__aexit__</item>+ <item>__slots__</item>+ <item>__init_subclass__</item>+ <item>__set_name__</item>+ <item>__prepare__</item>+ <item>__instancecheck__</item>+ <item>__subclasscheck__</item>+ <item>__class_getitem__</item> </list> <list name="exceptions"> <!-- Exceptions list resources used: - http://docs.python.org/2.7/library/exceptions.html#exception-hierarchy- - http://docs.python.org/3.4/library/exceptions.html#exception-hierarchy+ - http://docs.python.org/3.10/library/exceptions.html#exception-hierarchy --> <item>ArithmeticError</item> <item>AssertionError</item>@@ -329,6 +352,7 @@ <item>DeprecationWarning</item> <item>EnvironmentError</item> <item>EOFError</item>+ <item>EncodingWarning</item> <item>Exception</item> <item>FileExistsError</item> <item>FileNotFoundError</item>@@ -346,6 +370,7 @@ <item>KeyError</item> <item>LookupError</item> <item>MemoryError</item>+ <item>ModuleNotFoundError</item> <item>NameError</item> <item>NotADirectoryError</item> <item>NotImplementedError</item>@@ -354,11 +379,13 @@ <item>PendingDeprecationWarning</item> <item>PermissionError</item> <item>ProcessLookupError</item>+ <item>RecursionError</item> <item>ReferenceError</item> <item>ResourceWarning</item> <item>RuntimeError</item> <item>RuntimeWarning</item> <item>StandardError</item>+ <item>StopAsyncIteration</item> <item>StopIteration</item> <item>SyntaxError</item> <item>SyntaxWarning</item>@@ -408,6 +435,7 @@ <DetectIdentifier attribute="Normal Text"/> <RegExpr attribute="Decorator" String="@[_a-zA-Z[:^ascii:]][\._a-zA-Z0-9[:^ascii:]]*" firstNonSpace="true"/>+ <Detect2Chars attribute="Operator" char=":" char1="=" context="#stay"/> <AnyChar attribute="Operator" String="+*/%|=;<>!^&~-@" context="#stay"/> <LineContinue attribute="Operator" context="MultiLineExpr"/>@@ -543,7 +571,8 @@ <context name="UnfinishedStringError" attribute="Error" lineEndContext="#stay" noIndentationBasedFolding="true"> <!-- A single string/comment reached the end of the line without a \ line escape -->- <!-- We set ALL succeeding lines to the "Error" attribute so that this error is easier to spot -->+ <!-- We set the following line (or part of it) to the "Error" attribute so that this error is easier to spot -->+ <RegExpr attribute="Error" String="^(\s{4,}|[^[\]()"']{4,}(["'].*)?)" context="#pop" column="0"/> </context> <!-- Comments -->@@ -897,4 +926,4 @@ </general> </language> -<!-- kate: space-indent off; indent-width 4; -->+<!-- kate: space-indent off; indent-width 2; -->
xml/r.xml view
@@ -8,7 +8,7 @@ R : http://www.r-project.org/ RKWard : http://rkward.kde.org/ -->-<language version="12" kateversion="5.0" name="R Script" section="Scientific" extensions="*.R;*.r;*.S;*.s;*.q" mimetype="" license="GPLv2">+<language version="13" kateversion="5.0" name="R Script" section="Scientific" extensions="*.R;*.r;*.S;*.s;*.q" mimetype="" license="GPLv2"> <highlighting> <list name="controls">@@ -129,6 +129,7 @@ <Detect2Chars attribute="Operator" context="operator_rhs" char="&" char1="&"/> <StringDetect attribute="Operator" context="operator_rhs" String=":::"/> <Detect2Chars attribute="Operator" context="operator_rhs" char=":" char1=":"/>+ <Detect2Chars attribute="Operator" context="operator_rhs" char=":" char1="="/> <AnyChar attribute="Operator" context="operator_rhs" String="+-*/<>=!|&:^@$~"/> <RangeDetect attribute="Operator" context="operator_rhs" char="%" char1="%"/>
xml/ruby.xml view
@@ -31,7 +31,7 @@ <!-- Hold the "language" opening tag on a single line, as mentioned in "language.dtd". --> <language name="Ruby" section="Scripts"- version="16" kateversion="5.0"+ version="17" kateversion="5.0" extensions="*.rb;*.rjs;*.rxml;*.xml.erb;*.js.erb;*.rake;Rakefile;Gemfile;*.gemspec;Vagrantfile" mimetype="application/x-ruby" style="ruby" indenter="ruby"@@ -183,6 +183,8 @@ <item>extend</item> <item>include</item> <item>prepend</item>+ <item>refine</item>+ <item>using</item> </list> <contexts>
xml/rust.xml view
@@ -40,7 +40,7 @@ <!ENTITY scope2 "::(?=[^\s\:])"> <!-- Points after keyword or group { } --> ]>-<language name="Rust" version="13" kateversion="5.0" section="Sources" extensions="*.rs" mimetype="text/rust" priority="15" license="MIT" author="The Rust Project Developers">+<language name="Rust" version="14" kateversion="5.0" section="Sources" extensions="*.rs" mimetype="text/rust" priority="15" license="MIT" author="The Rust Project Developers"> <highlighting> <list name="fn"> <item>fn</item>@@ -491,7 +491,7 @@ </highlighting> <general> <comments>- <comment name="singleLine" start="//" />+ <comment name="singleLine" start="//" position="afterwhitespace" /> <comment name="multiLine" start="/*" end="*/" region="Comment"/> </comments> <keywords casesensitive="1" />
xml/scheme.xml view
@@ -17,7 +17,7 @@ https://www.gnu.org/software/kawa/Syntax.html https://www.gnu.org/software/guile/manual/html_node/Scheme-Syntax.html -->-<language version="11" kateversion="5.62" name="Scheme" section="Scripts" extensions="*.scm;*.ss;*.scheme;*.guile;*.chicken;*.meta" mimetype="text/x-scheme" author="Dominik Haumann (dhaumann@kde.org)" license="MIT" priority="9">+<language version="12" kateversion="5.79" name="Scheme" section="Scripts" extensions="*.scm;*.ss;*.scheme;*.guile;*.chicken;*.meta" mimetype="text/x-scheme" author="Dominik Haumann (dhaumann@kde.org)" license="MIT" priority="9"> <highlighting> <list name="operators"> <item><=</item>@@ -27,7 +27,6 @@ <item>>=</item> <item>></item> <item>-</item>- <item>/</item> <item>*,*</item> <item>+</item> <item>!</item>@@ -35,8 +34,6 @@ <item>%</item> <item>*</item> <item>/</item>- <item>=</item>- <item>></item> <item>?</item> <item>^</item> <item>_</item>@@ -824,7 +821,7 @@ <RegExpr attribute="Normal" context="#stay" String="&symbol;"/> <!-- s, f, d, l are extensions of Kawa --> <RegExpr attribute="Float" context="#stay" String="[0-9]*+\.[0-9]++([esfdl][+-]?[0-9]++)?|[0-9]++[esfdl][+-]?[0-9]++"/>- <RegExpr attribute="Decimal" context="#stay" String="[0-9]++"/>+ <Int attribute="Decimal" context="#stay"/> </context> @@ -1026,6 +1023,7 @@ <context name="Num2" attribute="Decimal" lineEndContext="#pop" fallthroughContext="#pop!Digit2"> <IncludeRules context="NumPrefix"/>+ <AnyChar attribute="Base Prefix" context="#stay" String="ie"/> <AnyChar attribute="Function" context="#pop!Digit2" String="+-"/> </context> <context name="Digit2" attribute="Decimal" lineEndContext="#pop" fallthroughContext="#pop">@@ -1034,6 +1032,7 @@ <context name="Num8" attribute="Decimal" lineEndContext="#pop" fallthroughContext="#pop!Digit8"> <IncludeRules context="NumPrefix"/>+ <AnyChar attribute="Base Prefix" context="#stay" String="ie"/> <AnyChar attribute="Function" context="#pop!Digit8" String="+-"/> </context> <context name="Digit8" attribute="Decimal" lineEndContext="#pop" fallthroughContext="#pop">@@ -1042,16 +1041,21 @@ <context name="Num10" attribute="Decimal" lineEndContext="#pop" fallthroughContext="#pop!Digit10"> <IncludeRules context="NumPrefix"/>+ <DetectChar attribute="Base Prefix" context="#pop!Num16" char="x"/>+ <DetectChar attribute="Base Prefix" context="#pop!Num8" char="o"/>+ <DetectChar attribute="Base Prefix" context="#pop!Num2" char="b"/>+ <AnyChar attribute="Base Prefix" context="#stay" String="ied"/> <AnyChar attribute="Function" context="#pop!Digit10" String="+-"/> </context> <context name="Digit10" attribute="Decimal" lineEndContext="#pop" fallthroughContext="#pop"> <!-- s, f, d, l are extensions of Kawa --> <RegExpr attribute="Float" context="#pop" String="[0-9]*+\.[0-9]++([esfdl][+-]?[0-9]++)?|[0-9]++[esfdl][+-]?[0-9]++"/>- <RegExpr attribute="Decimal" context="#pop" String="[0-9]++"/>+ <Int attribute="Decimal" context="#pop" additionalDeliminator="eid"/> </context> <context name="Num16" attribute="Decimal" lineEndContext="#pop" fallthroughContext="#pop!Digit16"> <IncludeRules context="NumPrefix"/>+ <DetectChar attribute="Base Prefix" context="#stay" char="i"/> <AnyChar attribute="Function" context="#pop!Digit16" String="+-"/> </context> <context name="Digit16" attribute="Decimal" lineEndContext="#pop" fallthroughContext="#pop">@@ -1059,8 +1063,12 @@ </context> <context name="NumPrefix" attribute="Decimal" lineEndContext="#pop">- <Detect2Chars attribute="Decimal" context="#stay" char="#" char1="e"/>- <Detect2Chars attribute="Decimal" context="#stay" char="#" char1="i"/>+ <Detect2Chars attribute="Base Prefix" context="#stay" char="#" char1="e"/>+ <Detect2Chars attribute="Base Prefix" context="#stay" char="#" char1="i"/>+ <Detect2Chars attribute="Base Prefix" context="#pop!Num16" char="#" char1="x"/>+ <Detect2Chars attribute="Base Prefix" context="#pop!Num8" char="#" char1="o"/>+ <Detect2Chars attribute="Base Prefix" context="#pop!Num2" char="#" char1="b"/>+ <Detect2Chars attribute="Base Prefix" context="#pop!Num10" char="#" char1="d"/> </context>
xml/sql-postgresql.xml view
@@ -3,7 +3,7 @@ <!-- PostgreSQL SQL, syntax definition based on sql.xml by Yury Lebedev v5 fix comments by Gene Thomas <gene@genethomas.com> -->-<language name="SQL (PostgreSQL)" version="14" kateversion="5.44" section="Database" extensions="*.sql;*.SQL;*.ddl;*.DDL" mimetype="text/x-sql" casesensitive="0" author="Shane Wright (me@shanewright.co.uk)" license="">+<language name="SQL (PostgreSQL)" version="15" kateversion="5.44" section="Database" extensions="*.sql;*.SQL;*.ddl;*.DDL" mimetype="text/x-sql" casesensitive="0" author="Shane Wright (me@shanewright.co.uk)" license=""> <highlighting> <list name="controlFlow"> <item>BEGIN</item>@@ -988,7 +988,6 @@ <context name="Normal" attribute="Normal Text" lineEndContext="#stay"> <!-- comments before operators -->- <DetectChar attribute="Comment" context="SingleLineComment" char="#"/> <Detect2Chars attribute="Comment" context="SingleLineComment" char="-" char1="-"/> <Detect2Chars attribute="Comment" context="MultiLineComment" char="/" char1="*" beginRegion="Comment"/> <WordDetect attribute="Comment" context="SingleLineComment" String="rem" insensitive="true" column="0"/>
xml/typescript.xml view
@@ -61,10 +61,10 @@ --> <language name="TypeScript"- version="13"+ version="15" kateversion="5.53" section="Scripts"- extensions="*.ts"+ extensions="*.ts;*.mts;*.cts" priority="9" mimetype="text/typescript;application/typescript;text/x-typescript;application/x-typescript" indenter="cstyle"@@ -741,7 +741,7 @@ <general> <comments>- <comment name="singleLine" start="//" />+ <comment name="singleLine" start="//" position="afterwhitespace" /> <comment name="multiLine" start="/*" end="*/" /> </comments> <keywords casesensitive="1" additionalDeliminator=""'`" weakDeliminator="$" />
xml/vhdl.xml view
@@ -5,7 +5,8 @@ <!ENTITY identifier "\b(?:[A-Za-z_][A-Za-z0-9_]*)\b|/(?:[^/]++(?://)?+)*+/"> <!ENTITY bos "\b"> <!-- bol or space following --> ]>-<language name="VHDL" version="13" kateversion="5.62" section="Hardware" extensions="*.vhdl;*.vhd" mimetype="text/x-vhdl" author="Rocky Scaletta (rocky@purdue.edu), Stefan Endrullis (stefan@endrullis.de), Florent Ouchet (outchy@users.sourceforge.net), Chris Higgs (chiggs.99@gmail.com), Jan Michel (jan@mueschelsoft.de), Luigi Calligaris (luigi.calligaris@stfc.ac.uk)">+<language name="VHDL" version="15" kateversion="5.62" section="Hardware" extensions="*.vhdl;*.vhd" mimetype="text/x-vhdl" author="Rocky Scaletta (rocky@purdue.edu), Stefan Endrullis (stefan@endrullis.de), Florent Ouchet (outchy@users.sourceforge.net), Chris Higgs (chiggs.99@gmail.com), Jan Michel (jan@mueschelsoft.de), Luigi Calligaris (luigi.calligaris@stfc.ac.uk)">+ <!-- BNF: https://github.com/antlr/grammars-v4/blob/master/vhdl/vhdl.g4 --> <highlighting> <list name="keywordsToplevel"> <item>file</item>@@ -232,9 +233,9 @@ <context name="package_main" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="package_decl"> <RegExpr attribute="Control" context="#pop#pop" dynamic="1" insensitive="1"- String="&bos;end(\s+package\b)?(\s+%1)?\s*;" endRegion="EntityRegion1"/>+ String="&bos;end(\s+package\b)?(\s+%1)?\s*;" endRegion="PackageRegion1"/> <WordDetect attribute="Error" context="#pop#pop!expressionError" insensitive="true"- String="end" endRegion="EntityRegion1"/>+ String="end" endRegion="PackageRegion1"/> </context> <context name="package_decl" attribute="Normal Text" lineEndContext="#stay">@@ -253,9 +254,9 @@ <context name="packagebody_main" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="package_decl"> <RegExpr attribute="Control" context="#pop#pop" dynamic="1" insensitive="1"- String="&bos;end(\s+package\s+body\b)?(\s+%1)?\s*;" endRegion="EntityRegion1"/>+ String="&bos;end(\s+package\s+body\b)?(\s+%1)?\s*;" endRegion="PackageBodyRegion1"/> <WordDetect attribute="Error" context="#pop#pop!expressionError" insensitive="true"- String="end" endRegion="EntityRegion1"/>+ String="end" endRegion="PackageBodyRegion1"/> </context> <!--====ARCHITECTURE ===============-->@@ -320,7 +321,7 @@ <context name="case_stmt" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="case_when"> <RegExpr attribute="Control" context="#pop" insensitive="true" endRegion="CaseRegion1"- String="&bos;end\s+case(&varname;)?\s*;"/>+ String="&bos;end\s+case(\s+&varname;)?\s*;"/> <WordDetect attribute="Error" context="#pop!expressionError" insensitive="true" String="end" endRegion="CaseRegion1"/> </context>@@ -328,17 +329,22 @@ <context name="case_when" attribute="Normal Text" lineEndContext="#stay"> <Detect2Chars char="=" char1=">" attribute="Operator" context="case_when2" beginRegion="CaseWhenRegion1"/> <IncludeRules context="preExpression"/>- <WordDetect attribute="Control" insensitive="true" String="when"/>+ <WordDetect attribute="Control" insensitive="true" String="when" context="case_when_name"/> <IncludeRules context="postExpression"/> </context> <context name="case_when2" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="sequential_stmt_decl"> <IncludeRules context="blank"/>- <WordDetect attribute="Control" context="#pop" insensitive="true" String="when" endRegion="CaseWhenRegion1"/>+ <WordDetect attribute="Control" context="#pop!case_when_name" insensitive="true" String="when" endRegion="CaseWhenRegion1"/> <WordDetect attribute="Control" context="#pop#pop" insensitive="true" String="end" lookAhead="1" endRegion="CaseWhenRegion1"/> <IncludeRules context="sequentialStatementKw"/> <IncludeRules context="label"/> </context>++ <context name="case_when_name" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop">+ <IncludeRules context="blank"/>+ <DetectIdentifier attribute="Name" context="#pop"/>+ </context> <!-- 'when' and 'end case' are checked at the beginning of the line for better code folding --> <!--====while ===============-->@@ -351,25 +357,25 @@ <!--====loop ===============--> <context name="loop" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="sequential_stmt"> <RegExpr attribute="Control" context="#pop" insensitive="true" endRegion="LoopRegion1"- String="&bos;end\s+loop(&varname;)?\s*;"/>+ String="&bos;end\s+loop(\s+&varname;)?\s*;"/> <WordDetect attribute="Error" context="#pop!expressionError" insensitive="true"- String="end" endRegion="CaseRegion1"/>+ String="end" endRegion="LoopRegion1"/> </context> <!--====declare ===============--> <context name="declare" attribute="Normal Text" lineEndContext="#stay"> <IncludeRules context="preExpression"/>- <WordDetect attribute="Redirection" context="#pop!declare_begin" insensitive="true"+ <WordDetect attribute="Keyword" context="#pop!declare_begin" insensitive="true" String="begin"/> <keyword attribute="Signal" context="signal" String="signals"/> <IncludeRules context="postExpression"/> </context> <context name="declare_begin" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="sequential_stmt">- <RegExpr attribute="Redirection" context="#pop" insensitive="true" endRegion="DeclareRegion1"+ <RegExpr attribute="Keyword" context="#pop" insensitive="true" endRegion="DeclareRegion1" String="&bos;end(\s+declare)?\s*;"/> <WordDetect attribute="Error" context="#pop!expressionError" insensitive="true"- String="end" endRegion="ProcedureRegion1"/>+ String="end" endRegion="DeclareRegion1"/> </context> @@ -460,11 +466,12 @@ <Int attribute="Integer" context="#stay"/> </context> + <!-- must be synchronized with postDeclaration_pop_semi --> <context name="postDeclaration" attribute="Normal Text" lineEndContext="#stay"> <WordDetect attribute="Signal" context="type" insensitive="1" String="type"/>- <WordDetect attribute="Control" context="function" insensitive="1" String="function"/>- <WordDetect attribute="Keyword" context="procedure" insensitive="1" String="procedure"/>- <WordDetect attribute="Keyword" context="component" insensitive="1" String="component"/>+ <WordDetect attribute="Redirection" context="function" insensitive="1" String="function"/>+ <WordDetect attribute="Keyword" context="procedure" insensitive="1" String="procedure" beginRegion="ProcedureRegion1"/>+ <WordDetect attribute="Control" context="component" insensitive="1" String="component"/> <keyword attribute="Data Type" context="#stay" String="types"/> <keyword attribute="Data Type" context="#stay" String="timeunits"/> <keyword attribute="Signal" context="signal" String="signals"/>@@ -474,16 +481,44 @@ <DetectIdentifier attribute="Normal Text"/> </context> + <!-- same as postDeclaration, but pops a context when ; is found -->+ <context name="postDeclaration_pop_semi" attribute="Normal Text" lineEndContext="#stay">+ <WordDetect attribute="Signal" context="#pop!type" insensitive="1" String="type"/>+ <WordDetect attribute="Redirection" context="#pop!function" insensitive="1" String="function"/>+ <WordDetect attribute="Keyword" context="#pop!procedure" insensitive="1" String="procedure" beginRegion="ProcedureRegion1"/>+ <WordDetect attribute="Control" context="#pop!component" insensitive="1" String="component"/>+ <keyword attribute="Data Type" context="#stay" String="types"/>+ <keyword attribute="Data Type" context="#stay" String="timeunits"/>+ <keyword attribute="Signal" context="#pop!signal" String="signals"/>+ <keyword attribute="Range" context="#stay" String="range"/>+ <keyword attribute="Keyword" context="#stay" String="keywords"/>+ <keyword attribute="Control" context="#stay" String="controls"/>+ <DetectIdentifier attribute="Normal Text"/>+ </context>+ <!-- label --> <context name="label" attribute="Normal Text" lineEndContext="#stay">- <RegExpr attribute="Name" context="after_label" String="\b(?!process|constant|signal|variable)&varname;(?=\s*:(?!=))"/>+ <RegExpr attribute="Name" context="after_label" String="\b(?!(process|constant|signal|variable)\b)&varname;(?=\s*:(?!=))"/> </context> <context name="after_label" attribute="Normal Text" lineEndContext="#stay">- <DetectChar attribute="Operator" context="#pop" char=":"/>+ <DetectChar attribute="Operator" context="#pop!instantiation_statement" char=":"/> <DetectSpaces attribute="Normal Text"/> </context> + <context name="instantiation_statement" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop">+ <IncludeRules context="blank"/>+ <WordDetect attribute="Keyword" context="#pop!instance" insensitive="1" String="component"/>+ <WordDetect attribute="Keyword" context="#pop!instance" insensitive="1" String="entity"/>+ <WordDetect attribute="Keyword" context="#pop!instance" insensitive="1" String="configuration"/>+ <WordDetect attribute="Control" context="#pop!generate" insensitive="1" String="if"/>+ <WordDetect attribute="Control" context="#pop!generate" insensitive="1" String="for"/>+ <WordDetect attribute="Control" context="#pop!block" insensitive="1" String="block" beginRegion="BlockRegion1"/>+ <WordDetect attribute="Process" context="#pop!process" insensitive="1" String="process" beginRegion="ProcessRegion1"/>+ <WordDetect attribute="Keyword" context="#stay" insensitive="1" String="postponed"/>+ <IncludeRules context="reference"/>+ </context>+ <!-- parallel statement --> <context name="parallel_stmt" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="parallel_stmt_decl"> <IncludeRules context="blank"/>@@ -493,8 +528,9 @@ </context> <context name="parallelStatementKw" attribute="Normal Text" lineEndContext="#stay">- <WordDetect attribute="Control" context="generate" insensitive="1" String="if" beginRegion="GenerateRegion1"/>- <WordDetect attribute="Control" context="generate" insensitive="1" String="for" beginRegion="GenerateRegion1"/>+ <WordDetect attribute="Control" context="if_start" insensitive="1" String="if" beginRegion="IfRegion1"/>+ <WordDetect attribute="Control" context="while" insensitive="1" String="for"/>+ <WordDetect attribute="Control" context="while" insensitive="1" String="while"/> <WordDetect attribute="Control" context="block" insensitive="1" String="block" beginRegion="BlockRegion1"/> <WordDetect attribute="Process" context="process" insensitive="1" String="process" beginRegion="ProcessRegion1"/> <WordDetect attribute="Keyword" context="#stay" insensitive="1" String="postponed"/>@@ -506,7 +542,7 @@ <WordDetect attribute="Keyword" context="#stay" insensitive="true" String="generic"/> <WordDetect attribute="Keyword" context="#stay" insensitive="true" String="port"/> <WordDetect attribute="Keyword" context="#stay" insensitive="true" String="map"/>- <IncludeRules context="postDeclaration"/>+ <IncludeRules context="postDeclaration_pop_semi"/> </context> <!-- sequential statement -->@@ -520,8 +556,8 @@ <context name="sequentialStatementKw" attribute="Normal Text" lineEndContext="#stay"> <WordDetect attribute="Control" context="if_start" insensitive="1" String="if" beginRegion="IfRegion1"/> <WordDetect attribute="Control" context="case" insensitive="1" String="case" beginRegion="CaseRegion1"/>- <WordDetect attribute="Control" context="while" insensitive="1" String="while"/> <WordDetect attribute="Control" context="while" insensitive="1" String="for"/>+ <WordDetect attribute="Control" context="while" insensitive="1" String="while"/> <WordDetect attribute="Control" context="loop" insensitive="1" String="loop" beginRegion="LoopRegion1"/> <WordDetect attribute="Keyword" context="declare" insensitive="1" String="declare" beginRegion="DeclareRegion1"/> </context>@@ -529,23 +565,54 @@ <context name="sequential_stmt_decl" attribute="Normal Text" lineEndContext="#stay"> <DetectChar attribute="Normal Text" context="#pop" char=";"/> <IncludeRules context="preDeclaration"/>- <IncludeRules context="postDeclaration"/>+ <IncludeRules context="postDeclaration_pop_semi"/> </context> <!-- if/for generate --> <context name="generate" attribute="Normal Text" lineEndContext="#stay"> <IncludeRules context="preExpression"/>- <WordDetect attribute="Control" context="generate_stmt" insensitive="1" String="generate"/>+ <WordDetect attribute="Control" context="generate_decl" insensitive="1" String="generate" beginRegion="GenerateRegion1"/>+ <!-- label: for ... loop -->+ <WordDetect attribute="Control" context="#pop!loop" insensitive="1" String="loop" beginRegion="LoopRegion1"/> <IncludeRules context="postExpression"/> </context> - <context name="generate_stmt" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="parallel_stmt">+ <context name="generate_decl" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="generate_stmt">+ <RegExpr attribute="Control" context="generate_els" insensitive="1"+ String="&bos;end\s*;"/> <RegExpr attribute="Control" context="#pop#pop" insensitive="1" String="&bos;end(\s+generate\b)?(\s+&varname;)?\s*;" endRegion="GenerateRegion1"/> <WordDetect attribute="Error" context="#pop#pop!expressionError" insensitive="true" String="end" endRegion="GenerateRegion1"/> </context> + <context name="generate_els" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop">+ <IncludeRules context="blank"/>+ <WordDetect attribute="Control" context="#pop!generate_stmt_els" insensitive="1" String="elsif"/>+ <WordDetect attribute="Control" context="#pop!generate_stmt_els" insensitive="1" String="else"/>+ </context>++ <context name="generate_stmt" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="sequential_stmt_decl">+ <IncludeRules context="preDeclaration"/>+ <WordDetect attribute="Control" context="#pop" insensitive="1" String="end" lookAhead="1"/>+ <WordDetect attribute="Control" context="#pop!generate_body" insensitive="1" String="begin"/>+ <WordDetect attribute="Control" context="#pop!generate_stmt_els" insensitive="1" String="elsif"/>+ <WordDetect attribute="Control" context="#pop!generate_stmt_els" insensitive="1" String="else"/>+ <IncludeRules context="sequentialStatementKw"/>+ <IncludeRules context="label"/>+ <IncludeRules context="postDeclaration"/>+ </context>++ <context name="generate_body" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="sequential_stmt_decl">+ <IncludeRules context="parallel_stmt"/>+ </context>++ <context name="generate_stmt_els" attribute="Normal Text" lineEndContext="#stay">+ <IncludeRules context="preExpression"/>+ <WordDetect attribute="Control" context="#pop!generate_stmt" insensitive="1" String="generate"/>+ <IncludeRules context="postExpression"/>+ </context>+ <!-- block --> <context name="block" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="entity_decl"> <RegExpr attribute="Control" context="#pop#pop" insensitive="1"@@ -571,11 +638,7 @@ <!-- expression --> <context name="preExpression" attribute="Normal Text" lineEndContext="#stay">- <IncludeRules context="blank"/>- <AnyChar attribute="Operator" context="#stay" String="[&><=:+-*/|`].,"/>- <DetectChar attribute="Vector" context="string" char="""/>- <DetectChar attribute="Attribute" context="attribute" char="'"/>- <Int attribute="Integer" context="#stay"/>+ <IncludeRules context="preDeclaration"/> </context> <context name="postExpression" attribute="Normal Text" lineEndContext="#stay">@@ -587,7 +650,7 @@ </context> <!-- expression error -->- <context name="expressionError" attribute="Error" lineEndContext="#stay">+ <context name="expressionError" attribute="Error" lineEndContext="#pop"> <Detect2Chars attribute="Comment" context="comment" char="-" char1="-"/> <DetectChar attribute="Error" context="#pop" char=";"/> </context>@@ -639,25 +702,26 @@ <!-- type range --> <context name="type_range" attribute="Normal Text" lineEndContext="#stay"> <IncludeRules context="preExpression"/>+ <DetectChar attribute="Normal Text" context="#pop" char=";"/> <WordDetect attribute="Control" context="type_range_units" insensitive="1" String="units" beginRegion="UnitRegion1"/> <IncludeRules context="postExpression"/> </context> - <context name="type_range_units" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="type_range_units_decl">+ <context name="type_range_units" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="type_body"> <RegExpr attribute="Control" context="#pop#pop" insensitive="1" String="&bos;end\s+units(\s+&varname;)?\s*;" endRegion="UnitRegion1"/> <WordDetect attribute="Error" context="#pop#pop!expressionError" insensitive="true"- String="end" endRegion="GenerateRegion1"/>+ String="end" endRegion="UnitRegion1"/> </context> - <context name="type_range_units_decl" attribute="Normal Text" lineEndContext="#stay">+ <context name="type_body" attribute="Normal Text" lineEndContext="#stay"> <IncludeRules context="preExpression"/>- <WordDetect attribute="Control" context="#pop" insensitive="true" String="end" lookAhead="1"/>+ <WordDetect context="#pop" insensitive="true" String="end" lookAhead="1"/> <IncludeRules context="postExpression"/> </context> <!-- type record -->- <context name="type_record" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="type_record_body">+ <context name="type_record" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="type_body"> <IncludeRules context="blank"/> <RegExpr attribute="Keyword" context="#pop" insensitive="1" String="&bos;end\s+record;" endRegion="sig"/>@@ -665,14 +729,6 @@ String="end" endRegion="sig"/> </context> - <context name="type_record_body" attribute="Normal Text" lineEndContext="#stay">- <IncludeRules context="blank"/>- <DetectChar attribute="Normal Text" context="#stay" char=";"/>- <DetectChar attribute="Operator" context="#stay" char=":"/>- <WordDetect attribute="Keyword" context="#pop" insensitive="true" String="end" lookAhead="1"/>- <DetectIdentifier attribute="Normal Text"/>- </context>- <!-- function --> <context name="function" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="function_name"> <IncludeRules context="blank"/>@@ -686,7 +742,7 @@ </context> <context name="function_return" attribute="Normal Text" lineEndContext="#stay">- <DetectSpaces attribute="Normal Text" context="#stay"/>+ <IncludeRules context="blank"/> <DetectChar attribute="Normal Text" context="#pop#pop#pop" char=";"/> <WordDetect attribute="Keyword" context="#pop#pop#pop!function_is" insensitive="1" String="is" beginRegion="FunctionRegion1"/> <keyword attribute="Data Type" context="#stay" String="types"/>@@ -695,7 +751,7 @@ <context name="function_is" attribute="Normal Text" lineEndContext="#stay"> <IncludeRules context="preExpression"/> <WordDetect attribute="Redirection" context="#pop!function_begin" insensitive="true"- String="begin" beginRegion="FunctionRegion1"/>+ String="begin"/> <keyword attribute="Signal" context="signal" String="signals"/> <IncludeRules context="postExpression"/> </context>@@ -722,14 +778,14 @@ <context name="procedure_is" attribute="Normal Text" lineEndContext="#stay"> <IncludeRules context="preExpression"/>- <WordDetect attribute="Redirection" context="#pop!procedure_begin" insensitive="true"- String="begin" endRegion="ProcedureRegion1"/>+ <WordDetect attribute="Keyword" context="#pop!procedure_begin" insensitive="true"+ String="begin" endRegion="ProcedureRegion1" beginRegion="ProcedureRegion1"/> <keyword attribute="Signal" context="signal" String="signals"/> <IncludeRules context="postExpression"/> </context> <context name="procedure_begin" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="sequential_stmt">- <RegExpr attribute="Redirection" context="#pop" insensitive="1"+ <RegExpr attribute="Keyword" context="#pop" insensitive="1" String="&bos;end(\s+procedure)?(\s+&varname;)?\s*;" endRegion="ProcedureRegion1"/> <WordDetect attribute="Error" context="#pop!expressionError" insensitive="true" String="end" endRegion="ProcedureRegion1"/>@@ -751,10 +807,53 @@ <context name="component_body" attribute="Normal Text" lineEndContext="#stay"> <IncludeRules context="preExpression"/>- <WordDetect attribute="Keyword" context="#stay" insensitive="true" String="generic"/>- <WordDetect attribute="Keyword" context="#stay" insensitive="true" String="port"/>+ <WordDetect attribute="Control" context="#stay" insensitive="true" String="generic"/>+ <WordDetect attribute="Control" context="#stay" insensitive="true" String="port"/> <WordDetect attribute="Control" context="#pop" insensitive="true" String="end" lookAhead="1"/> <IncludeRules context="postExpression"/>+ </context>++<!-- label: configuration ref -->+<!-- label: component ref -->+<!-- label: entity ref -->+<!-- label: ref -->+ <context name="instance" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop">+ <IncludeRules context="blank"/>+ <IncludeRules context="reference"/>+ </context>++ <context name="reference" attribute="Normal Text" lineEndContext="#stay">+ <RegExpr attribute="Reference" context="instance_body" beginRegion="InstanceRegion1"+ String="&varname;(\s*\.\s*&varname;)?"/>+ </context>++ <context name="instance_body" attribute="Normal Text" lineEndContext="#stay">+ <DetectChar attribute="Normal Text" context="#pop#pop" char=";" endRegion="InstanceRegion1"/>+ <IncludeRules context="preExpression"/>+ <WordDetect attribute="Control" context="#pop#pop" insensitive="true" String="end" lookAhead="1"/>+ <RegExpr attribute="Keyword" context="instance_map_start" insensitive="true" beginRegion="InstanceMapRegion" String="&bos;(port|generic)\s+map\s*(?=\()"/>+ <IncludeRules context="postExpression"/>+ </context>+ <context name="instance_map_start" attribute="Normal Text" lineEndContext="#stay">+ <DetectChar attribute="Normal Text" context="#pop!instance_map" char="("/>+ </context>++ <!-- Inside a port or generic map -->+ <context name="instance_map" attribute="Normal Text" lineEndContext="#stay">+ <IncludeRules context="preDeclaration"/>+ <AnyChar attribute="Error" context="#stay" String="<;:"/>+ <DetectChar attribute="Normal Text" context="#pop" char=")" endRegion="InstanceMapRegion"/>+ <DetectChar attribute="Normal Text" context="instance_inner_par" char="("/>+ <IncludeRules context="postDeclaration"/>+ </context>++ <!-- Inside parantheses inside a map -->+ <context name="instance_inner_par" attribute="Normal Text" lineEndContext="#stay">+ <IncludeRules context="preDeclaration"/>+ <DetectChar attribute="Error" context="#stay" char=";"/>+ <DetectChar attribute="Normal Text" context="#pop" char=")"/>+ <DetectChar attribute="Normal Text" context="instance_inner_par" char="("/>+ <IncludeRules context="postDeclaration"/> </context> </contexts>
xml/xml.xml view
@@ -6,7 +6,7 @@ <!ENTITY name "(?![0-9])[\w_:][\w.:_-]*"> <!ENTITY entref "&(?:#[0-9]+|#[xX][0-9A-Fa-f]+|&name;);"> ]>-<language name="XML" version="15" kateversion="5.0" section="Markup" extensions="*.docbook;*.xml;*.rc;*.daml;*.rdf;*.rss;*.xspf;*.xsd;*.svg;*.ui;*.kcfg;*.qrc;*.wsdl;*.scxml;*.xbel;*.dae;*.sch;*.brd" mimetype="text/xml;text/book;text/daml;text/rdf;application/rss+xml;application/xspf+xml;image/svg+xml;application/x-designer;application/x-xbel;application/xml;application/scxml+xml" casesensitive="1" indenter="xml" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL">+<language name="XML" version="16" kateversion="5.0" section="Markup" extensions="*.docbook;*.xml;*.rc;*.daml;*.rdf;*.rss;*.xspf;*.xsd;*.svg;*.ui;*.kcfg;*.qrc;*.wsdl;*.scxml;*.xbel;*.dae;*.sch;*.brd" mimetype="text/xml;text/book;text/daml;text/rdf;application/rss+xml;application/xspf+xml;image/svg+xml;application/x-designer;application/x-xbel;application/xml;application/scxml+xml;application/vnd.oasis.opendocument.text-flat-xml;application/vnd.oasis.opendocument.graphics-flat-xml;application/vnd.oasis.opendocument.presentation-flat-xml;application/vnd.oasis.opendocument.spreadsheet-flat-xml" casesensitive="1" indenter="xml" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL"> <highlighting> <contexts>
xml/yacc.xml view
@@ -32,7 +32,7 @@ ======================================================================== -->-<language name="Yacc/Bison" version="9" kateversion="5.0" section="Sources" extensions="*.y;*.yy;*.ypp;*.y++" mimetype="text/x-yacc;text/x-bison" priority="5" author="Jan Villat (jan.villat@net2000.ch)" license="LGPL">+<language name="Yacc/Bison" version="9" kateversion="5.79" section="Sources" extensions="*.y;*.yy;*.ypp;*.y++" mimetype="text/x-yacc;text/x-bison" priority="5" author="Jan Villat (jan.villat@net2000.ch)" license="LGPL"> <highlighting> <contexts>@@ -112,7 +112,7 @@ <IncludeRules context="Symbol-Variable" /> <IncludeRules context="##C++" /> </context>- <context name="Code-Symbols End" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop!Percent Command In">+ <context name="Code-Symbols End" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop!Percent Command In"> <IncludeRules context="Comment" /> <DetectSpaces /> <DetectChar attribute="Normal Text" context="#pop" char=";" lookAhead="true" />@@ -145,7 +145,7 @@ </context> <!-- The Bison parser allows to have ';' followed by '|', without the rule ending. The problem here is that the ';' char has endRegion="rule" (although it is not very relevant). -->- <context name="Rule End" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop#pop">+ <context name="Rule End" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop#pop"> <DetectSpaces /> <DetectChar attribute="Normal Text" context="#stay" char=";" /> <DetectChar attribute="Normal Text" context="#pop" char="|" />@@ -231,10 +231,10 @@ <DetectChar attribute="Directive" context="Dol" char="$" /> <RegExpr attribute="Directive" context="#stay" String="@\$?(?:\d+|[A-Za-z_]\w*)?" /> </context>- <context name="Dol" attribute="Normal Text" fallthrough="true" fallthroughContext="DolEnd" lineEndContext="#stay">+ <context name="Dol" attribute="Normal Text" fallthroughContext="DolEnd" lineEndContext="#stay"> <RegExpr attribute="Data Type" context="DolEnd" String="<[^>]+>" /> </context>- <context name="DolEnd" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop#pop">+ <context name="DolEnd" attribute="Normal Text" lineEndContext="#stay" fallthroughContext="#pop#pop"> <RegExpr attribute="Directive" context="#pop#pop" String="@?\d+" /> <DetectChar attribute="Directive" context="#pop#pop" char="$" /> <DetectIdentifier attribute="Directive" context="#pop#pop" />
xml/yaml.xml view
@@ -53,7 +53,7 @@ <!-- Modifications (YAML 1.2), values & support for literal/folded style: Nibaldo González S. <nibgonz@gmail.com> These modifications are under the MIT license. //-->-<language name="YAML" version="10" kateversion="5.0" section="Markup"+<language name="YAML" version="11" kateversion="5.0" section="Markup" extensions="*.yaml;*.yml" mimetype="text/yaml" priority="9" author="Dr Orlovsky MA (dr.orlovsky@gmail.com), Nibaldo González (nibgonz@gmail.com)" license="LGPL"> <highlighting>@@ -304,8 +304,7 @@ <context attribute="Error" lineEndContext="#pop#pop#pop" name="attribute-end-inline"> <RegExpr attribute="Comment" context="comment" String="(?:^|\s+)#" /> <DetectSpaces attribute="Normal Text" context="#stay"/>- <AnyChar attribute="String" context="#pop#pop#pop" lookAhead="true" String="}]"/>- <DetectChar attribute="Operator" context="#pop#pop#pop" lookAhead="true" char="," />+ <AnyChar context="#pop#pop#pop" lookAhead="true" String="}],"/> </context> <context attribute="String" lineEndContext="#stay" name="string" noIndentationBasedFolding="true">
xml/zsh.xml view
@@ -12,20 +12,36 @@ <!ENTITY wordseps " &tab;&symbolseps;"> <!ENTITY wordseps_or_extglog " &tab;>|&;)`"> <!-- wordseps without < and ( --> - <!ENTITY _fragpathseps "*?#^~[&wordseps;&substseps;">+ <!ENTITY bq_string "`[^`]*+`">+ <!ENTITY sq_string "'[^']*+'">+ <!ENTITY dq_string ""(?:[^"\\`]*+|&bq_string;|\\.)*+"">+ <!ENTITY strings "(?:&sq_string;|&dq_string;|&bq_string;)">++ <!ENTITY simpleglob "*?#^~">+ <!ENTITY globrange "<[0-9]*-[0-9]*>">+ <!ENTITY globany "\[(?:[^&wordseps;"'`\\\[\]]+|\\.|&strings;|\[:\w+:\]|\[)*\]">++ <!ENTITY _fragpathseps "&simpleglob;[&wordseps;&substseps;"> <!ENTITY _fragpathnosep "(?:&_brace_noexpansion;)?+"> <!ENTITY path "(?:[^&_fragpathseps;]*+&_fragpathnosep;)*+"> <!ENTITY fragpath "(?:[^&_fragpathseps;/]*+&_fragpathnosep;)*+"> <!ENTITY fragpathesc "\\.(?:[^&_fragpathseps;/]*+(?:\\.|&_brace_noexpansion;)?+)*+"> <!ENTITY opt "(?:[^&_fragpathseps;=/]*+&_fragpathnosep;)*+">- <!ENTITY assumepath "/&path;|(?=[*?#^~([]|<[0-9]*-[0-9]*>)">+ <!ENTITY assumepath "/&path;|(?=[&simpleglob;([]|&globrange;)"> <!ENTITY pathpart "(?:~(?:/&path;|(?=[&wordseps;]|$))|&fragpath;(?:&assumepath;|(?=&fragpathesc;&assumepath;))|\.\.?(?=[&wordseps;]|$))"> + <!-- Path only with / -->+ <!ENTITY path_with_sep_text "[^[&wordseps;'"`\\/]">+ <!ENTITY path_with_sep_text2 "[^[()<>'"`\\/]">+ <!ENTITY path_with_sep_expr "\\.|&strings;|&globany;|&globrange;">+ <!ENTITY path_with_sep_spe "(~|\.\.?)($|[/ &tab;<>|&;)])">+ <!ENTITY path_with_sep_sub "\((&path_with_sep_text2;++|&path_with_sep_expr;)*+(\)|(?=/))">+ <!ENTITY path_with_sep "/|&path_with_sep_spe;|(&path_with_sep_text;++|&path_with_sep_expr;|&path_with_sep_sub;)*+/">+ <!ENTITY _braceexpansion_spe " &tab;<>|&;{}\\`'"$"> <!ENTITY _brace_noexpansion "\{[^&_braceexpansion_spe;,]*+\}"> <!ENTITY _braceexpansion_var "\$(?:\{[^\[\]&_braceexpansion_spe;]*+(?:\[[*@a-zA-Z0-9]\])\})?">- <!ENTITY _braceexpansion_string "'[^']*'|"([^"\`]*+|`[^`]*`)*+"">- <!ENTITY _braceexpansion_elems "\\.|`[^`]*`|&_braceexpansion_string;|&_braceexpansion_var;|&_brace_noexpansion;">+ <!ENTITY _braceexpansion_elems "\\.|&strings;|&_braceexpansion_var;|&_brace_noexpansion;"> <!ENTITY _braceexpansion_consume "&_braceexpansion_elems;|{(?:[^&_braceexpansion_spe;,]++|&_braceexpansion_elems;)*?}|(?R)?+"> <!ENTITY _braceexpansion "(?:[^&_braceexpansion_spe;,]++|&_braceexpansion_consume;)*?,(?:[^&_braceexpansion_spe;]++|&_braceexpansion_consume;)*?}"> <!ENTITY braceexpansion "{&_braceexpansion;">@@ -45,19 +61,23 @@ <!ENTITY _ispattern_ugeP_2 "{(?:[^}'`"\\|()]*+(?:&_ispattern_q;)?)*(?:}(?=[|()]))"> <!ENTITY _ispattern_ugeP_3 "<(?:[^>'`"\\|()]*+(?:&_ispattern_q;)?)*(?:>|(?=[|()]))"> <!ENTITY _ispattern_ugeP_4 "([^&wordseps;{}'"`\\])(?:(?:(?!\1)[^'`"\\\1|()])*+(?:&_ispattern_q;)?)*(?:\1|(?=[|()]))">- <!ENTITY _ispattern_dq ""(?:[^"\\`]*+(?:`[^`]`|\\.)?)*"">- <!ENTITY _ispattern_q "\\.|'[^']*'|`[^`]`|&_ispattern_dq;">+ <!ENTITY _ispattern_q "\\.|&strings;"> <!ENTITY _ispattern_check "(?:\)(?:[^ &tab;}<>|&;)]|&nogroupend;)|[ &tab;|(]|$)"> <!ENTITY ispattern "(?:[^ &tab;\\'"|()`ugeP]*+(?:&_ispattern_ugN;|&_ispattern_ugeP;|&_ispattern_q;)?)*&_ispattern_check;"> <!ENTITY heredocq "(?|"([^"]+)"|'([^']+)'|\\(.[^&wordseps;&substseps;]*))"> - <!ENTITY arithmetic_as_subshell "\(((?:[^`'"()$]++|\$\{[^`'"(){}$]+\}|\$(?=[^{`'"()])|`[^`]*+`|\((?1)(?:[)]|(?=['"])))++)(?:[)](?=$|[^)])|["'])">+ <!ENTITY arithmetic_as_subshell "\(((?:[^`'"()$]++|\$\{[^`'"(){}$]+\}|\$(?=[^{`'"()])|&bq_string;|\((?1)(?:[)]|(?=['"])))++)(?:[)](?=$|[^)])|["'])"> + <!ENTITY unary_operators "-[abcdefghknoprstuvwxzLOGNS]&eos;">+ <!ENTITY binary_operators "(?:-(?:e[fq]|[nolg]t|[nlg]e)|==?|!=)&eos;">++ <!ENTITY dblbracket_close "\]\](?=($|[ &tab;;|&)]))">+ <!ENTITY int "(?:[0-9]++[_0-9]*+)"> <!ENTITY exp "(?:[eE][-+]?∫)"> ]>-<language name="Zsh" version="26" kateversion="5.79" section="Scripts" extensions="*.sh;*.zsh;.zshrc;.zprofile;.zlogin;.zlogout;.profile" mimetype="application/x-shellscript" casesensitive="1" author="Jonathan Poelen (jonathan.poelen@gmail.com)" license="MIT">+<language name="Zsh" version="30" kateversion="5.79" section="Scripts" extensions="*.sh;*.zsh;.zshrc;.zprofile;.zlogin;.zlogout;.profile" mimetype="application/x-shellscript" casesensitive="1" author="Jonathan Poelen (jonathan.poelen@gmail.com)" license="MIT"> <highlighting> <list name="keywords">@@ -336,17 +356,12 @@ <Detect2Chars attribute="String Transl." context="#pop!StringDQ" char="$" char1="""/> </context> <context attribute="Variable" lineEndContext="#pop" name="DispatchVarNameVariables">- <Detect2Chars context="#pop!VarNameSpe" char="$" char1="#" lookAhead="1"/>- <RegExpr attribute="Variable" context="#pop!AfterVarName" String="\$(?:&varname;|[0-9]+|[-*@?$!])"/>- <Detect2Chars context="#pop!VarNameSpe" char="$" char1="~" lookAhead="1"/>- <Detect2Chars context="#pop!VarNameSpe" char="$" char1="=" lookAhead="1"/>- <Detect2Chars context="#pop!VarNameSpe" char="$" char1="^" lookAhead="1"/>- <Detect2Chars context="#pop!VarNameSpe" char="$" char1="+" lookAhead="1"/>- </context>- <context attribute="Variable" lineEndContext="#pop" name="VarNameSpe">- <DetectChar attribute="Variable" context="#pop!VarNameSpeParam" char="$"/>+ <RegExpr attribute="Dollar Prefix" context="#pop!VarNamePrefixedWithDollar" String="\$(?=&varname;|[0-9]+|[-*@?$!#~=^+])"/> </context>- <context attribute="Variable" lineEndContext="#pop" name="VarNameSpeParam">+ <context attribute="Variable" lineEndContext="#pop" name="VarNamePrefixedWithDollar">+ <DetectIdentifier attribute="Variable" context="#pop!AfterVarName"/>+ <Int attribute="Variable" context="#pop!AfterVarName" additionalDeliminator="$"/>+ <AnyChar attribute="Variable" context="#pop!AfterVarName" String="-*@?$!"/> <DetectChar attribute="Parameter Expansion Operator" context="#pop!VarNameSubstLen" char="#"/> <DetectChar attribute="Parameter Expansion Operator" context="#pop!VarNameParam+" char="+"/> <AnyChar attribute="Parameter Expansion Operator" context="#pop!VarNameParam" String="~=^"/>@@ -407,6 +422,7 @@ <IncludeRules context="FindWord"/> <DetectChar attribute="Parameter Expansion Operator" context="#pop" char="/"/> <AnyChar context="#pop#pop" String=" &tab;<>|&;()" lookAhead="1"/>+ <DetectIdentifier attribute="String SingleQ"/> </context> <context attribute="Normal Text" lineEndContext="#stay" name="CommandBackq" fallthroughContext="Command">@@ -482,6 +498,7 @@ <DetectChar context="NormalOptionMaybeBraceExpansion" char="{" lookAhead="1"/> <DetectChar attribute="Normal Text" context="#pop" char="}"/> <DetectChar context="MaybeGlobRangeOrPop" char="<" lookAhead="1"/>+ <DetectIdentifier/> </context> <context attribute="Normal Text" lineEndContext="#pop" name="NormalOptionMaybeGroupEnd"> <IncludeRules context="FindNoGroupEndThenPop"/>@@ -544,11 +561,13 @@ <AnyChar context="#pop#pop" String="&wordseps_or_extglog;" lookAhead="1"/> <IncludeRules context="IncPath"/> <DetectChar context="PathMaybeGroupEnd" char="}" lookAhead="1"/>+ <DetectIdentifier attribute="Path"/> </context> <context attribute="Path" lineEndContext="#pop" name="PathRecBrace"> <AnyChar context="#pop" String="&wordseps_or_extglog;" lookAhead="1"/> <IncludeRules context="IncPath"/> <DetectChar attribute="Path" context="#pop" char="}"/>+ <DetectIdentifier attribute="Path"/> </context> <context attribute="Glob" lineEndContext="#stay" name="MaybeGlobRangeOrPop" fallthroughContext="#pop#pop"> <IncludeRules context="FindGlobRangeThenPop"/>@@ -572,7 +591,7 @@ <!-- FindPathThenPopInAlternateValue consumes path in ${xx:here}--> <context attribute="Normal Text" lineEndContext="#pop" name="FindPathThenPopInAlternateValue">- <AnyChar attribute="Glob" context="PathThenPopInAlternateValue" String="?*#^~|"/>+ <AnyChar attribute="Glob" context="PathThenPopInAlternateValue" String="&simpleglob;|"/> <Detect2Chars context="PathThenPopInAlternateValue" char="(" char1="#" lookAhead="1"/> <AnyChar context="PathThenPopInAlternateValue" String="[(" lookAhead="1"/> <RegExpr attribute="Path" context="PathThenPopInAlternateValue" String="&pathpart;"/>@@ -580,6 +599,7 @@ <context attribute="Path" lineEndContext="#pop" name="PathThenPopInAlternateValue"> <AnyChar context="#pop" String="&wordseps_or_extglog;}" lookAhead="1"/> <IncludeRules context="IncPath"/>+ <DetectIdentifier/> </context> <context attribute="Glob" lineEndContext="#stay" name="FindGlobAny">@@ -589,22 +609,25 @@ <DetectChar attribute="Glob Flag" context="#pop!GlobAny" char="^"/> </context> <context attribute="String SingleQ" lineEndContext="#pop" name="GlobAny">+ <DetectIdentifier attribute="String SingleQ"/> <DetectChar context="AssumeEscape" char="\" lookAhead="1"/> <DetectChar attribute="Glob Flag" context="#stay" char="-"/>- <Detect2Chars attribute="Glob" context="GlobClass" char="[" char1=":"/>+ <IncludeRules context="FindStrings"/> <DetectChar attribute="Glob" context="#pop" char="]"/>+ <Detect2Chars attribute="Glob" context="GlobClass" char="[" char1=":"/> </context> <context attribute="Glob" lineEndContext="#pop#pop" name="GlobClass">+ <DetectIdentifier attribute="Pattern"/> <Detect2Chars attribute="Glob" context="#pop" char=":" char1="]"/> <DetectChar attribute="Error" context="#pop" char="]"/> </context> <context attribute="Pattern" lineEndContext="#stay" name="FindSingleGlob">- <AnyChar attribute="Glob" context="#stay" String="?*#^~"/>+ <AnyChar attribute="Glob" context="#stay" String="&simpleglob;"/> </context> <context attribute="Pattern" lineEndContext="#stay" name="FindGlobPattern">- <AnyChar attribute="Glob" context="#stay" String="?*#^~|"/>+ <AnyChar attribute="Glob" context="#stay" String="&simpleglob;|"/> <IncludeRules context="FindGlobAny"/> <IncludeRules context="FindGroupPattern"/> </context>@@ -644,11 +667,13 @@ <DetectChar attribute="Glob" context="#pop" char=")"/> <IncludeRules context="FindWord"/> <IncludeRules context="FindSubPattern"/>+ <DetectIdentifier attribute="Pattern"/> </context> <context attribute="Pattern" lineEndContext="#stay" name="ExtGlobPatternThenPath"> <DetectChar attribute="Glob" context="#pop!PathThenPop" char=")"/> <IncludeRules context="FindWord"/> <IncludeRules context="FindSubPattern"/>+ <DetectIdentifier attribute="Pattern"/> </context> <context attribute="Normal Text" lineEndContext="#pop" name="VarAssign" fallthroughContext="#pop">@@ -797,6 +822,7 @@ <context attribute="Normal Text" lineEndContext="#pop" name="StringRedirection2"> <AnyChar context="#pop" String="&wordseps;`" lookAhead="1"/> <IncludeRules context="FindWord"/>+ <DetectIdentifier attribute="Normal Text"/> </context> <context attribute="Normal Text" lineEndContext="#pop" name="CloseFile" fallthroughContext="#pop"> <DetectChar attribute="Keyword" context="#pop" char="-"/>@@ -861,6 +887,8 @@ </context> <context attribute="Here Doc" lineEndContext="#pop" name="HereDocSubstitutions">+ <DetectSpaces attribute="Here Doc"/>+ <DetectIdentifier attribute="Here Doc"/> <DetectChar context="HereDocVariables" char="$" lookAhead="1"/> <DetectChar attribute="Backquote" context="CommandBackq" char="`"/> <DetectChar context="AssumeEscape" char="\" lookAhead="1"/>@@ -952,11 +980,15 @@ <!-- StringSQ consumes anything till ' --> <context attribute="String SingleQ" lineEndContext="#stay" name="StringSQ">+ <DetectSpaces attribute="String SingleQ"/>+ <DetectIdentifier attribute="String SingleQ"/> <DetectChar attribute="String SingleQ" context="#pop" char="'"/> </context> <!-- StringDQ consumes anything till ", substitutes vars and expressions --> <context attribute="String DoubleQ" lineEndContext="#stay" name="StringDQ">+ <DetectSpaces attribute="String DoubleQ"/>+ <DetectIdentifier attribute="String DoubleQ"/> <DetectChar attribute="String DoubleQ" context="#pop" char="""/> <DetectChar context="StringDQEscape" char="\" lookAhead="1"/> <DetectChar context="StringDQDispatchVariables" char="$" lookAhead="1"/>@@ -985,6 +1017,8 @@ <!-- StringEsc eats till ', but escaping many characters --> <context attribute="String SingleQ" lineEndContext="#stay" name="StringEsc">+ <DetectSpaces attribute="String SingleQ"/>+ <DetectIdentifier attribute="String SingleQ"/> <DetectChar attribute="String SingleQ" context="#pop" char="'"/> <RegExpr attribute="String Escape" context="#stay" String="\\(?:[abefnrtv\\']|[0-7]{1,3}|x[A-Fa-f0-9]{1,2}|c.)"/> </context>@@ -1111,12 +1145,14 @@ <DetectChar attribute="Parameter Expansion" context="#pop" char="}"/> <IncludeRules context="FindWord"/> <IncludeRules context="FindPathThenPopInAlternateValue"/>+ <DetectIdentifier attribute="String DoubleQ"/> </context> <context attribute="String DoubleQ" lineEndContext="#stay" name="RecursiveAlternateValue"> <DetectChar attribute="String DoubleQ" context="RecursiveAlternateValue" char="{"/> <DetectChar attribute="String DoubleQ" context="#pop" char="}"/> <IncludeRules context="FindWord"/> <IncludeRules context="FindPathThenPopInAlternateValue"/>+ <DetectIdentifier attribute="String DoubleQ"/> </context> <!-- called as soon as ${xxx%, etc are encoutered -->@@ -1125,12 +1161,14 @@ <DetectChar attribute="Parameter Expansion" context="#pop" char="}"/> <IncludeRules context="FindWord"/> <IncludeRules context="FindStringDQPattern"/>+ <DetectIdentifier attribute="String DoubleQ"/> </context> <context attribute="String DoubleQ" lineEndContext="#stay" name="RecursiveAlternatePatternValue"> <DetectChar attribute="String DoubleQ" context="RecursiveAlternateValue" char="{"/> <DetectChar attribute="String DoubleQ" context="#pop" char="}"/> <IncludeRules context="FindWord"/> <IncludeRules context="FindStringDQPattern"/>+ <DetectIdentifier attribute="String DoubleQ"/> </context> <!-- called as soon as ${xxx/ ${xxx// ${xxx:/ are encoutered -->@@ -1144,12 +1182,12 @@ <DetectChar attribute="Parameter Expansion" context="#pop" char="}"/> <IncludeRules context="FindWord"/> <IncludeRules context="FindSubPattern"/>- <DetectIdentifier attribute="Pattern" context="#stay"/>+ <DetectIdentifier attribute="Pattern"/> </context> <!-- called as soon as ${( is encoutered --> <context attribute="Parameter Expansion" lineEndContext="#stay" name="VarFlags">- <AnyChar attribute="Parameter Expansion Operator" context="#stay" String="#q@AabcCDefFikLnoOPqQ+-tuUvVwWXz0~mSBEMNR"/>+ <AnyChar attribute="Parameter Expansion Operator" context="#stay" String="#%*q@AabcCDefFikLnoOPqQ+-tuUvVwWXz0~mSBEMNR"/> <AnyChar attribute="Parameter Expansion Operator" context="VarFlag_s" String="sjgZ_"/> <AnyChar attribute="Parameter Expansion Operator" context="VarFlag_l" String="lrI"/> <DetectChar attribute="Parameter Expansion Operator" context="#pop!VarFlagsSubs" char="p"/>@@ -1352,6 +1390,7 @@ <DetectChar context="BraceExpansionVariables" char="$" lookAhead="1"/> <IncludeRules context="FindStrings"/> <IncludeRules context="FindPattern"/>+ <DetectIdentifier attribute="Escape"/> </context> <context attribute="Escape" lineEndContext="#pop" name="EscapeMaybeBraceExpansion"> <IncludeRules context="DispatchBraceExpansion"/>@@ -1371,6 +1410,7 @@ <DetectChar context="PathMaybeBraceExpansion" char="{" lookAhead="1"/> <IncludeRules context="FindWord"/> <IncludeRules context="FindPattern"/>+ <DetectIdentifier attribute="Path"/> </context> <context attribute="Normal Text" lineEndContext="#pop" name="SequenceExpression">@@ -1444,7 +1484,7 @@ <!-- ExprDblParenSubst like ExprDblParen but matches )) as Variable --> <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblParenSubst"> <DetectSpaces attribute="Normal Text" context="#stay"/>- <Detect2Chars attribute="Variable" context="#pop" char=")" char1=")" endRegion="expression"/>+ <Detect2Chars attribute="Parameter Expansion" context="#pop" char=")" char1=")" endRegion="expression"/> <IncludeRules context="FindExprDblParen"/> <!-- $((cmd ) # jump to SubstCommand context -->@@ -1480,6 +1520,7 @@ <IncludeRules context="FindPathThenPop"/> <DetectChar context="ExprBracketValueMaybeBraceExpansion" char="{" lookAhead="1"/> <DetectChar context="NormalOptionMaybeGroupEnd" char="}" lookAhead="1"/>+ <DetectIdentifier attribute="Normal Text"/> </context> <context attribute="Normal Text" lineEndContext="#pop" name="ExprBracketValueRecBrace"> <AnyChar context="#pop#pop" String=" &tab;" lookAhead="1"/>@@ -1488,6 +1529,7 @@ <IncludeRules context="FindGlobAny"/> <DetectChar context="ExprBracketValueMaybeBraceExpansion" char="{" lookAhead="1"/> <DetectChar attribute="Normal Text" context="#pop" char="}"/>+ <DetectIdentifier attribute="Normal Text"/> </context> <context attribute="Normal Text" lineEndContext="#pop" name="ExprBracketValueMaybeBraceExpansion"> <IncludeRules context="DispatchBraceExpansion"/>@@ -1508,6 +1550,7 @@ <context attribute="Normal Text" lineEndContext="#stay" name="ExprBracketFinal" fallthroughContext="ExprBracketValue"> <DetectSpaces attribute="Normal Text" context="#stay"/> <IncludeRules context="FindExprBracketEnd"/>+ <RegExpr attribute="Expression" context="#pop!ExprBracket" String="-[ao]&eos;"/> <RegExpr attribute="Error" context="#pop" String="(?:[^] &tab;]++|\][^ &tab;])++" endRegion="expression"/> </context> @@ -1517,10 +1560,10 @@ </context> <context attribute="Normal Text" lineEndContext="#pop" name="TestMaybeUnary" fallthroughContext="#pop!ExprBracketValue">- <RegExpr attribute="Expression" context="#pop" String="-[abcdefghknoprstuvwxzLOGNS](?=[ &tab;]|$)"/>+ <RegExpr attribute="Expression" context="#pop#pop!ExprBracketParam2" String="&unary_operators;"/> </context> <context attribute="Normal Text" lineEndContext="#pop" name="TestMaybeBinary" fallthroughContext="#pop!ExprBracketValue">- <RegExpr attribute="Expression" context="#pop" String="(?:-(?:e[fq]|[nolg]t|[nlg]e)|==?|!=)(?=[ &tab;]|$)"/>+ <RegExpr attribute="Expression" context="#pop" String="&binary_operators;"/> </context> @@ -1528,11 +1571,13 @@ <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblBracket" fallthroughContext="#pop!ExprDblBracketNot"> <DetectSpaces attribute="Normal Text" context="#stay"/> <IncludeRules context="FindExprDblBracketEnd"/>+ <DetectChar attribute="Comment" context="Comment" char="#"/> </context> <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblBracketNot" fallthroughContext="#pop!ExprDblBracketParam1"> <DetectChar context="ExprDblBracketTestMaybeNot" char="!" lookAhead="1"/> <DetectSpaces attribute="Normal Text" context="#stay"/>+ <DetectChar attribute="Comment" context="Comment" char="#"/> </context> <context attribute="Normal Text" lineEndContext="#pop" name="ExprDblBracketTestMaybeNot" fallthroughContext="#pop#pop!ExprDblBracketParam1"> <RegExpr attribute="Expression" context="#pop" String="!(?=$|[ &tab;(])"/>@@ -1541,46 +1586,92 @@ <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblBracketParam1" fallthroughContext="#pop!ExprDblBracketParam1_2"> <DetectSpaces attribute="Normal Text" context="#stay"/> </context>- <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblBracketParam1_2" fallthroughContext="ExprDblBracketValue">+ <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblBracketParam1_2" fallthroughContext="ExprDblBracketValueText"> <DetectSpaces attribute="Normal Text" context="#pop!ExprDblBracketParam2"/> <DetectChar context="TestMaybeUnary2" char="-" lookAhead="1"/>- <AnyChar attribute="Expression" context="#pop!ExprDblBracketParam3Spe" String="<>"/> <DetectChar context="ExprDblBracketSubValue" char="(" lookAhead="1"/> <IncludeRules context="FindExprDblBracketEnd"/> </context>- <context attribute="Normal Text" lineEndContext="#pop" name="TestMaybeUnary2" fallthroughContext="#pop!ExprDblBracketValue">- <IncludeRules context="TestMaybeUnary"/>+ <context attribute="Normal Text" lineEndContext="#pop" name="TestMaybeUnary2" fallthroughContext="#pop!ExprDblBracketValueText">+ <RegExpr attribute="Expression" context="#pop!ExprDblBracketUnary" String="&unary_operators;(?!\s+(?:=~|&binary_operators;))"/> </context>+ <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblBracketUnary" fallthroughContext="#pop!ExprDblBracketValueText">+ <DetectSpaces attribute="Normal Text"/>+ <DetectChar attribute="Comment" context="Comment" char="#"/>+ </context> <context attribute="Normal Text" lineEndContext="#pop" name="ExprDblBracketSubValue" fallthroughContext="#pop"> <DetectChar attribute="Operator" context="ExprDblBracketNot" char="("/> <DetectChar attribute="Operator" context="#pop" char=")"/> </context> - <context attribute="Normal Text" lineEndContext="#pop" name="ExprDblBracketValue">+ <context attribute="Normal Text" lineEndContext="#pop" name="ExprDblBracketValueText" fallthroughContext="#pop!ExprDblBracketValueText2">+ <Detect2Chars context="#pop!ExprDblBracketValueTextMaybeEnd" char="]" char1="]" lookAhead="1"/>+ <IncludeRules context="FindExprDblBracketValueTextPath"/>+ </context>+ <context attribute="Normal Text" lineEndContext="#pop" name="FindExprDblBracketValueTextPath">+ <RegExpr context="#pop!ExprDblBracketValueTextPath" String="&path_with_sep;|" lookAhead="1"/>+ </context>+ <context attribute="Normal Text" lineEndContext="#pop" name="ExprDblBracketValueTextMaybeEnd">+ <RegExpr attribute="Keyword" context="#pop#pop" String="&dblbracket_close;" endRegion="expression"/>+ <IncludeRules context="FindExprDblBracketValueTextPath"/>+ <Detect2Chars context="#pop!ExprDblBracketValueText2" char="]" char1="]" lookAhead="1"/>+ </context>+ <context attribute="Normal Text" lineEndContext="#pop" name="ExprDblBracketValueText2">+ <DetectIdentifier/>+ <AnyChar String="*?+@~^:%+-/,"/> <Detect2Chars attribute="Control" context="#pop#pop!ExprDblBracket" char="&" char1="&"/> <Detect2Chars attribute="Control" context="#pop#pop!ExprDblBracket" char="|" char1="|"/>+ <AnyChar context="#pop" String=" &tab;)" lookAhead="1"/>+ <IncludeRules context="FindWord"/>+ <IncludeRules context="FindGroupPattern"/> <AnyChar attribute="Error" context="#stay" String="&;|"/>+ <DetectChar context="ExprDblBracketValueTextMaybeRange" char="<" lookAhead="1"/>+ <DetectChar attribute="Expression" context="#pop!ExprDblBracketValuePattern" char=">"/>+ </context>+ <context attribute="Path" lineEndContext="#pop" name="ExprDblBracketValueTextPath">+ <IncludeRules context="ExprDblBracketValueText2"/>+ </context>+ <context attribute="Normal Text" lineEndContext="#pop" name="ExprDblBracketValueTextMaybeRange">+ <RegExpr context="#pop" String="&globrange;"/>+ <DetectChar attribute="Expression" context="#pop#pop!ExprDblBracketValuePattern" char="<"/>+ </context>++ <context attribute="Normal Text" lineEndContext="#pop" name="ExprDblBracketValuePattern" fallthroughContext="#pop!ExprDblBracketValuePattern2">+ <RegExpr context="ExprDblBracketValuePatternPath" String="&path_with_sep;|" lookAhead="1"/>+ </context>+ <context attribute="Normal Text" lineEndContext="#pop" name="ExprDblBracketValuePatternPath" fallthroughContext="#pop!PathThenPop">+ <DetectChar attribute="Path" context="#pop!PathThenPop" char="~"/>+ </context>+ <context attribute="Normal Text" lineEndContext="#pop" name="ExprDblBracketValuePattern2">+ <DetectIdentifier attribute="Normal Text"/>+ <Detect2Chars attribute="Control" context="#pop#pop!ExprDblBracket" char="&" char1="&"/>+ <Detect2Chars attribute="Control" context="#pop#pop!ExprDblBracket" char="|" char1="|"/> <AnyChar context="#pop" String=" &tab;)" lookAhead="1"/> <IncludeRules context="FindWord"/> <IncludeRules context="FindSingleGlob"/> <IncludeRules context="FindGlobAny"/> <IncludeRules context="FindGroupPattern"/>- <DetectChar context="MaybeGlobRangeOrPop" char="<" lookAhead="1"/>- <DetectChar context="#pop" char=">" lookAhead="1"/>+ <DetectChar context="ExprDblBracketValueMaybeGlobRange" char="<" lookAhead="1"/>+ <AnyChar attribute="Error" context="#stay" String=">&|;"/> </context>+ <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblBracketValueMaybeGlobRange">+ <IncludeRules context="FindGlobRangeThenPop"/>+ <DetectChar attribute="Error" context="#pop" char="<"/>+ </context> <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblBracketParam2" fallthroughContext="#pop!ExprDblBracketParam2_2"> <DetectSpaces attribute="Normal Text" context="#stay"/>+ <DetectChar attribute="Comment" context="Comment" char="#"/> </context>- <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblBracketParam2_2" fallthroughContext="ExprDblBracketValue">+ <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblBracketParam2_2" fallthroughContext="ExprDblBracketValuePattern"> <DetectSpaces attribute="Normal Text" context="#pop!ExprDblBracketParam3"/> <AnyChar context="TestMaybeBinary2" String="-=!" lookAhead="1"/> <AnyChar attribute="Expression" context="#pop!ExprDblBracketParam3Spe" String="<>"/> <IncludeRules context="FindExprDblBracketEnd"/> </context>- <context attribute="Normal Text" lineEndContext="#pop" name="TestMaybeBinary2" fallthroughContext="#pop!ExprDblBracketValue">+ <context attribute="Normal Text" lineEndContext="#pop" name="TestMaybeBinary2" fallthroughContext="#pop!ExprDblBracketValuePattern"> <IncludeRules context="TestMaybeBinary"/>- <RegExpr attribute="Expression" context="#pop#pop!ExprDblBracketRegex" String="=~(?=[ &tab;(]|$)"/>+ <RegExpr attribute="Expression" context="#pop#pop!ExprDblBracketRegex" String="=~&eos;"/> </context> <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblBracketParam3Spe" fallthroughContext="#pop!ExprDblBracketParam3">@@ -1589,15 +1680,17 @@ <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblBracketParam3" fallthroughContext="#pop!ExprDblBracketParam3_2"> <DetectSpaces attribute="Normal Text" context="#stay"/>+ <DetectChar attribute="Comment" context="Comment" char="#"/> </context>- <context attribute="Normal Text" lineEndContext="#pop!ExprDblBracketFinal" name="ExprDblBracketParam3_2" fallthroughContext="ExprDblBracketValue">+ <context attribute="Normal Text" lineEndContext="#pop!ExprDblBracketFinal" name="ExprDblBracketParam3_2" fallthroughContext="ExprDblBracketValuePattern"> <DetectSpaces attribute="Normal Text" context="#pop!ExprDblBracketFinal"/> <IncludeRules context="FindExprDblBracketEnd"/> </context> - <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblBracketFinal" fallthroughContext="ExprDblBracketValue">+ <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblBracketFinal" fallthroughContext="ExprDblBracketValuePattern"> <DetectSpaces attribute="Normal Text" context="#stay"/> <IncludeRules context="FindExprDblBracketEnd"/>+ <DetectChar attribute="Comment" context="Comment" char="#"/> <RegExpr attribute="Error" context="#pop" String="(?:[^] &tab;]++|\](?:[^]]|\][^ &tab;]))++" endRegion="expression"/> </context> @@ -1606,13 +1699,15 @@ <DetectChar context="#pop" char=")" lookAhead="1"/> <Detect2Chars attribute="Control" context="#pop!ExprDblBracket" char="&" char1="&"/> <Detect2Chars attribute="Control" context="#pop!ExprDblBracket" char="|" char1="|"/>- <RegExpr attribute="Keyword" context="#pop" String="\]\](?=($|[ &tab;;|&)]))" endRegion="expression"/>+ <RegExpr attribute="Keyword" context="#pop" String="&dblbracket_close;" endRegion="expression"/> </context> <context attribute="Normal Text" lineEndContext="#stay" name="ExprDblBracketRegex" fallthroughContext="#pop!Regex"> <DetectSpaces attribute="Normal Text" context="#stay"/>+ <DetectChar attribute="Comment" context="Comment" char="#"/> </context> <context attribute="Pattern" lineEndContext="#stay" name="Regex">+ <DetectIdentifier attribute="Pattern"/> <DetectSpaces attribute="Normal Text" context="#pop!ExprDblBracketFinal"/> <DetectChar attribute="Operator" context="#pop" char=")"/> <Detect2Chars attribute="Operator" context="RegexChar" char="[" char1="^"/>@@ -1620,6 +1715,7 @@ <IncludeRules context="FindRegex"/> </context> <context attribute="Pattern" lineEndContext="#stay" name="ExprDblBracketSubRegex">+ <DetectIdentifier attribute="Pattern"/> <DetectSpaces attribute="Pattern" context="#stay"/> <DetectChar attribute="Operator" context="#pop" char=")"/> <Detect2Chars attribute="Operator" context="RegexSubChar" char="[" char1="^"/>@@ -1646,7 +1742,7 @@ </context> <context attribute="Normal Text" lineEndContext="#pop" name="RegexDup">- <AnyChar attribute="Number" context="#stay" String="0123456789"/>+ <Int attribute="Number"/> <DetectChar attribute="Parameter Expansion Operator" context="#stay" char=","/> <DetectChar attribute="Parameter Expansion" context="#pop" char="}"/> </context>@@ -1669,6 +1765,7 @@ <DetectChar context="RegexCharClassSelect" char="[" lookAhead="1"/> <DetectChar attribute="Operator" context="#pop" char="]"/> <AnyChar context="#pop" String="() &tab;" lookAhead="1"/>+ <IncludeRules context="FindStrings"/> </context> <context attribute="Operator" lineEndContext="#stay" name="RegexInCharEnd"> <DetectChar attribute="Pattern" context="#stay" char="-"/>@@ -1682,14 +1779,17 @@ </context> <context attribute="Parameter Expansion" lineEndContext="#pop#pop#pop" name="RegexCharClass">+ <DetectIdentifier attribute="Parameter Expansion"/> <Detect2Chars attribute="Parameter Expansion Operator" context="#pop" char=":" char1="]"/> <DetectChar attribute="Error" context="#pop" char="]"/> </context> <context attribute="Parameter Expansion" lineEndContext="#pop#pop#pop" name="RegexCollatingSymbols">+ <DetectIdentifier attribute="Parameter Expansion"/> <Detect2Chars attribute="Parameter Expansion Operator" context="#pop" char="." char1="]"/> <DetectChar attribute="Error" context="#pop" char="]"/> </context> <context attribute="Parameter Expansion" lineEndContext="#pop#pop#pop" name="RegexEquivalenceClass">+ <DetectIdentifier attribute="Parameter Expansion"/> <Detect2Chars attribute="Parameter Expansion Operator" context="#pop" char="=" char1="]"/> <DetectChar attribute="Error" context="#pop" char="]"/> </context>@@ -1734,6 +1834,7 @@ <AnyChar attribute="Number" context="#stay" String="0123456789-"/> </context> <context attribute="Normal Text" lineEndContext="#stay" name="Subscript2">+ <DetectIdentifier attribute="Normal Text"/> <DetectChar attribute="Parameter Expansion Operator" context="#pop#pop" char="]"/> <DetectChar attribute="Parameter Expansion Operator" context="#pop" char=","/> <IncludeRules context="FindGroupPattern"/>@@ -1762,11 +1863,13 @@ <IncludeRules context="FindWord"/> <DetectChar context="FunctionNameMaybeBraceExpansion" char="{" lookAhead="1"/> <DetectChar context="NormalOptionMaybeGroupEnd" char="}" lookAhead="1"/>+ <DetectIdentifier attribute="Function"/> </context> <context attribute="Function" lineEndContext="#pop" name="FunctionNameRecBrace" fallthroughContext="#pop"> <IncludeRules context="FindWord"/> <DetectChar context="FunctionNameMaybeBraceExpansion" char="{" lookAhead="1"/> <DetectChar attribute="Function" context="#pop" char="}"/>+ <DetectIdentifier attribute="Function"/> </context> <context attribute="Function" lineEndContext="#pop" name="FunctionNameStartMaybeBraceExpansion"> <IncludeRules context="DispatchBraceExpansion"/>@@ -1853,6 +1956,7 @@ <DetectChar attribute="Operator" context="#stay" char=","/> <DetectChar attribute="Parameter Expansion Operator" context="#pop!GlobModifier" char=":"/> <DetectChar attribute="Glob Flag" context="#pop" char=")"/>+ <IncludeRules context="FindWord"/> </context> <context attribute="Normal Text" lineEndContext="#pop" name="GlobQualifier_o" fallthroughContext="#pop">@@ -1979,17 +2083,20 @@ <IncludeRules context="FindWord"/> <IncludeRules context="FindSubPattern"/> <DetectChar attribute="Error" context="#pop#pop" char=")"/>+ <DetectIdentifier attribute="Pattern"/> </context> <context attribute="String DoubleQ" lineEndContext="#stay" name="GlobModifier_s_Rep"> <DetectChar attribute="Glob Flag" context="#pop#pop" char=")"/> <DetectChar attribute="Parameter Expansion Operator" context="#pop" char="/"/> <DetectChar attribute="String DoubleQ" context="GlobModifier_s_RecursiveRep" char="("/> <IncludeRules context="FindWord"/>+ <DetectIdentifier attribute="String DoubleQ"/> </context> <context attribute="String DoubleQ" lineEndContext="#stay" name="GlobModifier_s_RecursiveRep"> <DetectChar attribute="String DoubleQ" context="#pop" char=")"/> <DetectChar attribute="String DoubleQ" context="GlobModifier_s_RecursiveRep" char="("/> <IncludeRules context="FindWord"/>+ <DetectIdentifier attribute="String DoubleQ"/> </context> </contexts>@@ -1997,37 +2104,38 @@ <itemDatas> <itemData name="Normal Text" defStyleNum="dsNormal"/> <itemData name="Comment" defStyleNum="dsComment"/>- <itemData name="Keyword" defStyleNum="dsKeyword"/>- <itemData name="Control" defStyleNum="dsKeyword"/>- <itemData name="Control Flow" defStyleNum="dsControlFlow"/>- <itemData name="Builtin" defStyleNum="dsBuiltIn"/>- <itemData name="Command" defStyleNum="dsFunction"/>- <itemData name="OtherCommand" defStyleNum="dsExtension"/>- <itemData name="Redirection" defStyleNum="dsOperator"/>- <itemData name="Escape" defStyleNum="dsDataType"/>+ <itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false"/>+ <itemData name="Control" defStyleNum="dsKeyword" spellChecking="false"/>+ <itemData name="Control Flow" defStyleNum="dsControlFlow" spellChecking="false"/>+ <itemData name="Builtin" defStyleNum="dsBuiltIn" spellChecking="false"/>+ <itemData name="Command" defStyleNum="dsFunction" spellChecking="false"/>+ <itemData name="OtherCommand" defStyleNum="dsExtension" spellChecking="false"/>+ <itemData name="Redirection" defStyleNum="dsOperator" spellChecking="false"/>+ <itemData name="Escape" defStyleNum="dsDataType" spellChecking="false"/> <itemData name="String SingleQ" defStyleNum="dsString"/> <itemData name="String DoubleQ" defStyleNum="dsString"/> <itemData name="Here Doc" defStyleNum="dsString"/>- <itemData name="Backquote" defStyleNum="dsKeyword"/>+ <itemData name="Backquote" defStyleNum="dsKeyword" spellChecking="false"/> <itemData name="String Transl." defStyleNum="dsString"/> <itemData name="String Escape" defStyleNum="dsDataType"/>- <itemData name="Variable" defStyleNum="dsVariable"/>- <itemData name="Expression" defStyleNum="dsOthers"/>- <itemData name="Function" defStyleNum="dsFunction"/>- <itemData name="Pattern" defStyleNum="dsSpecialString"/>- <itemData name="Path" defStyleNum="dsNormal"/>- <itemData name="Glob" defStyleNum="dsPreprocessor"/>- <itemData name="Glob Flag" defStyleNum="dsOperator"/>- <itemData name="Option" defStyleNum="dsAttribute"/>- <itemData name="Hex" defStyleNum="dsBaseN"/>- <itemData name="Number" defStyleNum="dsDecVal"/>- <itemData name="Base" defStyleNum="dsDataType"/>- <itemData name="BaseN" defStyleNum="dsBaseN"/>- <itemData name="File Descriptor" defStyleNum="dsDecVal"/>- <itemData name="Parameter Expansion" defStyleNum="dsVariable"/>- <itemData name="Parameter Expansion Operator" defStyleNum="dsOperator"/>- <itemData name="Operator" defStyleNum="dsOperator"/>- <itemData name="Error" defStyleNum="dsError"/>+ <itemData name="Variable" defStyleNum="dsVariable" spellChecking="false"/>+ <itemData name="Dollar Prefix" defStyleNum="dsVariable" spellChecking="false"/>+ <itemData name="Expression" defStyleNum="dsOthers" spellChecking="false"/>+ <itemData name="Function" defStyleNum="dsFunction" spellChecking="false"/>+ <itemData name="Pattern" defStyleNum="dsSpecialString" spellChecking="false"/>+ <itemData name="Path" defStyleNum="dsNormal" spellChecking="false"/>+ <itemData name="Glob" defStyleNum="dsPreprocessor" spellChecking="false"/>+ <itemData name="Glob Flag" defStyleNum="dsOperator" spellChecking="false"/>+ <itemData name="Option" defStyleNum="dsAttribute" spellChecking="false"/>+ <itemData name="Hex" defStyleNum="dsBaseN" spellChecking="false"/>+ <itemData name="Number" defStyleNum="dsDecVal" spellChecking="false"/>+ <itemData name="Base" defStyleNum="dsDataType" spellChecking="false"/>+ <itemData name="BaseN" defStyleNum="dsBaseN" spellChecking="false"/>+ <itemData name="File Descriptor" defStyleNum="dsDecVal" spellChecking="false"/>+ <itemData name="Parameter Expansion" defStyleNum="dsVariable" spellChecking="false"/>+ <itemData name="Parameter Expansion Operator" defStyleNum="dsOperator" spellChecking="false"/>+ <itemData name="Operator" defStyleNum="dsOperator" spellChecking="false"/>+ <itemData name="Error" defStyleNum="dsError" spellChecking="false"/> </itemDatas> </highlighting> <general>