annotate runtime/syntax/opl.vim @ 5612:30e300c0b2c1 v7.4.153

updated for version 7.4.153 Problem: Compiler warning for pointer type. Solution: Add type cast.
author Bram Moolenaar <bram@vim.org>
date Tue, 14 Jan 2014 19:35:56 +0100
parents b7811ab264bf
children 43efa4f5a8ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: OPL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Czo <Olivier.Sirol@lip6.fr>
3312
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
4 " Last Change: 2012 Feb 03 by Thilo Six
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 7
diff changeset
5 " $Id: opl.vim,v 1.1 2004/06/13 17:34:11 vimboss Exp $
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " Open Psion Language... (EPOC16/EPOC32)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16
3312
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
17 let s:cpo_save = &cpo
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
18 set cpo&vim
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
19
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 " case is not significant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 " A bunch of useful OPL keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn keyword OPLStatement proc endp abs acos addr adjustalloc alert alloc app
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn keyword OPLStatement append appendsprite asc asin at atan back beep
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn keyword OPLStatement begintrans bookmark break busy byref cache
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn keyword OPLStatement cachehdr cacherec cachetidy call cancel caption
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn keyword OPLStatement changesprite chr$ clearflags close closesprite cls
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn keyword OPLStatement cmd$ committrans compact compress const continue
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn keyword OPLStatement copy cos count create createsprite cursor
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn keyword OPLStatement datetosecs datim$ day dayname$ days daystodate
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn keyword OPLStatement dbuttons dcheckbox dchoice ddate declare dedit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn keyword OPLStatement deditmulti defaultwin deg delete dfile dfloat
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn keyword OPLStatement dialog diaminit diampos dinit dir$ dlong do dow
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn keyword OPLStatement dposition drawsprite dtext dtime dxinput edit else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn keyword OPLStatement elseif enda endif endv endwh entersend entersend0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn keyword OPLStatement eof erase err err$ errx$ escape eval exist exp ext
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn keyword OPLStatement external find findfield findlib first fix$ flags
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn keyword OPLStatement flt font freealloc gat gborder gbox gbutton
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn keyword OPLStatement gcircle gclock gclose gcls gcolor gcopy gcreate
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn keyword OPLStatement gcreatebit gdrawobject gellipse gen$ get get$
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn keyword OPLStatement getcmd$ getdoc$ getevent getevent32 geteventa32
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn keyword OPLStatement geteventc getlibh gfill gfont ggmode ggrey gheight
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn keyword OPLStatement gidentity ginfo ginfo32 ginvert giprint glineby
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn keyword OPLStatement glineto gloadbit gloadfont global gmove gorder
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn keyword OPLStatement goriginx goriginy goto gotomark gpatt gpeekline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn keyword OPLStatement gpoly gprint gprintb gprintclip grank gsavebit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn keyword OPLStatement gscroll gsetpenwidth gsetwin gstyle gtmode gtwidth
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn keyword OPLStatement gunloadfont gupdate guse gvisible gwidth gx
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn keyword OPLStatement gxborder gxprint gy hex$ hour iabs icon if include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn keyword OPLStatement input insert int intf intrans key key$ keya keyc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn keyword OPLStatement killmark kmod last lclose left$ len lenalloc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn keyword OPLStatement linklib ln loadlib loadm loc local lock log lopen
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn keyword OPLStatement lower$ lprint max mcard mcasc mean menu mid$ min
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn keyword OPLStatement minit minute mkdir modify month month$ mpopup
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn keyword OPLStatement newobj newobjh next notes num$ odbinfo off onerr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn keyword OPLStatement open openr opx os parse$ path pause peek pi
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn keyword OPLStatement pointerfilter poke pos position possprite print
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn keyword OPLStatement put rad raise randomize realloc recsize rename
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn keyword OPLStatement rept$ return right$ rmdir rnd rollback sci$ screen
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn keyword OPLStatement screeninfo second secstodate send setdoc setflags
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn keyword OPLStatement setname setpath sin space sqr statuswin
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn keyword OPLStatement statwininfo std stop style sum tan testevent trap
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn keyword OPLStatement type uadd unloadlib unloadm until update upper$
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn keyword OPLStatement use usr usr$ usub val var vector week while year
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 " syn keyword OPLStatement rem
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn match OPLNumber "\<\d\+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn match OPLNumber "\<\d\+\.\d*\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn match OPLNumber "\.\d\+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn region OPLString start=+"+ end=+"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn region OPLComment start="REM[\t ]" end="$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 syn match OPLMathsOperator "-\|=\|[:<>+\*^/\\]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 if version >= 508 || !exists("did_OPL_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 let did_OPL_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 HiLink OPLStatement Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 HiLink OPLNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 HiLink OPLString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 HiLink OPLComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 HiLink OPLMathsOperator Conditional
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 " HiLink OPLError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 let b:current_syntax = "opl"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99
3312
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
100 let &cpo = s:cpo_save
b7811ab264bf updated for version 7.3.423
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
101 unlet s:cpo_save
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 " vim: ts=8