Guest User

Untitled

a guest
Feb 21st, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.67 KB | None | 0 0
  1. { name = 'support.function.boolean-test.scheme';
  2. comment = '
  3. These functions run a test, and return a boolean
  4. answer.
  5. ';
  6. match = '(?x)
  7. (?<=(\s|\()) # preceded by space or (
  8. ( char-alphabetic|char-lower-case|char-numeric|
  9. char-ready|char-upper-case|char-whitespace|
  10. (?:char|string)(?:-ci)?(?:=|<=?|>=?)|
  11. atom|boolean|bound-identifier=|char|complex|
  12. identifier|integer|symbol|free-identifier=|inexact|
  13. eof-object|exact|list|(?:input|output)-port|pair|
  14. real|rational|zero|vector|negative|odd|null|string|
  15. eq|equal|eqv|even|number|positive|procedure
  16. )
  17. (\?) # name ends with ? sign
  18. (?=(\s|\()) # followed by space or (
  19. ';
  20. },
  21. { name = 'support.function.convert-type.scheme';
  22. comment = '
  23. These functions change one type into another.
  24. ';
  25. match = '(?x)
  26. (?<=(\s|\()) # preceded by space or (
  27. ( char->integer|exact->inexact|inexact->exact|
  28. integer->char|symbol->string|list->vector|
  29. list->string|identifier->symbol|vector->list|
  30. string->list|string->number|string->symbol|
  31. number->string
  32. )
  33. (?=(\s|\()) # followed by space or (
  34. ';
  35. },
  36. { name = 'support.function.with-side-effects.scheme';
  37. comment = '
  38. These functions are potentially dangerous because
  39. they have side-effects which could affect other
  40. parts of the program.
  41. ';
  42. match = '(?x)
  43. (?<=(\s|\()) # preceded by space or (
  44. ( set-(?:car|cdr)| # set car/cdr
  45. (?:vector|string)-(?:fill|set) # fill/set string/vector
  46. )
  47. (!) # name ends with ! sign
  48. (?=(\s|\()) # followed by space or (
  49. ';
  50. },
  51. { name = 'support.function.arithmetic-operators.scheme';
  52. comment = '
  53. +, -, *, /, =, >, etc.
  54. ';
  55. match = '(?x)
  56. (?<=(\s|\()) # preceded by space or (
  57. ( >=?|<=?|=|[*/+-])
  58. (?=(\s|\()) # followed by space or (
  59. ';
  60. },
  61. { name = 'support.function.general.scheme';
  62. match = '(?x)
  63. (?<=(\s|\()) # preceded by space or (
  64. ( append|apply|approximate|
  65. call-with-current-continuation|call/cc|catch|
  66. construct-identifier|define-syntax|display|foo|
  67. for-each|force|cd|gen-counter|gen-loser|
  68. generate-identifier|last-pair|length|let-syntax|
  69. letrec-syntax|list|list-ref|list-tail|load|log|
  70. macro|magnitude|map|map-streams|max|member|memq|
  71. memv|min|newline|nil|not|peek-char|rationalize|
  72. read|read-char|return|reverse|sequence|substring|
  73. syntax|syntax-rules|transcript-off|transcript-on|
  74. truncate|unwrap-syntax|values-list|write|write-char|
  75.  
  76. # cons, car, cdr, etc
  77. cons|c(a|d){1,4}r|
  78.  
  79. # unary math operators
  80. abs|acos|angle|asin|assoc|assq|assv|atan|ceiling|
  81. cos|floor|round|sin|sqrt|tan|
  82. (?:real|imag)-part|numerator|denominator
  83.  
  84. # other math operators
  85. modulo|exp|expt|remainder|quotient|lcm|
  86.  
  87. # ports / files
  88. call-with-(?:input|output)-file|
  89. (?:close|current)-(?:input|output)-port|
  90. with-(?:input|output)-from-file|
  91. open-(?:input|output)-file|
  92.  
  93. # char-«foo»
  94. char-(?:downcase|upcase|ready)|
  95.  
  96. # make-«foo»
  97. make-(?:polar|promise|rectangular|string|vector)
  98.  
  99. # string-«foo», vector-«foo»
  100. string(?:-(?:append|copy|length|ref))?|
  101. vector(?:-length|-ref)
  102. )
  103. (?=(\s|\()) # followed by space or (
  104. ';
  105. },
Add Comment
Please, Sign In to add comment