"Fossies" - the Fresh Open Source Software Archive

Member "highlight-3.57-x64/langDefs/lisp.lang" (12 May 2020, 929 Bytes) of package /windows/www/highlight-3.57-x64.zip:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "lisp.lang": 3.56_vs_3.57.

    1 
    2 Description="Lisp"
    3 
    4 Categories = {"source"}
    5 
    6 Identifiers=[[ [a-zA-Z_][\w\-]* ]]
    7 
    8 Keywords={
    9   { Id=1,
   10     Regex=[[\(([\w\-\_]+)]],
   11   },
   12   { Id=2,
   13     Regex=[[ def(un|method)\s+([\w\-]+)]], Group=2
   14   },
   15   { Id=3,
   16     Regex=[[ \[.+?\]|\[/\w+\] ]],
   17   },
   18 }
   19 
   20 Strings={
   21   Delimiter=[[ " ]],
   22   Escape=[=[\\[\w]]=],
   23 }
   24 
   25 Comments={
   26   { Block=false,
   27     Delimiter= { [[;]] },
   28   },
   29   { Block=true,
   30     Nested=false,
   31     Delimiter= { [[\;\|]],[[\|\;]],}
   32   }
   33 }
   34 
   35 Operators=[[\(|\)|\[|\]|\{|\}|\,|\:|\&|<|>|\!|\+|\=|\/|\*|\'|\@|\#|\`]]
   36 
   37 -- fix recognition of $
   38 function OnStateChange(oldState, newState, token)
   39 
   40   --recognize hereDoc multine strings
   41   if oldState==HL_STANDARD and newState==HL_STRING then
   42     exitDelim = string.match(token, "%[(%a+)%]")
   43     if exitDelim then exitDelim = "[/"..exitDelim.."]" end
   44   end
   45   if oldState==HL_STRING and token==exitDelim  then
   46     exitDelim=nil
   47     return HL_STRING_END
   48   end
   49 
   50   return newState
   51 end