robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
810428c4d5
master
1" Vim syntax file 2" Language: gp (version 2.15) 3" Maintainer: Karim Belabas <Karim.Belabas@math.u-bordeaux.fr> 4" Last change: 2023 Aug 22 5" URL: http://pari.math.u-bordeaux.fr 6 7" quit when a syntax file was already loaded 8if exists ( "b:current_syntax" ) 9finish 10endif 11 12let s: cpo_save = & cpo 13set cpo & vim 14 15" control statements 16syntax keyword gpStatement break return next 17syntax keyword gpConditional if iferr 18syntax keyword gpRepeat until while for forcomposite fordiv 19syntax keyword gpRepeat fordivfactored foreach forell forfactored 20syntax keyword gpRepeat forpart forperm forprime forprimestep forqfvec 21syntax keyword gpRepeat forsquarefree forstep forsubgroup forsubset 22syntax keyword gpRepeat forvec 23syntax keyword gpRepeat parfor parforeach parforprime parforprimestep 24syntax keyword gpRepeat parforvec 25" storage class 26syntax keyword gpScope my local global export exportall 27" defaults 28syntax keyword gpInterfaceKey breakloop colors compatible 29syntax keyword gpInterfaceKey datadir debug debugfiles debugmem 30syntax keyword gpInterfaceKey echo factor_add_primes factor_proven format 31syntax keyword gpInterfaceKey graphcolormap graphcolors 32syntax keyword gpInterfaceKey help histfile histsize 33syntax keyword gpInterfaceKey lines linewrap log logfile nbthreads 34syntax keyword gpInterfaceKey new_galois_format output parisize parisizemax 35syntax keyword gpInterfaceKey path plothsizes prettyprinter primelimit prompt 36syntax keyword gpInterfaceKey prompt_cont psfile readline realbitprecision 37syntax keyword gpInterfaceKey realprecision recover secure seriesprecision 38syntax keyword gpInterfaceKey simplify sopath strictmatch TeXstyle 39syntax keyword gpInterfaceKey threadsize threadsizemax timer 40 41syntax match gpInterface "^\s * \\ [ a-z ] . * " 42syntax keyword gpInterface default 43syntax keyword gpInput read input 44 45" functions 46syntax match gpFunRegion "^\s * [ a-zA-Z ][ _a-zA-Z0-9 ] * (. * )\s * =\s * [ ^ \t= ] "me= e-1contains = gpFunction , gpArgs 47syntax match gpFunRegion "^\s * [ a-zA-Z ][ _a-zA-Z0-9 ] * (. * )\s * =\s * $ "contains = gpFunction , gpArgs 48syntax match gpArgs contained "[ a-zA-Z ][ _a-zA-Z0-9 ] * " 49syntax match gpFunction contained "^\s * [ a-zA-Z ][ _a-zA-Z0-9 ] * ( "me= e-1 50 51" String and Character constants 52" Highlight special (backslash'ed) characters differently 53syntax match gpSpecial contained "\\ [ ent\\ ] " 54syntax region gpString start = +" +skip = +\\\\\|\\" +end = +" +contains = gpSpecial 55 56"comments 57syntax region gpComment start = "/\* "end = "\*/ "contains = gpTodo 58syntax match gpComment "\\\\. * "contains = gpTodo 59syntax keyword gpTodo contained TODO 60syntax sync ccommentgpComment minlines= 10 61 62"catch errors caused by wrong parenthesis 63syntax region gpParen transparent start = '( 'end = ') 'contains = ALLBUT , gpParenError , gpTodo , gpFunction , gpArgs , gpSpecial 64syntax match gpParenError ") " 65syntax match gpInParen contained "[ {} ] " 66 67hi def link gpConditional Conditional 68hi def link gpRepeat Repeat 69hi def link gpError Error 70hi def link gpParenError gpError 71hi def link gpInParen gpError 72hi def link gpStatement Statement 73hi def link gpString String 74hi def link gpComment Comment 75hi def link gpInterface Type 76hi def link gpInput Type 77hi def link gpInterfaceKey Statement 78hi def link gpFunction Function 79hi def link gpScope Type 80" contained ones 81hi def link gpSpecial Special 82hi def link gpTodo Todo 83hi def link gpArgs Type 84 85let b: current_syntax = "gp" 86let & cpo = s: cpo_save 87unlet s: cpo_save 88" vim: ts=8