home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 February / OpenLinux 2.3 CD.iso / live / usr / share / vim / syntax / gp.vim < prev    next >
Encoding:
Text File  |  1999-08-10  |  2.4 KB  |  66 lines

  1. " Vim syntax file
  2. " Language:    gp (version 2.0)
  3. " Maintainer:    Karim Belabas <karim@mpim-bonn.mpg.de>
  4. " Last change:    1998 February 23
  5.  
  6. syntax clear
  7. " some control statements
  8. syntax keyword gpStatement    break return next
  9. syntax keyword gpConditional    if
  10. syntax keyword gpRepeat        until while for fordiv forprime forstep forvec
  11.  
  12. syntax keyword gpInterfaceKey    buffersize colors compatible debug debugmem
  13. syntax keyword gpInterfaceKey    echo format help histsize log logfile output
  14. syntax keyword gpInterfaceKey    parisize path primelimit prompt psfile
  15. syntax keyword gpInterfaceKey    realprecision seriesprecision simplify
  16. syntax keyword gpInterfaceKey    strictmatch timer
  17.  
  18. syntax match   gpInterface    "^\s*\\[a-z].*"
  19. syntax keyword gpInterface    default
  20. syntax keyword gpInput        read input
  21.  
  22. " functions
  23. syntax match gpFunRegion "^\s*[a-zA-Z][_a-zA-Z0-9]*(.*)\s*=\s*[^ \t=]"me=e-1 contains=gpFunction,gpArgs
  24. syntax match gpFunRegion "^\s*[a-zA-Z][_a-zA-Z0-9]*(.*)\s*=\s*$" contains=gpFunction,gpArgs
  25. syntax match gpArgs contained "[a-zA-Z][_a-zA-Z0-9]*"
  26. syntax match gpFunction contained "^\s*[a-zA-Z][_a-zA-Z0-9]*("me=e-1
  27.  
  28. " String and Character constants
  29. " Highlight special (backslash'ed) characters differently
  30. syntax match  gpSpecial contained "\\[ent\\]"
  31. syntax region gpString  start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=gpSpecial
  32.  
  33. "comments
  34. syntax region gpComment    start="/\*"  end="\*/" contains=gpTodo
  35. syntax match  gpComment "\\\\.*" contains=gpTodo
  36. syntax keyword gpTodo contained    TODO
  37. syntax sync ccomment gpComment minlines=10
  38.  
  39. "catch errors caused by wrong parenthesis
  40. syntax region gpParen        transparent start='(' end=')' contains=ALLBUT,gpParenError,gpTodo,gpFunction,gpArgs,gpSpecial
  41. syntax match gpParenError    ")"
  42. syntax match gpInParen contained "[{}]"
  43.  
  44. if !exists("did_gp_syntax_inits")
  45.   let did_gp_syntax_inits = 1
  46.   highlight link gpConditional    Conditional
  47.   highlight link gpRepeat    Repeat
  48.   highlight link gpError    Error
  49.   highlight link gpParenError    gpError
  50.   highlight link gpInParen    gpError
  51.   highlight link gpStatement    Statement
  52.   highlight link gpString    String
  53.   highlight link gpComment    Comment
  54.   highlight link gpInterface    Type
  55.   highlight link gpInput    Type
  56.   highlight link gpInterfaceKey Statement
  57.   highlight link gpFunction    Function
  58.   " contained ones
  59.   highlight link gpSpecial    Special
  60.   highlight link gpTodo        Todo
  61.   highlight link gpArgs        Type
  62. endif
  63.  
  64. let b:current_syntax = "gp"
  65. " vim: ts=8
  66.