Advertisement
Guest User

coloring.tx

a guest
Mar 20th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.12 KB | None | 0 0
  1. Coloring:
  2. configuration=Configuration? rules*=Rule
  3. ;
  4.  
  5. Rule:
  6. rules=Rules | matches=Matches | regular_expressions = RegularExpressions
  7. ;
  8.  
  9. Configuration:
  10. 'configuration' '=' '{' configuration_commands *= ConfigurationCommand '}'
  11. ;
  12.  
  13. ConfigurationCommand:
  14. default=Default | coment=Coment
  15. ;
  16.  
  17. Default:
  18. 'default' ':' default_options += DefaultOption
  19. ;
  20.  
  21. DefaultOption:
  22. default_keyword_option = DefaultKeyword | default_operation = DefaultOperation
  23. ;
  24.  
  25. DefaultKeyword:
  26. 'keyword' '->' type=Type ';'
  27. ;
  28.  
  29. DefaultOperation:
  30. 'operation' '->' type=Type ';'
  31. ;
  32.  
  33. Coment:
  34. 'comment' ':' comment_options+=CommentOption
  35. ;
  36.  
  37. CommentOption:
  38. line=Line | block=Block
  39. ;
  40.  
  41. Line:
  42. 'line' ':' id=STRING ';'
  43. ;
  44.  
  45. Block:
  46. 'block' ':' 'start' ':' start=STRING ';' 'end' ':' end=STRING ';'
  47. ;
  48.  
  49. Rules:
  50. 'rules' '=' '{' rule_options*=RuleOption '}'
  51. ;
  52.  
  53. RuleOption:
  54. rule_keyword=RuleKeyword | rule_operation=RuleOperation
  55. ;
  56.  
  57. RuleKeyword:
  58. 'keyword' ':' rule_lists+=RuleList
  59. ;
  60.  
  61. RuleOperation:
  62. 'operation' ':' rule_lists+=RuleList
  63. ;
  64.  
  65. RuleList:
  66. elements+=ID[','] '->' type=Type ';'
  67. ;
  68.  
  69. Matches:
  70. 'matches' '=' '{' match_list*=MatchList '}'
  71. ;
  72.  
  73. MatchList:
  74. words*=STRING[','] '->' type=Type ';'
  75. ;
  76.  
  77. RegularExpressions:
  78. 'regular' 'expressions' '=' '{' regular_expression_list *= RegularExpressionList '}'
  79. ;
  80.  
  81. RegularExpressionList:
  82. expression*=STRING[','] '->' type=Type ';'
  83. ;
  84.  
  85. Type:
  86. "comment.block.documentation" |
  87. "comment.line.double-dash" |
  88. "comment.line.double-slash" |
  89. "comment.line.number-sign" |
  90. "comment.line.percentage" |
  91. "comment.block" |
  92. "comment.line" |
  93. "comment" |
  94. "constant.character.escape" |
  95. "constant.sha.git-rebase" |
  96. "constant.language" |
  97. "constant.numeric" |
  98. "constant.other" |
  99. "constant.regexp" |
  100. "constant.rgb-value" |
  101. "constant.character" |
  102. "constant" |
  103. "emphasis" |
  104. "entity.name.class" |
  105. "entity.name.function" |
  106. "entity.name.method" |
  107. "entity.name.section" |
  108. "entity.name.selector" |
  109. "entity.name.tag" |
  110. "entity.name.type" |
  111. "entity.other.attribute-name" |
  112. "entity.other.inherited-class" |
  113. "entity.other" |
  114. "entity.name" |
  115. "entity" |
  116. "header" |
  117. "invalid.deprecated" |
  118. "invalid.illegal" |
  119. "invalid" |
  120. "keyword.other.unit" |
  121. "keyword.control.less" |
  122. "keyword.operator.new" |
  123. "keyword.operator" |
  124. "keyword.control" |
  125. "keyword.other" |
  126. "keyword" |
  127. "markup.punctuation.list.beginning" |
  128. "markup.punctuation.quote.beginning" |
  129. "markup.list.numbered" |
  130. "markup.inline.raw" |
  131. "markup.list.unnumbered" |
  132. "markup.underline.link" |
  133. "markup.bold" |
  134. "markup.changed" |
  135. "markup.deleted" |
  136. "markup.heading" |
  137. "markup.inserted" |
  138. "markup.italic" |
  139. "markup.list" |
  140. "markup.other" |
  141. "markup.quote" |
  142. "markup.raw" |
  143. "markup.underline" |
  144. "markup" |
  145. "meta.structure.dictionary.key.python" |
  146. "meta.parameter.type.variable" |
  147. "meta.preprocessor.numeric" |
  148. "meta.preprocessor.string" |
  149. "meta.type.annotation" |
  150. "meta.type.name" |
  151. "meta.cast" |
  152. "meta.preprocessor" |
  153. "meta.return-type" |
  154. "meta.selector" |
  155. "meta.tag" |
  156. "metatag.php" |
  157. "meta" |
  158. "storage.modifier.import.java" |
  159. "storage.modifier.package.java" |
  160. "storage.type.cs" |
  161. "storage.type.java" |
  162. "storage.modifier" |
  163. "storage.type" |
  164. "storage" |
  165. "string.quoted.double" |
  166. "string.quoted.other" |
  167. "string.quoted.single" |
  168. "string.quoted.triple" |
  169. "string.html" |
  170. "string.interpolated" |
  171. "string.jade" |
  172. "string.other" |
  173. "string.quoted" |
  174. "string.regexp" |
  175. "string.unquoted" |
  176. "string.xml" |
  177. "string.yaml" |
  178. "string" |
  179. "strong" |
  180. "support.type.property-name.css" |
  181. "support.type.property-name.less" |
  182. "support.type.property-name.scss" |
  183. "support.function.git-rebase" |
  184. "support.type.property-name" |
  185. "support.class" |
  186. "support.constant" |
  187. "support.function" |
  188. "support.other" |
  189. "support.property-value" |
  190. "support.type" |
  191. "support.variable" |
  192. "support" |
  193. "variable.language" |
  194. "variable.name" |
  195. "variable.other" |
  196. "variable.parameter" |
  197. "variable"
  198. ;
  199.  
  200. // Comments
  201. Comment:
  202. CommentLine | CommentBlock
  203. ;
  204.  
  205. CommentLine:
  206. /\/\/.*?$/
  207. ;
  208.  
  209. CommentBlock:
  210. /\/\*(.|\n)*?\*\//
  211. ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement