Warning, /frameworks/syntax-highlighting/data/syntax/praat.xml is written in an unsupported language. File is not indexed.

0001 <?xml version="1.0" encoding="UTF-8"?>
0002 <!DOCTYPE language
0003 [
0004   <!ENTITY B '([^a-zA-Z0-9\._"&apos;\$#\[:\(]|\s|^|$)'>
0005 ]>
0006 <!--
0007    This file is part of the KDE project
0008    Copyright (C) 2016 José Joaquín Atria <jjatria@gmail.com>
0009 
0010    This library is free software; you can redistribute it and/or
0011    modify it under the terms of the GNU Library General Public
0012    License version 2 as published by the Free Software Foundation.
0013 
0014    This library is distributed in the hope that it will be useful,
0015    but WITHOUT ANY WARRANTY; without even the implied warranty of
0016    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0017    Library General Public License for more details.
0018 
0019    You should have received a copy of the GNU Library General Public License
0020    along with this library; see the file COPYING.LIB.  If not, write to
0021    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0022    Boston, MA 02110-1301, USA.
0023 -->
0024 <language name="Praat" version="6" kateversion="5.0" section="Scripts" extensions="*.Praat;*.praat;*.psc;*.praat-script;*.praatscript;*.proc" author="Jose Joaquín Atria (jjatria@gmail.com)" license="LGPLv2">
0025   <highlighting>
0026     <list name="keywords">
0027       <item>assert</item>
0028       <item>clearinfo</item>
0029       <item>demo</item>
0030       <item>elif</item>
0031       <item>else</item>
0032       <item>elsif</item>
0033       <item>from</item>
0034       <item>minus</item>
0035       <item>nocheck</item>
0036       <item>noprogress</item>
0037       <item>nowarn</item>
0038       <item>plus</item>
0039       <item>select</item>
0040       <item>stopwatch</item>
0041       <item>then</item>
0042       <item>to</item>
0043     </list>
0044     <list name="functions_string">
0045       <item>backslashTrigraphsToUnicode$</item>
0046       <item>chooseDirectory$</item>
0047       <item>chooseReadFile$</item>
0048       <item>chooseWriteFile$</item>
0049       <item>date$</item>
0050       <item>demoKey$</item>
0051       <item>do$</item>
0052       <item>environment$</item>
0053       <item>extractLine$</item>
0054       <item>extractWord$</item>
0055       <item>fixed$</item>
0056       <item>info$</item>
0057       <item>left$</item>
0058       <item>mid$</item>
0059       <item>percent$</item>
0060       <item>readFile$</item>
0061       <item>replace$</item>
0062       <item>replace_regex$</item>
0063       <item>right$</item>
0064       <item>selected$</item>
0065       <item>string$</item>
0066     </list>
0067     <list name="functions_numeric">
0068       <item>abs</item>
0069       <item>appendFile</item>
0070       <item>appendFileLine</item>
0071       <item>appendInfo</item>
0072       <item>appendInfoLine</item>
0073       <item>arccos</item>
0074       <item>arccosh</item>
0075       <item>arcsin</item>
0076       <item>arcsinh</item>
0077       <item>arctan</item>
0078       <item>arctan2</item>
0079       <item>arctanh</item>
0080       <item>barkToHertz</item>
0081       <item>beginPause</item>
0082       <item>beginSendPraat</item>
0083       <item>besselI</item>
0084       <item>besselK</item>
0085       <item>beta</item>
0086       <item>beta2</item>
0087       <item>binomialP</item>
0088       <item>binomialQ</item>
0089       <item>boolean</item>
0090       <item>ceiling</item>
0091       <item>chiSquareP</item>
0092       <item>chiSquareQ</item>
0093       <item>choice</item>
0094       <item>comment</item>
0095       <item>cos</item>
0096       <item>cosh</item>
0097       <item>createDirectory</item>
0098       <item>deleteFile</item>
0099       <item>demoClicked</item>
0100       <item>demoClickedIn</item>
0101       <item>demoCommandKeyPressed</item>
0102       <item>demoExtraControlKeyPressed</item>
0103       <item>demoInput</item>
0104       <item>demoKeyPressed</item>
0105       <item>demoOptionKeyPressed</item>
0106       <item>demoShiftKeyPressed</item>
0107       <item>demoShow</item>
0108       <item>demoWaitForInput</item>
0109       <item>demoWindowTitle</item>
0110       <item>demoX</item>
0111       <item>demoY</item>
0112       <item>differenceLimensToPhon</item>
0113       <item>do</item>
0114       <item>editor</item>
0115       <item>endPause</item>
0116       <item>endSendPraat</item>
0117       <item>endsWith</item>
0118       <item>erb</item>
0119       <item>erbToHertz</item>
0120       <item>erf</item>
0121       <item>erfc</item>
0122       <item>exitScript</item>
0123       <item>exp</item>
0124       <item>extractNumber</item>
0125       <item>fileReadable</item>
0126       <item>fisherP</item>
0127       <item>fisherQ</item>
0128       <item>floor</item>
0129       <item>gaussP</item>
0130       <item>gaussQ</item>
0131       <item>hash</item>
0132       <item>hertzToBark</item>
0133       <item>hertzToErb</item>
0134       <item>hertzToMel</item>
0135       <item>hertzToSemitones</item>
0136       <item>imax</item>
0137       <item>imin</item>
0138       <item>incompleteBeta</item>
0139       <item>incompleteGammaP</item>
0140       <item>index</item>
0141       <item>index_regex</item>
0142       <item>integer</item>
0143       <item>invBinomialP</item>
0144       <item>invBinomialQ</item>
0145       <item>invChiSquareQ</item>
0146       <item>invFisherQ</item>
0147       <item>invGaussQ</item>
0148       <item>invSigmoid</item>
0149       <item>invStudentQ</item>
0150       <item>length</item>
0151       <item>ln</item>
0152       <item>lnBeta</item>
0153       <item>lnGamma</item>
0154       <item>log10</item>
0155       <item>log2</item>
0156       <item>max</item>
0157       <item>melToHertz</item>
0158       <item>min</item>
0159       <item>minusObject</item>
0160       <item>natural</item>
0161       <item>number</item>
0162       <item>numberOfColumns</item>
0163       <item>numberOfRows</item>
0164       <item>numberOfSelected</item>
0165       <item>objectsAreIdentical</item>
0166       <item>option</item>
0167       <item>optionMenu</item>
0168       <item>pauseScript</item>
0169       <item>phonToDifferenceLimens</item>
0170       <item>plusObject</item>
0171       <item>positive</item>
0172       <item>randomBinomial</item>
0173       <item>randomGauss</item>
0174       <item>randomInteger</item>
0175       <item>randomPoisson</item>
0176       <item>randomUniform</item>
0177       <item>real</item>
0178       <item>readFile</item>
0179       <item>removeObject</item>
0180       <item>rindex</item>
0181       <item>rindex_regex</item>
0182       <item>round</item>
0183       <item>runScript</item>
0184       <item>runSystem</item>
0185       <item>runSystem_nocheck</item>
0186       <item>selectObject</item>
0187       <item>selected</item>
0188       <item>semitonesToHertz</item>
0189       <item>sentence</item>
0190       <item>sentencetext</item>
0191       <item>sigmoid</item>
0192       <item>sin</item>
0193       <item>sinc</item>
0194       <item>sincpi</item>
0195       <item>sinh</item>
0196       <item>soundPressureToPhon</item>
0197       <item>sqrt</item>
0198       <item>startsWith</item>
0199       <item>studentP</item>
0200       <item>studentQ</item>
0201       <item>tan</item>
0202       <item>tanh</item>
0203       <item>text</item>
0204       <item>variableExists</item>
0205       <item>word</item>
0206       <item>writeFile</item>
0207       <item>writeFileLine</item>
0208       <item>writeInfo</item>
0209       <item>writeInfoLine</item>
0210   </list>
0211     <list name="functions_array">
0212       <item>linear#</item>
0213       <item>randomGauss#</item>
0214       <item>randomInteger#</item>
0215       <item>randomUniform#</item>
0216       <item>zero#</item>
0217     </list>
0218     <list name="variables_numeric">
0219       <item>all</item>
0220       <item>average</item>
0221       <item>e</item>
0222       <item>left</item>
0223       <item>macintosh</item>
0224       <item>mono</item>
0225       <item>pi</item>
0226       <item>praatVersion</item>
0227       <item>right</item>
0228       <item>stereo</item>
0229       <item>undefined</item>
0230       <item>unix</item>
0231       <item>windows</item>
0232    </list>
0233     <list name="variables_string">
0234       <item>praatVersion$</item>
0235       <item>tab$</item>
0236       <item>shellDirectory$</item>
0237       <item>homeDirectory$</item>
0238       <item>preferencesDirectory$</item>
0239       <item>newline$</item>
0240       <item>temporaryDirectory$</item>
0241       <item>defaultDirectory$</item>
0242     </list>
0243     <contexts>
0244       <context name="normal" attribute="normal" lineEndContext="#pop"  >
0245         <DetectChar char='#' attribute="comment" context="comment" firstNonSpace="true" />
0246 
0247         <IncludeRules context="function check" />
0248 
0249         <DetectChar char='@' attribute="function" context="procedure name" firstNonSpace="true" />
0250 
0251         <RegExpr String="call&B;" attribute="keyword" context="function word to shorthand arguments" firstNonSpace="true" />
0252         <RegExpr String="include&B;" attribute="keyword" context="unquoted string" firstNonSpace="true" />
0253 
0254         <RegExpr String="&B;?if&B;" attribute="keyword" beginRegion="if" />
0255         <RegExpr String="endif&B;" attribute="keyword" endRegion="if" firstNonSpace="true" />
0256         <RegExpr String="&B;?fi&B;" attribute="keyword" endRegion="if" />
0257 
0258         <RegExpr String="for&B;" attribute="keyword" beginRegion="for" firstNonSpace="true" />
0259         <RegExpr String="endfor&B;" attribute="keyword" endRegion="for" firstNonSpace="true" />
0260 
0261         <RegExpr String="while&B;" attribute="keyword" beginRegion="while" firstNonSpace="true" />
0262         <RegExpr String="endwhile&B;" attribute="keyword" endRegion="while" firstNonSpace="true" />
0263 
0264         <RegExpr String="repeat&B;" attribute="keyword" beginRegion="repeat" firstNonSpace="true" />
0265         <RegExpr String="until&B;" attribute="keyword" endRegion="repeat" firstNonSpace="true" />
0266 
0267         <RegExpr String="procedure&B;" attribute="keyword" context="procedure name" beginRegion="procedure" firstNonSpace="true" />
0268         <RegExpr String="endproc&B;" attribute="keyword" endRegion="procedure" firstNonSpace="true" />
0269 
0270         <StringDetect String="select all" attribute="keyword" firstNonSpace="true" />
0271         <keyword String="keywords" attribute="keyword" />
0272 
0273         <RegExpr String="&B;(print(line|tab)?|echo|exit|asserterror|pause|send(praat|socket)|execute)&B;" attribute="keyword" context="unquoted string" />
0274         <RegExpr String="&B;editor&B;" attribute="keyword" context="unquoted string" beginRegion="editor" />
0275         <RegExpr String="&B;endeditor&B;" attribute="keyword" endRegion="editor" />
0276 
0277         <RegExpr String="form&B;" attribute="keyword" context="old form definition" firstNonSpace="true" beginRegion="form" />
0278 
0279         <RegExpr String="(goto|label)&B;" attribute="keyword" context="label" firstNonSpace="true" />
0280 
0281         <DetectChar char='"' attribute="string" context="quoted string" />
0282         <IncludeRules context="expansion" />
0283 
0284         <IncludeRules context="operator" />
0285         <IncludeRules context="variable name" />
0286 
0287         <RegExpr String="\b[A-Z]" attribute="command" context="command" />
0288 
0289         <DetectChar char=';' attribute="comment" context="comment" />
0290       </context>
0291 
0292       <context name="label" attribute="variable" lineEndContext="#pop" />
0293 
0294       <context name="old form definition" attribute="string" lineEndContext="#pop!old form" />
0295 
0296       <context name="old form" attribute="normal" lineEndContext="#stay">
0297         <DetectChar char='#' attribute="comment" context="comment" firstNonSpace="true" />
0298 
0299         <RegExpr String="(choice|optionmenu)&B;" attribute="keyword" context="normal word with colon to number" firstNonSpace="true" />
0300         <RegExpr String="(option|button)&B;" attribute="keyword" context="unquoted string" firstNonSpace="true" />
0301 
0302         <RegExpr String="(sentence|text)&B;" attribute="keyword" context="normal word to string" firstNonSpace="true" />
0303 
0304         <RegExpr String="word&B;" attribute="keyword" context="normal word to string word" firstNonSpace="true" />
0305 
0306         <RegExpr String="comment&B;" attribute="keyword" context="unquoted string" firstNonSpace="true" />
0307 
0308         <RegExpr String="(real|natural|positive|integer)&B;" attribute="keyword" context="number" firstNonSpace="true" />
0309 
0310         <RegExpr String="boolean&B;" attribute="keyword" context="normal word to variable" firstNonSpace="true" />
0311 
0312         <RegExpr String="endform&B;" attribute="keyword" context="#pop" endRegion="form" firstNonSpace="true" />
0313       </context>
0314 
0315       <context name="operator" attribute="operator" lineEndContext="#pop" >
0316         <RegExpr String="([+\/*&lt;>=!-]=?|[&amp;*|][&amp;*|]?|\^|&lt;>)" attribute="operator" />
0317         <RegExpr String="\.(and|or|not|div|mod)|(and|or|not|div|mod)\." attribute="normal" />
0318         <WordDetect String="and" attribute="operator" />
0319         <WordDetect String="or"  attribute="operator" />
0320         <WordDetect String="not" attribute="operator" />
0321         <WordDetect String="div" attribute="operator" />
0322         <WordDetect String="mod" attribute="operator" />
0323       </context>
0324 
0325       <context name="command" attribute="command" lineEndContext="#pop" >
0326         <IncludeRules context="expansion" />
0327         <StringDetect String="..." attribute="command" context="shorthand arguments" />
0328         <DetectChar char=":" attribute="command" context="#pop" />
0329       </context>
0330 
0331       <context name="shorthand arguments" attribute="normal" lineEndContext="#pop#pop" >
0332         <IncludeRules context="variable name" />
0333         <DetectChar char='"' attribute="string" context="quoted string" />
0334       </context>
0335 
0336       <context name="variable name" attribute="normal" lineEndContext="#pop" >
0337         <IncludeRules context="operator" />
0338         <IncludeRules context="number" />
0339         <keyword String="variables_numeric" attribute="variable" />
0340         <keyword String="variables_string" attribute="variable" />
0341 
0342         <RegExpr String="\b[A-Z][a-zA-Z]+_" attribute="object.attribute" context="object reference" />
0343 
0344       </context>
0345 
0346       <context name="object reference" attribute="object.attribute" lineEndContext="#pop#pop" >
0347         <DetectChar char="." attribute="object.attribute" context="#pop#pop!object attributes" lookAhead="true" />
0348 
0349         <IncludeRules context="expansion" />
0350 
0351         <DetectChar char="$" attribute="object.attribute" />
0352         <DetectChar char="[" attribute="normal" context="#pop#pop" />
0353       </context>
0354 
0355       <context name="object attributes" attribute="normal" lineEndContext="#pop" >
0356         <RegExpr String="\.(ncol|nrow|xmin|ymin|xmax|ymax|nx|ny|dx|dy)&B;" attribute="object.attribute" context="#pop" />
0357       </context>
0358 
0359       <context name="normal word with colon to number" attribute="normal" lineEndContext="#pop" >
0360         <DetectChar char=":" attribute="normal" context="number" />
0361       </context>
0362 
0363       <context name="normal word to variable" attribute="normal" lineEndContext="#pop" >
0364         <RegExpr String="\b\w+\b" attribute="normal" context="variable" />
0365       </context>
0366 
0367       <context name="variable" attribute="variable" lineEndContext="#pop" />
0368 
0369       <context name="number" attribute="normal" lineEndContext="#pop" >
0370         <IncludeRules context="operator" />
0371         <RegExpr String="\b\d+(\.\d*)?([eE][-+]?\d+)?%?" attribute="number" />
0372       </context>
0373 
0374       <context name="normal word to string word" attribute="normal" lineEndContext="#pop" >
0375         <RegExpr String="\b\w+\b" attribute="normal" context="string word" />
0376       </context>
0377 
0378       <context name="normal word to string" attribute="normal" lineEndContext="#pop" >
0379         <RegExpr String="\b\w+\b" attribute="normal" context="unquoted string" />
0380       </context>
0381 
0382       <context name="string word" attribute="string" lineEndContext="#pop" >
0383         <RegExpr String="\b\w+\b" attribute="string" context="ignore" />
0384       </context>
0385 
0386       <context name="ignore" attribute="normal" lineEndContext="#pop" />
0387 
0388       <context name="comment" attribute="comment" lineEndContext="#pop" >
0389         <DetectSpaces />
0390         <IncludeRules context="##Comments" />
0391       </context>
0392 
0393       <context name="quoted string" attribute="string" lineEndContext="broken quoted string" >
0394         <IncludeRules context="expansion" />
0395         <DetectChar char='"' attribute="string" context="#pop" />
0396       </context>
0397 
0398       <context name="unquoted string" attribute="string" lineEndContext="broken unquoted string" >
0399         <IncludeRules context="expansion" />
0400       </context>
0401 
0402       <context name="expansion" attribute="normal" lineEndContext="#pop" >
0403         <RegExpr String="'[^\[\]'&quot;]+(\[([\w\d,]+|&quot;[\w\d,]+&quot;)\])?'" attribute="expansion" />
0404       </context>
0405 
0406       <context name="broken unquoted string" attribute="string" lineEndContext="#stay" >
0407         <DetectSpaces attribute="normal" />
0408         <StringDetect String="..." attribute="normal" context="#pop" firstNonSpace="true" />
0409         <IncludeRules context="expansion" />
0410         <RegExpr String="[\w\d#@;.]" context="#pop#pop" firstNonSpace="true" lookAhead="true" />
0411       </context>
0412 
0413       <context name="broken quoted string" attribute="string" lineEndContext="#stay" >
0414         <IncludeRules context="broken unquoted string" />
0415         <DetectChar char='"' attribute="string" context="#pop#pop" />
0416       </context>
0417 
0418       <context name="function check" attribute="normal" lineEndContext="#pop" >
0419         <keyword String="functions_numeric" attribute="normal" context="numeric function check" lookAhead="true" />
0420         <keyword String="functions_string" attribute="normal" context="string function check" lookAhead="true" />
0421         <keyword String="functions_array" attribute="normal" context="array function check" lookAhead="true" />
0422       </context>
0423 
0424       <context name="array function check" attribute="normal" lineEndContext="#pop" >
0425         <RegExpr String="[a-zA-Z0-9_]+# *[:(]" attribute="normal" context="function call" lookAhead="true" />
0426         <DetectChar char=" " context="#pop#pop" />
0427       </context>
0428 
0429       <context name="string function check" attribute="normal" lineEndContext="#pop" >
0430         <RegExpr String="[a-zA-Z0-9_]+\$ *[:(]" attribute="normal" context="function call" lookAhead="true" />
0431         <DetectChar char=" " context="#pop#pop" />
0432       </context>
0433 
0434       <context name="numeric function check" attribute="normal" lineEndContext="#pop" >
0435         <RegExpr String="[a-zA-Z0-9_]+ *[:(]" attribute="normal" context="function call" lookAhead="true" />
0436         <RegExpr String="&B;editor&B;" attribute="keyword" context="#pop#pop!unquoted string" beginRegion="editor" />
0437         <DetectChar char=" " context="#pop#pop" />
0438       </context>
0439 
0440       <context name="function call" attribute="function" lineEndContext="#pop" >
0441         <RegExpr String="&B;beginSendPraat&B;" beginRegion="sendpraat" />
0442         <RegExpr String="&B;endSendPraat&B;" endRegion="sendpraat" />
0443 
0444         <RegExpr String="&B;beginPause&B;" beginRegion="pause" />
0445         <RegExpr String="&B;endPause&B;" endRegion="pause" />
0446 
0447         <DetectSpaces attribute="normal" />
0448         <AnyChar String=":(" attribute="normal" context="#pop#pop#pop" />
0449       </context>
0450 
0451       <context name="procedure name" attribute="function" lineEndContext="#pop" >
0452         <AnyChar String=":(" attribute="normal" context="#pop" />
0453         <IncludeRules context="expansion" />
0454         <DetectSpaces attribute="normal" context="#pop" />
0455       </context>
0456 
0457       <context name="function word to shorthand arguments" attribute="function" lineEndContext="#pop" >
0458         <AnyChar String=":(" attribute="normal" context="#pop" />
0459         <IncludeRules context="expansion" />
0460         <DetectSpaces attribute="normal" context="#pop!shorthand arguments" />
0461       </context>
0462 
0463     </contexts>
0464     <itemDatas>
0465       <itemData name="normal" defStyleNum="dsNormal" />
0466       <itemData name="number" defStyleNum="dsDecVal" />
0467       <itemData name="object.attribute" defStyleNum="dsDecVal" />
0468       <itemData name="variable" defStyleNum="dsDataType" />
0469       <itemData name="keyword" defStyleNum="dsKeyword" />
0470       <itemData name="expansion" defStyleNum="dsSpecialString" />
0471       <itemData name="string" defStyleNum="dsString" />
0472       <itemData name="command" defStyleNum="dsFunction" />
0473       <itemData name="function" defStyleNum="dsFunction" />
0474       <itemData name="operator" defStyleNum="dsOperator" />
0475       <itemData name="comment" defStyleNum="dsComment" />
0476     </itemDatas>
0477   </highlighting>
0478   <general>
0479     <comments>
0480       <comment name="singleLine" start="#" position="afterwhitespace" />
0481     </comments>
0482     <keywords casesensitive="true" weakDeliminator="._#$" />
0483   </general>
0484 </language>