github-linguist-grammars 4.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (335) hide show
  1. checksums.yaml +7 -0
  2. data/grammars/file.lasso.json +713 -0
  3. data/grammars/module.ceylon.json +54 -0
  4. data/grammars/objdump.x86asm.json +73 -0
  5. data/grammars/source.Inform7.json +45 -0
  6. data/grammars/source.Kotlin.json +774 -0
  7. data/grammars/source.LS.json +104 -0
  8. data/grammars/source.MCPOST.json +68 -0
  9. data/grammars/source.MOD.json +70 -0
  10. data/grammars/source.abap.json +176 -0
  11. data/grammars/source.abl.json +138 -0
  12. data/grammars/source.actionscript.3.json +1571 -0
  13. data/grammars/source.acucobol.json +16 -0
  14. data/grammars/source.ada.json +140 -0
  15. data/grammars/source.agda.json +254 -0
  16. data/grammars/source.ahk.json +171 -0
  17. data/grammars/source.alloy.json +44 -0
  18. data/grammars/source.ampl.json +157 -0
  19. data/grammars/source.antlr.json +300 -0
  20. data/grammars/source.apache-config.json +352 -0
  21. data/grammars/source.apache-config.mod_perl.json +70 -0
  22. data/grammars/source.apl.json +442 -0
  23. data/grammars/source.applescript.json +1385 -0
  24. data/grammars/source.apt.json +25 -0
  25. data/grammars/source.asm.x86.json +182 -0
  26. data/grammars/source.asp.json +157 -0
  27. data/grammars/source.aspectj.json +963 -0
  28. data/grammars/source.ats.json +170 -0
  29. data/grammars/source.autoit.3.json +132 -0
  30. data/grammars/source.awk.json +388 -0
  31. data/grammars/source.befunge.json +38 -0
  32. data/grammars/source.bf.json +36 -0
  33. data/grammars/source.bison.json +59 -0
  34. data/grammars/source.blitzmax.json +912 -0
  35. data/grammars/source.boo.json +452 -0
  36. data/grammars/source.brightauthorproject.json +29 -0
  37. data/grammars/source.brightscript.json +158 -0
  38. data/grammars/source.bro.json +409 -0
  39. data/grammars/source.bsv.json +283 -0
  40. data/grammars/source.c++.json +364 -0
  41. data/grammars/source.c++.qt.json +37 -0
  42. data/grammars/source.c.ec.json +39 -0
  43. data/grammars/source.c.json +727 -0
  44. data/grammars/source.c.platform.json +154 -0
  45. data/grammars/source.cache.cmake.json +75 -0
  46. data/grammars/source.cake.json +16 -0
  47. data/grammars/source.camlp4.ocaml.json +63 -0
  48. data/grammars/source.capnp.json +93 -0
  49. data/grammars/source.ceylon.json +77 -0
  50. data/grammars/source.cfscript.cfc.json +170 -0
  51. data/grammars/source.cfscript.json +744 -0
  52. data/grammars/source.chapel.json +240 -0
  53. data/grammars/source.cirru.json +66 -0
  54. data/grammars/source.clarion.json +159 -0
  55. data/grammars/source.clips.json +80 -0
  56. data/grammars/source.clojure.json +397 -0
  57. data/grammars/source.cm.json +54 -0
  58. data/grammars/source.cmake.json +181 -0
  59. data/grammars/source.cobol.json +528 -0
  60. data/grammars/source.coffee.json +678 -0
  61. data/grammars/source.compiled-papyrus.json +11 -0
  62. data/grammars/source.cool.json +103 -0
  63. data/grammars/source.coq.json +62 -0
  64. data/grammars/source.crystal.json +2760 -0
  65. data/grammars/source.cs.json +556 -0
  66. data/grammars/source.css.json +630 -0
  67. data/grammars/source.css.less.json +276 -0
  68. data/grammars/source.css.mss.json +256 -0
  69. data/grammars/source.csx.json +16 -0
  70. data/grammars/source.cuda-c++.json +137 -0
  71. data/grammars/source.cython.json +2108 -0
  72. data/grammars/source.d.json +722 -0
  73. data/grammars/source.dart.json +763 -0
  74. data/grammars/source.desktop.json +90 -0
  75. data/grammars/source.diff.json +162 -0
  76. data/grammars/source.dockerfile.json +89 -0
  77. data/grammars/source.dosbatch.json +70 -0
  78. data/grammars/source.dot.json +126 -0
  79. data/grammars/source.dylan.json +217 -0
  80. data/grammars/source.eiffel.json +138 -0
  81. data/grammars/source.elixir.json +737 -0
  82. data/grammars/source.elm.json +355 -0
  83. data/grammars/source.erazor.json +126 -0
  84. data/grammars/source.erlang.json +1674 -0
  85. data/grammars/source.essl.json +50 -0
  86. data/grammars/source.factor.json +260 -0
  87. data/grammars/source.fan.json +188 -0
  88. data/grammars/source.fancy.json +270 -0
  89. data/grammars/source.fish.json +214 -0
  90. data/grammars/source.forth.json +101 -0
  91. data/grammars/source.fortran.json +499 -0
  92. data/grammars/source.fortran.modern.json +226 -0
  93. data/grammars/source.fsharp.json +403 -0
  94. data/grammars/source.gap.json +167 -0
  95. data/grammars/source.gcode.json +25 -0
  96. data/grammars/source.gdscript.json +154 -0
  97. data/grammars/source.gfm.json +1270 -0
  98. data/grammars/source.glsl.json +71 -0
  99. data/grammars/source.gnuplot.json +276 -0
  100. data/grammars/source.go.json +552 -0
  101. data/grammars/source.golo.json +182 -0
  102. data/grammars/source.gosu.2.json +163 -0
  103. data/grammars/source.grace.json +679 -0
  104. data/grammars/source.groovy.gradle.json +73 -0
  105. data/grammars/source.groovy.json +1385 -0
  106. data/grammars/source.harbour.json +450 -0
  107. data/grammars/source.haskell.json +449 -0
  108. data/grammars/source.haxe.2.json +1243 -0
  109. data/grammars/source.hss.1.json +464 -0
  110. data/grammars/source.httpspec.json +287 -0
  111. data/grammars/source.hxml.json +26 -0
  112. data/grammars/source.hy.json +270 -0
  113. data/grammars/source.idl-dlm.json +112 -0
  114. data/grammars/source.idl.json +267 -0
  115. data/grammars/source.idris.json +537 -0
  116. data/grammars/source.ini.json +113 -0
  117. data/grammars/source.inno.json +65 -0
  118. data/grammars/source.io.json +164 -0
  119. data/grammars/source.ioke.json +272 -0
  120. data/grammars/source.isabelle.root.json +68 -0
  121. data/grammars/source.isabelle.theory.json +106 -0
  122. data/grammars/source.j.json +49 -0
  123. data/grammars/source.jade.json +1009 -0
  124. data/grammars/source.jasmin.json +299 -0
  125. data/grammars/source.java-properties.json +97 -0
  126. data/grammars/source.java.json +1026 -0
  127. data/grammars/source.jcl.json +49 -0
  128. data/grammars/source.jflex.json +490 -0
  129. data/grammars/source.jq.json +218 -0
  130. data/grammars/source.js.json +948 -0
  131. data/grammars/source.js.jsx.json +2937 -0
  132. data/grammars/source.js.objj.json +424 -0
  133. data/grammars/source.js.regexp.json +150 -0
  134. data/grammars/source.js.regexp.replacement.json +30 -0
  135. data/grammars/source.json.json +149 -0
  136. data/grammars/source.julia.json +407 -0
  137. data/grammars/source.lean.json +145 -0
  138. data/grammars/source.lid.json +23 -0
  139. data/grammars/source.lilypond.json +623 -0
  140. data/grammars/source.lisp.json +111 -0
  141. data/grammars/source.litcoffee.json +669 -0
  142. data/grammars/source.livescript.json +616 -0
  143. data/grammars/source.llvm.json +71 -0
  144. data/grammars/source.logos.json +31 -0
  145. data/grammars/source.logtalk.json +315 -0
  146. data/grammars/source.loomscript.json +214 -0
  147. data/grammars/source.lsl.json +216 -0
  148. data/grammars/source.lua.json +191 -0
  149. data/grammars/source.makefile.json +474 -0
  150. data/grammars/source.makegen.json +13 -0
  151. data/grammars/source.man.json +53 -0
  152. data/grammars/source.mask.json +701 -0
  153. data/grammars/source.mata.json +133 -0
  154. data/grammars/source.mathematica.json +429 -0
  155. data/grammars/source.matlab.json +776 -0
  156. data/grammars/source.mercury.json +251 -0
  157. data/grammars/source.ml.json +291 -0
  158. data/grammars/source.modelica.json +142 -0
  159. data/grammars/source.modula2.json +103 -0
  160. data/grammars/source.monkey.json +701 -0
  161. data/grammars/source.moonscript.json +149 -0
  162. data/grammars/source.mupad.json +149 -0
  163. data/grammars/source.nant-build.json +86 -0
  164. data/grammars/source.ncl.json +66 -0
  165. data/grammars/source.nemerle.json +137 -0
  166. data/grammars/source.nesc.json +27 -0
  167. data/grammars/source.netlinx.erb.json +47 -0
  168. data/grammars/source.netlinx.json +768 -0
  169. data/grammars/source.nginx.json +797 -0
  170. data/grammars/source.nim.json +1150 -0
  171. data/grammars/source.nim_filter.json +133 -0
  172. data/grammars/source.nimcfg.json +116 -0
  173. data/grammars/source.ninja.json +66 -0
  174. data/grammars/source.nit.json +238 -0
  175. data/grammars/source.nix.json +1200 -0
  176. data/grammars/source.nmml.json +87 -0
  177. data/grammars/source.nsis.json +150 -0
  178. data/grammars/source.objc++.json +19 -0
  179. data/grammars/source.objc.json +918 -0
  180. data/grammars/source.objc.platform.json +277 -0
  181. data/grammars/source.ocaml.json +1426 -0
  182. data/grammars/source.ocamllex.json +305 -0
  183. data/grammars/source.ocamlyacc.json +346 -0
  184. data/grammars/source.octave.json +451 -0
  185. data/grammars/source.ooc.json +692 -0
  186. data/grammars/source.opa.json +206 -0
  187. data/grammars/source.opal.json +415 -0
  188. data/grammars/source.opalsysdefs.json +70 -0
  189. data/grammars/source.opencobol.json +65 -0
  190. data/grammars/source.ox.json +97 -0
  191. data/grammars/source.oz.json +84 -0
  192. data/grammars/source.papyrus-assembly.json +266 -0
  193. data/grammars/source.papyrus.json +231 -0
  194. data/grammars/source.parrot.pir.json +117 -0
  195. data/grammars/source.pascal.json +150 -0
  196. data/grammars/source.perl.6.json +310 -0
  197. data/grammars/source.perl.json +2413 -0
  198. data/grammars/source.php.zephir.json +362 -0
  199. data/grammars/source.pig_latin.json +172 -0
  200. data/grammars/source.pike.json +62 -0
  201. data/grammars/source.plsql.oracle.json +642 -0
  202. data/grammars/source.po.json +232 -0
  203. data/grammars/source.pogoscript.json +85 -0
  204. data/grammars/source.postscript.json +231 -0
  205. data/grammars/source.powershell.json +755 -0
  206. data/grammars/source.processing.json +885 -0
  207. data/grammars/source.prolog.eclipse.json +206 -0
  208. data/grammars/source.prolog.json +292 -0
  209. data/grammars/source.protobuf.json +395 -0
  210. data/grammars/source.pubspec.json +13 -0
  211. data/grammars/source.puppet.json +494 -0
  212. data/grammars/source.purescript.json +818 -0
  213. data/grammars/source.pyjade.json +1010 -0
  214. data/grammars/source.python.django.json +34 -0
  215. data/grammars/source.python.json +1960 -0
  216. data/grammars/source.python.salt.json +13 -0
  217. data/grammars/source.qmake.json +217 -0
  218. data/grammars/source.qml.json +195 -0
  219. data/grammars/source.r.json +203 -0
  220. data/grammars/source.racket.json +119 -0
  221. data/grammars/source.rebol.json +647 -0
  222. data/grammars/source.red.json +652 -0
  223. data/grammars/source.regexp.babel.json +190 -0
  224. data/grammars/source.regexp.python.json +187 -0
  225. data/grammars/source.regexp.spin.json +188 -0
  226. data/grammars/source.ruby.json +1956 -0
  227. data/grammars/source.ruby.rspec.cucumber.steps.json +274 -0
  228. data/grammars/source.rust.json +269 -0
  229. data/grammars/source.sas.json +322 -0
  230. data/grammars/source.sas_log.json +26 -0
  231. data/grammars/source.sass.json +248 -0
  232. data/grammars/source.sbt.json +36 -0
  233. data/grammars/source.scad.json +152 -0
  234. data/grammars/source.scala.json +739 -0
  235. data/grammars/source.scaml.json +466 -0
  236. data/grammars/source.scheme.json +370 -0
  237. data/grammars/source.scilab.json +103 -0
  238. data/grammars/source.scss.json +1321 -0
  239. data/grammars/source.shell.json +1212 -0
  240. data/grammars/source.smali.json +1668 -0
  241. data/grammars/source.smalltalk.json +135 -0
  242. data/grammars/source.smt.json +173 -0
  243. data/grammars/source.sp.json +118 -0
  244. data/grammars/source.sparql.json +23 -0
  245. data/grammars/source.spin.json +936 -0
  246. data/grammars/source.sqf.json +112 -0
  247. data/grammars/source.sql.json +473 -0
  248. data/grammars/source.stata.json +208 -0
  249. data/grammars/source.strings.json +53 -0
  250. data/grammars/source.stylus.json +1021 -0
  251. data/grammars/source.swift.json +965 -0
  252. data/grammars/source.systemverilog.json +1050 -0
  253. data/grammars/source.tcl.json +277 -0
  254. data/grammars/source.tea.json +180 -0
  255. data/grammars/source.thrift.json +704 -0
  256. data/grammars/source.toml.json +327 -0
  257. data/grammars/source.ts.json +1094 -0
  258. data/grammars/source.tsx.json +1324 -0
  259. data/grammars/source.turtle.json +505 -0
  260. data/grammars/source.txl.json +62 -0
  261. data/grammars/source.ucfconstraints.json +72 -0
  262. data/grammars/source.vala.json +814 -0
  263. data/grammars/source.varnish.vcl.json +343 -0
  264. data/grammars/source.vbnet.json +338 -0
  265. data/grammars/source.verilog.json +302 -0
  266. data/grammars/source.vhdl.json +1349 -0
  267. data/grammars/source.viml.json +224 -0
  268. data/grammars/source.webidl.json +814 -0
  269. data/grammars/source.x10.json +68 -0
  270. data/grammars/source.x86asm.json +47 -0
  271. data/grammars/source.xc.json +379 -0
  272. data/grammars/source.xq.json +241 -0
  273. data/grammars/source.xquery.json +193 -0
  274. data/grammars/source.xtend.json +733 -0
  275. data/grammars/source.yaml.json +334 -0
  276. data/grammars/source.yaml.salt.json +348 -0
  277. data/grammars/text.bibtex.json +251 -0
  278. data/grammars/text.cfml.basic.json +736 -0
  279. data/grammars/text.dart-analysis-output.json +162 -0
  280. data/grammars/text.dart-doccomments.json +19 -0
  281. data/grammars/text.elixir.json +45 -0
  282. data/grammars/text.gherkin.feature.json +135 -0
  283. data/grammars/text.groff.json +113 -0
  284. data/grammars/text.haml.json +299 -0
  285. data/grammars/text.html.abl.json +24 -0
  286. data/grammars/text.html.asciidoc.json +492 -0
  287. data/grammars/text.html.asdoc.json +541 -0
  288. data/grammars/text.html.asp.json +58 -0
  289. data/grammars/text.html.basic.json +552 -0
  290. data/grammars/text.html.cfm.json +811 -0
  291. data/grammars/text.html.creole.json +329 -0
  292. data/grammars/text.html.django.json +69 -0
  293. data/grammars/text.html.elixir.json +18 -0
  294. data/grammars/text.html.erb.json +157 -0
  295. data/grammars/text.html.erlang.yaws.json +72 -0
  296. data/grammars/text.html.factor.json +27 -0
  297. data/grammars/text.html.handlebars.json +783 -0
  298. data/grammars/text.html.jsp.json +1203 -0
  299. data/grammars/text.html.liquid.json +35 -0
  300. data/grammars/text.html.mako.json +729 -0
  301. data/grammars/text.html.markdown.source.gfm.apib.json +1297 -0
  302. data/grammars/text.html.markdown.source.gfm.mson.json +1165 -0
  303. data/grammars/text.html.mediawiki.json +972 -0
  304. data/grammars/text.html.php.json +2607 -0
  305. data/grammars/text.html.slash.json +313 -0
  306. data/grammars/text.html.smarty.json +216 -0
  307. data/grammars/text.html.ssp.json +49 -0
  308. data/grammars/text.html.tcl.json +44 -0
  309. data/grammars/text.html.twig.json +1353 -0
  310. data/grammars/text.html.vue.json +642 -0
  311. data/grammars/text.idl-idldoc.json +14 -0
  312. data/grammars/text.junit-test-report.json +92 -0
  313. data/grammars/text.log.latex.json +86 -0
  314. data/grammars/text.python.console.json +25 -0
  315. data/grammars/text.python.traceback.json +46 -0
  316. data/grammars/text.rdoc.json +48 -0
  317. data/grammars/text.restructuredtext.json +561 -0
  318. data/grammars/text.robot.json +73 -0
  319. data/grammars/text.shell-session.json +48 -0
  320. data/grammars/text.slim.json +527 -0
  321. data/grammars/text.tex.json +271 -0
  322. data/grammars/text.tex.latex.beamer.json +63 -0
  323. data/grammars/text.tex.latex.haskell.json +56 -0
  324. data/grammars/text.tex.latex.json +1013 -0
  325. data/grammars/text.tex.latex.memoir.json +99 -0
  326. data/grammars/text.tex.latex.rd.json +117 -0
  327. data/grammars/text.xml.ant.json +202 -0
  328. data/grammars/text.xml.flex-config.json +2634 -0
  329. data/grammars/text.xml.genshi.json +34 -0
  330. data/grammars/text.xml.json +364 -0
  331. data/grammars/text.xml.pom.json +774 -0
  332. data/grammars/text.xml.xsl.json +94 -0
  333. data/grammars/text.zone_file.json +72 -0
  334. data/lib/linguist/grammars.rb +13 -0
  335. metadata +389 -0
@@ -0,0 +1,101 @@
1
+ {
2
+ "fileTypes": [
3
+ "frt",
4
+ "fs"
5
+ ],
6
+ "foldingStartMarker": "/\\*\\*|\\{\\s*$",
7
+ "foldingStopMarker": "\\*\\*/|^\\s*\\}",
8
+ "keyEquivalent": "^~F",
9
+ "name": "Forth",
10
+ "patterns": [
11
+ {
12
+ "match": "(?i:(?<=^|\\s)(TRUE|FALSE|BL|PI|CELL|C/L|R/O|W/O|R/W)(?=\\s))",
13
+ "name": "constant.language.forth"
14
+ },
15
+ {
16
+ "match": "(?<=^|\\s)([$#%]?[-+]?[0-9]+(\\.[0-9]*e(-?[0-9]+)|\\.?[0-9a-fA-F]*))(?=\\s)",
17
+ "name": "constant.numeric.forth"
18
+ },
19
+ {
20
+ "match": "(?<=^|\\s)(([&^]\\S)|((\"|')\\S(\"|')))(?=\\s)",
21
+ "name": "constant.character.forth"
22
+ },
23
+ {
24
+ "comment": "line comments for iForth",
25
+ "match": "(?<=^|\\s)(-- .*$)",
26
+ "name": "comment.line.double-dash.forth"
27
+ },
28
+ {
29
+ "comment": "ANSI line comment",
30
+ "match": "(?<=^|\\s)(\\\\ .*$)",
31
+ "name": "comment.line.backslash.forth"
32
+ },
33
+ {
34
+ "comment": "gForth line comment",
35
+ "match": "(?<=^|\\s)(\\\\[Gg] .*$)",
36
+ "name": "comment.line.backslash-g.forth"
37
+ },
38
+ {
39
+ "begin": "(?<=^|\\s)(\\(\\*)(?=\\s)",
40
+ "comment": "multiline comments for iForth",
41
+ "end": "(?<=^|\\s)(\\*\\))(?=\\s)",
42
+ "name": "comment.block.forth"
43
+ },
44
+ {
45
+ "begin": "\\b(?i:DOC)\\b",
46
+ "comment": "documentation comments for iForth",
47
+ "end": "\\b(?i:ENDDOC)\\b",
48
+ "name": "comment.block.documentation.forth"
49
+ },
50
+ {
51
+ "comment": "ANSI line comment",
52
+ "match": "(?<=^|\\s)(\\.?\\( [^)]*\\))",
53
+ "name": "comment.line.parentheses.forth"
54
+ },
55
+ {
56
+ "comment": "",
57
+ "match": "(?i:((?<=ABORT\" )|(?<=BREAK\" )|(?<=\\.\" )|(C\" )|(S\\\\?\" )))[^\"]+\"",
58
+ "name": "string.quoted.double.forth"
59
+ },
60
+ {
61
+ "comment": "",
62
+ "match": "(?i:((?<=INCLUDE)|(?<=NEEDS)|(?<=REQUIRE)|(?<=USE)))[ ]\\S+(?=\\s)",
63
+ "name": "string.unquoted.forth"
64
+ },
65
+ {
66
+ "match": "(?<=^|\\s)\\[(?i:(\\?DO|\\+LOOP|AGAIN|BEGIN|DO|ELSE|ENDIF|FOR|IF|IFDEF|IFUNDEF|LOOP|NEXT|REPEAT|THEN|UNTIL|WHILE))\\](?=\\s)",
67
+ "name": "keyword.control.immediate.forth"
68
+ },
69
+ {
70
+ "match": "(?<=^|\\s)(?i:(COMPILE-ONLY|IMMEDIATE|IS|RESTRICT|TO|WHAT'S))(?=\\s)",
71
+ "name": "keyword.other.immediate.forth"
72
+ },
73
+ {
74
+ "match": "(?<=^|\\s)(?i:(-DO|\\-LOOP|\\?DO|\\?LEAVE|\\+DO|\\+LOOP|ABORT\\\"|AGAIN|AHEAD|BEGIN|CASE|DO|ELSE|ENDCASE|ENDIF|ENDOF|ENDTRY\\-IFERROR|ENDTRY|FOR|IF|IFERROR|LEAVE|LOOP|NEXT|RECOVER|REPEAT|RESTORE|THEN|TRY|U\\-DO|U\\+DO|UNTIL|WHILE))(?=\\s)",
75
+ "name": "keyword.control.compile-only.forth"
76
+ },
77
+ {
78
+ "match": "(?<=^|\\s)(?i:(\\?DUP-0=-IF|\\?DUP-IF|\\)|\\['\\]|\\[CHAR\\]|\\[COMPILE\\]|\\[IS\\]|\\[TO\\]|<COMPILATION|<INTERPRETATION|ASSERT\\(|ASSERT0\\(|ASSERT1\\(|ASSERT2\\(|ASSERT3\\(|COMPILATION>|DEFERS|DOES>|INTERPRETATION>|OF|POSTPONE))(?=\\s)",
79
+ "name": "keyword.other.compile-only.forth"
80
+ },
81
+ {
82
+ "match": "(?<=^|\\s)(?i:('|<IS>|<TO>|CHAR|END-STRUCT|INCLUDE[D]?|LOAD|NEEDS|REQUIRE[D]?|REVISION|SEE|STRUCT|THRU|USE))(?=\\s)",
83
+ "name": "keyword.other.non-immediate.forth"
84
+ },
85
+ {
86
+ "match": "(?<=^|\\s)(?i:(~~|BREAK:|BREAK\"|DBG))(?=\\s)",
87
+ "name": "keyword.other.warning.forth"
88
+ },
89
+ {
90
+ "match": "\\b(?i:I|J)\\b",
91
+ "name": "variable.language.forth"
92
+ },
93
+ {
94
+ "comment": "",
95
+ "match": "(?<=^|\\s)(?i:(2CONSTANT|2VARIABLE|ALIAS|CONSTANT|CREATE-INTERPRET/COMPILE[:]?|CREATE|DEFER|FCONSTANT|FIELD|FVARIABLE|USER|VALUE|VARIABLE|VOCABULARY))(?=\\s)",
96
+ "name": "storage.type.forth"
97
+ }
98
+ ],
99
+ "scopeName": "source.forth",
100
+ "uuid": "0AAA4CFD-D621-4B33-BB76-E5D9EDE64E84"
101
+ }
@@ -0,0 +1,499 @@
1
+ {
2
+ "comment": "?i: has to be added everywhere because fortran is case insensitive; NB: order of matching matters",
3
+ "fileTypes": [
4
+ "f",
5
+ "F",
6
+ "f77",
7
+ "F77",
8
+ "for",
9
+ "FOR",
10
+ "fpp",
11
+ "FPP"
12
+ ],
13
+ "name": "Fortran - Punchcard",
14
+ "patterns": [
15
+ {
16
+ "include": "#preprocessor-rule-enabled"
17
+ },
18
+ {
19
+ "include": "#preprocessor-rule-disabled"
20
+ },
21
+ {
22
+ "include": "#preprocessor-rule-other"
23
+ },
24
+ {
25
+ "comment": "built-in constants",
26
+ "match": "(?i:(r8|r4|\\.TRUE\\.|\\.FALSE\\.))",
27
+ "name": "constant.language.fortran"
28
+ },
29
+ {
30
+ "comment": "numbers",
31
+ "match": "\\b[\\+\\-]?[0-9]+\\.?[0-9a-zA-Z_]*\\b",
32
+ "name": "constant.numeric.fortran"
33
+ },
34
+ {
35
+ "begin": "(?x:\t\t\t\t\t\t\t\t# extended mode\n\t\t\t\t\t^\n\t\t\t\t\t\\s*\t\t\t\t\t\t\t\t\t# start of line and possibly some space\n\t\t\t\t\t([a-zA-Z\\(\\)]*)(?<!end)\t\t\t\t# 1: possibly some type specification but not the word end\n\t\t\t\t\t\\s*\t\t\t\t\t\t\t\t\t# possibly some space\n\t\t\t\t\t(?i:(function|subroutine))\\b\t\t# 2: function or subroutine\n\t\t\t\t\t\\s+\t\t\t\t\t\t\t\t\t# some space\n\t\t\t\t\t([A-Za-z_][A-Za-z0-9_]*)\t\t\t# 3: name\n\t\t\t\t\t)",
36
+ "beginCaptures": {
37
+ "1": {
38
+ "name": "storage.type.fortran"
39
+ },
40
+ "2": {
41
+ "name": "storage.type.function.fortran"
42
+ },
43
+ "3": {
44
+ "name": "entity.name.function.fortran"
45
+ }
46
+ },
47
+ "comment": "First line of function/subroutine definition",
48
+ "end": "(?x:\t\t\t\t\t\t\t\t\t# extended mode\n\t\t\t\t\t((?i:end))\t\t\t\t\t\t\t# 1: the word end\n\t\t\t\t\t(\t\t\t\t\t\t\t\t\t# followed by\n\t\t\t\t\t\t$\t\t\t\t\t\t\t\t# end of line\n\t\t\t\t\t|\t\t\t\t\t\t\t\t\t# or\n\t\t\t\t\t\t\\s*\t\t\t\t\t\t\t\t# possibly some space\n\t\t\t\t\t\t(?i:(function|subroutine))\t\t# 2: function or subroutine\n\t\t\t\t\t\t((\\s+[A-Za-z_][A-Za-z0-9_]*)?)\t# 3: possibly the name\n\t\t\t\t\t)\n\t\t\t\t\t)",
49
+ "endCaptures": {
50
+ "1": {
51
+ "name": "keyword.other.fortran"
52
+ },
53
+ "3": {
54
+ "name": "storage.type.function.fortran"
55
+ },
56
+ "4": {
57
+ "name": "entity.name.function.end.fortran"
58
+ }
59
+ },
60
+ "name": "meta.function.fortran",
61
+ "patterns": [
62
+ {
63
+ "begin": "\\G\\s*(\\()",
64
+ "beginCaptures": {
65
+ "1": {
66
+ "name": "punctuation.definition.parameters.begin.fortran"
67
+ }
68
+ },
69
+ "end": "\\)",
70
+ "endCaptures": {
71
+ "0": {
72
+ "name": "punctuation.definition.parameters.end.fortran"
73
+ }
74
+ },
75
+ "patterns": [
76
+ {
77
+ "captures": {
78
+ "1": {
79
+ "name": "variable.parameter.fortran"
80
+ },
81
+ "2": {
82
+ "name": "punctuation.separator.arguments.fortan"
83
+ }
84
+ },
85
+ "match": "([^\\s),]*)\\s*(,)?"
86
+ }
87
+ ]
88
+ },
89
+ {
90
+ "include": "$self"
91
+ },
92
+ {
93
+ "include": "source.fortran.modern"
94
+ }
95
+ ]
96
+ },
97
+ {
98
+ "begin": "\\b(?i:(integer|real|double\\s+precision|complex|logical|character))\\b(?=.*::)",
99
+ "beginCaptures": {
100
+ "1": {
101
+ "name": "storage.type.fortran"
102
+ }
103
+ },
104
+ "comment": "Line of type specification",
105
+ "end": "(?=!)|$",
106
+ "name": "meta.specification.fortran",
107
+ "patterns": [
108
+ {
109
+ "include": "$self"
110
+ }
111
+ ]
112
+ },
113
+ {
114
+ "comment": "statements controling the flow of the program",
115
+ "match": "\\b(?i:(go\\s*to|assign|to|if|then|else|elseif|end\\s*if|continue|stop|pause|do|end\\s*do|while|cycle))\\b",
116
+ "name": "keyword.control.fortran"
117
+ },
118
+ {
119
+ "comment": "programming units",
120
+ "match": "\\b(?i:(program|end\\s+program|entry|block\\s+data|call|return|contains|include))\\b",
121
+ "name": "keyword.control.programming-units.fortran"
122
+ },
123
+ {
124
+ "comment": "i/o statements",
125
+ "match": "\\b(?i:(open|close|read|write|print|inquire|backspace|endfile|format))\\b",
126
+ "name": "keyword.control.io.fortran"
127
+ },
128
+ {
129
+ "comment": "operators",
130
+ "match": "((?<!\\=)\\=(?!\\=)|\\-|\\+|\\/\\/|\\/|(?!^)\\*|::)",
131
+ "name": "keyword.operator.fortran"
132
+ },
133
+ {
134
+ "comment": "logical operators",
135
+ "match": "(?i:(\\.and\\.|\\.or\\.|\\.eq\\.|\\.lt\\.|\\.le\\.|\\.gt\\.|\\.ge\\.|\\.ne\\.|\\.not\\.|\\.eqv\\.|\\.neqv\\.))",
136
+ "name": "keyword.operator.logical.fortran"
137
+ },
138
+ {
139
+ "comment": "argument related intrisics",
140
+ "match": "\\b(?i:(present)(?=\\())",
141
+ "name": "keyword.other.instrisic.argument.fortran"
142
+ },
143
+ {
144
+ "comment": "numeric intrisics",
145
+ "match": "\\b(?i:(abs|aimag|aint|anint|cmplx|conjg|dble|dim|dprod|int|max|min|mod|nint|real|sign|digits|epsilon|huge|maxexponent|minexponent|precision|radix|range|tiny)(?=\\())",
146
+ "name": "keyword.other.instrisic.numeric.fortran"
147
+ },
148
+ {
149
+ "comment": "character string intrinsics",
150
+ "match": "\\b(?i:(achar|adjustl|adjustr|char|iachar|ichar|index|len_trim|repeat|scan|string|trim|verify|len)(?=\\())",
151
+ "name": "keyword.other.instrisic.string.fortran"
152
+ },
153
+ {
154
+ "comment": "mathematical intrisics",
155
+ "match": "\\b(?i:(((acos|asin|atan|atan2|cos|cosh|exp|log|log10|sin|sinh|sqrt|tan|tanh)(?=\\())|(random_number|random_seed)))\\b",
156
+ "name": "keyword.other.instrisic.math.fortran"
157
+ },
158
+ {
159
+ "comment": "data kind intrinsics",
160
+ "match": "\\b(?i:(kind|selected_int_kind|selected_real_kind|transfer)(?=\\())",
161
+ "name": "keyword.other.instrisic.data.fortran"
162
+ },
163
+ {
164
+ "comment": "logical intrinsics",
165
+ "match": "\\b(?i:(logical)(?=\\())",
166
+ "name": "keyword.other.instrisic.logical.fortran"
167
+ },
168
+ {
169
+ "comment": "bit operations intrinsics",
170
+ "match": "\\b(?i:(((bit_size|btest|iand|ibclr|ibits|ibset|ieor|ior|ishift|ishiftc|not)(?=\\())|mvbits))\\b",
171
+ "name": "keyword.other.instrisic.bit.fortran"
172
+ },
173
+ {
174
+ "comment": "floating point intrinsics",
175
+ "match": "\\b(?i:(exponent|fraction|nearest|rrspacing|scale|set_exponent|spacing)(?=\\())",
176
+ "name": "keyword.other.instrisic.floating-point.fortran"
177
+ },
178
+ {
179
+ "comment": "matrix/vector/array intrisics",
180
+ "match": "\\b(?i:(((dot_product|sum|matmul|transpose|all|any|count|maxval|minval|maxloc|minloc|product|sum|lbound|ubound|shape|size|merge|pack|unpack|reshape|spread|cshift|eoshift)(?=\\())|(where|elsewhere|end\\s*where)))\\b",
181
+ "name": "keyword.other.instrisic.array.fortran"
182
+ },
183
+ {
184
+ "comment": "other intrisics",
185
+ "match": "\\b(?i:(((dtime)(?=\\())|(date_and_time|system_clock)))\\b",
186
+ "name": "keyword.other.instrisic.fortran"
187
+ },
188
+ {
189
+ "comment": "data specification",
190
+ "match": "\\b(?i:(integer|real|double\\s+precision|complex|logical|character|block\\sdata|operator|assignment))\\b",
191
+ "name": "storage.type.fortran"
192
+ },
193
+ {
194
+ "comment": "data type attributes",
195
+ "match": "\\b(?i:(dimension|common|equivalence|parameter|external|intrinsic|save|data|implicit\\s*none|implicit|intent|in|out|inout))\\b",
196
+ "name": "storage.modifier.fortran"
197
+ },
198
+ {
199
+ "applyEndPatternLast": 1,
200
+ "begin": "'",
201
+ "beginCaptures": {
202
+ "0": {
203
+ "name": "punctuation.definition.string.begin.fortran"
204
+ }
205
+ },
206
+ "comment": "String",
207
+ "end": "'",
208
+ "endCaptures": {
209
+ "0": {
210
+ "name": "punctuation.definition.string.end.fortran"
211
+ }
212
+ },
213
+ "name": "string.quoted.single.fortran",
214
+ "patterns": [
215
+ {
216
+ "match": "''",
217
+ "name": "constant.character.escape.apostrophe.fortran"
218
+ }
219
+ ]
220
+ },
221
+ {
222
+ "applyEndPatternLast": 1,
223
+ "begin": "\"",
224
+ "beginCaptures": {
225
+ "0": {
226
+ "name": "punctuation.definition.string.begin.fortran"
227
+ }
228
+ },
229
+ "comment": "String",
230
+ "end": "\"",
231
+ "endCaptures": {
232
+ "0": {
233
+ "name": "punctuation.definition.string.end.fortran"
234
+ }
235
+ },
236
+ "name": "string.quoted.double.fortran",
237
+ "patterns": [
238
+ {
239
+ "match": "\"\"",
240
+ "name": "constant.character.escape.quote.fortran"
241
+ }
242
+ ]
243
+ },
244
+ {
245
+ "begin": "^[Cc](?=\\b|[Cc])",
246
+ "beginCaptures": {
247
+ "0": {
248
+ "name": "punctuation.definition.comment.fortran"
249
+ }
250
+ },
251
+ "end": "$\\n?",
252
+ "name": "comment.line.c.fortran",
253
+ "patterns": [
254
+ {
255
+ "match": "\\\\\\s*\\n"
256
+ }
257
+ ]
258
+ },
259
+ {
260
+ "begin": "^\\*",
261
+ "beginCaptures": {
262
+ "0": {
263
+ "name": "punctuation.definition.comment.fortran"
264
+ }
265
+ },
266
+ "end": "$\\n?",
267
+ "name": "comment.line.asterisk.fortran",
268
+ "patterns": [
269
+ {
270
+ "match": "\\\\\\s*\\n"
271
+ }
272
+ ]
273
+ },
274
+ {
275
+ "begin": "^\\s*#\\s*(error|warning)\\b",
276
+ "captures": {
277
+ "1": {
278
+ "name": "keyword.control.import.error.fortran"
279
+ }
280
+ },
281
+ "end": "$\\n?",
282
+ "name": "meta.preprocessor.diagnostic.fortran",
283
+ "patterns": [
284
+ {
285
+ "match": "(?>\\\\\\s*\\n)",
286
+ "name": "punctuation.separator.continuation.fortran"
287
+ }
288
+ ]
289
+ },
290
+ {
291
+ "begin": "^\\s*#\\s*(include|import)\\b\\s+",
292
+ "captures": {
293
+ "1": {
294
+ "name": "keyword.control.import.include.fortran"
295
+ }
296
+ },
297
+ "end": "(?=(?://|/\\*))|$\\n?",
298
+ "name": "meta.preprocessor.fortran.include",
299
+ "patterns": [
300
+ {
301
+ "match": "(?>\\\\\\s*\\n)",
302
+ "name": "punctuation.separator.continuation.fortran"
303
+ },
304
+ {
305
+ "begin": "\"",
306
+ "beginCaptures": {
307
+ "0": {
308
+ "name": "punctuation.definition.string.begin.fortran"
309
+ }
310
+ },
311
+ "end": "\"",
312
+ "endCaptures": {
313
+ "0": {
314
+ "name": "punctuation.definition.string.end.fortran"
315
+ }
316
+ },
317
+ "name": "string.quoted.double.include.fortran"
318
+ },
319
+ {
320
+ "begin": "<",
321
+ "beginCaptures": {
322
+ "0": {
323
+ "name": "punctuation.definition.string.begin.fortran"
324
+ }
325
+ },
326
+ "end": ">",
327
+ "endCaptures": {
328
+ "0": {
329
+ "name": "punctuation.definition.string.end.fortran"
330
+ }
331
+ },
332
+ "name": "string.quoted.other.lt-gt.include.fortran"
333
+ }
334
+ ]
335
+ },
336
+ {
337
+ "include": "#pragma-mark"
338
+ },
339
+ {
340
+ "begin": "^\\s*#\\s*(define|defined|elif|else|if|ifdef|ifndef|line|pragma|undef)\\b",
341
+ "captures": {
342
+ "1": {
343
+ "name": "keyword.control.import.fortran"
344
+ }
345
+ },
346
+ "end": "(?=(?://|/\\*))|$\\n?",
347
+ "name": "meta.preprocessor.fortran",
348
+ "patterns": [
349
+ {
350
+ "match": "(?>\\\\\\s*\\n)",
351
+ "name": "punctuation.separator.continuation.fortran"
352
+ }
353
+ ]
354
+ }
355
+ ],
356
+ "repository": {
357
+ "disabled": {
358
+ "begin": "^\\s*#\\s*if(n?def)?\\b.*$",
359
+ "comment": "eat nested preprocessor if(def)s",
360
+ "end": "^\\s*#\\s*endif\\b.*$",
361
+ "patterns": [
362
+ {
363
+ "include": "#disabled"
364
+ },
365
+ {
366
+ "include": "#pragma-mark"
367
+ }
368
+ ]
369
+ },
370
+ "pragma-mark": {
371
+ "captures": {
372
+ "1": {
373
+ "name": "meta.preprocessor.fortran"
374
+ },
375
+ "2": {
376
+ "name": "keyword.control.import.pragma.fortran"
377
+ },
378
+ "3": {
379
+ "name": "meta.toc-list.pragma-mark.fortran"
380
+ }
381
+ },
382
+ "match": "^\\s*(#\\s*(pragma\\s+mark)\\s+(.*))",
383
+ "name": "meta.section"
384
+ },
385
+ "preprocessor-rule-disabled": {
386
+ "begin": "^\\s*(#(if)\\s+(0)\\b).*",
387
+ "captures": {
388
+ "1": {
389
+ "name": "meta.preprocessor.fortran"
390
+ },
391
+ "2": {
392
+ "name": "keyword.control.import.if.fortran"
393
+ },
394
+ "3": {
395
+ "name": "constant.numeric.preprocessor.fortran"
396
+ }
397
+ },
398
+ "end": "^\\s*(#\\s*(endif)\\b)",
399
+ "patterns": [
400
+ {
401
+ "begin": "^\\s*(#\\s*(else)\\b)",
402
+ "captures": {
403
+ "1": {
404
+ "name": "meta.preprocessor.fortran"
405
+ },
406
+ "2": {
407
+ "name": "keyword.control.import.else.fortran"
408
+ }
409
+ },
410
+ "end": "(?=^\\s*#\\s*endif\\b.*$)",
411
+ "patterns": [
412
+ {
413
+ "include": "$base"
414
+ }
415
+ ]
416
+ },
417
+ {
418
+ "begin": "",
419
+ "end": "(?=^\\s*#\\s*(else|endif)\\b.*$)",
420
+ "name": "comment.block.preprocessor.if-branch",
421
+ "patterns": [
422
+ {
423
+ "include": "#disabled"
424
+ },
425
+ {
426
+ "include": "#pragma-mark"
427
+ }
428
+ ]
429
+ }
430
+ ]
431
+ },
432
+ "preprocessor-rule-enabled": {
433
+ "begin": "^\\s*(#(if)\\s+(0*1)\\b)",
434
+ "captures": {
435
+ "1": {
436
+ "name": "meta.preprocessor.fortran"
437
+ },
438
+ "2": {
439
+ "name": "keyword.control.import.if.fortran"
440
+ },
441
+ "3": {
442
+ "name": "constant.numeric.preprocessor.fortran"
443
+ }
444
+ },
445
+ "end": "^\\s*(#\\s*(endif)\\b)",
446
+ "patterns": [
447
+ {
448
+ "begin": "^\\s*(#\\s*(else)\\b).*",
449
+ "captures": {
450
+ "1": {
451
+ "name": "meta.preprocessor.fortran"
452
+ },
453
+ "2": {
454
+ "name": "keyword.control.import.else.fortran"
455
+ }
456
+ },
457
+ "contentName": "comment.block.preprocessor.else-branch",
458
+ "end": "(?=^\\s*#\\s*endif\\b.*$)",
459
+ "patterns": [
460
+ {
461
+ "include": "#disabled"
462
+ },
463
+ {
464
+ "include": "#pragma-mark"
465
+ }
466
+ ]
467
+ },
468
+ {
469
+ "begin": "",
470
+ "end": "(?=^\\s*#\\s*(else|endif)\\b.*$)",
471
+ "patterns": [
472
+ {
473
+ "include": "$base"
474
+ }
475
+ ]
476
+ }
477
+ ]
478
+ },
479
+ "preprocessor-rule-other": {
480
+ "begin": "^\\s*(#\\s*(if(n?def)?)\\b.*?(?:(?=(?://|/\\*))|$))",
481
+ "captures": {
482
+ "1": {
483
+ "name": "meta.preprocessor.fortran"
484
+ },
485
+ "2": {
486
+ "name": "keyword.control.import.fortran"
487
+ }
488
+ },
489
+ "end": "^\\s*(#\\s*(endif)\\b).*$",
490
+ "patterns": [
491
+ {
492
+ "include": "$base"
493
+ }
494
+ ]
495
+ }
496
+ },
497
+ "scopeName": "source.fortran",
498
+ "uuid": "45253F88-F7CC-49C5-9C32-F3FADD2AB579"
499
+ }