"Fossies" - the Fresh Open Source Software Archive

Member "highlight-3.57-x64/langDefs/tcl.lang" (12 May 2020, 2860 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 "tcl.lang": 3.53_vs_3.54.

    1 
    2 Description="Tcl/Tk"
    3 
    4 Categories = {"script"}
    5 
    6 Identifiers=[[ [a-zA-Z_][\w\-]* ]]
    7 
    8 Keywords={
    9   { Id=1,
   10     List={"Safe", "Base", "encoding", "if", "pid", "switch",  "Tcl", "eof",
   11         "incr", "tcl_endOfWord",  "after", "error", "info",
   12         "pkg_mkIndex", "tcl_findLibrary",  "append", "eval", "interp", "proc",
   13         "tcl_startOfNextWord",  "array", "exec", "join", "puts",
   14         "tcl_startOfPreviousWord",  "auto_execok", "exit", "lappend", "pwd",
   15         "tcl_wordBreakAfter",  "auto_import", "expr", "lindex", "re_syntax",
   16         "tcl_wordBreakBefore",  "auto_load", "fblocked", "linsert", "read", "tcltest",
   17         "auto_mkindex", "fconfigure", "list", "regexp", "tclvars",  "auto_mkindex_old",
   18         "fcopy", "llength", "registry", "tell",  "auto_qualify", "file", "load",
   19         "regsub", "time",  "auto_reset", "fileevent", "lrange", "rename", "trace",
   20         "bgerror", "filename", "lreplace", "resource", "unknown", "binary", "flush",
   21         "lsearch", "return", "unset",  "break", "for", "lset", "scan", "update",
   22         "catch", "foreach", "lsort", "seek", "uplevel",  "cd", "format", "memory",
   23         "set", "upvar",  "clock", "gets", "msgcat", "socket", "variable",  "close",
   24         "glob", "namespace", "source", "vwait",  "concat", "global", "open", "split",
   25         "while",  "continue", "history", "package", "string",  "dde", "http", "parray",
   26         "subst",   "bell", "entry", "loadTk", "raise", "tk_focusFollowsMouse",
   27         "tk_textPaste",  "bind", "event", "lower", "scale", "tk_focusNext", "tkerror",
   28         "bindtags", "focus", "menu", "scrollbar", "tk_focusPrev", "tkvars",  "bitmap",
   29         "font", "menubutton", "selection", "tk_getOpenFile", "tkwait",  "button",
   30         "frame", "message", "send", "tk_getSaveFile", "toplevel",  "canvas", "grab",
   31         "option", "spinbox", "tk_menuSetFocus", "winfo",  "checkbutton", "grid",
   32         "options", "text", "tk_messageBox", "wm",  "clipboard", "image", "pack", "tk",
   33         "tk_optionMenu",  "colors", "keysyms", "panedwindow", "tk_bisque", "tk_popup",
   34         "console", "label", "photo", "tk_chooseColor", "tk_setPalette",  "cursors",
   35         "labelframe", "place", "tk_chooseDirectory", "tk_textCopy",  "destroy",
   36         "listbox", "radiobutton", "tk_dialog", "tk_textCut", "default", "else",
   37         "challenge", "success", "failure"},
   38   },
   39   { Id=2,
   40     Regex=[[\$\w*]],
   41   },
   42   { Id=3,
   43     Regex=[[\W(-\w+)]],
   44   },
   45   { Id=4,
   46     Regex=[[::(\w+)]],
   47   },
   48 }
   49 
   50 Strings={
   51   Delimiter=[["]]
   52 }
   53 
   54 IgnoreCase=false
   55 
   56 Comments={
   57   { Block=false,
   58     Delimiter= { [[#]] },
   59   },
   60 }
   61 
   62 Operators=[[\(|\)|\[|\]|\{|\}|\,|\;|\:|\&|<|>|\!|\=|\/|\*|\%|\+|\-|\\|\@]]
   63 
   64 -- fix recognition of $
   65 function OnStateChange(oldState, newState, token)
   66 
   67   if  (string.sub(token,1,1) =="$") and oldState==HL_STRING and newState==HL_KEYWORD then
   68     return HL_INTERPOLATION
   69   end
   70 
   71 end