]>
luflow.net public git repositories - flow-web.git/blob - static/highlight/es/languages/gams.js
1 /*! `gams` grammar compiled for Highlight.js 11.11.1 */
2 var hljsGrammar
= (function () {
7 Author: Stefan Bechert <stefan.bechert@gmx.net>
8 Contributors: Oleg Efimov <efimovov@gmail.com>, Mikko Kouhia <mikko.kouhia@iki.fi>
9 Description: The General Algebraic Modeling System language
10 Website: https://www.gams.com
14 /** @type LanguageFn */
16 const regex
= hljs
.regex
;
19 'abort acronym acronyms alias all and assign binary card diag display '
20 + 'else eq file files for free ge gt if integer le loop lt maximizing '
21 + 'minimizing model models ne negative no not option options or ord '
22 + 'positive prod put putpage puttl repeat sameas semicont semiint smax '
23 + 'smin solve sos1 sos2 sum system table then until using while xor yes',
27 'abs arccos arcsin arctan arctan2 Beta betaReg binomial ceil centropy '
28 + 'cos cosh cvPower div div0 eDist entropy errorf execSeed exp fact '
29 + 'floor frac gamma gammaReg log logBeta logGamma log10 log2 mapVal max '
30 + 'min mod ncpCM ncpF ncpVUpow ncpVUsin normal pi poly power '
31 + 'randBinomial randLinear randTriangle round rPower sigmoid sign '
32 + 'signPower sin sinh slexp sllog10 slrec sqexp sqlog10 sqr sqrec sqrt '
33 + 'tan tanh trunc uniform uniformInt vcPower bool_and bool_eqv bool_imp '
34 + 'bool_not bool_or bool_xor ifThen rel_eq rel_ge rel_gt rel_le rel_lt '
35 + 'rel_ne gday gdow ghour gleap gmillisec gminute gmonth gsecond gyear '
36 + 'jdate jnow jstart jtime errorLevel execError gamsRelease gamsVersion '
37 + 'handleCollect handleDelete handleStatus handleSubmit heapFree '
38 + 'heapLimit heapSize jobHandle jobKill jobStatus jobTerminate '
39 + 'licenseLevel licenseStatus maxExecError sleep timeClose timeComp '
40 + 'timeElapsed timeExec timeStart'
52 { begin: /=[lgenxc]=/ },
56 const QSTR
= { // One-line quoted comment string
69 contains: [ hljs
.BACKSLASH_ESCAPE
]
77 hljs
.C_LINE_COMMENT_MODE
,
78 hljs
.C_BLOCK_COMMENT_MODE
,
79 hljs
.QUOTE_STRING_MODE
,
80 hljs
.APOS_STRING_MODE
,
84 const COMMENT_WORD
= /[a-z0-9&#*=?@\\><:,()$[\]_.{}!+%^-]+/;
85 const DESCTEXT
= { // Parameter/set/variable description text
86 begin: /[a
-z
][a
-z0
-9_
]*(\([a
-z0
-9_
, ]*\))?[ \t]+/,
95 // one comment word, then possibly more
98 // [ ] because \s would be too broad (matching newlines)
99 regex
.anyNumberOfTimes(regex
.concat(/[ ]+/, COMMENT_WORD
))
109 case_insensitive: true,
112 hljs
.COMMENT(/^\$ontext/, /^\$offtext/),
115 begin: '^\\$[a-z0-9]+',
120 className: 'keyword',
121 begin: '^\\$[a-z0-9]+'
125 hljs
.COMMENT('^\\*', '$'),
126 hljs
.C_LINE_COMMENT_MODE
,
127 hljs
.C_BLOCK_COMMENT_MODE
,
128 hljs
.QUOTE_STRING_MODE
,
129 hljs
.APOS_STRING_MODE
,
133 'set sets parameter parameters variable variables '
134 + 'scalar scalars equation equations',
137 hljs
.COMMENT('^\\*', '$'),
138 hljs
.C_LINE_COMMENT_MODE
,
139 hljs
.C_BLOCK_COMMENT_MODE
,
140 hljs
.QUOTE_STRING_MODE
,
141 hljs
.APOS_STRING_MODE
,
146 { // table environment
147 beginKeywords: 'table',
151 { // table header row
152 beginKeywords: 'table',
154 contains: [ DESCTEXT
]
156 hljs
.COMMENT('^\\*', '$'),
157 hljs
.C_LINE_COMMENT_MODE
,
158 hljs
.C_BLOCK_COMMENT_MODE
,
159 hljs
.QUOTE_STRING_MODE
,
160 hljs
.APOS_STRING_MODE
,
162 // Table does not contain DESCTEXT or ASSIGNMENT
165 // Function definitions
167 className: 'function',
168 begin: /^[a
-z
][a
-z0
-9_
,\-+' ()$]+\.{2}/,
189 export default hljsGrammar;