HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/share/highlight/langDefs/lisp.lang
Description="Lisp"

Identifiers=[[ [a-zA-Z_][\w\-]* ]]

Keywords={
  { Id=1,
    Regex=[[\(([\w\-\_]+)]],
  },
      { Id=2,
    Regex=[[ def(un|method)\s+([\w\-]+)]], Group=2
  },
}

Strings={
  Delimiter=[[ "|\[\w+\]|\[/\w+\] ]],
}

Comments={
  { Block=false,
    Delimiter= { [[;]] },
  },
  { Block=true,
    Nested=false,
    Delimiter= { [[\;\|]],[[\|\;]],}
  }
}

Operators=[[\(|\)|\[|\]|\{|\}|\,|\:|\&|<|>|\!|\+|\=|\/|\*|\'|\@|\#|\`]]

-- fix recognition of $
function OnStateChange(oldState, newState, token)
  
   --recognize hereDoc multine strings
   if oldState==HL_STANDARD and newState==HL_STRING then
      exitDelim = string.match(token, "%[(%a+)%]")
      if exitDelim then exitDelim = "[/"..exitDelim.."]" end
   end
   if oldState==HL_STRING and token==exitDelim  then
      exitDelim=nil
      return HL_STRING_END
   end

   return newState
end