mode-csound_document.js 119 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002
  1. ace.define("ace/mode/csound_preprocessor_highlight_rules",[], function(require, exports, module) {
  2. "use strict";
  3. var oop = require("../lib/oop");
  4. var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
  5. var CsoundPreprocessorHighlightRules = function(embeddedRulePrefix) {
  6. this.embeddedRulePrefix = embeddedRulePrefix === undefined ? "" : embeddedRulePrefix;
  7. this.semicolonComments = {
  8. token : "comment.line.semicolon.csound",
  9. regex : ";.*$"
  10. };
  11. this.comments = [
  12. {
  13. token : "punctuation.definition.comment.begin.csound",
  14. regex : "/\\*",
  15. push : [
  16. {
  17. token : "punctuation.definition.comment.end.csound",
  18. regex : "\\*/",
  19. next : "pop"
  20. }, {
  21. defaultToken: "comment.block.csound"
  22. }
  23. ]
  24. }, {
  25. token : "comment.line.double-slash.csound",
  26. regex : "//.*$"
  27. },
  28. this.semicolonComments
  29. ];
  30. this.macroUses = [
  31. {
  32. token : ["entity.name.function.preprocessor.csound", "punctuation.definition.macro-parameter-value-list.begin.csound"],
  33. regex : /(\$[A-Z_a-z]\w*\.?)(\()/,
  34. next : "macro parameter value list"
  35. }, {
  36. token : "entity.name.function.preprocessor.csound",
  37. regex : /\$[A-Z_a-z]\w*(?:\.|\b)/
  38. }
  39. ];
  40. this.numbers = [
  41. {
  42. token : "constant.numeric.float.csound",
  43. regex : /(?:\d+[Ee][+-]?\d+)|(?:\d+\.\d*|\d*\.\d+)(?:[Ee][+-]?\d+)?/
  44. }, {
  45. token : ["storage.type.number.csound", "constant.numeric.integer.hexadecimal.csound"],
  46. regex : /(0[Xx])([0-9A-Fa-f]+)/
  47. }, {
  48. token : "constant.numeric.integer.decimal.csound",
  49. regex : /\d+/
  50. }
  51. ];
  52. this.bracedStringContents = [
  53. {
  54. token : "constant.character.escape.csound",
  55. regex : /\\(?:[\\abnrt"]|[0-7]{1,3})/
  56. },
  57. {
  58. token : "constant.character.placeholder.csound",
  59. regex : /%[#0\- +]*\d*(?:\.\d+)?[diuoxXfFeEgGaAcs]/
  60. }, {
  61. token : "constant.character.escape.csound",
  62. regex : /%%/
  63. }
  64. ];
  65. this.quotedStringContents = [
  66. this.macroUses,
  67. this.bracedStringContents
  68. ];
  69. var start = [
  70. this.comments,
  71. {
  72. token : "keyword.preprocessor.csound",
  73. regex : /#(?:e(?:nd(?:if)?|lse)\b|##)|@@?[ \t]*\d+/
  74. }, {
  75. token : "keyword.preprocessor.csound",
  76. regex : /#include/,
  77. push : [
  78. this.comments,
  79. {
  80. token : "string.csound",
  81. regex : /([^ \t])(?:.*?\1)/,
  82. next : "pop"
  83. }
  84. ]
  85. }, {
  86. token : "keyword.preprocessor.csound",
  87. regex : /#includestr/,
  88. push : [
  89. this.comments,
  90. {
  91. token : "string.csound",
  92. regex : /([^ \t])(?:.*?\1)/,
  93. next : "pop"
  94. }
  95. ]
  96. }, {
  97. token : "keyword.preprocessor.csound",
  98. regex : /#[ \t]*define/,
  99. next : "define directive"
  100. }, {
  101. token : "keyword.preprocessor.csound",
  102. regex : /#(?:ifn?def|undef)\b/,
  103. next : "macro directive"
  104. },
  105. this.macroUses
  106. ];
  107. this.$rules = {
  108. "start": start,
  109. "define directive": [
  110. this.comments,
  111. {
  112. token : "entity.name.function.preprocessor.csound",
  113. regex : /[A-Z_a-z]\w*/
  114. }, {
  115. token : "punctuation.definition.macro-parameter-name-list.begin.csound",
  116. regex : /\(/,
  117. next : "macro parameter name list"
  118. }, {
  119. token : "punctuation.definition.macro.begin.csound",
  120. regex : /#/,
  121. next : "macro body"
  122. }
  123. ],
  124. "macro parameter name list": [
  125. {
  126. token : "variable.parameter.preprocessor.csound",
  127. regex : /[A-Z_a-z]\w*/
  128. }, {
  129. token : "punctuation.definition.macro-parameter-name-list.end.csound",
  130. regex : /\)/,
  131. next : "define directive"
  132. }
  133. ],
  134. "macro body": [
  135. {
  136. token : "constant.character.escape.csound",
  137. regex : /\\#/
  138. }, {
  139. token : "punctuation.definition.macro.end.csound",
  140. regex : /#/,
  141. next : "start"
  142. },
  143. start
  144. ],
  145. "macro directive": [
  146. this.comments,
  147. {
  148. token : "entity.name.function.preprocessor.csound",
  149. regex : /[A-Z_a-z]\w*/,
  150. next : "start"
  151. }
  152. ],
  153. "macro parameter value list": [
  154. {
  155. token : "punctuation.definition.macro-parameter-value-list.end.csound",
  156. regex : /\)/,
  157. next : "start"
  158. }, {
  159. token : "punctuation.definition.string.begin.csound",
  160. regex : /"/,
  161. next : "macro parameter value quoted string"
  162. }, this.pushRule({
  163. token : "punctuation.macro-parameter-value-parenthetical.begin.csound",
  164. regex : /\(/,
  165. next : "macro parameter value parenthetical"
  166. }), {
  167. token : "punctuation.macro-parameter-value-separator.csound",
  168. regex : "[#']"
  169. }
  170. ],
  171. "macro parameter value quoted string": [
  172. {
  173. token : "constant.character.escape.csound",
  174. regex : /\\[#'()]/
  175. }, {
  176. token : "invalid.illegal.csound",
  177. regex : /[#'()]/
  178. }, {
  179. token : "punctuation.definition.string.end.csound",
  180. regex : /"/,
  181. next : "macro parameter value list"
  182. },
  183. this.quotedStringContents,
  184. {
  185. defaultToken: "string.quoted.csound"
  186. }
  187. ],
  188. "macro parameter value parenthetical": [
  189. {
  190. token : "constant.character.escape.csound",
  191. regex : /\\\)/
  192. }, this.popRule({
  193. token : "punctuation.macro-parameter-value-parenthetical.end.csound",
  194. regex : /\)/
  195. }), this.pushRule({
  196. token : "punctuation.macro-parameter-value-parenthetical.begin.csound",
  197. regex : /\(/,
  198. next : "macro parameter value parenthetical"
  199. }),
  200. start
  201. ]
  202. };
  203. };
  204. oop.inherits(CsoundPreprocessorHighlightRules, TextHighlightRules);
  205. (function() {
  206. this.pushRule = function(params) {
  207. if (Array.isArray(params.next)) {
  208. for (var i = 0; i < params.next.length; i++) {
  209. params.next[i] = this.embeddedRulePrefix + params.next[i];
  210. }
  211. }
  212. return {
  213. regex : params.regex, onMatch: function(value, currentState, stack, line) {
  214. if (stack.length === 0)
  215. stack.push(currentState);
  216. if (Array.isArray(params.next)) {
  217. for (var i = 0; i < params.next.length; i++) {
  218. stack.push(params.next[i]);
  219. }
  220. } else {
  221. stack.push(params.next);
  222. }
  223. this.next = stack[stack.length - 1];
  224. return params.token;
  225. },
  226. get next() { return Array.isArray(params.next) ? params.next[params.next.length - 1] : params.next; },
  227. set next(next) {
  228. if (!Array.isArray(params.next)) {
  229. params.next = next;
  230. }
  231. },
  232. get token() { return params.token; }
  233. };
  234. };
  235. this.popRule = function(params) {
  236. if (params.next) {
  237. params.next = this.embeddedRulePrefix + params.next;
  238. }
  239. return {
  240. regex : params.regex, onMatch: function(value, currentState, stack, line) {
  241. stack.pop();
  242. if (params.next) {
  243. stack.push(params.next);
  244. this.next = stack[stack.length - 1];
  245. } else {
  246. this.next = stack.length > 1 ? stack[stack.length - 1] : stack.pop();
  247. }
  248. return params.token;
  249. }
  250. };
  251. };
  252. }).call(CsoundPreprocessorHighlightRules.prototype);
  253. exports.CsoundPreprocessorHighlightRules = CsoundPreprocessorHighlightRules;
  254. });
  255. ace.define("ace/mode/csound_score_highlight_rules",[], function(require, exports, module) {
  256. "use strict";
  257. var oop = require("../lib/oop");
  258. var CsoundPreprocessorHighlightRules = require("./csound_preprocessor_highlight_rules").CsoundPreprocessorHighlightRules;
  259. var CsoundScoreHighlightRules = function(embeddedRulePrefix) {
  260. CsoundPreprocessorHighlightRules.call(this, embeddedRulePrefix);
  261. this.quotedStringContents.push({
  262. token : "invalid.illegal.csound-score",
  263. regex : /[^"]*$/
  264. });
  265. var start = this.$rules.start;
  266. start.push(
  267. {
  268. token : "keyword.control.csound-score",
  269. regex : /[abCdefiqstvxy]/
  270. }, {
  271. token : "invalid.illegal.csound-score",
  272. regex : /w/
  273. }, {
  274. token : "constant.numeric.language.csound-score",
  275. regex : /z/
  276. }, {
  277. token : ["keyword.control.csound-score", "constant.numeric.integer.decimal.csound-score"],
  278. regex : /([nNpP][pP])(\d+)/
  279. }, {
  280. token : "keyword.other.csound-score",
  281. regex : /[mn]/,
  282. push : [
  283. {
  284. token : "empty",
  285. regex : /$/,
  286. next : "pop"
  287. },
  288. this.comments,
  289. {
  290. token : "entity.name.label.csound-score",
  291. regex : /[A-Z_a-z]\w*/
  292. }
  293. ]
  294. }, {
  295. token : "keyword.preprocessor.csound-score",
  296. regex : /r\b/,
  297. next : "repeat section"
  298. },
  299. this.numbers,
  300. {
  301. token : "keyword.operator.csound-score",
  302. regex : "[!+\\-*/^%&|<>#~.]"
  303. },
  304. this.pushRule({
  305. token : "punctuation.definition.string.begin.csound-score",
  306. regex : /"/,
  307. next : "quoted string"
  308. }),
  309. this.pushRule({
  310. token : "punctuation.braced-loop.begin.csound-score",
  311. regex : /{/,
  312. next : "loop after left brace"
  313. })
  314. );
  315. this.addRules({
  316. "repeat section": [
  317. {
  318. token : "empty",
  319. regex : /$/,
  320. next : "start"
  321. },
  322. this.comments,
  323. {
  324. token : "constant.numeric.integer.decimal.csound-score",
  325. regex : /\d+/,
  326. next : "repeat section before label"
  327. }
  328. ],
  329. "repeat section before label": [
  330. {
  331. token : "empty",
  332. regex : /$/,
  333. next : "start"
  334. },
  335. this.comments,
  336. {
  337. token : "entity.name.label.csound-score",
  338. regex : /[A-Z_a-z]\w*/,
  339. next : "start"
  340. }
  341. ],
  342. "quoted string": [
  343. this.popRule({
  344. token : "punctuation.definition.string.end.csound-score",
  345. regex : /"/
  346. }),
  347. this.quotedStringContents,
  348. {
  349. defaultToken: "string.quoted.csound-score"
  350. }
  351. ],
  352. "loop after left brace": [
  353. this.popRule({
  354. token : "constant.numeric.integer.decimal.csound-score",
  355. regex : /\d+/,
  356. next : "loop after repeat count"
  357. }),
  358. this.comments,
  359. {
  360. token : "invalid.illegal.csound",
  361. regex : /\S.*/
  362. }
  363. ],
  364. "loop after repeat count": [
  365. this.popRule({
  366. token : "entity.name.function.preprocessor.csound-score",
  367. regex : /[A-Z_a-z]\w*\b/,
  368. next : "loop after macro name"
  369. }),
  370. this.comments,
  371. {
  372. token : "invalid.illegal.csound",
  373. regex : /\S.*/
  374. }
  375. ],
  376. "loop after macro name": [
  377. start,
  378. this.popRule({
  379. token : "punctuation.braced-loop.end.csound-score",
  380. regex : /}/
  381. })
  382. ]
  383. });
  384. this.normalizeRules();
  385. };
  386. oop.inherits(CsoundScoreHighlightRules, CsoundPreprocessorHighlightRules);
  387. exports.CsoundScoreHighlightRules = CsoundScoreHighlightRules;
  388. });
  389. ace.define("ace/mode/lua_highlight_rules",[], function(require, exports, module) {
  390. "use strict";
  391. var oop = require("../lib/oop");
  392. var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
  393. var LuaHighlightRules = function() {
  394. var keywords = (
  395. "break|do|else|elseif|end|for|function|if|in|local|repeat|"+
  396. "return|then|until|while|or|and|not"
  397. );
  398. var builtinConstants = ("true|false|nil|_G|_VERSION");
  399. var functions = (
  400. "string|xpcall|package|tostring|print|os|unpack|require|"+
  401. "getfenv|setmetatable|next|assert|tonumber|io|rawequal|"+
  402. "collectgarbage|getmetatable|module|rawset|math|debug|"+
  403. "pcall|table|newproxy|type|coroutine|_G|select|gcinfo|"+
  404. "pairs|rawget|loadstring|ipairs|_VERSION|dofile|setfenv|"+
  405. "load|error|loadfile|"+
  406. "sub|upper|len|gfind|rep|find|match|char|dump|gmatch|"+
  407. "reverse|byte|format|gsub|lower|preload|loadlib|loaded|"+
  408. "loaders|cpath|config|path|seeall|exit|setlocale|date|"+
  409. "getenv|difftime|remove|time|clock|tmpname|rename|execute|"+
  410. "lines|write|close|flush|open|output|type|read|stderr|"+
  411. "stdin|input|stdout|popen|tmpfile|log|max|acos|huge|"+
  412. "ldexp|pi|cos|tanh|pow|deg|tan|cosh|sinh|random|randomseed|"+
  413. "frexp|ceil|floor|rad|abs|sqrt|modf|asin|min|mod|fmod|log10|"+
  414. "atan2|exp|sin|atan|getupvalue|debug|sethook|getmetatable|"+
  415. "gethook|setmetatable|setlocal|traceback|setfenv|getinfo|"+
  416. "setupvalue|getlocal|getregistry|getfenv|setn|insert|getn|"+
  417. "foreachi|maxn|foreach|concat|sort|remove|resume|yield|"+
  418. "status|wrap|create|running|"+
  419. "__add|__sub|__mod|__unm|__concat|__lt|__index|__call|__gc|__metatable|"+
  420. "__mul|__div|__pow|__len|__eq|__le|__newindex|__tostring|__mode|__tonumber"
  421. );
  422. var stdLibaries = ("string|package|os|io|math|debug|table|coroutine");
  423. var deprecatedIn5152 = ("setn|foreach|foreachi|gcinfo|log10|maxn");
  424. var keywordMapper = this.createKeywordMapper({
  425. "keyword": keywords,
  426. "support.function": functions,
  427. "keyword.deprecated": deprecatedIn5152,
  428. "constant.library": stdLibaries,
  429. "constant.language": builtinConstants,
  430. "variable.language": "self"
  431. }, "identifier");
  432. var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))";
  433. var hexInteger = "(?:0[xX][\\dA-Fa-f]+)";
  434. var integer = "(?:" + decimalInteger + "|" + hexInteger + ")";
  435. var fraction = "(?:\\.\\d+)";
  436. var intPart = "(?:\\d+)";
  437. var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))";
  438. var floatNumber = "(?:" + pointFloat + ")";
  439. this.$rules = {
  440. "start" : [{
  441. stateName: "bracketedComment",
  442. onMatch : function(value, currentState, stack){
  443. stack.unshift(this.next, value.length - 2, currentState);
  444. return "comment";
  445. },
  446. regex : /\-\-\[=*\[/,
  447. next : [
  448. {
  449. onMatch : function(value, currentState, stack) {
  450. if (value.length == stack[1]) {
  451. stack.shift();
  452. stack.shift();
  453. this.next = stack.shift();
  454. } else {
  455. this.next = "";
  456. }
  457. return "comment";
  458. },
  459. regex : /\]=*\]/,
  460. next : "start"
  461. }, {
  462. defaultToken : "comment"
  463. }
  464. ]
  465. },
  466. {
  467. token : "comment",
  468. regex : "\\-\\-.*$"
  469. },
  470. {
  471. stateName: "bracketedString",
  472. onMatch : function(value, currentState, stack){
  473. stack.unshift(this.next, value.length, currentState);
  474. return "string.start";
  475. },
  476. regex : /\[=*\[/,
  477. next : [
  478. {
  479. onMatch : function(value, currentState, stack) {
  480. if (value.length == stack[1]) {
  481. stack.shift();
  482. stack.shift();
  483. this.next = stack.shift();
  484. } else {
  485. this.next = "";
  486. }
  487. return "string.end";
  488. },
  489. regex : /\]=*\]/,
  490. next : "start"
  491. }, {
  492. defaultToken : "string"
  493. }
  494. ]
  495. },
  496. {
  497. token : "string", // " string
  498. regex : '"(?:[^\\\\]|\\\\.)*?"'
  499. }, {
  500. token : "string", // ' string
  501. regex : "'(?:[^\\\\]|\\\\.)*?'"
  502. }, {
  503. token : "constant.numeric", // float
  504. regex : floatNumber
  505. }, {
  506. token : "constant.numeric", // integer
  507. regex : integer + "\\b"
  508. }, {
  509. token : keywordMapper,
  510. regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
  511. }, {
  512. token : "keyword.operator",
  513. regex : "\\+|\\-|\\*|\\/|%|\\#|\\^|~|<|>|<=|=>|==|~=|=|\\:|\\.\\.\\.|\\.\\."
  514. }, {
  515. token : "paren.lparen",
  516. regex : "[\\[\\(\\{]"
  517. }, {
  518. token : "paren.rparen",
  519. regex : "[\\]\\)\\}]"
  520. }, {
  521. token : "text",
  522. regex : "\\s+|\\w+"
  523. } ]
  524. };
  525. this.normalizeRules();
  526. };
  527. oop.inherits(LuaHighlightRules, TextHighlightRules);
  528. exports.LuaHighlightRules = LuaHighlightRules;
  529. });
  530. ace.define("ace/mode/python_highlight_rules",[], function(require, exports, module) {
  531. "use strict";
  532. var oop = require("../lib/oop");
  533. var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
  534. var PythonHighlightRules = function() {
  535. var keywords = (
  536. "and|as|assert|break|class|continue|def|del|elif|else|except|exec|" +
  537. "finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|" +
  538. "raise|return|try|while|with|yield|async|await|nonlocal"
  539. );
  540. var builtinConstants = (
  541. "True|False|None|NotImplemented|Ellipsis|__debug__"
  542. );
  543. var builtinFunctions = (
  544. "abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|" +
  545. "eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|" +
  546. "binfile|bin|iter|property|tuple|bool|filter|len|range|type|bytearray|" +
  547. "float|list|raw_input|unichr|callable|format|locals|reduce|unicode|" +
  548. "chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|" +
  549. "cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|" +
  550. "__import__|complex|hash|min|apply|delattr|help|next|setattr|set|" +
  551. "buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern|" +
  552. "ascii|breakpoint|bytes"
  553. );
  554. var keywordMapper = this.createKeywordMapper({
  555. "invalid.deprecated": "debugger",
  556. "support.function": builtinFunctions,
  557. "variable.language": "self|cls",
  558. "constant.language": builtinConstants,
  559. "keyword": keywords
  560. }, "identifier");
  561. var strPre = "[uU]?";
  562. var strRawPre = "[rR]";
  563. var strFormatPre = "[fF]";
  564. var strRawFormatPre = "(?:[rR][fF]|[fF][rR])";
  565. var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))";
  566. var octInteger = "(?:0[oO]?[0-7]+)";
  567. var hexInteger = "(?:0[xX][\\dA-Fa-f]+)";
  568. var binInteger = "(?:0[bB][01]+)";
  569. var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")";
  570. var exponent = "(?:[eE][+-]?\\d+)";
  571. var fraction = "(?:\\.\\d+)";
  572. var intPart = "(?:\\d+)";
  573. var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))";
  574. var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")";
  575. var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")";
  576. var stringEscape = "\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})";
  577. this.$rules = {
  578. "start" : [ {
  579. token : "comment",
  580. regex : "#.*$"
  581. }, {
  582. token : "string", // multi line """ string start
  583. regex : strPre + '"{3}',
  584. next : "qqstring3"
  585. }, {
  586. token : "string", // " string
  587. regex : strPre + '"(?=.)',
  588. next : "qqstring"
  589. }, {
  590. token : "string", // multi line ''' string start
  591. regex : strPre + "'{3}",
  592. next : "qstring3"
  593. }, {
  594. token : "string", // ' string
  595. regex : strPre + "'(?=.)",
  596. next : "qstring"
  597. }, {
  598. token: "string",
  599. regex: strRawPre + '"{3}',
  600. next: "rawqqstring3"
  601. }, {
  602. token: "string",
  603. regex: strRawPre + '"(?=.)',
  604. next: "rawqqstring"
  605. }, {
  606. token: "string",
  607. regex: strRawPre + "'{3}",
  608. next: "rawqstring3"
  609. }, {
  610. token: "string",
  611. regex: strRawPre + "'(?=.)",
  612. next: "rawqstring"
  613. }, {
  614. token: "string",
  615. regex: strFormatPre + '"{3}',
  616. next: "fqqstring3"
  617. }, {
  618. token: "string",
  619. regex: strFormatPre + '"(?=.)',
  620. next: "fqqstring"
  621. }, {
  622. token: "string",
  623. regex: strFormatPre + "'{3}",
  624. next: "fqstring3"
  625. }, {
  626. token: "string",
  627. regex: strFormatPre + "'(?=.)",
  628. next: "fqstring"
  629. },{
  630. token: "string",
  631. regex: strRawFormatPre + '"{3}',
  632. next: "rfqqstring3"
  633. }, {
  634. token: "string",
  635. regex: strRawFormatPre + '"(?=.)',
  636. next: "rfqqstring"
  637. }, {
  638. token: "string",
  639. regex: strRawFormatPre + "'{3}",
  640. next: "rfqstring3"
  641. }, {
  642. token: "string",
  643. regex: strRawFormatPre + "'(?=.)",
  644. next: "rfqstring"
  645. }, {
  646. token: "keyword.operator",
  647. regex: "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|@|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="
  648. }, {
  649. token: "punctuation",
  650. regex: ",|:|;|\\->|\\+=|\\-=|\\*=|\\/=|\\/\\/=|%=|@=|&=|\\|=|^=|>>=|<<=|\\*\\*="
  651. }, {
  652. token: "paren.lparen",
  653. regex: "[\\[\\(\\{]"
  654. }, {
  655. token: "paren.rparen",
  656. regex: "[\\]\\)\\}]"
  657. }, {
  658. token: "text",
  659. regex: "\\s+"
  660. }, {
  661. include: "constants"
  662. }],
  663. "qqstring3": [{
  664. token: "constant.language.escape",
  665. regex: stringEscape
  666. }, {
  667. token: "string", // multi line """ string end
  668. regex: '"{3}',
  669. next: "start"
  670. }, {
  671. defaultToken: "string"
  672. }],
  673. "qstring3": [{
  674. token: "constant.language.escape",
  675. regex: stringEscape
  676. }, {
  677. token: "string", // multi line ''' string end
  678. regex: "'{3}",
  679. next: "start"
  680. }, {
  681. defaultToken: "string"
  682. }],
  683. "qqstring": [{
  684. token: "constant.language.escape",
  685. regex: stringEscape
  686. }, {
  687. token: "string",
  688. regex: "\\\\$",
  689. next: "qqstring"
  690. }, {
  691. token: "string",
  692. regex: '"|$',
  693. next: "start"
  694. }, {
  695. defaultToken: "string"
  696. }],
  697. "qstring": [{
  698. token: "constant.language.escape",
  699. regex: stringEscape
  700. }, {
  701. token: "string",
  702. regex: "\\\\$",
  703. next: "qstring"
  704. }, {
  705. token: "string",
  706. regex: "'|$",
  707. next: "start"
  708. }, {
  709. defaultToken: "string"
  710. }],
  711. "rawqqstring3": [{
  712. token: "string", // multi line """ string end
  713. regex: '"{3}',
  714. next: "start"
  715. }, {
  716. defaultToken: "string"
  717. }],
  718. "rawqstring3": [{
  719. token: "string", // multi line ''' string end
  720. regex: "'{3}",
  721. next: "start"
  722. }, {
  723. defaultToken: "string"
  724. }],
  725. "rawqqstring": [{
  726. token: "string",
  727. regex: "\\\\$",
  728. next: "rawqqstring"
  729. }, {
  730. token: "string",
  731. regex: '"|$',
  732. next: "start"
  733. }, {
  734. defaultToken: "string"
  735. }],
  736. "rawqstring": [{
  737. token: "string",
  738. regex: "\\\\$",
  739. next: "rawqstring"
  740. }, {
  741. token: "string",
  742. regex: "'|$",
  743. next: "start"
  744. }, {
  745. defaultToken: "string"
  746. }],
  747. "fqqstring3": [{
  748. token: "constant.language.escape",
  749. regex: stringEscape
  750. }, {
  751. token: "string", // multi line """ string end
  752. regex: '"{3}',
  753. next: "start"
  754. }, {
  755. token: "paren.lparen",
  756. regex: "{",
  757. push: "fqstringParRules"
  758. }, {
  759. defaultToken: "string"
  760. }],
  761. "fqstring3": [{
  762. token: "constant.language.escape",
  763. regex: stringEscape
  764. }, {
  765. token: "string", // multi line ''' string end
  766. regex: "'{3}",
  767. next: "start"
  768. }, {
  769. token: "paren.lparen",
  770. regex: "{",
  771. push: "fqstringParRules"
  772. }, {
  773. defaultToken: "string"
  774. }],
  775. "fqqstring": [{
  776. token: "constant.language.escape",
  777. regex: stringEscape
  778. }, {
  779. token: "string",
  780. regex: "\\\\$",
  781. next: "fqqstring"
  782. }, {
  783. token: "string",
  784. regex: '"|$',
  785. next: "start"
  786. }, {
  787. token: "paren.lparen",
  788. regex: "{",
  789. push: "fqstringParRules"
  790. }, {
  791. defaultToken: "string"
  792. }],
  793. "fqstring": [{
  794. token: "constant.language.escape",
  795. regex: stringEscape
  796. }, {
  797. token: "string",
  798. regex: "'|$",
  799. next: "start"
  800. }, {
  801. token: "paren.lparen",
  802. regex: "{",
  803. push: "fqstringParRules"
  804. }, {
  805. defaultToken: "string"
  806. }],
  807. "rfqqstring3": [{
  808. token: "string", // multi line """ string end
  809. regex: '"{3}',
  810. next: "start"
  811. }, {
  812. token: "paren.lparen",
  813. regex: "{",
  814. push: "fqstringParRules"
  815. }, {
  816. defaultToken: "string"
  817. }],
  818. "rfqstring3": [{
  819. token: "string", // multi line ''' string end
  820. regex: "'{3}",
  821. next: "start"
  822. }, {
  823. token: "paren.lparen",
  824. regex: "{",
  825. push: "fqstringParRules"
  826. }, {
  827. defaultToken: "string"
  828. }],
  829. "rfqqstring": [{
  830. token: "string",
  831. regex: "\\\\$",
  832. next: "rfqqstring"
  833. }, {
  834. token: "string",
  835. regex: '"|$',
  836. next: "start"
  837. }, {
  838. token: "paren.lparen",
  839. regex: "{",
  840. push: "fqstringParRules"
  841. }, {
  842. defaultToken: "string"
  843. }],
  844. "rfqstring": [{
  845. token: "string",
  846. regex: "'|$",
  847. next: "start"
  848. }, {
  849. token: "paren.lparen",
  850. regex: "{",
  851. push: "fqstringParRules"
  852. }, {
  853. defaultToken: "string"
  854. }],
  855. "fqstringParRules": [{//TODO: nested {}
  856. token: "paren.lparen",
  857. regex: "[\\[\\(]"
  858. }, {
  859. token: "paren.rparen",
  860. regex: "[\\]\\)]"
  861. }, {
  862. token: "string",
  863. regex: "\\s+"
  864. }, {
  865. token: "string",
  866. regex: "'(.)*'"
  867. }, {
  868. token: "string",
  869. regex: '"(.)*"'
  870. }, {
  871. token: "function.support",
  872. regex: "(!s|!r|!a)"
  873. }, {
  874. include: "constants"
  875. },{
  876. token: 'paren.rparen',
  877. regex: "}",
  878. next: 'pop'
  879. },{
  880. token: 'paren.lparen',
  881. regex: "{",
  882. push: "fqstringParRules"
  883. }],
  884. "constants": [{
  885. token: "constant.numeric", // imaginary
  886. regex: "(?:" + floatNumber + "|\\d+)[jJ]\\b"
  887. }, {
  888. token: "constant.numeric", // float
  889. regex: floatNumber
  890. }, {
  891. token: "constant.numeric", // long integer
  892. regex: integer + "[lL]\\b"
  893. }, {
  894. token: "constant.numeric", // integer
  895. regex: integer + "\\b"
  896. }, {
  897. token: ["punctuation", "function.support"],// method
  898. regex: "(\\.)([a-zA-Z_]+)\\b"
  899. }, {
  900. token: keywordMapper,
  901. regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
  902. }]
  903. };
  904. this.normalizeRules();
  905. };
  906. oop.inherits(PythonHighlightRules, TextHighlightRules);
  907. exports.PythonHighlightRules = PythonHighlightRules;
  908. });
  909. ace.define("ace/mode/csound_orchestra_highlight_rules",[], function(require, exports, module) {
  910. "use strict";
  911. var lang = require("../lib/lang");
  912. var oop = require("../lib/oop");
  913. var CsoundPreprocessorHighlightRules = require("./csound_preprocessor_highlight_rules").CsoundPreprocessorHighlightRules;
  914. var CsoundScoreHighlightRules = require("./csound_score_highlight_rules").CsoundScoreHighlightRules;
  915. var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules;
  916. var PythonHighlightRules = require("./python_highlight_rules").PythonHighlightRules;
  917. var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) {
  918. CsoundPreprocessorHighlightRules.call(this, embeddedRulePrefix);
  919. var opcodes = [
  920. "ATSadd",
  921. "ATSaddnz",
  922. "ATSbufread",
  923. "ATScross",
  924. "ATSinfo",
  925. "ATSinterpread",
  926. "ATSpartialtap",
  927. "ATSread",
  928. "ATSreadnz",
  929. "ATSsinnoi",
  930. "FLbox",
  931. "FLbutBank",
  932. "FLbutton",
  933. "FLcloseButton",
  934. "FLcolor",
  935. "FLcolor2",
  936. "FLcount",
  937. "FLexecButton",
  938. "FLgetsnap",
  939. "FLgroup",
  940. "FLgroupEnd",
  941. "FLgroup_end",
  942. "FLhide",
  943. "FLhvsBox",
  944. "FLhvsBoxSetValue",
  945. "FLjoy",
  946. "FLkeyIn",
  947. "FLknob",
  948. "FLlabel",
  949. "FLloadsnap",
  950. "FLmouse",
  951. "FLpack",
  952. "FLpackEnd",
  953. "FLpack_end",
  954. "FLpanel",
  955. "FLpanelEnd",
  956. "FLpanel_end",
  957. "FLprintk",
  958. "FLprintk2",
  959. "FLroller",
  960. "FLrun",
  961. "FLsavesnap",
  962. "FLscroll",
  963. "FLscrollEnd",
  964. "FLscroll_end",
  965. "FLsetAlign",
  966. "FLsetBox",
  967. "FLsetColor",
  968. "FLsetColor2",
  969. "FLsetFont",
  970. "FLsetPosition",
  971. "FLsetSize",
  972. "FLsetSnapGroup",
  973. "FLsetText",
  974. "FLsetTextColor",
  975. "FLsetTextSize",
  976. "FLsetTextType",
  977. "FLsetVal",
  978. "FLsetVal_i",
  979. "FLsetVali",
  980. "FLsetsnap",
  981. "FLshow",
  982. "FLslidBnk",
  983. "FLslidBnk2",
  984. "FLslidBnk2Set",
  985. "FLslidBnk2Setk",
  986. "FLslidBnkGetHandle",
  987. "FLslidBnkSet",
  988. "FLslidBnkSetk",
  989. "FLslider",
  990. "FLtabs",
  991. "FLtabsEnd",
  992. "FLtabs_end",
  993. "FLtext",
  994. "FLupdate",
  995. "FLvalue",
  996. "FLvkeybd",
  997. "FLvslidBnk",
  998. "FLvslidBnk2",
  999. "FLxyin",
  1000. "JackoAudioIn",
  1001. "JackoAudioInConnect",
  1002. "JackoAudioOut",
  1003. "JackoAudioOutConnect",
  1004. "JackoFreewheel",
  1005. "JackoInfo",
  1006. "JackoInit",
  1007. "JackoMidiInConnect",
  1008. "JackoMidiOut",
  1009. "JackoMidiOutConnect",
  1010. "JackoNoteOut",
  1011. "JackoOn",
  1012. "JackoTransport",
  1013. "K35_hpf",
  1014. "K35_lpf",
  1015. "MixerClear",
  1016. "MixerGetLevel",
  1017. "MixerReceive",
  1018. "MixerSend",
  1019. "MixerSetLevel",
  1020. "MixerSetLevel_i",
  1021. "OSCbundle",
  1022. "OSCcount",
  1023. "OSCinit",
  1024. "OSCinitM",
  1025. "OSClisten",
  1026. "OSCraw",
  1027. "OSCsend",
  1028. "OSCsend_lo",
  1029. "S",
  1030. "STKBandedWG",
  1031. "STKBeeThree",
  1032. "STKBlowBotl",
  1033. "STKBlowHole",
  1034. "STKBowed",
  1035. "STKBrass",
  1036. "STKClarinet",
  1037. "STKDrummer",
  1038. "STKFMVoices",
  1039. "STKFlute",
  1040. "STKHevyMetl",
  1041. "STKMandolin",
  1042. "STKModalBar",
  1043. "STKMoog",
  1044. "STKPercFlut",
  1045. "STKPlucked",
  1046. "STKResonate",
  1047. "STKRhodey",
  1048. "STKSaxofony",
  1049. "STKShakers",
  1050. "STKSimple",
  1051. "STKSitar",
  1052. "STKStifKarp",
  1053. "STKTubeBell",
  1054. "STKVoicForm",
  1055. "STKWhistle",
  1056. "STKWurley",
  1057. "a",
  1058. "abs",
  1059. "active",
  1060. "adsr",
  1061. "adsyn",
  1062. "adsynt",
  1063. "adsynt2",
  1064. "aftouch",
  1065. "alpass",
  1066. "alwayson",
  1067. "ampdb",
  1068. "ampdbfs",
  1069. "ampmidi",
  1070. "ampmidid",
  1071. "areson",
  1072. "aresonk",
  1073. "atone",
  1074. "atonek",
  1075. "atonex",
  1076. "babo",
  1077. "balance",
  1078. "balance2",
  1079. "bamboo",
  1080. "barmodel",
  1081. "bbcutm",
  1082. "bbcuts",
  1083. "beadsynt",
  1084. "beosc",
  1085. "betarand",
  1086. "bexprnd",
  1087. "bformdec1",
  1088. "bformenc1",
  1089. "binit",
  1090. "biquad",
  1091. "biquada",
  1092. "birnd",
  1093. "bpf",
  1094. "bpfcos",
  1095. "bqrez",
  1096. "butbp",
  1097. "butbr",
  1098. "buthp",
  1099. "butlp",
  1100. "butterbp",
  1101. "butterbr",
  1102. "butterhp",
  1103. "butterlp",
  1104. "button",
  1105. "buzz",
  1106. "c2r",
  1107. "cabasa",
  1108. "cauchy",
  1109. "cauchyi",
  1110. "cbrt",
  1111. "ceil",
  1112. "cell",
  1113. "cent",
  1114. "centroid",
  1115. "ceps",
  1116. "cepsinv",
  1117. "chanctrl",
  1118. "changed",
  1119. "changed2",
  1120. "chani",
  1121. "chano",
  1122. "chebyshevpoly",
  1123. "checkbox",
  1124. "chn_S",
  1125. "chn_a",
  1126. "chn_k",
  1127. "chnclear",
  1128. "chnexport",
  1129. "chnget",
  1130. "chngetks",
  1131. "chnmix",
  1132. "chnparams",
  1133. "chnset",
  1134. "chnsetks",
  1135. "chuap",
  1136. "clear",
  1137. "clfilt",
  1138. "clip",
  1139. "clockoff",
  1140. "clockon",
  1141. "cmp",
  1142. "cmplxprod",
  1143. "comb",
  1144. "combinv",
  1145. "compilecsd",
  1146. "compileorc",
  1147. "compilestr",
  1148. "compress",
  1149. "compress2",
  1150. "connect",
  1151. "control",
  1152. "convle",
  1153. "convolve",
  1154. "copya2ftab",
  1155. "copyf2array",
  1156. "cos",
  1157. "cosh",
  1158. "cosinv",
  1159. "cosseg",
  1160. "cossegb",
  1161. "cossegr",
  1162. "cps2pch",
  1163. "cpsmidi",
  1164. "cpsmidib",
  1165. "cpsmidinn",
  1166. "cpsoct",
  1167. "cpspch",
  1168. "cpstmid",
  1169. "cpstun",
  1170. "cpstuni",
  1171. "cpsxpch",
  1172. "cpumeter",
  1173. "cpuprc",
  1174. "cross2",
  1175. "crossfm",
  1176. "crossfmi",
  1177. "crossfmpm",
  1178. "crossfmpmi",
  1179. "crosspm",
  1180. "crosspmi",
  1181. "crunch",
  1182. "ctlchn",
  1183. "ctrl14",
  1184. "ctrl21",
  1185. "ctrl7",
  1186. "ctrlinit",
  1187. "cuserrnd",
  1188. "dam",
  1189. "date",
  1190. "dates",
  1191. "db",
  1192. "dbamp",
  1193. "dbfsamp",
  1194. "dcblock",
  1195. "dcblock2",
  1196. "dconv",
  1197. "dct",
  1198. "dctinv",
  1199. "deinterleave",
  1200. "delay",
  1201. "delay1",
  1202. "delayk",
  1203. "delayr",
  1204. "delayw",
  1205. "deltap",
  1206. "deltap3",
  1207. "deltapi",
  1208. "deltapn",
  1209. "deltapx",
  1210. "deltapxw",
  1211. "denorm",
  1212. "diff",
  1213. "diode_ladder",
  1214. "directory",
  1215. "diskgrain",
  1216. "diskin",
  1217. "diskin2",
  1218. "dispfft",
  1219. "display",
  1220. "distort",
  1221. "distort1",
  1222. "divz",
  1223. "doppler",
  1224. "dot",
  1225. "downsamp",
  1226. "dripwater",
  1227. "dssiactivate",
  1228. "dssiaudio",
  1229. "dssictls",
  1230. "dssiinit",
  1231. "dssilist",
  1232. "dumpk",
  1233. "dumpk2",
  1234. "dumpk3",
  1235. "dumpk4",
  1236. "duserrnd",
  1237. "dust",
  1238. "dust2",
  1239. "envlpx",
  1240. "envlpxr",
  1241. "ephasor",
  1242. "eqfil",
  1243. "evalstr",
  1244. "event",
  1245. "event_i",
  1246. "exciter",
  1247. "exitnow",
  1248. "exp",
  1249. "expcurve",
  1250. "expon",
  1251. "exprand",
  1252. "exprandi",
  1253. "expseg",
  1254. "expsega",
  1255. "expsegb",
  1256. "expsegba",
  1257. "expsegr",
  1258. "fareylen",
  1259. "fareyleni",
  1260. "faustaudio",
  1261. "faustcompile",
  1262. "faustctl",
  1263. "faustdsp",
  1264. "faustgen",
  1265. "faustplay",
  1266. "fft",
  1267. "fftinv",
  1268. "ficlose",
  1269. "filebit",
  1270. "filelen",
  1271. "filenchnls",
  1272. "filepeak",
  1273. "filescal",
  1274. "filesr",
  1275. "filevalid",
  1276. "fillarray",
  1277. "filter2",
  1278. "fin",
  1279. "fini",
  1280. "fink",
  1281. "fiopen",
  1282. "flanger",
  1283. "flashtxt",
  1284. "flooper",
  1285. "flooper2",
  1286. "floor",
  1287. "fmanal",
  1288. "fmax",
  1289. "fmb3",
  1290. "fmbell",
  1291. "fmin",
  1292. "fmmetal",
  1293. "fmod",
  1294. "fmpercfl",
  1295. "fmrhode",
  1296. "fmvoice",
  1297. "fmwurlie",
  1298. "fof",
  1299. "fof2",
  1300. "fofilter",
  1301. "fog",
  1302. "fold",
  1303. "follow",
  1304. "follow2",
  1305. "foscil",
  1306. "foscili",
  1307. "fout",
  1308. "fouti",
  1309. "foutir",
  1310. "foutk",
  1311. "fprintks",
  1312. "fprints",
  1313. "frac",
  1314. "fractalnoise",
  1315. "framebuffer",
  1316. "freeverb",
  1317. "ftaudio",
  1318. "ftchnls",
  1319. "ftconv",
  1320. "ftcps",
  1321. "ftfree",
  1322. "ftgen",
  1323. "ftgenonce",
  1324. "ftgentmp",
  1325. "ftlen",
  1326. "ftload",
  1327. "ftloadk",
  1328. "ftlptim",
  1329. "ftmorf",
  1330. "ftom",
  1331. "ftprint",
  1332. "ftresize",
  1333. "ftresizei",
  1334. "ftsamplebank",
  1335. "ftsave",
  1336. "ftsavek",
  1337. "ftslice",
  1338. "ftsr",
  1339. "gain",
  1340. "gainslider",
  1341. "gauss",
  1342. "gaussi",
  1343. "gausstrig",
  1344. "gbuzz",
  1345. "genarray",
  1346. "genarray_i",
  1347. "gendy",
  1348. "gendyc",
  1349. "gendyx",
  1350. "getcfg",
  1351. "getcol",
  1352. "getftargs",
  1353. "getrow",
  1354. "getrowlin",
  1355. "getseed",
  1356. "gogobel",
  1357. "grain",
  1358. "grain2",
  1359. "grain3",
  1360. "granule",
  1361. "guiro",
  1362. "harmon",
  1363. "harmon2",
  1364. "harmon3",
  1365. "harmon4",
  1366. "hdf5read",
  1367. "hdf5write",
  1368. "hilbert",
  1369. "hilbert2",
  1370. "hrtfearly",
  1371. "hrtfmove",
  1372. "hrtfmove2",
  1373. "hrtfreverb",
  1374. "hrtfstat",
  1375. "hsboscil",
  1376. "hvs1",
  1377. "hvs2",
  1378. "hvs3",
  1379. "hypot",
  1380. "i",
  1381. "ihold",
  1382. "imagecreate",
  1383. "imagefree",
  1384. "imagegetpixel",
  1385. "imageload",
  1386. "imagesave",
  1387. "imagesetpixel",
  1388. "imagesize",
  1389. "in",
  1390. "in32",
  1391. "inch",
  1392. "inh",
  1393. "init",
  1394. "initc14",
  1395. "initc21",
  1396. "initc7",
  1397. "inleta",
  1398. "inletf",
  1399. "inletk",
  1400. "inletkid",
  1401. "inletv",
  1402. "ino",
  1403. "inq",
  1404. "inrg",
  1405. "ins",
  1406. "insglobal",
  1407. "insremot",
  1408. "int",
  1409. "integ",
  1410. "interleave",
  1411. "interp",
  1412. "invalue",
  1413. "inx",
  1414. "inz",
  1415. "jacktransport",
  1416. "jitter",
  1417. "jitter2",
  1418. "joystick",
  1419. "jspline",
  1420. "k",
  1421. "la_i_add_mc",
  1422. "la_i_add_mr",
  1423. "la_i_add_vc",
  1424. "la_i_add_vr",
  1425. "la_i_assign_mc",
  1426. "la_i_assign_mr",
  1427. "la_i_assign_t",
  1428. "la_i_assign_vc",
  1429. "la_i_assign_vr",
  1430. "la_i_conjugate_mc",
  1431. "la_i_conjugate_mr",
  1432. "la_i_conjugate_vc",
  1433. "la_i_conjugate_vr",
  1434. "la_i_distance_vc",
  1435. "la_i_distance_vr",
  1436. "la_i_divide_mc",
  1437. "la_i_divide_mr",
  1438. "la_i_divide_vc",
  1439. "la_i_divide_vr",
  1440. "la_i_dot_mc",
  1441. "la_i_dot_mc_vc",
  1442. "la_i_dot_mr",
  1443. "la_i_dot_mr_vr",
  1444. "la_i_dot_vc",
  1445. "la_i_dot_vr",
  1446. "la_i_get_mc",
  1447. "la_i_get_mr",
  1448. "la_i_get_vc",
  1449. "la_i_get_vr",
  1450. "la_i_invert_mc",
  1451. "la_i_invert_mr",
  1452. "la_i_lower_solve_mc",
  1453. "la_i_lower_solve_mr",
  1454. "la_i_lu_det_mc",
  1455. "la_i_lu_det_mr",
  1456. "la_i_lu_factor_mc",
  1457. "la_i_lu_factor_mr",
  1458. "la_i_lu_solve_mc",
  1459. "la_i_lu_solve_mr",
  1460. "la_i_mc_create",
  1461. "la_i_mc_set",
  1462. "la_i_mr_create",
  1463. "la_i_mr_set",
  1464. "la_i_multiply_mc",
  1465. "la_i_multiply_mr",
  1466. "la_i_multiply_vc",
  1467. "la_i_multiply_vr",
  1468. "la_i_norm1_mc",
  1469. "la_i_norm1_mr",
  1470. "la_i_norm1_vc",
  1471. "la_i_norm1_vr",
  1472. "la_i_norm_euclid_mc",
  1473. "la_i_norm_euclid_mr",
  1474. "la_i_norm_euclid_vc",
  1475. "la_i_norm_euclid_vr",
  1476. "la_i_norm_inf_mc",
  1477. "la_i_norm_inf_mr",
  1478. "la_i_norm_inf_vc",
  1479. "la_i_norm_inf_vr",
  1480. "la_i_norm_max_mc",
  1481. "la_i_norm_max_mr",
  1482. "la_i_print_mc",
  1483. "la_i_print_mr",
  1484. "la_i_print_vc",
  1485. "la_i_print_vr",
  1486. "la_i_qr_eigen_mc",
  1487. "la_i_qr_eigen_mr",
  1488. "la_i_qr_factor_mc",
  1489. "la_i_qr_factor_mr",
  1490. "la_i_qr_sym_eigen_mc",
  1491. "la_i_qr_sym_eigen_mr",
  1492. "la_i_random_mc",
  1493. "la_i_random_mr",
  1494. "la_i_random_vc",
  1495. "la_i_random_vr",
  1496. "la_i_size_mc",
  1497. "la_i_size_mr",
  1498. "la_i_size_vc",
  1499. "la_i_size_vr",
  1500. "la_i_subtract_mc",
  1501. "la_i_subtract_mr",
  1502. "la_i_subtract_vc",
  1503. "la_i_subtract_vr",
  1504. "la_i_t_assign",
  1505. "la_i_trace_mc",
  1506. "la_i_trace_mr",
  1507. "la_i_transpose_mc",
  1508. "la_i_transpose_mr",
  1509. "la_i_upper_solve_mc",
  1510. "la_i_upper_solve_mr",
  1511. "la_i_vc_create",
  1512. "la_i_vc_set",
  1513. "la_i_vr_create",
  1514. "la_i_vr_set",
  1515. "la_k_a_assign",
  1516. "la_k_add_mc",
  1517. "la_k_add_mr",
  1518. "la_k_add_vc",
  1519. "la_k_add_vr",
  1520. "la_k_assign_a",
  1521. "la_k_assign_f",
  1522. "la_k_assign_mc",
  1523. "la_k_assign_mr",
  1524. "la_k_assign_t",
  1525. "la_k_assign_vc",
  1526. "la_k_assign_vr",
  1527. "la_k_conjugate_mc",
  1528. "la_k_conjugate_mr",
  1529. "la_k_conjugate_vc",
  1530. "la_k_conjugate_vr",
  1531. "la_k_current_f",
  1532. "la_k_current_vr",
  1533. "la_k_distance_vc",
  1534. "la_k_distance_vr",
  1535. "la_k_divide_mc",
  1536. "la_k_divide_mr",
  1537. "la_k_divide_vc",
  1538. "la_k_divide_vr",
  1539. "la_k_dot_mc",
  1540. "la_k_dot_mc_vc",
  1541. "la_k_dot_mr",
  1542. "la_k_dot_mr_vr",
  1543. "la_k_dot_vc",
  1544. "la_k_dot_vr",
  1545. "la_k_f_assign",
  1546. "la_k_get_mc",
  1547. "la_k_get_mr",
  1548. "la_k_get_vc",
  1549. "la_k_get_vr",
  1550. "la_k_invert_mc",
  1551. "la_k_invert_mr",
  1552. "la_k_lower_solve_mc",
  1553. "la_k_lower_solve_mr",
  1554. "la_k_lu_det_mc",
  1555. "la_k_lu_det_mr",
  1556. "la_k_lu_factor_mc",
  1557. "la_k_lu_factor_mr",
  1558. "la_k_lu_solve_mc",
  1559. "la_k_lu_solve_mr",
  1560. "la_k_mc_set",
  1561. "la_k_mr_set",
  1562. "la_k_multiply_mc",
  1563. "la_k_multiply_mr",
  1564. "la_k_multiply_vc",
  1565. "la_k_multiply_vr",
  1566. "la_k_norm1_mc",
  1567. "la_k_norm1_mr",
  1568. "la_k_norm1_vc",
  1569. "la_k_norm1_vr",
  1570. "la_k_norm_euclid_mc",
  1571. "la_k_norm_euclid_mr",
  1572. "la_k_norm_euclid_vc",
  1573. "la_k_norm_euclid_vr",
  1574. "la_k_norm_inf_mc",
  1575. "la_k_norm_inf_mr",
  1576. "la_k_norm_inf_vc",
  1577. "la_k_norm_inf_vr",
  1578. "la_k_norm_max_mc",
  1579. "la_k_norm_max_mr",
  1580. "la_k_qr_eigen_mc",
  1581. "la_k_qr_eigen_mr",
  1582. "la_k_qr_factor_mc",
  1583. "la_k_qr_factor_mr",
  1584. "la_k_qr_sym_eigen_mc",
  1585. "la_k_qr_sym_eigen_mr",
  1586. "la_k_random_mc",
  1587. "la_k_random_mr",
  1588. "la_k_random_vc",
  1589. "la_k_random_vr",
  1590. "la_k_subtract_mc",
  1591. "la_k_subtract_mr",
  1592. "la_k_subtract_vc",
  1593. "la_k_subtract_vr",
  1594. "la_k_t_assign",
  1595. "la_k_trace_mc",
  1596. "la_k_trace_mr",
  1597. "la_k_upper_solve_mc",
  1598. "la_k_upper_solve_mr",
  1599. "la_k_vc_set",
  1600. "la_k_vr_set",
  1601. "lenarray",
  1602. "lfo",
  1603. "limit",
  1604. "limit1",
  1605. "lincos",
  1606. "line",
  1607. "linen",
  1608. "linenr",
  1609. "lineto",
  1610. "link_beat_force",
  1611. "link_beat_get",
  1612. "link_beat_request",
  1613. "link_create",
  1614. "link_enable",
  1615. "link_is_enabled",
  1616. "link_metro",
  1617. "link_peers",
  1618. "link_tempo_get",
  1619. "link_tempo_set",
  1620. "linlin",
  1621. "linrand",
  1622. "linseg",
  1623. "linsegb",
  1624. "linsegr",
  1625. "liveconv",
  1626. "locsend",
  1627. "locsig",
  1628. "log",
  1629. "log10",
  1630. "log2",
  1631. "logbtwo",
  1632. "logcurve",
  1633. "loopseg",
  1634. "loopsegp",
  1635. "looptseg",
  1636. "loopxseg",
  1637. "lorenz",
  1638. "loscil",
  1639. "loscil3",
  1640. "loscil3phs",
  1641. "loscilphs",
  1642. "loscilx",
  1643. "lowpass2",
  1644. "lowres",
  1645. "lowresx",
  1646. "lpf18",
  1647. "lpform",
  1648. "lpfreson",
  1649. "lphasor",
  1650. "lpinterp",
  1651. "lposcil",
  1652. "lposcil3",
  1653. "lposcila",
  1654. "lposcilsa",
  1655. "lposcilsa2",
  1656. "lpread",
  1657. "lpreson",
  1658. "lpshold",
  1659. "lpsholdp",
  1660. "lpslot",
  1661. "lua_exec",
  1662. "lua_iaopcall",
  1663. "lua_iaopcall_off",
  1664. "lua_ikopcall",
  1665. "lua_ikopcall_off",
  1666. "lua_iopcall",
  1667. "lua_iopcall_off",
  1668. "lua_opdef",
  1669. "mac",
  1670. "maca",
  1671. "madsr",
  1672. "mags",
  1673. "mandel",
  1674. "mandol",
  1675. "maparray",
  1676. "maparray_i",
  1677. "marimba",
  1678. "massign",
  1679. "max",
  1680. "max_k",
  1681. "maxabs",
  1682. "maxabsaccum",
  1683. "maxaccum",
  1684. "maxalloc",
  1685. "maxarray",
  1686. "mclock",
  1687. "mdelay",
  1688. "median",
  1689. "mediank",
  1690. "metro",
  1691. "mfb",
  1692. "midglobal",
  1693. "midiarp",
  1694. "midic14",
  1695. "midic21",
  1696. "midic7",
  1697. "midichannelaftertouch",
  1698. "midichn",
  1699. "midicontrolchange",
  1700. "midictrl",
  1701. "mididefault",
  1702. "midifilestatus",
  1703. "midiin",
  1704. "midinoteoff",
  1705. "midinoteoncps",
  1706. "midinoteonkey",
  1707. "midinoteonoct",
  1708. "midinoteonpch",
  1709. "midion",
  1710. "midion2",
  1711. "midiout",
  1712. "midiout_i",
  1713. "midipgm",
  1714. "midipitchbend",
  1715. "midipolyaftertouch",
  1716. "midiprogramchange",
  1717. "miditempo",
  1718. "midremot",
  1719. "min",
  1720. "minabs",
  1721. "minabsaccum",
  1722. "minaccum",
  1723. "minarray",
  1724. "mincer",
  1725. "mirror",
  1726. "mode",
  1727. "modmatrix",
  1728. "monitor",
  1729. "moog",
  1730. "moogladder",
  1731. "moogladder2",
  1732. "moogvcf",
  1733. "moogvcf2",
  1734. "moscil",
  1735. "mp3bitrate",
  1736. "mp3in",
  1737. "mp3len",
  1738. "mp3nchnls",
  1739. "mp3scal",
  1740. "mp3sr",
  1741. "mpulse",
  1742. "mrtmsg",
  1743. "mtof",
  1744. "mton",
  1745. "multitap",
  1746. "mute",
  1747. "mvchpf",
  1748. "mvclpf1",
  1749. "mvclpf2",
  1750. "mvclpf3",
  1751. "mvclpf4",
  1752. "mxadsr",
  1753. "nchnls_hw",
  1754. "nestedap",
  1755. "nlalp",
  1756. "nlfilt",
  1757. "nlfilt2",
  1758. "noise",
  1759. "noteoff",
  1760. "noteon",
  1761. "noteondur",
  1762. "noteondur2",
  1763. "notnum",
  1764. "nreverb",
  1765. "nrpn",
  1766. "nsamp",
  1767. "nstance",
  1768. "nstrnum",
  1769. "ntom",
  1770. "ntrpol",
  1771. "nxtpow2",
  1772. "octave",
  1773. "octcps",
  1774. "octmidi",
  1775. "octmidib",
  1776. "octmidinn",
  1777. "octpch",
  1778. "olabuffer",
  1779. "oscbnk",
  1780. "oscil",
  1781. "oscil1",
  1782. "oscil1i",
  1783. "oscil3",
  1784. "oscili",
  1785. "oscilikt",
  1786. "osciliktp",
  1787. "oscilikts",
  1788. "osciln",
  1789. "oscils",
  1790. "oscilx",
  1791. "out",
  1792. "out32",
  1793. "outc",
  1794. "outch",
  1795. "outh",
  1796. "outiat",
  1797. "outic",
  1798. "outic14",
  1799. "outipat",
  1800. "outipb",
  1801. "outipc",
  1802. "outkat",
  1803. "outkc",
  1804. "outkc14",
  1805. "outkpat",
  1806. "outkpb",
  1807. "outkpc",
  1808. "outleta",
  1809. "outletf",
  1810. "outletk",
  1811. "outletkid",
  1812. "outletv",
  1813. "outo",
  1814. "outq",
  1815. "outq1",
  1816. "outq2",
  1817. "outq3",
  1818. "outq4",
  1819. "outrg",
  1820. "outs",
  1821. "outs1",
  1822. "outs2",
  1823. "outvalue",
  1824. "outx",
  1825. "outz",
  1826. "p",
  1827. "p5gconnect",
  1828. "p5gdata",
  1829. "pan",
  1830. "pan2",
  1831. "pareq",
  1832. "part2txt",
  1833. "partials",
  1834. "partikkel",
  1835. "partikkelget",
  1836. "partikkelset",
  1837. "partikkelsync",
  1838. "passign",
  1839. "paulstretch",
  1840. "pcauchy",
  1841. "pchbend",
  1842. "pchmidi",
  1843. "pchmidib",
  1844. "pchmidinn",
  1845. "pchoct",
  1846. "pchtom",
  1847. "pconvolve",
  1848. "pcount",
  1849. "pdclip",
  1850. "pdhalf",
  1851. "pdhalfy",
  1852. "peak",
  1853. "pgmassign",
  1854. "pgmchn",
  1855. "phaser1",
  1856. "phaser2",
  1857. "phasor",
  1858. "phasorbnk",
  1859. "phs",
  1860. "pindex",
  1861. "pinker",
  1862. "pinkish",
  1863. "pitch",
  1864. "pitchac",
  1865. "pitchamdf",
  1866. "planet",
  1867. "platerev",
  1868. "plltrack",
  1869. "pluck",
  1870. "poisson",
  1871. "pol2rect",
  1872. "polyaft",
  1873. "polynomial",
  1874. "port",
  1875. "portk",
  1876. "poscil",
  1877. "poscil3",
  1878. "pow",
  1879. "powershape",
  1880. "powoftwo",
  1881. "pows",
  1882. "prealloc",
  1883. "prepiano",
  1884. "print",
  1885. "print_type",
  1886. "printarray",
  1887. "printf",
  1888. "printf_i",
  1889. "printk",
  1890. "printk2",
  1891. "printks",
  1892. "printks2",
  1893. "prints",
  1894. "product",
  1895. "pset",
  1896. "ptable",
  1897. "ptable3",
  1898. "ptablei",
  1899. "ptableiw",
  1900. "ptablew",
  1901. "ptrack",
  1902. "puts",
  1903. "pvadd",
  1904. "pvbufread",
  1905. "pvcross",
  1906. "pvinterp",
  1907. "pvoc",
  1908. "pvread",
  1909. "pvs2array",
  1910. "pvs2tab",
  1911. "pvsadsyn",
  1912. "pvsanal",
  1913. "pvsarp",
  1914. "pvsbandp",
  1915. "pvsbandr",
  1916. "pvsbin",
  1917. "pvsblur",
  1918. "pvsbuffer",
  1919. "pvsbufread",
  1920. "pvsbufread2",
  1921. "pvscale",
  1922. "pvscent",
  1923. "pvsceps",
  1924. "pvscross",
  1925. "pvsdemix",
  1926. "pvsdiskin",
  1927. "pvsdisp",
  1928. "pvsenvftw",
  1929. "pvsfilter",
  1930. "pvsfread",
  1931. "pvsfreeze",
  1932. "pvsfromarray",
  1933. "pvsftr",
  1934. "pvsftw",
  1935. "pvsfwrite",
  1936. "pvsgain",
  1937. "pvshift",
  1938. "pvsifd",
  1939. "pvsin",
  1940. "pvsinfo",
  1941. "pvsinit",
  1942. "pvslock",
  1943. "pvsmaska",
  1944. "pvsmix",
  1945. "pvsmooth",
  1946. "pvsmorph",
  1947. "pvsosc",
  1948. "pvsout",
  1949. "pvspitch",
  1950. "pvstanal",
  1951. "pvstencil",
  1952. "pvstrace",
  1953. "pvsvoc",
  1954. "pvswarp",
  1955. "pvsynth",
  1956. "pwd",
  1957. "pyassign",
  1958. "pyassigni",
  1959. "pyassignt",
  1960. "pycall",
  1961. "pycall1",
  1962. "pycall1i",
  1963. "pycall1t",
  1964. "pycall2",
  1965. "pycall2i",
  1966. "pycall2t",
  1967. "pycall3",
  1968. "pycall3i",
  1969. "pycall3t",
  1970. "pycall4",
  1971. "pycall4i",
  1972. "pycall4t",
  1973. "pycall5",
  1974. "pycall5i",
  1975. "pycall5t",
  1976. "pycall6",
  1977. "pycall6i",
  1978. "pycall6t",
  1979. "pycall7",
  1980. "pycall7i",
  1981. "pycall7t",
  1982. "pycall8",
  1983. "pycall8i",
  1984. "pycall8t",
  1985. "pycalli",
  1986. "pycalln",
  1987. "pycallni",
  1988. "pycallt",
  1989. "pyeval",
  1990. "pyevali",
  1991. "pyevalt",
  1992. "pyexec",
  1993. "pyexeci",
  1994. "pyexect",
  1995. "pyinit",
  1996. "pylassign",
  1997. "pylassigni",
  1998. "pylassignt",
  1999. "pylcall",
  2000. "pylcall1",
  2001. "pylcall1i",
  2002. "pylcall1t",
  2003. "pylcall2",
  2004. "pylcall2i",
  2005. "pylcall2t",
  2006. "pylcall3",
  2007. "pylcall3i",
  2008. "pylcall3t",
  2009. "pylcall4",
  2010. "pylcall4i",
  2011. "pylcall4t",
  2012. "pylcall5",
  2013. "pylcall5i",
  2014. "pylcall5t",
  2015. "pylcall6",
  2016. "pylcall6i",
  2017. "pylcall6t",
  2018. "pylcall7",
  2019. "pylcall7i",
  2020. "pylcall7t",
  2021. "pylcall8",
  2022. "pylcall8i",
  2023. "pylcall8t",
  2024. "pylcalli",
  2025. "pylcalln",
  2026. "pylcallni",
  2027. "pylcallt",
  2028. "pyleval",
  2029. "pylevali",
  2030. "pylevalt",
  2031. "pylexec",
  2032. "pylexeci",
  2033. "pylexect",
  2034. "pylrun",
  2035. "pylruni",
  2036. "pylrunt",
  2037. "pyrun",
  2038. "pyruni",
  2039. "pyrunt",
  2040. "qinf",
  2041. "qnan",
  2042. "r2c",
  2043. "rand",
  2044. "randh",
  2045. "randi",
  2046. "random",
  2047. "randomh",
  2048. "randomi",
  2049. "rbjeq",
  2050. "readclock",
  2051. "readf",
  2052. "readfi",
  2053. "readk",
  2054. "readk2",
  2055. "readk3",
  2056. "readk4",
  2057. "readks",
  2058. "readscore",
  2059. "readscratch",
  2060. "rect2pol",
  2061. "release",
  2062. "remoteport",
  2063. "remove",
  2064. "repluck",
  2065. "reshapearray",
  2066. "reson",
  2067. "resonk",
  2068. "resonr",
  2069. "resonx",
  2070. "resonxk",
  2071. "resony",
  2072. "resonz",
  2073. "resyn",
  2074. "reverb",
  2075. "reverb2",
  2076. "reverbsc",
  2077. "rewindscore",
  2078. "rezzy",
  2079. "rfft",
  2080. "rifft",
  2081. "rms",
  2082. "rnd",
  2083. "rnd31",
  2084. "round",
  2085. "rspline",
  2086. "rtclock",
  2087. "s16b14",
  2088. "s32b14",
  2089. "samphold",
  2090. "sandpaper",
  2091. "sc_lag",
  2092. "sc_lagud",
  2093. "sc_phasor",
  2094. "sc_trig",
  2095. "scale",
  2096. "scalearray",
  2097. "scanhammer",
  2098. "scans",
  2099. "scantable",
  2100. "scanu",
  2101. "schedkwhen",
  2102. "schedkwhennamed",
  2103. "schedule",
  2104. "schedwhen",
  2105. "scoreline",
  2106. "scoreline_i",
  2107. "seed",
  2108. "sekere",
  2109. "select",
  2110. "semitone",
  2111. "sense",
  2112. "sensekey",
  2113. "seqtime",
  2114. "seqtime2",
  2115. "serialBegin",
  2116. "serialEnd",
  2117. "serialFlush",
  2118. "serialPrint",
  2119. "serialRead",
  2120. "serialWrite",
  2121. "serialWrite_i",
  2122. "setcol",
  2123. "setctrl",
  2124. "setksmps",
  2125. "setrow",
  2126. "setscorepos",
  2127. "sfilist",
  2128. "sfinstr",
  2129. "sfinstr3",
  2130. "sfinstr3m",
  2131. "sfinstrm",
  2132. "sfload",
  2133. "sflooper",
  2134. "sfpassign",
  2135. "sfplay",
  2136. "sfplay3",
  2137. "sfplay3m",
  2138. "sfplaym",
  2139. "sfplist",
  2140. "sfpreset",
  2141. "shaker",
  2142. "shiftin",
  2143. "shiftout",
  2144. "signum",
  2145. "sin",
  2146. "sinh",
  2147. "sininv",
  2148. "sinsyn",
  2149. "sleighbells",
  2150. "slicearray",
  2151. "slicearray_i",
  2152. "slider16",
  2153. "slider16f",
  2154. "slider16table",
  2155. "slider16tablef",
  2156. "slider32",
  2157. "slider32f",
  2158. "slider32table",
  2159. "slider32tablef",
  2160. "slider64",
  2161. "slider64f",
  2162. "slider64table",
  2163. "slider64tablef",
  2164. "slider8",
  2165. "slider8f",
  2166. "slider8table",
  2167. "slider8tablef",
  2168. "sliderKawai",
  2169. "sndloop",
  2170. "sndwarp",
  2171. "sndwarpst",
  2172. "sockrecv",
  2173. "sockrecvs",
  2174. "socksend",
  2175. "socksends",
  2176. "sorta",
  2177. "sortd",
  2178. "soundin",
  2179. "space",
  2180. "spat3d",
  2181. "spat3di",
  2182. "spat3dt",
  2183. "spdist",
  2184. "splitrig",
  2185. "sprintf",
  2186. "sprintfk",
  2187. "spsend",
  2188. "sqrt",
  2189. "squinewave",
  2190. "statevar",
  2191. "stix",
  2192. "strcat",
  2193. "strcatk",
  2194. "strchar",
  2195. "strchark",
  2196. "strcmp",
  2197. "strcmpk",
  2198. "strcpy",
  2199. "strcpyk",
  2200. "strecv",
  2201. "streson",
  2202. "strfromurl",
  2203. "strget",
  2204. "strindex",
  2205. "strindexk",
  2206. "strlen",
  2207. "strlenk",
  2208. "strlower",
  2209. "strlowerk",
  2210. "strrindex",
  2211. "strrindexk",
  2212. "strset",
  2213. "strsub",
  2214. "strsubk",
  2215. "strtod",
  2216. "strtodk",
  2217. "strtol",
  2218. "strtolk",
  2219. "strupper",
  2220. "strupperk",
  2221. "stsend",
  2222. "subinstr",
  2223. "subinstrinit",
  2224. "sum",
  2225. "sumarray",
  2226. "svfilter",
  2227. "syncgrain",
  2228. "syncloop",
  2229. "syncphasor",
  2230. "system",
  2231. "system_i",
  2232. "tab",
  2233. "tab2array",
  2234. "tab2pvs",
  2235. "tab_i",
  2236. "tabifd",
  2237. "table",
  2238. "table3",
  2239. "table3kt",
  2240. "tablecopy",
  2241. "tablefilter",
  2242. "tablefilteri",
  2243. "tablegpw",
  2244. "tablei",
  2245. "tableicopy",
  2246. "tableigpw",
  2247. "tableikt",
  2248. "tableimix",
  2249. "tableiw",
  2250. "tablekt",
  2251. "tablemix",
  2252. "tableng",
  2253. "tablera",
  2254. "tableseg",
  2255. "tableshuffle",
  2256. "tableshufflei",
  2257. "tablew",
  2258. "tablewa",
  2259. "tablewkt",
  2260. "tablexkt",
  2261. "tablexseg",
  2262. "tabmorph",
  2263. "tabmorpha",
  2264. "tabmorphak",
  2265. "tabmorphi",
  2266. "tabplay",
  2267. "tabrec",
  2268. "tabrowlin",
  2269. "tabsum",
  2270. "tabw",
  2271. "tabw_i",
  2272. "tambourine",
  2273. "tan",
  2274. "tanh",
  2275. "taninv",
  2276. "taninv2",
  2277. "tbvcf",
  2278. "tempest",
  2279. "tempo",
  2280. "temposcal",
  2281. "tempoval",
  2282. "timedseq",
  2283. "timeinstk",
  2284. "timeinsts",
  2285. "timek",
  2286. "times",
  2287. "tival",
  2288. "tlineto",
  2289. "tone",
  2290. "tonek",
  2291. "tonex",
  2292. "tradsyn",
  2293. "trandom",
  2294. "transeg",
  2295. "transegb",
  2296. "transegr",
  2297. "trcross",
  2298. "trfilter",
  2299. "trhighest",
  2300. "trigger",
  2301. "trigseq",
  2302. "trim",
  2303. "trim_i",
  2304. "trirand",
  2305. "trlowest",
  2306. "trmix",
  2307. "trscale",
  2308. "trshift",
  2309. "trsplit",
  2310. "turnoff",
  2311. "turnoff2",
  2312. "turnon",
  2313. "tvconv",
  2314. "unirand",
  2315. "unwrap",
  2316. "upsamp",
  2317. "urandom",
  2318. "urd",
  2319. "vactrol",
  2320. "vadd",
  2321. "vadd_i",
  2322. "vaddv",
  2323. "vaddv_i",
  2324. "vaget",
  2325. "valpass",
  2326. "vaset",
  2327. "vbap",
  2328. "vbapg",
  2329. "vbapgmove",
  2330. "vbaplsinit",
  2331. "vbapmove",
  2332. "vbapz",
  2333. "vbapzmove",
  2334. "vcella",
  2335. "vco",
  2336. "vco2",
  2337. "vco2ft",
  2338. "vco2ift",
  2339. "vco2init",
  2340. "vcomb",
  2341. "vcopy",
  2342. "vcopy_i",
  2343. "vdel_k",
  2344. "vdelay",
  2345. "vdelay3",
  2346. "vdelayk",
  2347. "vdelayx",
  2348. "vdelayxq",
  2349. "vdelayxs",
  2350. "vdelayxw",
  2351. "vdelayxwq",
  2352. "vdelayxws",
  2353. "vdivv",
  2354. "vdivv_i",
  2355. "vecdelay",
  2356. "veloc",
  2357. "vexp",
  2358. "vexp_i",
  2359. "vexpseg",
  2360. "vexpv",
  2361. "vexpv_i",
  2362. "vibes",
  2363. "vibr",
  2364. "vibrato",
  2365. "vincr",
  2366. "vlimit",
  2367. "vlinseg",
  2368. "vlowres",
  2369. "vmap",
  2370. "vmirror",
  2371. "vmult",
  2372. "vmult_i",
  2373. "vmultv",
  2374. "vmultv_i",
  2375. "voice",
  2376. "vosim",
  2377. "vphaseseg",
  2378. "vport",
  2379. "vpow",
  2380. "vpow_i",
  2381. "vpowv",
  2382. "vpowv_i",
  2383. "vpvoc",
  2384. "vrandh",
  2385. "vrandi",
  2386. "vsubv",
  2387. "vsubv_i",
  2388. "vtaba",
  2389. "vtabi",
  2390. "vtabk",
  2391. "vtable1k",
  2392. "vtablea",
  2393. "vtablei",
  2394. "vtablek",
  2395. "vtablewa",
  2396. "vtablewi",
  2397. "vtablewk",
  2398. "vtabwa",
  2399. "vtabwi",
  2400. "vtabwk",
  2401. "vwrap",
  2402. "waveset",
  2403. "websocket",
  2404. "weibull",
  2405. "wgbow",
  2406. "wgbowedbar",
  2407. "wgbrass",
  2408. "wgclar",
  2409. "wgflute",
  2410. "wgpluck",
  2411. "wgpluck2",
  2412. "wguide1",
  2413. "wguide2",
  2414. "wiiconnect",
  2415. "wiidata",
  2416. "wiirange",
  2417. "wiisend",
  2418. "window",
  2419. "wrap",
  2420. "writescratch",
  2421. "wterrain",
  2422. "xadsr",
  2423. "xin",
  2424. "xout",
  2425. "xscanmap",
  2426. "xscans",
  2427. "xscansmap",
  2428. "xscanu",
  2429. "xtratim",
  2430. "xyscale",
  2431. "zacl",
  2432. "zakinit",
  2433. "zamod",
  2434. "zar",
  2435. "zarg",
  2436. "zaw",
  2437. "zawm",
  2438. "zdf_1pole",
  2439. "zdf_1pole_mode",
  2440. "zdf_2pole",
  2441. "zdf_2pole_mode",
  2442. "zdf_ladder",
  2443. "zfilter2",
  2444. "zir",
  2445. "ziw",
  2446. "ziwm",
  2447. "zkcl",
  2448. "zkmod",
  2449. "zkr",
  2450. "zkw",
  2451. "zkwm"
  2452. ];
  2453. var deprecatedOpcodes = [
  2454. "array",
  2455. "bformdec",
  2456. "bformenc",
  2457. "copy2ftab",
  2458. "copy2ttab",
  2459. "hrtfer",
  2460. "ktableseg",
  2461. "lentab",
  2462. "maxtab",
  2463. "mintab",
  2464. "pop",
  2465. "pop_f",
  2466. "push",
  2467. "push_f",
  2468. "scalet",
  2469. "sndload",
  2470. "soundout",
  2471. "soundouts",
  2472. "specaddm",
  2473. "specdiff",
  2474. "specdisp",
  2475. "specfilt",
  2476. "spechist",
  2477. "specptrk",
  2478. "specscal",
  2479. "specsum",
  2480. "spectrum",
  2481. "stack",
  2482. "sumtab",
  2483. "tabgen",
  2484. "tabmap",
  2485. "tabmap_i",
  2486. "tabslice",
  2487. "tb0",
  2488. "tb0_init",
  2489. "tb1",
  2490. "tb10",
  2491. "tb10_init",
  2492. "tb11",
  2493. "tb11_init",
  2494. "tb12",
  2495. "tb12_init",
  2496. "tb13",
  2497. "tb13_init",
  2498. "tb14",
  2499. "tb14_init",
  2500. "tb15",
  2501. "tb15_init",
  2502. "tb1_init",
  2503. "tb2",
  2504. "tb2_init",
  2505. "tb3",
  2506. "tb3_init",
  2507. "tb4",
  2508. "tb4_init",
  2509. "tb5",
  2510. "tb5_init",
  2511. "tb6",
  2512. "tb6_init",
  2513. "tb7",
  2514. "tb7_init",
  2515. "tb8",
  2516. "tb8_init",
  2517. "tb9",
  2518. "tb9_init",
  2519. "vbap16",
  2520. "vbap4",
  2521. "vbap4move",
  2522. "vbap8",
  2523. "vbap8move",
  2524. "xyin"
  2525. ];
  2526. opcodes = lang.arrayToMap(opcodes);
  2527. deprecatedOpcodes = lang.arrayToMap(deprecatedOpcodes);
  2528. this.lineContinuations = [
  2529. {
  2530. token : "constant.character.escape.line-continuation.csound",
  2531. regex : /\\$/
  2532. }, this.pushRule({
  2533. token : "constant.character.escape.line-continuation.csound",
  2534. regex : /\\/,
  2535. next : "line continuation"
  2536. })
  2537. ];
  2538. this.comments.push(this.lineContinuations);
  2539. this.quotedStringContents.push(
  2540. this.lineContinuations,
  2541. {
  2542. token : "invalid.illegal",
  2543. regex : /[^"\\]*$/
  2544. }
  2545. );
  2546. var start = this.$rules.start;
  2547. start.splice(1, 0, {
  2548. token : ["text.csound", "entity.name.label.csound", "entity.punctuation.label.csound", "text.csound"],
  2549. regex : /^([ \t]*)(\w+)(:)([ \t]+|$)/
  2550. });
  2551. start.push(
  2552. this.pushRule({
  2553. token : "keyword.function.csound",
  2554. regex : /\binstr\b/,
  2555. next : "instrument numbers and identifiers"
  2556. }), this.pushRule({
  2557. token : "keyword.function.csound",
  2558. regex : /\bopcode\b/,
  2559. next : "after opcode keyword"
  2560. }), {
  2561. token : "keyword.other.csound",
  2562. regex : /\bend(?:in|op)\b/
  2563. },
  2564. {
  2565. token : "variable.language.csound",
  2566. regex : /\b(?:0dbfs|A4|k(?:r|smps)|nchnls(?:_i)?|sr)\b/
  2567. },
  2568. this.numbers,
  2569. {
  2570. token : "keyword.operator.csound",
  2571. regex : "\\+=|-=|\\*=|/=|<<|>>|<=|>=|==|!=|&&|\\|\\||[~¬]|[=!+\\-*/^%&|<>#?:]"
  2572. },
  2573. this.pushRule({
  2574. token : "punctuation.definition.string.begin.csound",
  2575. regex : /"/,
  2576. next : "quoted string"
  2577. }), this.pushRule({
  2578. token : "punctuation.definition.string.begin.csound",
  2579. regex : /{{/,
  2580. next : "braced string"
  2581. }),
  2582. {
  2583. token : "keyword.control.csound",
  2584. regex : /\b(?:do|else(?:if)?|end(?:if|until)|fi|i(?:f|then)|kthen|od|r(?:ir)?eturn|then|until|while)\b/
  2585. },
  2586. this.pushRule({
  2587. token : "keyword.control.csound",
  2588. regex : /\b[ik]?goto\b/,
  2589. next : "goto before label"
  2590. }), this.pushRule({
  2591. token : "keyword.control.csound",
  2592. regex : /\b(?:r(?:einit|igoto)|tigoto)\b/,
  2593. next : "goto before label"
  2594. }), this.pushRule({
  2595. token : "keyword.control.csound",
  2596. regex : /\bc(?:g|in?|k|nk?)goto\b/,
  2597. next : ["goto before label", "goto before argument"]
  2598. }), this.pushRule({
  2599. token : "keyword.control.csound",
  2600. regex : /\btimout\b/,
  2601. next : ["goto before label", "goto before argument", "goto before argument"]
  2602. }), this.pushRule({
  2603. token : "keyword.control.csound",
  2604. regex : /\bloop_[gl][et]\b/,
  2605. next : ["goto before label", "goto before argument", "goto before argument", "goto before argument"]
  2606. }),
  2607. this.pushRule({
  2608. token : "support.function.csound",
  2609. regex : /\b(?:readscore|scoreline(?:_i)?)\b/,
  2610. next : "Csound score opcode"
  2611. }), this.pushRule({
  2612. token : "support.function.csound",
  2613. regex : /\bpyl?run[it]?\b(?!$)/,
  2614. next : "Python opcode"
  2615. }), this.pushRule({
  2616. token : "support.function.csound",
  2617. regex : /\blua_(?:exec|opdef)\b(?!$)/,
  2618. next : "Lua opcode"
  2619. }),
  2620. {
  2621. token : "support.variable.csound",
  2622. regex : /\bp\d+\b/
  2623. }, {
  2624. regex : /\b([A-Z_a-z]\w*)(?:(:)([A-Za-z]))?\b/, onMatch: function(value, currentState, stack, line) {
  2625. var tokens = value.split(this.splitRegex);
  2626. var name = tokens[1];
  2627. var type;
  2628. if (opcodes.hasOwnProperty(name))
  2629. type = "support.function.csound";
  2630. else if (deprecatedOpcodes.hasOwnProperty(name))
  2631. type = "invalid.deprecated.csound";
  2632. if (type) {
  2633. if (tokens[2]) {
  2634. return [
  2635. {type: type, value: name},
  2636. {type: "punctuation.type-annotation.csound", value: tokens[2]},
  2637. {type: "type-annotation.storage.type.csound", value: tokens[3]}
  2638. ];
  2639. }
  2640. return type;
  2641. }
  2642. return "text.csound";
  2643. }
  2644. }
  2645. );
  2646. this.$rules["macro parameter value list"].splice(2, 0, {
  2647. token : "punctuation.definition.string.begin.csound",
  2648. regex : /{{/,
  2649. next : "macro parameter value braced string"
  2650. });
  2651. var scoreHighlightRules = new CsoundScoreHighlightRules("csound-score-");
  2652. this.addRules({
  2653. "macro parameter value braced string": [
  2654. {
  2655. token : "constant.character.escape.csound",
  2656. regex : /\\[#'()]/
  2657. }, {
  2658. token : "invalid.illegal.csound.csound",
  2659. regex : /[#'()]/
  2660. }, {
  2661. token : "punctuation.definition.string.end.csound",
  2662. regex : /}}/,
  2663. next : "macro parameter value list"
  2664. }, {
  2665. defaultToken: "string.braced.csound"
  2666. }
  2667. ],
  2668. "instrument numbers and identifiers": [
  2669. this.comments,
  2670. {
  2671. token : "entity.name.function.csound",
  2672. regex : /\d+|[A-Z_a-z]\w*/
  2673. }, this.popRule({
  2674. token : "empty",
  2675. regex : /$/
  2676. })
  2677. ],
  2678. "after opcode keyword": [
  2679. this.comments,
  2680. this.popRule({
  2681. token : "empty",
  2682. regex : /$/
  2683. }), this.popRule({
  2684. token : "entity.name.function.opcode.csound",
  2685. regex : /[A-Z_a-z]\w*/,
  2686. next : "opcode type signatures"
  2687. })
  2688. ],
  2689. "opcode type signatures": [
  2690. this.comments,
  2691. this.popRule({
  2692. token : "empty",
  2693. regex : /$/
  2694. }), {
  2695. token : "storage.type.csound",
  2696. regex : /\b(?:0|[afijkKoOpPStV\[\]]+)/
  2697. }
  2698. ],
  2699. "quoted string": [
  2700. this.popRule({
  2701. token : "punctuation.definition.string.end.csound",
  2702. regex : /"/
  2703. }),
  2704. this.quotedStringContents,
  2705. {
  2706. defaultToken: "string.quoted.csound"
  2707. }
  2708. ],
  2709. "braced string": [
  2710. this.popRule({
  2711. token : "punctuation.definition.string.end.csound",
  2712. regex : /}}/
  2713. }),
  2714. this.bracedStringContents,
  2715. {
  2716. defaultToken: "string.braced.csound"
  2717. }
  2718. ],
  2719. "goto before argument": [
  2720. this.popRule({
  2721. token : "text.csound",
  2722. regex : /,/
  2723. }),
  2724. start
  2725. ],
  2726. "goto before label": [
  2727. {
  2728. token : "text.csound",
  2729. regex : /\s+/
  2730. },
  2731. this.comments,
  2732. this.popRule({
  2733. token : "entity.name.label.csound",
  2734. regex : /\w+/
  2735. }), this.popRule({
  2736. token : "empty",
  2737. regex : /(?!\w)/
  2738. })
  2739. ],
  2740. "Csound score opcode": [
  2741. this.comments,
  2742. {
  2743. token : "punctuation.definition.string.begin.csound",
  2744. regex : /{{/,
  2745. next : scoreHighlightRules.embeddedRulePrefix + "start"
  2746. }, this.popRule({
  2747. token : "empty",
  2748. regex : /$/
  2749. })
  2750. ],
  2751. "Python opcode": [
  2752. this.comments,
  2753. {
  2754. token : "punctuation.definition.string.begin.csound",
  2755. regex : /{{/,
  2756. next : "python-start"
  2757. }, this.popRule({
  2758. token : "empty",
  2759. regex : /$/
  2760. })
  2761. ],
  2762. "Lua opcode": [
  2763. this.comments,
  2764. {
  2765. token : "punctuation.definition.string.begin.csound",
  2766. regex : /{{/,
  2767. next : "lua-start"
  2768. }, this.popRule({
  2769. token : "empty",
  2770. regex : /$/
  2771. })
  2772. ],
  2773. "line continuation": [
  2774. this.popRule({
  2775. token : "empty",
  2776. regex : /$/
  2777. }),
  2778. this.semicolonComments,
  2779. {
  2780. token : "invalid.illegal.csound",
  2781. regex : /\S.*/
  2782. }
  2783. ]
  2784. });
  2785. var rules = [
  2786. this.popRule({
  2787. token : "punctuation.definition.string.end.csound",
  2788. regex : /}}/
  2789. })
  2790. ];
  2791. this.embedRules(scoreHighlightRules.getRules(), scoreHighlightRules.embeddedRulePrefix, rules);
  2792. this.embedRules(PythonHighlightRules, "python-", rules);
  2793. this.embedRules(LuaHighlightRules, "lua-", rules);
  2794. this.normalizeRules();
  2795. };
  2796. oop.inherits(CsoundOrchestraHighlightRules, CsoundPreprocessorHighlightRules);
  2797. exports.CsoundOrchestraHighlightRules = CsoundOrchestraHighlightRules;
  2798. });
  2799. ace.define("ace/mode/css_highlight_rules",[], function(require, exports, module) {
  2800. "use strict";
  2801. var oop = require("../lib/oop");
  2802. var lang = require("../lib/lang");
  2803. var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
  2804. var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index";
  2805. var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters";
  2806. var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom";
  2807. var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen";
  2808. var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
  2809. var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))";
  2810. var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b";
  2811. var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b";
  2812. var CssHighlightRules = function() {
  2813. var keywordMapper = this.createKeywordMapper({
  2814. "support.function": supportFunction,
  2815. "support.constant": supportConstant,
  2816. "support.type": supportType,
  2817. "support.constant.color": supportConstantColor,
  2818. "support.constant.fonts": supportConstantFonts
  2819. }, "text", true);
  2820. this.$rules = {
  2821. "start" : [{
  2822. include : ["strings", "url", "comments"]
  2823. }, {
  2824. token: "paren.lparen",
  2825. regex: "\\{",
  2826. next: "ruleset"
  2827. }, {
  2828. token: "paren.rparen",
  2829. regex: "\\}"
  2830. }, {
  2831. token: "string",
  2832. regex: "@(?!viewport)",
  2833. next: "media"
  2834. }, {
  2835. token: "keyword",
  2836. regex: "#[a-z0-9-_]+"
  2837. }, {
  2838. token: "keyword",
  2839. regex: "%"
  2840. }, {
  2841. token: "variable",
  2842. regex: "\\.[a-z0-9-_]+"
  2843. }, {
  2844. token: "string",
  2845. regex: ":[a-z0-9-_]+"
  2846. }, {
  2847. token : "constant.numeric",
  2848. regex : numRe
  2849. }, {
  2850. token: "constant",
  2851. regex: "[a-z0-9-_]+"
  2852. }, {
  2853. caseInsensitive: true
  2854. }],
  2855. "media": [{
  2856. include : ["strings", "url", "comments"]
  2857. }, {
  2858. token: "paren.lparen",
  2859. regex: "\\{",
  2860. next: "start"
  2861. }, {
  2862. token: "paren.rparen",
  2863. regex: "\\}",
  2864. next: "start"
  2865. }, {
  2866. token: "string",
  2867. regex: ";",
  2868. next: "start"
  2869. }, {
  2870. token: "keyword",
  2871. regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
  2872. + "|page|font|keyframes|viewport|counter-style|font-feature-values"
  2873. + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
  2874. }],
  2875. "comments" : [{
  2876. token: "comment", // multi line comment
  2877. regex: "\\/\\*",
  2878. push: [{
  2879. token : "comment",
  2880. regex : "\\*\\/",
  2881. next : "pop"
  2882. }, {
  2883. defaultToken : "comment"
  2884. }]
  2885. }],
  2886. "ruleset" : [{
  2887. regex : "-(webkit|ms|moz|o)-",
  2888. token : "text"
  2889. }, {
  2890. token : "punctuation.operator",
  2891. regex : "[:;]"
  2892. }, {
  2893. token : "paren.rparen",
  2894. regex : "\\}",
  2895. next : "start"
  2896. }, {
  2897. include : ["strings", "url", "comments"]
  2898. }, {
  2899. token : ["constant.numeric", "keyword"],
  2900. regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"
  2901. }, {
  2902. token : "constant.numeric",
  2903. regex : numRe
  2904. }, {
  2905. token : "constant.numeric", // hex6 color
  2906. regex : "#[a-f0-9]{6}"
  2907. }, {
  2908. token : "constant.numeric", // hex3 color
  2909. regex : "#[a-f0-9]{3}"
  2910. }, {
  2911. token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"],
  2912. regex : pseudoElements
  2913. }, {
  2914. token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"],
  2915. regex : pseudoClasses
  2916. }, {
  2917. include: "url"
  2918. }, {
  2919. token : keywordMapper,
  2920. regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
  2921. }, {
  2922. caseInsensitive: true
  2923. }],
  2924. url: [{
  2925. token : "support.function",
  2926. regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
  2927. push: [{
  2928. token : "support.function",
  2929. regex : "\\)",
  2930. next : "pop"
  2931. }, {
  2932. defaultToken: "string"
  2933. }]
  2934. }],
  2935. strings: [{
  2936. token : "string.start",
  2937. regex : "'",
  2938. push : [{
  2939. token : "string.end",
  2940. regex : "'|$",
  2941. next: "pop"
  2942. }, {
  2943. include : "escapes"
  2944. }, {
  2945. token : "constant.language.escape",
  2946. regex : /\\$/,
  2947. consumeLineEnd: true
  2948. }, {
  2949. defaultToken: "string"
  2950. }]
  2951. }, {
  2952. token : "string.start",
  2953. regex : '"',
  2954. push : [{
  2955. token : "string.end",
  2956. regex : '"|$',
  2957. next: "pop"
  2958. }, {
  2959. include : "escapes"
  2960. }, {
  2961. token : "constant.language.escape",
  2962. regex : /\\$/,
  2963. consumeLineEnd: true
  2964. }, {
  2965. defaultToken: "string"
  2966. }]
  2967. }],
  2968. escapes: [{
  2969. token : "constant.language.escape",
  2970. regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
  2971. }]
  2972. };
  2973. this.normalizeRules();
  2974. };
  2975. oop.inherits(CssHighlightRules, TextHighlightRules);
  2976. exports.CssHighlightRules = CssHighlightRules;
  2977. });
  2978. ace.define("ace/mode/doc_comment_highlight_rules",[], function(require, exports, module) {
  2979. "use strict";
  2980. var oop = require("../lib/oop");
  2981. var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
  2982. var DocCommentHighlightRules = function() {
  2983. this.$rules = {
  2984. "start" : [ {
  2985. token : "comment.doc.tag",
  2986. regex : "@[\\w\\d_]+" // TODO: fix email addresses
  2987. },
  2988. DocCommentHighlightRules.getTagRule(),
  2989. {
  2990. defaultToken : "comment.doc",
  2991. caseInsensitive: true
  2992. }]
  2993. };
  2994. };
  2995. oop.inherits(DocCommentHighlightRules, TextHighlightRules);
  2996. DocCommentHighlightRules.getTagRule = function(start) {
  2997. return {
  2998. token : "comment.doc.tag.storage.type",
  2999. regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
  3000. };
  3001. };
  3002. DocCommentHighlightRules.getStartRule = function(start) {
  3003. return {
  3004. token : "comment.doc", // doc comment
  3005. regex : "\\/\\*(?=\\*)",
  3006. next : start
  3007. };
  3008. };
  3009. DocCommentHighlightRules.getEndRule = function (start) {
  3010. return {
  3011. token : "comment.doc", // closing comment
  3012. regex : "\\*\\/",
  3013. next : start
  3014. };
  3015. };
  3016. exports.DocCommentHighlightRules = DocCommentHighlightRules;
  3017. });
  3018. ace.define("ace/mode/javascript_highlight_rules",[], function(require, exports, module) {
  3019. "use strict";
  3020. var oop = require("../lib/oop");
  3021. var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
  3022. var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
  3023. var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
  3024. var JavaScriptHighlightRules = function(options) {
  3025. var keywordMapper = this.createKeywordMapper({
  3026. "variable.language":
  3027. "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors
  3028. "Namespace|QName|XML|XMLList|" + // E4X
  3029. "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" +
  3030. "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" +
  3031. "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors
  3032. "SyntaxError|TypeError|URIError|" +
  3033. "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions
  3034. "isNaN|parseFloat|parseInt|" +
  3035. "JSON|Math|" + // Other
  3036. "this|arguments|prototype|window|document" , // Pseudo
  3037. "keyword":
  3038. "const|yield|import|get|set|async|await|" +
  3039. "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
  3040. "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" +
  3041. "__parent__|__count__|escape|unescape|with|__proto__|" +
  3042. "class|enum|extends|super|export|implements|private|public|interface|package|protected|static",
  3043. "storage.type":
  3044. "const|let|var|function",
  3045. "constant.language":
  3046. "null|Infinity|NaN|undefined",
  3047. "support.function":
  3048. "alert",
  3049. "constant.language.boolean": "true|false"
  3050. }, "identifier");
  3051. var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
  3052. var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
  3053. "u[0-9a-fA-F]{4}|" + // unicode
  3054. "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
  3055. "[0-2][0-7]{0,2}|" + // oct
  3056. "3[0-7][0-7]?|" + // oct
  3057. "[4-7][0-7]?|" + //oct
  3058. ".)";
  3059. this.$rules = {
  3060. "no_regex" : [
  3061. DocCommentHighlightRules.getStartRule("doc-start"),
  3062. comments("no_regex"),
  3063. {
  3064. token : "string",
  3065. regex : "'(?=.)",
  3066. next : "qstring"
  3067. }, {
  3068. token : "string",
  3069. regex : '"(?=.)',
  3070. next : "qqstring"
  3071. }, {
  3072. token : "constant.numeric", // hexadecimal, octal and binary
  3073. regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
  3074. }, {
  3075. token : "constant.numeric", // decimal integers and floats
  3076. regex : /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/
  3077. }, {
  3078. token : [
  3079. "storage.type", "punctuation.operator", "support.function",
  3080. "punctuation.operator", "entity.name.function", "text","keyword.operator"
  3081. ],
  3082. regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)",
  3083. next: "function_arguments"
  3084. }, {
  3085. token : [
  3086. "storage.type", "punctuation.operator", "entity.name.function", "text",
  3087. "keyword.operator", "text", "storage.type", "text", "paren.lparen"
  3088. ],
  3089. regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
  3090. next: "function_arguments"
  3091. }, {
  3092. token : [
  3093. "entity.name.function", "text", "keyword.operator", "text", "storage.type",
  3094. "text", "paren.lparen"
  3095. ],
  3096. regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",
  3097. next: "function_arguments"
  3098. }, {
  3099. token : [
  3100. "storage.type", "punctuation.operator", "entity.name.function", "text",
  3101. "keyword.operator", "text",
  3102. "storage.type", "text", "entity.name.function", "text", "paren.lparen"
  3103. ],
  3104. regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",
  3105. next: "function_arguments"
  3106. }, {
  3107. token : [
  3108. "storage.type", "text", "entity.name.function", "text", "paren.lparen"
  3109. ],
  3110. regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()",
  3111. next: "function_arguments"
  3112. }, {
  3113. token : [
  3114. "entity.name.function", "text", "punctuation.operator",
  3115. "text", "storage.type", "text", "paren.lparen"
  3116. ],
  3117. regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",
  3118. next: "function_arguments"
  3119. }, {
  3120. token : [
  3121. "text", "text", "storage.type", "text", "paren.lparen"
  3122. ],
  3123. regex : "(:)(\\s*)(function)(\\s*)(\\()",
  3124. next: "function_arguments"
  3125. }, {
  3126. token : "keyword",
  3127. regex : "from(?=\\s*('|\"))"
  3128. }, {
  3129. token : "keyword",
  3130. regex : "(?:" + kwBeforeRe + ")\\b",
  3131. next : "start"
  3132. }, {
  3133. token : ["support.constant"],
  3134. regex : /that\b/
  3135. }, {
  3136. token : ["storage.type", "punctuation.operator", "support.function.firebug"],
  3137. regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
  3138. }, {
  3139. token : keywordMapper,
  3140. regex : identifierRe
  3141. }, {
  3142. token : "punctuation.operator",
  3143. regex : /[.](?![.])/,
  3144. next : "property"
  3145. }, {
  3146. token : "storage.type",
  3147. regex : /=>/,
  3148. next : "start"
  3149. }, {
  3150. token : "keyword.operator",
  3151. regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
  3152. next : "start"
  3153. }, {
  3154. token : "punctuation.operator",
  3155. regex : /[?:,;.]/,
  3156. next : "start"
  3157. }, {
  3158. token : "paren.lparen",
  3159. regex : /[\[({]/,
  3160. next : "start"
  3161. }, {
  3162. token : "paren.rparen",
  3163. regex : /[\])}]/
  3164. }, {
  3165. token: "comment",
  3166. regex: /^#!.*$/
  3167. }
  3168. ],
  3169. property: [{
  3170. token : "text",
  3171. regex : "\\s+"
  3172. }, {
  3173. token : [
  3174. "storage.type", "punctuation.operator", "entity.name.function", "text",
  3175. "keyword.operator", "text",
  3176. "storage.type", "text", "entity.name.function", "text", "paren.lparen"
  3177. ],
  3178. regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",
  3179. next: "function_arguments"
  3180. }, {
  3181. token : "punctuation.operator",
  3182. regex : /[.](?![.])/
  3183. }, {
  3184. token : "support.function",
  3185. regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
  3186. }, {
  3187. token : "support.function.dom",
  3188. regex : /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
  3189. }, {
  3190. token : "support.constant",
  3191. regex : /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/
  3192. }, {
  3193. token : "identifier",
  3194. regex : identifierRe
  3195. }, {
  3196. regex: "",
  3197. token: "empty",
  3198. next: "no_regex"
  3199. }
  3200. ],
  3201. "start": [
  3202. DocCommentHighlightRules.getStartRule("doc-start"),
  3203. comments("start"),
  3204. {
  3205. token: "string.regexp",
  3206. regex: "\\/",
  3207. next: "regex"
  3208. }, {
  3209. token : "text",
  3210. regex : "\\s+|^$",
  3211. next : "start"
  3212. }, {
  3213. token: "empty",
  3214. regex: "",
  3215. next: "no_regex"
  3216. }
  3217. ],
  3218. "regex": [
  3219. {
  3220. token: "regexp.keyword.operator",
  3221. regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
  3222. }, {
  3223. token: "string.regexp",
  3224. regex: "/[sxngimy]*",
  3225. next: "no_regex"
  3226. }, {
  3227. token : "invalid",
  3228. regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
  3229. }, {
  3230. token : "constant.language.escape",
  3231. regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
  3232. }, {
  3233. token : "constant.language.delimiter",
  3234. regex: /\|/
  3235. }, {
  3236. token: "constant.language.escape",
  3237. regex: /\[\^?/,
  3238. next: "regex_character_class"
  3239. }, {
  3240. token: "empty",
  3241. regex: "$",
  3242. next: "no_regex"
  3243. }, {
  3244. defaultToken: "string.regexp"
  3245. }
  3246. ],
  3247. "regex_character_class": [
  3248. {
  3249. token: "regexp.charclass.keyword.operator",
  3250. regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
  3251. }, {
  3252. token: "constant.language.escape",
  3253. regex: "]",
  3254. next: "regex"
  3255. }, {
  3256. token: "constant.language.escape",
  3257. regex: "-"
  3258. }, {
  3259. token: "empty",
  3260. regex: "$",
  3261. next: "no_regex"
  3262. }, {
  3263. defaultToken: "string.regexp.charachterclass"
  3264. }
  3265. ],
  3266. "function_arguments": [
  3267. {
  3268. token: "variable.parameter",
  3269. regex: identifierRe
  3270. }, {
  3271. token: "punctuation.operator",
  3272. regex: "[, ]+"
  3273. }, {
  3274. token: "punctuation.operator",
  3275. regex: "$"
  3276. }, {
  3277. token: "empty",
  3278. regex: "",
  3279. next: "no_regex"
  3280. }
  3281. ],
  3282. "qqstring" : [
  3283. {
  3284. token : "constant.language.escape",
  3285. regex : escapedRe
  3286. }, {
  3287. token : "string",
  3288. regex : "\\\\$",
  3289. consumeLineEnd : true
  3290. }, {
  3291. token : "string",
  3292. regex : '"|$',
  3293. next : "no_regex"
  3294. }, {
  3295. defaultToken: "string"
  3296. }
  3297. ],
  3298. "qstring" : [
  3299. {
  3300. token : "constant.language.escape",
  3301. regex : escapedRe
  3302. }, {
  3303. token : "string",
  3304. regex : "\\\\$",
  3305. consumeLineEnd : true
  3306. }, {
  3307. token : "string",
  3308. regex : "'|$",
  3309. next : "no_regex"
  3310. }, {
  3311. defaultToken: "string"
  3312. }
  3313. ]
  3314. };
  3315. if (!options || !options.noES6) {
  3316. this.$rules.no_regex.unshift({
  3317. regex: "[{}]", onMatch: function(val, state, stack) {
  3318. this.next = val == "{" ? this.nextState : "";
  3319. if (val == "{" && stack.length) {
  3320. stack.unshift("start", state);
  3321. }
  3322. else if (val == "}" && stack.length) {
  3323. stack.shift();
  3324. this.next = stack.shift();
  3325. if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
  3326. return "paren.quasi.end";
  3327. }
  3328. return val == "{" ? "paren.lparen" : "paren.rparen";
  3329. },
  3330. nextState: "start"
  3331. }, {
  3332. token : "string.quasi.start",
  3333. regex : /`/,
  3334. push : [{
  3335. token : "constant.language.escape",
  3336. regex : escapedRe
  3337. }, {
  3338. token : "paren.quasi.start",
  3339. regex : /\${/,
  3340. push : "start"
  3341. }, {
  3342. token : "string.quasi.end",
  3343. regex : /`/,
  3344. next : "pop"
  3345. }, {
  3346. defaultToken: "string.quasi"
  3347. }]
  3348. });
  3349. if (!options || options.jsx != false)
  3350. JSX.call(this);
  3351. }
  3352. this.embedRules(DocCommentHighlightRules, "doc-",
  3353. [ DocCommentHighlightRules.getEndRule("no_regex") ]);
  3354. this.normalizeRules();
  3355. };
  3356. oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
  3357. function JSX() {
  3358. var tagRegex = identifierRe.replace("\\d", "\\d\\-");
  3359. var jsxTag = {
  3360. onMatch : function(val, state, stack) {
  3361. var offset = val.charAt(1) == "/" ? 2 : 1;
  3362. if (offset == 1) {
  3363. if (state != this.nextState)
  3364. stack.unshift(this.next, this.nextState, 0);
  3365. else
  3366. stack.unshift(this.next);
  3367. stack[2]++;
  3368. } else if (offset == 2) {
  3369. if (state == this.nextState) {
  3370. stack[1]--;
  3371. if (!stack[1] || stack[1] < 0) {
  3372. stack.shift();
  3373. stack.shift();
  3374. }
  3375. }
  3376. }
  3377. return [{
  3378. type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
  3379. value: val.slice(0, offset)
  3380. }, {
  3381. type: "meta.tag.tag-name.xml",
  3382. value: val.substr(offset)
  3383. }];
  3384. },
  3385. regex : "</?" + tagRegex + "",
  3386. next: "jsxAttributes",
  3387. nextState: "jsx"
  3388. };
  3389. this.$rules.start.unshift(jsxTag);
  3390. var jsxJsRule = {
  3391. regex: "{",
  3392. token: "paren.quasi.start",
  3393. push: "start"
  3394. };
  3395. this.$rules.jsx = [
  3396. jsxJsRule,
  3397. jsxTag,
  3398. {include : "reference"},
  3399. {defaultToken: "string"}
  3400. ];
  3401. this.$rules.jsxAttributes = [{
  3402. token : "meta.tag.punctuation.tag-close.xml",
  3403. regex : "/?>",
  3404. onMatch : function(value, currentState, stack) {
  3405. if (currentState == stack[0])
  3406. stack.shift();
  3407. if (value.length == 2) {
  3408. if (stack[0] == this.nextState)
  3409. stack[1]--;
  3410. if (!stack[1] || stack[1] < 0) {
  3411. stack.splice(0, 2);
  3412. }
  3413. }
  3414. this.next = stack[0] || "start";
  3415. return [{type: this.token, value: value}];
  3416. },
  3417. nextState: "jsx"
  3418. },
  3419. jsxJsRule,
  3420. comments("jsxAttributes"),
  3421. {
  3422. token : "entity.other.attribute-name.xml",
  3423. regex : tagRegex
  3424. }, {
  3425. token : "keyword.operator.attribute-equals.xml",
  3426. regex : "="
  3427. }, {
  3428. token : "text.tag-whitespace.xml",
  3429. regex : "\\s+"
  3430. }, {
  3431. token : "string.attribute-value.xml",
  3432. regex : "'",
  3433. stateName : "jsx_attr_q",
  3434. push : [
  3435. {token : "string.attribute-value.xml", regex: "'", next: "pop"},
  3436. {include : "reference"},
  3437. {defaultToken : "string.attribute-value.xml"}
  3438. ]
  3439. }, {
  3440. token : "string.attribute-value.xml",
  3441. regex : '"',
  3442. stateName : "jsx_attr_qq",
  3443. push : [
  3444. {token : "string.attribute-value.xml", regex: '"', next: "pop"},
  3445. {include : "reference"},
  3446. {defaultToken : "string.attribute-value.xml"}
  3447. ]
  3448. },
  3449. jsxTag
  3450. ];
  3451. this.$rules.reference = [{
  3452. token : "constant.language.escape.reference.xml",
  3453. regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
  3454. }];
  3455. }
  3456. function comments(next) {
  3457. return [
  3458. {
  3459. token : "comment", // multi line comment
  3460. regex : /\/\*/,
  3461. next: [
  3462. DocCommentHighlightRules.getTagRule(),
  3463. {token : "comment", regex : "\\*\\/", next : next || "pop"},
  3464. {defaultToken : "comment", caseInsensitive: true}
  3465. ]
  3466. }, {
  3467. token : "comment",
  3468. regex : "\\/\\/",
  3469. next: [
  3470. DocCommentHighlightRules.getTagRule(),
  3471. {token : "comment", regex : "$|^", next : next || "pop"},
  3472. {defaultToken : "comment", caseInsensitive: true}
  3473. ]
  3474. }
  3475. ];
  3476. }
  3477. exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
  3478. });
  3479. ace.define("ace/mode/xml_highlight_rules",[], function(require, exports, module) {
  3480. "use strict";
  3481. var oop = require("../lib/oop");
  3482. var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
  3483. var XmlHighlightRules = function(normalize) {
  3484. var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
  3485. this.$rules = {
  3486. start : [
  3487. {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
  3488. {
  3489. token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
  3490. regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
  3491. },
  3492. {token : "comment.start.xml", regex : "<\\!--", next : "comment"},
  3493. {
  3494. token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
  3495. regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
  3496. },
  3497. {include : "tag"},
  3498. {token : "text.end-tag-open.xml", regex: "</"},
  3499. {token : "text.tag-open.xml", regex: "<"},
  3500. {include : "reference"},
  3501. {defaultToken : "text.xml"}
  3502. ],
  3503. processing_instruction : [{
  3504. token : "entity.other.attribute-name.decl-attribute-name.xml",
  3505. regex : tagRegex
  3506. }, {
  3507. token : "keyword.operator.decl-attribute-equals.xml",
  3508. regex : "="
  3509. }, {
  3510. include: "whitespace"
  3511. }, {
  3512. include: "string"
  3513. }, {
  3514. token : "punctuation.xml-decl.xml",
  3515. regex : "\\?>",
  3516. next : "start"
  3517. }],
  3518. doctype : [
  3519. {include : "whitespace"},
  3520. {include : "string"},
  3521. {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
  3522. {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
  3523. {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
  3524. ],
  3525. int_subset : [{
  3526. token : "text.xml",
  3527. regex : "\\s+"
  3528. }, {
  3529. token: "punctuation.int-subset.xml",
  3530. regex: "]",
  3531. next: "pop"
  3532. }, {
  3533. token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
  3534. regex : "(<\\!)(" + tagRegex + ")",
  3535. push : [{
  3536. token : "text",
  3537. regex : "\\s+"
  3538. },
  3539. {
  3540. token : "punctuation.markup-decl.xml",
  3541. regex : ">",
  3542. next : "pop"
  3543. },
  3544. {include : "string"}]
  3545. }],
  3546. cdata : [
  3547. {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
  3548. {token : "text.xml", regex : "\\s+"},
  3549. {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
  3550. ],
  3551. comment : [
  3552. {token : "comment.end.xml", regex : "-->", next : "start"},
  3553. {defaultToken : "comment.xml"}
  3554. ],
  3555. reference : [{
  3556. token : "constant.language.escape.reference.xml",
  3557. regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
  3558. }],
  3559. attr_reference : [{
  3560. token : "constant.language.escape.reference.attribute-value.xml",
  3561. regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
  3562. }],
  3563. tag : [{
  3564. token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
  3565. regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
  3566. next: [
  3567. {include : "attributes"},
  3568. {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
  3569. ]
  3570. }],
  3571. tag_whitespace : [
  3572. {token : "text.tag-whitespace.xml", regex : "\\s+"}
  3573. ],
  3574. whitespace : [
  3575. {token : "text.whitespace.xml", regex : "\\s+"}
  3576. ],
  3577. string: [{
  3578. token : "string.xml",
  3579. regex : "'",
  3580. push : [
  3581. {token : "string.xml", regex: "'", next: "pop"},
  3582. {defaultToken : "string.xml"}
  3583. ]
  3584. }, {
  3585. token : "string.xml",
  3586. regex : '"',
  3587. push : [
  3588. {token : "string.xml", regex: '"', next: "pop"},
  3589. {defaultToken : "string.xml"}
  3590. ]
  3591. }],
  3592. attributes: [{
  3593. token : "entity.other.attribute-name.xml",
  3594. regex : tagRegex
  3595. }, {
  3596. token : "keyword.operator.attribute-equals.xml",
  3597. regex : "="
  3598. }, {
  3599. include: "tag_whitespace"
  3600. }, {
  3601. include: "attribute_value"
  3602. }],
  3603. attribute_value: [{
  3604. token : "string.attribute-value.xml",
  3605. regex : "'",
  3606. push : [
  3607. {token : "string.attribute-value.xml", regex: "'", next: "pop"},
  3608. {include : "attr_reference"},
  3609. {defaultToken : "string.attribute-value.xml"}
  3610. ]
  3611. }, {
  3612. token : "string.attribute-value.xml",
  3613. regex : '"',
  3614. push : [
  3615. {token : "string.attribute-value.xml", regex: '"', next: "pop"},
  3616. {include : "attr_reference"},
  3617. {defaultToken : "string.attribute-value.xml"}
  3618. ]
  3619. }]
  3620. };
  3621. if (this.constructor === XmlHighlightRules)
  3622. this.normalizeRules();
  3623. };
  3624. (function() {
  3625. this.embedTagRules = function(HighlightRules, prefix, tag){
  3626. this.$rules.tag.unshift({
  3627. token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
  3628. regex : "(<)(" + tag + "(?=\\s|>|$))",
  3629. next: [
  3630. {include : "attributes"},
  3631. {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
  3632. ]
  3633. });
  3634. this.$rules[tag + "-end"] = [
  3635. {include : "attributes"},
  3636. {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
  3637. onMatch : function(value, currentState, stack) {
  3638. stack.splice(0);
  3639. return this.token;
  3640. }}
  3641. ];
  3642. this.embedRules(HighlightRules, prefix, [{
  3643. token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
  3644. regex : "(</)(" + tag + "(?=\\s|>|$))",
  3645. next: tag + "-end"
  3646. }, {
  3647. token: "string.cdata.xml",
  3648. regex : "<\\!\\[CDATA\\["
  3649. }, {
  3650. token: "string.cdata.xml",
  3651. regex : "\\]\\]>"
  3652. }]);
  3653. };
  3654. }).call(TextHighlightRules.prototype);
  3655. oop.inherits(XmlHighlightRules, TextHighlightRules);
  3656. exports.XmlHighlightRules = XmlHighlightRules;
  3657. });
  3658. ace.define("ace/mode/html_highlight_rules",[], function(require, exports, module) {
  3659. "use strict";
  3660. var oop = require("../lib/oop");
  3661. var lang = require("../lib/lang");
  3662. var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
  3663. var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
  3664. var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
  3665. var tagMap = lang.createMap({
  3666. a : 'anchor',
  3667. button : 'form',
  3668. form : 'form',
  3669. img : 'image',
  3670. input : 'form',
  3671. label : 'form',
  3672. option : 'form',
  3673. script : 'script',
  3674. select : 'form',
  3675. textarea : 'form',
  3676. style : 'style',
  3677. table : 'table',
  3678. tbody : 'table',
  3679. td : 'table',
  3680. tfoot : 'table',
  3681. th : 'table',
  3682. tr : 'table'
  3683. });
  3684. var HtmlHighlightRules = function() {
  3685. XmlHighlightRules.call(this);
  3686. this.addRules({
  3687. attributes: [{
  3688. include : "tag_whitespace"
  3689. }, {
  3690. token : "entity.other.attribute-name.xml",
  3691. regex : "[-_a-zA-Z0-9:.]+"
  3692. }, {
  3693. token : "keyword.operator.attribute-equals.xml",
  3694. regex : "=",
  3695. push : [{
  3696. include: "tag_whitespace"
  3697. }, {
  3698. token : "string.unquoted.attribute-value.html",
  3699. regex : "[^<>='\"`\\s]+",
  3700. next : "pop"
  3701. }, {
  3702. token : "empty",
  3703. regex : "",
  3704. next : "pop"
  3705. }]
  3706. }, {
  3707. include : "attribute_value"
  3708. }],
  3709. tag: [{
  3710. token : function(start, tag) {
  3711. var group = tagMap[tag];
  3712. return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
  3713. "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
  3714. },
  3715. regex : "(</?)([-_a-zA-Z0-9:.]+)",
  3716. next: "tag_stuff"
  3717. }],
  3718. tag_stuff: [
  3719. {include : "attributes"},
  3720. {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
  3721. ]
  3722. });
  3723. this.embedTagRules(CssHighlightRules, "css-", "style");
  3724. this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");
  3725. if (this.constructor === HtmlHighlightRules)
  3726. this.normalizeRules();
  3727. };
  3728. oop.inherits(HtmlHighlightRules, XmlHighlightRules);
  3729. exports.HtmlHighlightRules = HtmlHighlightRules;
  3730. });
  3731. ace.define("ace/mode/csound_document_highlight_rules",[], function(require, exports, module) {
  3732. "use strict";
  3733. var oop = require("../lib/oop");
  3734. var CsoundOrchestraHighlightRules = require("./csound_orchestra_highlight_rules").CsoundOrchestraHighlightRules;
  3735. var CsoundScoreHighlightRules = require("./csound_score_highlight_rules").CsoundScoreHighlightRules;
  3736. var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
  3737. var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
  3738. var CsoundDocumentHighlightRules = function() {
  3739. var orchestraHighlightRules = new CsoundOrchestraHighlightRules("csound-");
  3740. var scoreHighlightRules = new CsoundScoreHighlightRules("csound-score-");
  3741. this.$rules = {
  3742. "start": [
  3743. {
  3744. token : ["meta.tag.punctuation.tag-open.csound-document", "entity.name.tag.begin.csound-document", "meta.tag.punctuation.tag-close.csound-document"],
  3745. regex : /(<)(CsoundSynthesi[sz]er)(>)/,
  3746. next : "synthesizer"
  3747. },
  3748. {defaultToken : "text.csound-document"}
  3749. ],
  3750. "synthesizer": [
  3751. {
  3752. token : ["meta.tag.punctuation.end-tag-open.csound-document", "entity.name.tag.begin.csound-document", "meta.tag.punctuation.tag-close.csound-document"],
  3753. regex : "(</)(CsoundSynthesi[sz]er)(>)",
  3754. next : "start"
  3755. }, {
  3756. token : ["meta.tag.punctuation.tag-open.csound-document", "entity.name.tag.begin.csound-document", "meta.tag.punctuation.tag-close.csound-document"],
  3757. regex : "(<)(CsInstruments)(>)",
  3758. next : orchestraHighlightRules.embeddedRulePrefix + "start"
  3759. }, {
  3760. token : ["meta.tag.punctuation.tag-open.csound-document", "entity.name.tag.begin.csound-document", "meta.tag.punctuation.tag-close.csound-document"],
  3761. regex : "(<)(CsScore)(>)",
  3762. next : scoreHighlightRules.embeddedRulePrefix + "start"
  3763. }, {
  3764. token : ["meta.tag.punctuation.tag-open.csound-document", "entity.name.tag.begin.csound-document", "meta.tag.punctuation.tag-close.csound-document"],
  3765. regex : "(<)([Hh][Tt][Mm][Ll])(>)",
  3766. next : "html-start"
  3767. }
  3768. ]
  3769. };
  3770. this.embedRules(orchestraHighlightRules.getRules(), orchestraHighlightRules.embeddedRulePrefix, [{
  3771. token : ["meta.tag.punctuation.end-tag-open.csound-document", "entity.name.tag.begin.csound-document", "meta.tag.punctuation.tag-close.csound-document"],
  3772. regex : "(</)(CsInstruments)(>)",
  3773. next : "synthesizer"
  3774. }]);
  3775. this.embedRules(scoreHighlightRules.getRules(), scoreHighlightRules.embeddedRulePrefix, [{
  3776. token : ["meta.tag.punctuation.end-tag-open.csound-document", "entity.name.tag.begin.csound-document", "meta.tag.punctuation.tag-close.csound-document"],
  3777. regex : "(</)(CsScore)(>)",
  3778. next : "synthesizer"
  3779. }]);
  3780. this.embedRules(HtmlHighlightRules, "html-", [{
  3781. token : ["meta.tag.punctuation.end-tag-open.csound-document", "entity.name.tag.begin.csound-document", "meta.tag.punctuation.tag-close.csound-document"],
  3782. regex : "(</)([Hh][Tt][Mm][Ll])(>)",
  3783. next : "synthesizer"
  3784. }]);
  3785. this.normalizeRules();
  3786. };
  3787. oop.inherits(CsoundDocumentHighlightRules, TextHighlightRules);
  3788. exports.CsoundDocumentHighlightRules = CsoundDocumentHighlightRules;
  3789. });
  3790. ace.define("ace/mode/csound_document",[], function(require, exports, module) {
  3791. "use strict";
  3792. var oop = require("../lib/oop");
  3793. var TextMode = require("./text").Mode;
  3794. var CsoundDocumentHighlightRules = require("./csound_document_highlight_rules").CsoundDocumentHighlightRules;
  3795. var Mode = function() {
  3796. this.HighlightRules = CsoundDocumentHighlightRules;
  3797. };
  3798. oop.inherits(Mode, TextMode);
  3799. exports.Mode = Mode;
  3800. });
  3801. (function() {
  3802. ace.require(["ace/mode/csound_document"], function(m) {
  3803. if (typeof module == "object" && typeof exports == "object" && module) {
  3804. module.exports = m;
  3805. }
  3806. });
  3807. })();