You are on page 1of 3

"

"
"
"

Vim syntax file for the Motoman INFORM III robot programming language.
Language:
INFORM III
Maintainer: Matthijs Kool <matthijzkNOSPAMPLZgmailKTHXBAIcom>
Last Change: 2012 Feb 13

" For version 5.x: Clear all syntax items


" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
syn case match
" I/O instructions
syn keyword
jbiFunction DOUT DIN WAIT PULSE AOUT ARATION ARATIOF ANTOUT
" Control instructions
syn keyword
jbiStatement JUMP CALL TIMER RET NOP PAUSE CWAIT NWAIT ENWAIT
\
MSG ADVINIT ADVSTOP END PSTART PWAIT NSRCH
" Operating instructions
syn keyword
jbiFunction CLEAR INC DEC SET ADD SUB MUL DIV CNVRT AND OR NOT
\
XOR MFRAME SETE GETE GETS SQRT SIN COS ATAN MULMAT
\
INVMAT SETFILE GETFILE SETREG GETREG
" Move instructions
syn keyword
jbiFunction MOVJ MOVL MOVC MOVS IMOV SPEED REFP
" Shift instructions
syn keyword
jbiFunction SFTON SFTOF MSHIFT
" Arc welding instructions
syn keyword
jbiFunction ARCON ARCOF VWELD AWELD ARCSET WVON WVOF ARCCTS
\
ARCCTE
syn keyword

jbiFunction RETRY REPLAY ANTSTK

" Handling instructions


syn keyword
jbiFunction HAND HSEN
" Spot welding instructions
syn keyword
jbiFunction GUNCL SPOT STROKE STRWAIT
" General purpose instructions
syn keyword
jbiFunction TOOLON TOOLOF
" Other
syn keyword

jbiFunction GETARG SETUALM DIALOG GETTOOL SETTOOL

" Boolean keywords


syn keyword
jbiBoolean ON OFF HIGH LOW
" Conditional statements
syn keyword
jbiConditional IF ELSE SWITCH ENDSWITCH IFTHEN ENDIF ANDIF
\
ORIF ELSEIF ENDWAIT
" Repeat statements
syn keyword
jbiRepeat UNTIL WHILE ENDWHILE

" Label statements


syn keyword
jbiLabel CASE DEFAULT LABEL QUE
" Operators
syn keyword

jbiOperator EXPRESS

syn keyword

jbiFunction MID VAL

" Function parameters


syn keyword
jbiType
\
\
\

ACC ALL AMP ANGL ANT AN3 AN4 ATT AV AVP BF BP BV CR


DEC DIS ENTRY EX FREQ LBP LEX MODE MT MTE MTF OFV PL
PX RBn RF SMODE SPDL SRCH STn T TF UNITn V VE VJ VR
WELDn WTM

" Inform types


syn match
syn match
syn match
syn match
syn match
syn match
syn match
syn match
syn match
syn match

jbiType
jbiType
jbiType
jbiType
jbiType
jbiType
jbiType
jbiType
jbiType
jbiType

/B\d\d\d\|B\[/hs=s,he=s+1
/LB\d\d\d\|LB\[/hs=s,he=s+2
/I\d\d\d\|I\[/hs=s,he=s+1
/LI\d\d\d\|LI\[/hs=s,he=s+2
/D\d\d\d\|D\[/hs=s,he=s+1
/LD\d\d\d\|LD\[/hs=s,he=s+2
/R\d\d\d\|R\[/hs=s,he=s+1
/LR\d\d\d\|LR\[/hs=s,he=s+2
/S\d\d\d\|S\[/hs=s,he=s+1
/LS\d\d\d\|LS\[/hs=s,he=s+2

syn
syn
syn
syn

jbiType
jbiType
jbiType
jbiType

/P\d\d\d\|P\[/hs=s,he=s+1
/PX\d\d\d\|PX\[/hs=s,he=s+2
/LP\d\d\d\|LP\[/hs=s,he=s+2
/LPX\d\d\d\|LPX\[/hs=s,he=s+3

match
match
match
match

" Special keywords


syn match
jbiSpecial
syn match
jbiSpecial
syn match
jbiSpecial
syn match
jbiSpecial
syn match
jbiSpecial
syn match
jbiSpecial
syn match
jbiSpecial
syn match
jbiSpecial
syn match
jbiSpecial
syn match
jbiSpecial
syn match
jbiSpecial
syn match
jbiSpecial
syn match
jbiSpecial
syn match
jbiSpecial
syn match
jbiSpecial
syn match
jbiSpecial
syn match
jbiSpecial
syn match
jbiSpecial
syn match
jbiSpecial
syn match
jbiSpecial
syn match
jbiSpecial
syn match
jbiSpecial
syn match
jbiSpecial
syn match
jbiSpecial
syn match
jbiSpecial
syn match
jbiSpecial
syn match
jbiSpecial

"AEF#"
"AG#"
"AO#"
"ARGF"
"ASF#"
"AT#"
"FOREVER"
"GUN#"
"IARG#"
"IN#"
"IGH#"
"IG#"
"JET#"
/JOB:/hs=s,he=e-1
"LONG"
"MREG#"
"OT#"
"OGH#"
"OH#"
"RIN#"
"SHORT"
"SIN#"
"SOUT#"
"TL#"
"UF#"
"WEV#"
"$RV"

" Specify comment region


syn region
jbiComment start=+'+ end=+$+ contains=jbiTodo
" Specify string region
syn region
jbiString start=+"+ end=+"+ end=+$+
" Specify job header region
syn region
jbiHeader start=+/+ end=+$+ contains=jbiNumbers
syn match

jbiNumbers "[0-9]"

syn keyword

jbiTodo contained TODO FIXME

" Define the default highlighting.


" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_basic_syn_inits")
if version < 508
let did_basic_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink
HiLink
HiLink
HiLink

jbiComment
jbiString
jbiNumbers
jbiBoolean

Comment
String
Number
Boolean

HiLink jbiFunction

Function

HiLink
HiLink
HiLink
HiLink
HiLink

Statement
Conditional
Repeat
Label
Operator

jbiStatement
jbiConditional
jbiRepeat
jbiLabel
jbiOperator

HiLink jbiHeader

PreProc

HiLink jbiType

Type

HiLink jbiSpecial

Special

HiLink jbiTodo

Todo

delcommand HiLink
endif
let b:current_syntax = "jbi"
" vim: ts=8

You might also like