neovim

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

plm.vim (5361B)


      1 " Vim syntax file
      2 " Language:	PL/M
      3 " Maintainer:	Philippe Coulonges <cphil@cphil.net>
      4 " Last change:	2003 May 11
      5 
      6 " quit when a syntax file was already loaded
      7 if exists("b:current_syntax")
      8  finish
      9 endif
     10 
     11 " PL/M is a case insensitive language
     12 syn case ignore
     13 
     14 syn keyword plmTodo contained	TODO FIXME XXX
     15 
     16 " String
     17 syn region  plmString		start=+'+  end=+'+
     18 
     19 syn match   plmOperator		"[@=\+\-\*\/\<\>]"
     20 
     21 syn match   plmIdentifier	"\<[a-zA-Z_][a-zA-Z0-9_]*\>"
     22 
     23 syn match   plmDelimiter	"[();,]"
     24 
     25 syn region  plmPreProc		start="^\s*\$\s*" skip="\\$" end="$"
     26 
     27 " FIXME : No Number support for floats, as I'm working on an embedded
     28 " project that doesn't use any.
     29 syn match   plmNumber		"-\=\<\d\+\>"
     30 syn match   plmNumber		"\<[0-9a-fA-F]*[hH]*\>"
     31 
     32 " If you don't like tabs
     33 "syn match plmShowTab "\t"
     34 "syn match plmShowTabc "\t"
     35 
     36 "when wanted, highlight trailing white space
     37 if exists("c_space_errors")
     38  syn match	plmSpaceError	"\s*$"
     39  syn match	plmSpaceError	" \+\t"me=e-1
     40 endif
     41 
     42 "
     43  " Use the same control variable as C language for I believe
     44  " users will want the same behavior
     45 if exists("c_comment_strings")
     46  " FIXME : don't work fine with c_comment_strings set,
     47  "	    which I don't care as I don't use
     48 
     49  " A comment can contain plmString, plmCharacter and plmNumber.
     50  " But a "*/" inside a plmString in a plmComment DOES end the comment!  So we
     51  " need to use a special type of plmString: plmCommentString, which also ends on
     52  " "*/", and sees a "*" at the start of the line as comment again.
     53  syntax match	plmCommentSkip	contained "^\s*\*\($\|\s\+\)"
     54  syntax region plmCommentString	contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=plmSpecial,plmCommentSkip
     55  syntax region plmComment2String	contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=plmSpecial
     56  syntax region plmComment	start="/\*" end="\*/" contains=plmTodo,plmCommentString,plmCharacter,plmNumber,plmFloat,plmSpaceError
     57  syntax match  plmComment	"//.*" contains=plmTodo,plmComment2String,plmCharacter,plmNumber,plmSpaceError
     58 else
     59  syn region	plmComment	start="/\*" end="\*/" contains=plmTodo,plmSpaceError
     60  syn match	plmComment	"//.*" contains=plmTodo,plmSpaceError
     61 endif
     62 
     63 syntax match	plmCommentError	"\*/"
     64 
     65 syn keyword plmReserved	ADDRESS AND AT BASED BY BYTE CALL CASE
     66 syn keyword plmReserved DATA DECLARE DISABLE DO DWORD
     67 syn keyword plmReserved	ELSE ENABLE END EOF EXTERNAL
     68 syn keyword plmReserved GO GOTO HALT IF INITIAL INTEGER INTERRUPT
     69 syn keyword plmReserved LABEL LITERALLY MINUS MOD NOT OR
     70 syn keyword plmReserved PLUS POINTER PROCEDURE PUBLIC
     71 syn keyword plmReserved REAL REENTRANT RETURN SELECTOR STRUCTURE
     72 syn keyword plmReserved THEN TO WHILE WORD XOR
     73 syn keyword plm386Reserved CHARINT HWORD LONGINT OFFSET QWORD SHORTINT
     74 
     75 syn keyword plmBuiltIn ABS ADJUSTRPL BLOCKINPUT BLOCKINWORD BLOCKOUTPUT
     76 syn keyword plmBuiltIn BLOCKOUTWORD BUILPTR CARRY CAUSEINTERRUPT CMPB
     77 syn keyword plmBuiltIn CMPW DEC DOUBLE FINDB FINDRB FINDRW FINDW FIX
     78 syn keyword plmBuiltIn FLAGS FLOAT GETREALERROR HIGH IABS INITREALMATHUNIT
     79 syn keyword plmBuiltIn INPUT INT INWORD LAST LOCKSET LENGTH LOW MOVB MOVE
     80 syn keyword plmBuiltIn MOVRB MOVRW MOVW NIL OUTPUT OUTWORD RESTOREREALSTATUS
     81 syn keyword plmBuiltIn ROL ROR SAL SAVEREALSTATUS SCL SCR SELECTOROF SETB
     82 syn keyword plmBuiltIn SETREALMODE SETW SHL SHR SIGN SIGNED SIZE SKIPB
     83 syn keyword plmBuiltIn SKIPRB SKIPRW SKIPW STACKBASE STACKPTR TIME SIZE
     84 syn keyword plmBuiltIn UNSIGN XLAT ZERO
     85 syn keyword plm386BuiltIn INTERRUPT SETINTERRUPT
     86 syn keyword plm286BuiltIn CLEARTASKSWITCHEDFLAG GETACCESSRIGHTS
     87 syn keyword plm286BuiltIn GETSEGMENTLIMIT LOCALTABLE MACHINESTATUS
     88 syn keyword plm286BuiltIn OFFSETOF PARITY RESTOREGLOBALTABLE
     89 syn keyword plm286BuiltIn RESTOREINTERRUPTTABLE SAVEGLOBALTABLE
     90 syn keyword plm286BuiltIn SAVEINTERRUPTTABLE SEGMENTREADABLE
     91 syn keyword plm286BuiltIn SEGMENTWRITABLE TASKREGISTER WAITFORINTERRUPT
     92 syn keyword plm386BuiltIn CONTROLREGISTER DEBUGREGISTER FINDHW
     93 syn keyword plm386BuiltIn FINDRHW INHWORD MOVBIT MOVRBIT MOVHW MOVRHW
     94 syn keyword plm386BuiltIn OUTHWORD SCANBIT SCANRBIT SETHW SHLD SHRD
     95 syn keyword plm386BuiltIn SKIPHW SKIPRHW TESTREGISTER
     96 syn keyword plm386w16BuiltIn BLOCKINDWORD BLOCKOUTDWORD CMPD FINDD
     97 syn keyword plm386w16BuiltIn FINDRD INDWORD MOVD MOVRD OUTDWORD
     98 syn keyword plm386w16BuiltIn SETD SKIPD SKIPRD
     99 
    100 syn sync lines=50
    101 
    102 " Define the default highlighting.
    103 " Only when an item doesn't have highlighting yet
    104 
    105 " The default methods for highlighting.  Can be overridden later
    106 "  hi def link plmLabel			Label
    107 "  hi def link plmConditional		Conditional
    108 "  hi def link plmRepeat			Repeat
    109 hi def link plmTodo			Todo
    110 hi def link plmNumber			Number
    111 hi def link plmOperator			Operator
    112 hi def link plmDelimiter			Operator
    113 "hi def link plmShowTab			Error
    114 "hi def link plmShowTabc			Error
    115 hi def link plmIdentifier			Identifier
    116 hi def link plmBuiltIn			Statement
    117 hi def link plm286BuiltIn			Statement
    118 hi def link plm386BuiltIn			Statement
    119 hi def link plm386w16BuiltIn		Statement
    120 hi def link plmReserved			Statement
    121 hi def link plm386Reserved			Statement
    122 hi def link plmPreProc			PreProc
    123 hi def link plmCommentError		plmError
    124 hi def link plmCommentString		plmString
    125 hi def link plmComment2String		plmString
    126 hi def link plmCommentSkip			plmComment
    127 hi def link plmString			String
    128 hi def link plmComment			Comment
    129 
    130 
    131 let b:current_syntax = "plm"
    132 
    133 " vim: ts=8 sw=2