neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

jess.vim (6230B)


      1 " Vim syntax file
      2 " Language:	Jess
      3 " Maintainer:	Paul Baleme <pbaleme@mail.com>
      4 " Last change:	September 14, 2000
      5 " Based on lisp.vim by : Dr. Charles E. Campbell, Jr.
      6 
      7 " quit when a syntax file was already loaded
      8 if exists("b:current_syntax")
      9  finish
     10 endif
     11 
     12 setlocal iskeyword=42,43,45,47-58,60-62,64-90,97-122,_
     13 
     14 " Lists
     15 syn match	jessSymbol	![^()'`,"; \t]\+!	contained
     16 syn match	jessBarSymbol	!|..\{-}|!		contained
     17 syn region	jessList matchgroup=Delimiter start="(" skip="|.\{-}|" matchgroup=Delimiter end=")" contains=jessAtom,jessBQList,jessConcat,jessDeclaration,jessList,jessNumber,jessSymbol,jessSpecial,jessFunc,jessKey,jessAtomMark,jessString,jessComment,jessBarSymbol,jessAtomBarSymbol,jessVar
     18 syn region	jessBQList	matchgroup=PreProc   start="`("	skip="|.\{-}|" matchgroup=PreProc   end=")" contains=jessAtom,jessBQList,jessConcat,jessDeclaration,jessList,jessNumber,jessSpecial,jessSymbol,jessFunc,jessKey,jessVar,jessAtomMark,jessString,jessComment,jessBarSymbol,jessAtomBarSymbol
     19 
     20 " Atoms
     21 syn match	jessAtomMark	"'"
     22 syn match	jessAtom	"'("me=e-1	contains=jessAtomMark	nextgroup=jessAtomList
     23 syn match	jessAtom	"'[^ \t()]\+"	contains=jessAtomMark
     24 syn match	jessAtomBarSymbol	!'|..\{-}|!	contains=jessAtomMark
     25 syn region	jessAtom	start=+'"+	skip=+\\"+ end=+"+
     26 syn region	jessAtomList	matchgroup=Special start="("	skip="|.\{-}|" matchgroup=Special end=")"	contained contains=jessAtomList,jessAtomNmbr0,jessString,jessComment,jessAtomBarSymbol
     27 syn match	jessAtomNmbr	"\<[0-9]\+"			contained
     28 
     29 " Standard jess Functions and Macros
     30 syn keyword jessFunc    *   +   **	-   /   <   >   <=  >=  <>  =
     31 syn keyword jessFunc    long	    longp
     32 syn keyword jessFunc    abs	    agenda	      and
     33 syn keyword jessFunc    assert	    assert-string       bag
     34 syn keyword jessFunc    batch	    bind	      bit-and
     35 syn keyword jessFunc    bit-not	    bit-or	      bload
     36 syn keyword jessFunc    bsave	    build	      call
     37 syn keyword jessFunc    clear	    clear-storage       close
     38 syn keyword jessFunc    complement$     context	      count-query-results
     39 syn keyword jessFunc    create$
     40 syn keyword jessFunc    delete$	    div
     41 syn keyword jessFunc    do-backward-chaining	      e
     42 syn keyword jessFunc    engine	    eq	      eq*
     43 syn keyword jessFunc    eval	    evenp	      exit
     44 syn keyword jessFunc    exp	    explode$	      external-addressp
     45 syn keyword jessFunc    fact-slot-value facts	      fetch
     46 syn keyword jessFunc    first$	    float	      floatp
     47 syn keyword jessFunc    foreach	    format	      gensym*
     48 syn keyword jessFunc    get	    get-fact-duplication
     49 syn keyword jessFunc    get-member	    get-multithreaded-io
     50 syn keyword jessFunc    get-reset-globals	      get-salience-evaluation
     51 syn keyword jessFunc    halt	    if	      implode$
     52 syn keyword jessFunc    import	    insert$	      integer
     53 syn keyword jessFunc    integerp	    intersection$       jess-version-number
     54 syn keyword jessFunc    jess-version-string	      length$
     55 syn keyword jessFunc    lexemep	    list-function$      load-facts
     56 syn keyword jessFunc    load-function   load-package	      log
     57 syn keyword jessFunc    log10	    lowcase	      matches
     58 syn keyword jessFunc    max	    member$	      min
     59 syn keyword jessFunc    mod	    modify	      multifieldp
     60 syn keyword jessFunc    neq	    new	      not
     61 syn keyword jessFunc    nth$	    numberp	      oddp
     62 syn keyword jessFunc    open	    or	      pi
     63 syn keyword jessFunc    ppdeffunction   ppdefglobal	      ddpefrule
     64 syn keyword jessFunc    printout	    random	      read
     65 syn keyword jessFunc    readline	    replace$	      reset
     66 syn keyword jessFunc    rest$	    retract	      retract-string
     67 syn keyword jessFunc    return	    round	      rules
     68 syn keyword jessFunc    run	    run-query	      run-until-halt
     69 syn keyword jessFunc    save-facts	    set	      set-fact-duplication
     70 syn keyword jessFunc    set-factory     set-member	      set-multithreaded-io
     71 syn keyword jessFunc    set-node-index-hash	      set-reset-globals
     72 syn keyword jessFunc    set-salience-evaluation	      set-strategy
     73 syn keyword jessFunc    setgen	    show-deffacts       show-deftemplates
     74 syn keyword jessFunc    show-jess-listeners	      socket
     75 syn keyword jessFunc    sqrt	    store	      str-cat
     76 syn keyword jessFunc    str-compare     str-index	      str-length
     77 syn keyword jessFunc    stringp	    sub-string	      subseq$
     78 syn keyword jessFunc    subsetp	    sym-cat	      symbolp
     79 syn keyword jessFunc    system	    throw	      time
     80 syn keyword jessFunc    try	    undefadvice	      undefinstance
     81 syn keyword jessFunc    undefrule	    union$	      unwatch
     82 syn keyword jessFunc    upcase	    view	      watch
     83 syn keyword jessFunc    while
     84 syn match   jessFunc	"\<c[ad]\+r\>"
     85 
     86 " jess Keywords (modifiers)
     87 syn keyword jessKey	    defglobal	  deffunction	    defrule
     88 syn keyword jessKey	    deffacts
     89 syn keyword jessKey	    defadvice	  defclass	    definstance
     90 
     91 " Standard jess Variables
     92 syn region	jessVar	start="?"	end="[^a-zA-Z0-9]"me=e-1
     93 
     94 " Strings
     95 syn region	jessString	start=+"+	skip=+\\"+ end=+"+
     96 
     97 " Shared with Declarations, Macros, Functions
     98 "syn keyword	jessDeclaration
     99 
    100 syn match	jessNumber	"[0-9]\+"
    101 
    102 syn match	jessSpecial	"\*[a-zA-Z_][a-zA-Z_0-9-]*\*"
    103 syn match	jessSpecial	!#|[^()'`,"; \t]\+|#!
    104 syn match	jessSpecial	!#x[0-9a-fA-F]\+!
    105 syn match	jessSpecial	!#o[0-7]\+!
    106 syn match	jessSpecial	!#b[01]\+!
    107 syn match	jessSpecial	!#\\[ -\~]!
    108 syn match	jessSpecial	!#[':][^()'`,"; \t]\+!
    109 syn match	jessSpecial	!#([^()'`,"; \t]\+)!
    110 
    111 syn match	jessConcat	"\s\.\s"
    112 syntax match	jessParenError	")"
    113 
    114 " Comments
    115 syn match	jessComment	";.*$"
    116 
    117 " synchronization
    118 syn sync lines=100
    119 
    120 " Define the default highlighting.
    121 " Only when an item doesn't have highlighting yet
    122 
    123 hi def link jessAtomNmbr	jessNumber
    124 hi def link jessAtomMark	jessMark
    125 
    126 hi def link jessAtom		Identifier
    127 hi def link jessAtomBarSymbol	Special
    128 hi def link jessBarSymbol	Special
    129 hi def link jessComment	Comment
    130 hi def link jessConcat	Statement
    131 hi def link jessDeclaration	Statement
    132 hi def link jessFunc		Statement
    133 hi def link jessKey		Type
    134 hi def link jessMark		Delimiter
    135 hi def link jessNumber	Number
    136 hi def link jessParenError	Error
    137 hi def link jessSpecial	Type
    138 hi def link jessString	String
    139 hi def link jessVar		Identifier
    140 
    141 
    142 let b:current_syntax = "jess"
    143 
    144 " vim: ts=18