Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1 | " Vim syntax file |
| 2 | " Language: Lifelines (v 3.0.7) http://lifelines.sourceforge.net |
| 3 | " Maintainer: Patrick Texier <p.texier@orsennes.com> |
| 4 | " Location: ftp://216.71.72.236/lifelines.vim |
| 5 | " Last Change: 2002 Mar 03 |
| 6 | |
| 7 | " For version 5.x: Clear all syntax items |
| 8 | " For version 6.x: Quit when a syntax file was already loaded |
| 9 | |
| 10 | if version < 600 |
| 11 | syntax clear |
| 12 | elseif exists("b:current_syntax") |
| 13 | finish |
| 14 | endif |
| 15 | |
| 16 | " A bunch of useful lifelines keywords 3.0.7 |
| 17 | |
| 18 | syn keyword lifelinesStatement set |
| 19 | syn keyword lifelinesUser getindi geindiset getfam getint getstr choosechild |
| 20 | syn keyword lifelinesUser chooseindi choosespouse choosesubset menuchoose |
| 21 | syn keyword lifelinesUser choosefam getintmsg getindimsg getstrmsg |
| 22 | syn keyword lifelinesProc proc func return call |
| 23 | syn keyword lifelinesInclude include |
| 24 | syn keyword lifelinesDef global |
| 25 | syn keyword lifelinesConditional if else elsif switch |
| 26 | syn keyword lifelinesRepeat continue break while |
| 27 | syn keyword lifelinesLogical and or not eq ne lt gt le ge strcmp eqstr nestr |
| 28 | syn keyword lifelinesArithm add sub mul div mod exp neg incr decr |
| 29 | syn keyword lifelinesIndi name fullname surname givens trimname birth |
| 30 | syn keyword lifelinesIndi death baptism burial |
| 31 | syn keyword lifelinesIndi father mother nextsib prevsib sex male female |
| 32 | syn keyword lifelinesIndi pn nspouses nfamilies parents title key |
| 33 | syn keyword lifelinesIndi soundex inode root indi firstindi nextindi |
| 34 | syn keyword lifelinesIndi previndi spouses families forindi indiset |
| 35 | syn keyword lifelinesIndi addtoset deletefromset lengthset union intersect |
| 36 | syn keyword lifelinesIndi difference parentset childset spouseset siblingset |
| 37 | syn keyword lifelinesIndi ancestorset descendentset descendantset uniqueset |
| 38 | syn keyword lifelinesIndi namesort keysort valuesort genindiset getindiset |
| 39 | syn keyword lifelinesIndi forindiset lastindi writeindi |
| 40 | syn keyword lifelinesIndi inset |
| 41 | syn keyword lifelinesFam marriage husband wife nchildren firstchild |
| 42 | syn keyword lifelinesFam lastchild fnode fam firstfam nextfam lastfam |
| 43 | syn keyword lifelinesFam prevfam children forfam writefam |
| 44 | syn keyword lifelinesList list empty length enqueue dequeue requeue |
| 45 | syn keyword lifelinesList push pop setel getel forlist inlist |
| 46 | syn keyword lifelinesTable table insert lookup |
| 47 | syn keyword lifelinesGedcom xref tag value parent child sibling savenode |
| 48 | syn keyword lifelinesGedcom fornodes traverse createnode addnode deletenode |
| 49 | syn keyword lifelinesGedcom reference dereference getrecord |
| 50 | syn keyword lifelinesGedcom gengedcom gengedcomstrong gengedcomweak |
| 51 | syn keyword lifelinesFunct date place year long short gettoday dayformat |
| 52 | syn keyword lifelinesFunct monthformat dateformat extractdate |
| 53 | syn keyword lifelinesFunct complexdate |
| 54 | syn keyword lifelinesFunct extractnames extractplaces extracttokens lower |
| 55 | syn keyword lifelinesFunct upper capitalize trim rjustify save strsave |
| 56 | syn keyword lifelinesFunct concat strconcat strlen substring index |
| 57 | syn keyword lifelinesFunct d card ord alpha roman strsoundex strtoint |
| 58 | syn keyword lifelinesFunct atoi linemode pagemod col row pos pageout nl |
| 59 | syn keyword lifelinesFunct sp qt newfile outfile copyfile print lock unlock |
| 60 | syn keyword lifelinesFunct database version system stddate program |
| 61 | syn keyword lifelinesFunct pvalue pagemode level extractdatestr debug |
| 62 | syn keyword lifelinesFunct f free getcol getproperty heapused |
| 63 | |
| 64 | syn region lifelinesString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=lifelinesSpecial |
| 65 | |
| 66 | syn region lifelinesComment start="/\*" end="\*/" contains=lifelinesComment |
| 67 | |
| 68 | " Only integers with lifelines |
| 69 | |
| 70 | syn match lifelinesNumber "\<\d\+\>" |
| 71 | |
| 72 | "catch errors caused by wrong parenthesis |
| 73 | "adapted from original c.vim written by Bram Moolenaar |
| 74 | |
| 75 | syn cluster lifelinesParenGroup contains=lifelinesParenError |
| 76 | syn region lifelinesParen transparent start='(' end=')' contains=ALLBUT,@lifelinesParenGroup |
| 77 | syn match lifelinesParenError ")" |
| 78 | syn match lifelinesErrInParen contained "[{}]" |
| 79 | |
| 80 | " Define the default highlighting. |
| 81 | " For version 5.7 and earlier: only when not done already |
| 82 | " For version 5.8 and later: only when an item doesn't have highlighting yet |
| 83 | |
| 84 | if version >= 508 || !exists("did_lifelines_syn_inits") |
| 85 | if version < 508 |
| 86 | let did_lifelines_syn_inits = 1 |
| 87 | command -nargs=+ HiLink hi link <args> |
| 88 | else |
| 89 | command -nargs=+ HiLink hi def link <args> |
| 90 | endif |
| 91 | |
| 92 | HiLink lifelinesConditional Conditional |
| 93 | HiLink lifelinesArithm Operator |
| 94 | HiLink lifelinesLogical Conditional |
| 95 | HiLink lifelinesInclude Include |
| 96 | HiLink lifelinesComment Comment |
| 97 | HiLink lifelinesStatement Statement |
| 98 | HiLink lifelinesUser Statement |
| 99 | HiLink lifelinesFunct Statement |
| 100 | HiLink lifelinesTable Statement |
| 101 | HiLink lifelinesGedcom Statement |
| 102 | HiLink lifelinesList Statement |
| 103 | HiLink lifelinesRepeat Repeat |
| 104 | HiLink lifelinesFam Statement |
| 105 | HiLink lifelinesIndi Statement |
| 106 | HiLink lifelinesProc Statement |
| 107 | HiLink lifelinesDef Statement |
| 108 | HiLink lifelinesString String |
| 109 | HiLink lifelinesNumber Number |
| 110 | HiLink lifelinesParenError Error |
| 111 | HiLink lifelinesErrInParen Error |
| 112 | |
| 113 | delcommand HiLink |
| 114 | endif |
| 115 | |
| 116 | let b:current_syntax = "lifelines" |
| 117 | |
| 118 | " vim: ts=8 |