forked from qt-creator/qt-creator
Merge remote branch 'origin/2.1'
Conflicts: share/qtcreator/static.pro src/plugins/qmljseditor/qmljshoverhandler.cpp src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.cpp
This commit is contained in:
61
share/qtcreator/generic-highlighter/alert.xml
Normal file
61
share/qtcreator/generic-highlighter/alert.xml
Normal file
@@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd">
|
||||
<!--
|
||||
This file is part of KDE's kate project.
|
||||
|
||||
copyright : (C) 2004 by Dominik Haumann
|
||||
email : dhdev at gmx dot de
|
||||
|
||||
**********************************************************************
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; if not, write to the *
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, *
|
||||
* Boston, MA 02110-1301, USA. *
|
||||
**********************************************************************
|
||||
|
||||
This file is included in every file that highlights the "alerts" keywords.
|
||||
That's why extensions and mimetype are empty.
|
||||
-->
|
||||
<language version="1.08" kateversion="2.3" name="Alerts" section="Other" extensions="" mimetype="" author="Dominik Haumann (dhdev@gmx.de)" license="LGPL" hidden="true">
|
||||
<highlighting>
|
||||
<list name="alerts">
|
||||
<item> ### </item>
|
||||
<item> ALERT </item>
|
||||
<item> BUG </item>
|
||||
<item> DANGER </item>
|
||||
<item> DEPRECATED </item>
|
||||
<item> FIXME </item>
|
||||
<item> HACK </item>
|
||||
<item> NOTE </item>
|
||||
<item> NOTICE </item>
|
||||
<item> SECURITY </item>
|
||||
<item> TASK </item>
|
||||
<item> TEST </item>
|
||||
<item> TESTING </item>
|
||||
<item> TODO </item>
|
||||
<item> WARNING </item>
|
||||
</list>
|
||||
<contexts>
|
||||
<context attribute="Normal Text" lineEndContext="#pop" name="Normal Text" >
|
||||
<keyword attribute="Alert" context="#stay" String="alerts" />
|
||||
</context>
|
||||
</contexts>
|
||||
<itemDatas>
|
||||
<itemData name="Normal Text" defStyleNum="dsNormal"/>
|
||||
<itemData name="Alert" defStyleNum="dsAlert"/>
|
||||
</itemDatas>
|
||||
</highlighting>
|
||||
<general>
|
||||
<keywords casesensitive="1"/>
|
||||
</general>
|
||||
</language>
|
||||
901
share/qtcreator/generic-highlighter/bash.xml
Normal file
901
share/qtcreator/generic-highlighter/bash.xml
Normal file
@@ -0,0 +1,901 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd"
|
||||
[
|
||||
<!ENTITY funcname "[A-Za-z_:][A-Za-z0-9_:#%@-]*">
|
||||
<!ENTITY varname "[A-Za-z_][A-Za-z0-9_]*">
|
||||
<!ENTITY word "[^|&;()<>\s]+"> <!-- see man bash -->
|
||||
<!ENTITY eos "(?=($|\s))"> <!-- eol or space following -->
|
||||
<!ENTITY noword "(?![\w$+-])"> <!-- no word, $, + or - following -->
|
||||
<!ENTITY pathpart "([\w_@.%*?+-]|\\ )"> <!-- valid character in a file name -->
|
||||
]>
|
||||
<language name="Bash" version="2.12" kateversion="2.4" section="Scripts" extensions="*.sh;*.bash;*.ebuild;*.eclass;.bashrc;.bash_profile;.bash_login;.profile" mimetype="application/x-shellscript" casesensitive="1" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL">
|
||||
|
||||
<!-- (c) 2004 by Wilbert Berendsen (wilbert@kde.nl)
|
||||
Changes by Matthew Woehlke (mw_triad@users.sourceforge.net)
|
||||
Changes by Sebastian Pipping (webmaster@hartwork.org)
|
||||
Released under the LGPL, part of kdelibs/kate -->
|
||||
|
||||
<highlighting>
|
||||
<list name="keywords">
|
||||
<item> else </item>
|
||||
<item> for </item>
|
||||
<item> function </item>
|
||||
<item> in </item>
|
||||
<item> select </item>
|
||||
<item> until </item>
|
||||
<item> while </item>
|
||||
<item> elif </item>
|
||||
<item> then </item>
|
||||
<item> set </item>
|
||||
</list>
|
||||
|
||||
<list name="builtins">
|
||||
<item> : </item>
|
||||
<item> source </item>
|
||||
<item> alias </item>
|
||||
<item> bg </item>
|
||||
<item> bind </item>
|
||||
<item> break </item>
|
||||
<item> builtin </item>
|
||||
<item> cd </item>
|
||||
<item> caller </item>
|
||||
<item> command </item>
|
||||
<item> compgen </item>
|
||||
<item> complete </item>
|
||||
<item> continue </item>
|
||||
<item> dirs </item>
|
||||
<item> disown </item>
|
||||
<item> echo </item>
|
||||
<item> enable </item>
|
||||
<item> eval </item>
|
||||
<item> exec </item>
|
||||
<item> exit </item>
|
||||
<item> fc </item>
|
||||
<item> fg </item>
|
||||
<item> getopts </item>
|
||||
<item> hash </item>
|
||||
<item> help </item>
|
||||
<item> history </item>
|
||||
<item> jobs </item>
|
||||
<item> kill </item>
|
||||
<item> let </item>
|
||||
<item> logout </item>
|
||||
<item> popd </item>
|
||||
<item> printf </item>
|
||||
<item> pushd </item>
|
||||
<item> pwd </item>
|
||||
<item> return </item>
|
||||
<item> set </item>
|
||||
<item> shift </item>
|
||||
<item> shopt </item>
|
||||
<item> suspend </item>
|
||||
<item> test </item>
|
||||
<item> time </item>
|
||||
<item> times </item>
|
||||
<item> trap </item>
|
||||
<item> type </item>
|
||||
<item> ulimit </item>
|
||||
<item> umask </item>
|
||||
<item> unalias </item>
|
||||
<item> wait </item>
|
||||
</list>
|
||||
|
||||
<list name="builtins_var">
|
||||
<item> export </item>
|
||||
<item> unset </item>
|
||||
<item> declare </item>
|
||||
<item> typeset </item>
|
||||
<item> local </item>
|
||||
<item> read </item>
|
||||
<item> readonly </item>
|
||||
</list>
|
||||
|
||||
<list name="unixcommands">
|
||||
<!-- /bin -->
|
||||
<item> arch </item>
|
||||
<item> awk </item>
|
||||
<item> bash </item>
|
||||
<item> bunzip2 </item>
|
||||
<item> bzcat </item>
|
||||
<item> bzcmp </item>
|
||||
<item> bzdiff </item>
|
||||
<item> bzegrep </item>
|
||||
<item> bzfgrep </item>
|
||||
<item> bzgrep </item>
|
||||
<item> bzip2 </item>
|
||||
<item> bzip2recover </item>
|
||||
<item> bzless </item>
|
||||
<item> bzmore </item>
|
||||
<item> cat </item>
|
||||
<item> chattr </item>
|
||||
<item> chgrp </item>
|
||||
<item> chmod </item>
|
||||
<item> chown </item>
|
||||
<item> chvt </item>
|
||||
<item> cp </item>
|
||||
<item> date </item>
|
||||
<item> dd </item>
|
||||
<item> deallocvt </item>
|
||||
<item> df </item>
|
||||
<item> dir </item>
|
||||
<item> dircolors </item>
|
||||
<item> dmesg </item>
|
||||
<item> dnsdomainname </item>
|
||||
<item> domainname </item>
|
||||
<item> du </item>
|
||||
<item> dumpkeys </item>
|
||||
<item> echo </item>
|
||||
<item> ed </item>
|
||||
<item> egrep </item>
|
||||
<item> false </item>
|
||||
<item> fgconsole </item>
|
||||
<item> fgrep </item>
|
||||
<item> fuser </item>
|
||||
<item> gawk </item>
|
||||
<item> getkeycodes </item>
|
||||
<item> gocr </item>
|
||||
<item> grep </item>
|
||||
<item> groff </item>
|
||||
<item> groups </item>
|
||||
<item> gunzip </item>
|
||||
<item> gzexe </item>
|
||||
<item> gzip </item>
|
||||
<item> hostname </item>
|
||||
<item> igawk </item>
|
||||
<item> install </item>
|
||||
<item> kbd_mode </item>
|
||||
<item> kbdrate </item>
|
||||
<item> killall </item>
|
||||
<item> last </item>
|
||||
<item> lastb </item>
|
||||
<item> link </item>
|
||||
<item> ln </item>
|
||||
<item> loadkeys </item>
|
||||
<item> loadunimap </item>
|
||||
<item> login </item>
|
||||
<item> ls </item>
|
||||
<item> lsattr </item>
|
||||
<item> lsmod </item>
|
||||
<item> lsmod.old </item>
|
||||
<item> lzcat </item>
|
||||
<item> lzcmp </item>
|
||||
<item> lzdiff </item>
|
||||
<item> lzegrep </item>
|
||||
<item> lzfgrep </item>
|
||||
<item> lzgrep </item>
|
||||
<item> lzless </item>
|
||||
<item> lzcat </item>
|
||||
<item> lzma </item>
|
||||
<item> lzmainfo </item>
|
||||
<item> lzmore </item>
|
||||
<item> mapscrn </item>
|
||||
<item> mesg </item>
|
||||
<item> mkdir </item>
|
||||
<item> mkfifo </item>
|
||||
<item> mknod </item>
|
||||
<item> mktemp </item>
|
||||
<item> more </item>
|
||||
<item> mount </item>
|
||||
<item> mv </item>
|
||||
<item> nano </item>
|
||||
<item> netstat </item>
|
||||
<item> nisdomainname </item>
|
||||
<item> nroff </item>
|
||||
<item> openvt </item>
|
||||
<item> pgawk </item>
|
||||
<item> pidof </item>
|
||||
<item> ping </item>
|
||||
<item> ps </item>
|
||||
<item> pstree </item>
|
||||
<item> pwd </item>
|
||||
<item> rbash </item>
|
||||
<item> readlink </item>
|
||||
<item> red </item>
|
||||
<item> resizecons </item>
|
||||
<item> rm </item>
|
||||
<item> rmdir </item>
|
||||
<item> run-parts </item>
|
||||
<item> sash </item>
|
||||
<item> sed </item>
|
||||
<item> setfont </item>
|
||||
<item> setkeycodes </item>
|
||||
<item> setleds </item>
|
||||
<item> setmetamode </item>
|
||||
<item> setserial </item>
|
||||
<item> sh </item>
|
||||
<item> showkey </item>
|
||||
<item> shred </item>
|
||||
<item> sleep </item>
|
||||
<item> ssed </item>
|
||||
<item> stat </item>
|
||||
<item> stty </item>
|
||||
<item> su </item>
|
||||
<item> sync </item>
|
||||
<item> tar </item>
|
||||
<item> tempfile </item>
|
||||
<item> touch </item>
|
||||
<item> troff </item>
|
||||
<item> true </item>
|
||||
<item> umount </item>
|
||||
<item> uname </item>
|
||||
<item> unicode_start </item>
|
||||
<item> unicode_stop </item>
|
||||
<item> unlink </item>
|
||||
<item> unlzma </item>
|
||||
<item> unxz </item>
|
||||
<item> utmpdump </item>
|
||||
<item> uuidgen </item>
|
||||
<item> vdir </item>
|
||||
<item> wall </item>
|
||||
<item> wc </item>
|
||||
<item> xz </item>
|
||||
<item> xzcat </item>
|
||||
<item> ypdomainname </item>
|
||||
<item> zcat </item>
|
||||
<item> zcmp </item>
|
||||
<item> zdiff </item>
|
||||
<item> zegrep </item>
|
||||
<item> zfgrep </item>
|
||||
<item> zforce </item>
|
||||
<item> zgrep </item>
|
||||
<item> zless </item>
|
||||
<item> zmore </item>
|
||||
<item> znew </item>
|
||||
<item> zsh </item>
|
||||
|
||||
<!-- some from /usr/bin -->
|
||||
<item> aclocal </item>
|
||||
<item> aconnect </item>
|
||||
<item> aplay </item>
|
||||
<item> apm </item>
|
||||
<item> apmsleep </item>
|
||||
<item> apropos </item>
|
||||
<item> ar </item>
|
||||
<item> arecord </item>
|
||||
<item> as </item>
|
||||
<item> as86 </item>
|
||||
<item> autoconf </item>
|
||||
<item> autoheader </item>
|
||||
<item> automake </item>
|
||||
<item> awk </item>
|
||||
<item> basename </item>
|
||||
<item> bc </item>
|
||||
<item> bison </item>
|
||||
<item> c++ </item>
|
||||
<item> cal </item>
|
||||
<item> cat </item>
|
||||
<item> cc </item>
|
||||
<item> cdda2wav </item>
|
||||
<item> cdparanoia </item>
|
||||
<item> cdrdao </item>
|
||||
<item> cd-read </item>
|
||||
<item> cdrecord </item>
|
||||
<item> chfn </item>
|
||||
<item> chgrp </item>
|
||||
<item> chmod </item>
|
||||
<item> chown </item>
|
||||
<item> chroot </item>
|
||||
<item> chsh </item>
|
||||
<item> clear </item>
|
||||
<item> cmp </item>
|
||||
<item> co </item>
|
||||
<item> col </item>
|
||||
<item> comm </item>
|
||||
<item> cp </item>
|
||||
<item> cpio </item>
|
||||
<item> cpp </item>
|
||||
<item> cut </item>
|
||||
<item> dc </item>
|
||||
<item> dd </item>
|
||||
<item> df </item>
|
||||
<item> diff </item>
|
||||
<item> diff3 </item>
|
||||
<item> dir </item>
|
||||
<item> dircolors </item>
|
||||
<item> directomatic </item>
|
||||
<item> dirname </item>
|
||||
<item> du </item>
|
||||
<item> env </item>
|
||||
<item> expr </item>
|
||||
<item> fbset </item>
|
||||
<item> file </item>
|
||||
<item> find </item>
|
||||
<item> flex </item>
|
||||
<item> flex++ </item>
|
||||
<item> fmt </item>
|
||||
<item> free </item>
|
||||
<item> ftp </item>
|
||||
<item> funzip </item>
|
||||
<item> fuser </item>
|
||||
<item> g++ </item>
|
||||
<item> gawk </item>
|
||||
<item> gc </item>
|
||||
<item> gcc </item>
|
||||
<item> gdb </item>
|
||||
<item> getent </item>
|
||||
<item> getopt </item>
|
||||
<item> gettext </item>
|
||||
<item> gettextize </item>
|
||||
<item> gimp </item>
|
||||
<item> gimp-remote </item>
|
||||
<item> gimptool </item>
|
||||
<item> gmake </item>
|
||||
<item> gs </item>
|
||||
<item> head </item>
|
||||
<item> hexdump </item>
|
||||
<item> id </item>
|
||||
<item> install </item>
|
||||
<item> join </item>
|
||||
<item> kill </item>
|
||||
<item> killall </item>
|
||||
<item> ld </item>
|
||||
<item> ld86 </item>
|
||||
<item> ldd </item>
|
||||
<item> less </item>
|
||||
<item> lex </item>
|
||||
<item> ln </item>
|
||||
<item> locate </item>
|
||||
<item> lockfile </item>
|
||||
<item> logname </item>
|
||||
<item> lp </item>
|
||||
<item> lpr </item>
|
||||
<item> ls </item>
|
||||
<item> lynx </item>
|
||||
<item> m4 </item>
|
||||
<item> make </item>
|
||||
<item> man </item>
|
||||
<item> mkdir </item>
|
||||
<item> mknod </item>
|
||||
<item> msgfmt </item>
|
||||
<item> mv </item>
|
||||
<item> namei </item>
|
||||
<item> nasm </item>
|
||||
<item> nawk </item>
|
||||
<item> nice </item>
|
||||
<item> nl </item>
|
||||
<item> nm </item>
|
||||
<item> nm86 </item>
|
||||
<item> nmap </item>
|
||||
<item> nohup </item>
|
||||
<item> nop </item>
|
||||
<item> od </item>
|
||||
<item> passwd </item>
|
||||
<item> patch </item>
|
||||
<item> pcregrep </item>
|
||||
<item> pcretest </item>
|
||||
<item> perl </item>
|
||||
<item> perror </item>
|
||||
<item> pidof </item>
|
||||
<item> pr </item>
|
||||
<item> printf </item>
|
||||
<item> procmail </item>
|
||||
<item> prune </item>
|
||||
<item> ps2ascii </item>
|
||||
<item> ps2epsi </item>
|
||||
<item> ps2frag </item>
|
||||
<item> ps2pdf </item>
|
||||
<item> ps2ps </item>
|
||||
<item> psbook </item>
|
||||
<item> psmerge </item>
|
||||
<item> psnup </item>
|
||||
<item> psresize </item>
|
||||
<item> psselect </item>
|
||||
<item> pstops </item>
|
||||
<item> rcs </item>
|
||||
<item> rev </item>
|
||||
<item> rm </item>
|
||||
<item> scp </item>
|
||||
<item> sed </item>
|
||||
<item> seq </item>
|
||||
<item> setterm </item>
|
||||
<item> shred </item>
|
||||
<item> size </item>
|
||||
<item> size86 </item>
|
||||
<item> skill </item>
|
||||
<item> slogin </item>
|
||||
<item> snice </item>
|
||||
<item> sort </item>
|
||||
<item> sox </item>
|
||||
<item> split </item>
|
||||
<item> ssh </item>
|
||||
<item> ssh-add </item>
|
||||
<item> ssh-agent </item>
|
||||
<item> ssh-keygen </item>
|
||||
<item> ssh-keyscan </item>
|
||||
<item> stat </item>
|
||||
<item> strings </item>
|
||||
<item> strip </item>
|
||||
<item> sudo </item>
|
||||
<item> suidperl </item>
|
||||
<item> sum </item>
|
||||
<item> tac </item>
|
||||
<item> tail </item>
|
||||
<item> tee </item>
|
||||
<item> test </item>
|
||||
<item> tr </item>
|
||||
<item> uniq </item>
|
||||
<item> unlink </item>
|
||||
<item> unzip </item>
|
||||
<item> updatedb </item>
|
||||
<item> updmap </item>
|
||||
<item> uptime </item>
|
||||
<item> users </item>
|
||||
<item> vmstat </item>
|
||||
<item> w </item>
|
||||
<item> wc </item>
|
||||
<item> wget </item>
|
||||
<item> whatis </item>
|
||||
<item> whereis </item>
|
||||
<item> which </item>
|
||||
<item> who </item>
|
||||
<item> whoami </item>
|
||||
<item> write </item>
|
||||
<item> xargs </item>
|
||||
<item> yacc </item>
|
||||
<item> yes </item>
|
||||
<item> zip </item>
|
||||
<item> zsoelim </item>
|
||||
|
||||
<!-- others -->
|
||||
<item> dcop </item>
|
||||
<item> kdialog </item>
|
||||
<item> kfile </item>
|
||||
<item> xhost </item>
|
||||
<item> xmodmap </item>
|
||||
<item> xset </item>
|
||||
</list>
|
||||
|
||||
|
||||
<contexts>
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="Start">
|
||||
<IncludeRules context="FindAll" />
|
||||
</context>
|
||||
|
||||
<!-- ====== The following rulessets are meant to be included ======== -->
|
||||
<!-- FindAll tries to interpret everything -->
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="FindAll">
|
||||
<IncludeRules context="FindComments" />
|
||||
<IncludeRules context="FindCommands" />
|
||||
<IncludeRules context="FindStrings" />
|
||||
<IncludeRules context="FindSubstitutions" />
|
||||
<IncludeRules context="FindOthers" />
|
||||
</context>
|
||||
|
||||
<!-- FindMost tries to interpret anything except commands -->
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="FindMost">
|
||||
<IncludeRules context="FindComments" />
|
||||
<IncludeRules context="FindStrings" />
|
||||
<IncludeRules context="FindSubstitutions" />
|
||||
<IncludeRules context="FindOthers" />
|
||||
</context>
|
||||
|
||||
|
||||
<!-- FindComments consumes shell comments till EOL -->
|
||||
<context attribute="Normal Text" lineEndContext="#pop" name="FindComments">
|
||||
<DetectChar attribute="Comment" context="Comment" char="#" firstNonSpace="true"/>
|
||||
<RegExpr attribute="Normal Text" context="Comment" String="[\s;](?=#)" />
|
||||
</context>
|
||||
<context attribute="Comment" lineEndContext="#pop" name="Comment">
|
||||
<IncludeRules context="##Alerts" />
|
||||
</context>
|
||||
|
||||
<!-- FindCommentsParen consumes shell comments till EOL or a closing parenthese -->
|
||||
<context attribute="Normal Text" lineEndContext="#pop" name="FindCommentsParen">
|
||||
<DetectChar attribute="Comment" context="CommentParen" char="#" firstNonSpace="true"/>
|
||||
<RegExpr attribute="Normal Text" context="CommentParen" String="[\s;](?=#)" />
|
||||
</context>
|
||||
<context attribute="Comment" lineEndContext="#pop" name="CommentParen">
|
||||
<RegExpr attribute="Comment" context="#pop" String="[^)](?=\))" />
|
||||
<IncludeRules context="##Alerts" />
|
||||
</context>
|
||||
|
||||
<!-- FindCommentsBackq consumes shell comments till EOL or a backquote -->
|
||||
<context attribute="Normal Text" lineEndContext="#pop" name="FindCommentsBackq">
|
||||
<DetectChar attribute="Comment" context="CommentBackq" char="#" firstNonSpace="true"/>
|
||||
<RegExpr attribute="Normal Text" context="CommentBackq" String="[\s;](?=#)" />
|
||||
</context>
|
||||
<context attribute="Comment" lineEndContext="#pop" name="CommentBackq">
|
||||
<RegExpr attribute="Comment" context="#pop" String="[^`](?=`)" />
|
||||
<IncludeRules context="##Alerts" />
|
||||
</context>
|
||||
|
||||
|
||||
<!-- FindCommands matches many items that can be expected outside strings, substitutions etc. -->
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="FindCommands">
|
||||
<!-- start expression in double parentheses -->
|
||||
<Detect2Chars attribute="Keyword" context="ExprDblParen" char="(" char1="(" beginRegion="expression" />
|
||||
<!-- start expression in double brackets -->
|
||||
<RegExpr attribute="Keyword" context="ExprDblBracket" String="\[\[&eos;" beginRegion="expression" column="0"/>
|
||||
<RegExpr attribute="Keyword" context="ExprDblBracket" String="\s\[\[&eos;" beginRegion="expression" />
|
||||
<!-- start expression in single brackets -->
|
||||
<RegExpr attribute="Builtin" context="ExprBracket" String="\[&eos;" beginRegion="expression" column="0"/>
|
||||
<RegExpr attribute="Builtin" context="ExprBracket" String="\s\[&eos;" beginRegion="expression" />
|
||||
<!-- start a group command with { -->
|
||||
<RegExpr attribute="Keyword" context="Group" String="\{&eos;" beginRegion="group" />
|
||||
<!-- start a subshell -->
|
||||
<DetectChar attribute="Keyword" context="SubShell" char="(" beginRegion="subshell" />
|
||||
<!-- match do and if blocks -->
|
||||
<RegExpr attribute="Keyword" context="#stay" String="\bdo&noword;" beginRegion="do" />
|
||||
<RegExpr attribute="Keyword" context="#stay" String="\bdone&noword;" endRegion="do" />
|
||||
<RegExpr attribute="Keyword" context="#stay" String="\bif&noword;" beginRegion="if" />
|
||||
<RegExpr attribute="Keyword" context="#stay" String="\bfi&noword;" endRegion="if" />
|
||||
<!-- handle case as a special case -->
|
||||
<RegExpr attribute="Keyword" context="Case" String="\bcase&noword;" beginRegion="case" />
|
||||
<!-- handle command line options -->
|
||||
<RegExpr attribute="Option" context="#stay" String="-[A-Za-z0-9][A-Za-z0-9_]*" />
|
||||
<RegExpr attribute="Option" context="#stay" String="--[a-z][A-Za-z0-9_-]*" />
|
||||
<!-- handle variable assignments -->
|
||||
<RegExpr attribute="Variable" context="Assign" String="\b&varname;\+?=" />
|
||||
<RegExpr attribute="Variable" context="AssignSubscr" String="\b&varname;(?=\[.+\]\+?=)" />
|
||||
<!-- handle functions with function keyword before keywords -->
|
||||
<StringDetect attribute="Function" context="#stay" String=":()" />
|
||||
<RegExpr attribute="Keyword" context="FunctionDef" String="\bfunction\b" />
|
||||
<!-- handle keywords -->
|
||||
<keyword attribute="Keyword" context="#stay" String="keywords" />
|
||||
<RegExpr attribute="Builtin" context="#stay" String="\.(?=\s)" />
|
||||
<keyword attribute="Builtin" context="#stay" String="builtins" />
|
||||
<keyword attribute="Command" context="#stay" String="unixcommands" />
|
||||
<!-- handle commands that have variable names as argument -->
|
||||
<keyword attribute="Builtin" context="VarName" String="builtins_var" />
|
||||
<!-- handle here-string -->
|
||||
<RegExpr attribute="Redirection" context="#stay" String="\d*<<<" />
|
||||
<!-- handle here document -->
|
||||
<StringDetect attribute="Redirection" context="HereDoc" String="<<" lookAhead="true" />
|
||||
<!-- handle process subst -->
|
||||
<RegExpr attribute="Redirection" context="ProcessSubst" String="[<>]\(" />
|
||||
<!-- handle redirection -->
|
||||
<RegExpr attribute="Redirection" context="#stay" String="([0-9]*(>{1,2}|<)(&[0-9]+-?)?|&>|>&|[0-9]*<>)" />
|
||||
<!-- handle &, &&, | and || -->
|
||||
<RegExpr attribute="Control" context="#stay" String="([|&])\1?" />
|
||||
<!-- mark function definitions without function keyword -->
|
||||
<RegExpr attribute="Function" context="#stay" String="&funcname;\s*\(\)" />
|
||||
</context>
|
||||
|
||||
<!-- FindOthers contains various rules to mark different shell input -->
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="FindOthers">
|
||||
<RegExpr attribute="Escape" context="#stay" String="\\[][;\\$`{}()|&<>* ]" />
|
||||
<RegExpr attribute="Keyword" context="#stay" String="\\$" />
|
||||
<RegExpr attribute="Escape" context="#stay" String="\{(?!(\s|$))\S*\}" />
|
||||
<RegExpr attribute="Path" context="#stay" String="&pathpart;*(?=/)" />
|
||||
<RegExpr attribute="Path" context="#stay" String="~\w*" />
|
||||
<RegExpr attribute="Path" context="#stay" String="/&pathpart;*(?=([\s/):;$`'"]|$))" />
|
||||
<!-- TODO: shell globs beside * and ? (in Path's) -->
|
||||
</context>
|
||||
|
||||
<!-- FindStrings looks for single and double quoted strings, also with $-prefix -->
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="FindStrings">
|
||||
<Detect2Chars attribute="Escape" context="#stay" char="\\" char1="'" />
|
||||
<Detect2Chars attribute="Escape" context="#stay" char="\\" char1=""" />
|
||||
<DetectChar attribute="String SingleQ" context="StringSQ" char="'" />
|
||||
<DetectChar attribute="String DoubleQ" context="StringDQ" char=""" />
|
||||
<Detect2Chars attribute="String SingleQ" context="StringEsc" char="$" char1="'" />
|
||||
<Detect2Chars attribute="String Transl." context="StringDQ" char="$" char1=""" />
|
||||
</context>
|
||||
|
||||
<!-- FindSubstitutions goes after anything starting with $ and ` and their escapes -->
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="FindSubstitutions">
|
||||
<RegExpr attribute="Variable" context="Subscript" String="\$&varname;\[" />
|
||||
<RegExpr attribute="Variable" context="#stay" String="\$&varname;" />
|
||||
<RegExpr attribute="Variable" context="#stay" String="\$[*@#?$!_0-9-]" />
|
||||
<RegExpr attribute="Variable" context="#stay" String="\$\{[*@#?$!_0-9-]\}" />
|
||||
<RegExpr attribute="Variable" context="#stay" String="\$\{#&varname;(\[[*@]\])?\}" />
|
||||
<RegExpr attribute="Variable" context="#stay" String="\$\{!&varname;(\[[*@]\]|[*@])?\}" />
|
||||
<RegExpr attribute="Variable" context="VarBrace" String="\$\{&varname;" />
|
||||
<RegExpr attribute="Variable" context="VarBrace" String="\$\{[*@#?$!_0-9-](?=[:#%/=?+-])" />
|
||||
<StringDetect attribute="Variable" context="ExprDblParenSubst" String="$((" beginRegion="expression" />
|
||||
<StringDetect attribute="Redirection" context="SubstFile" String="$(<" />
|
||||
<StringDetect attribute="Variable" context="SubstCommand" String="$(" />
|
||||
<DetectChar attribute="Backquote" context="SubstBackq" char="`" />
|
||||
<RegExpr attribute="Escape" context="#stay" String="\\[`$\\]" />
|
||||
</context>
|
||||
|
||||
<!-- FindTests finds operators valid in tests -->
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="FindTests">
|
||||
<RegExpr attribute="Expression" context="#stay" String="-[abcdefghkprstuwxOGLSNozn](?=\s)"/>
|
||||
<RegExpr attribute="Expression" context="#stay" String="-([no]t|ef)(?=\s)"/>
|
||||
<RegExpr attribute="Expression" context="#stay" String="([!=]=?|[><])(?=\s)"/>
|
||||
<RegExpr attribute="Expression" context="#stay" String="-(eq|ne|[gl][te])(?=\s)"/>
|
||||
</context>
|
||||
|
||||
|
||||
<!-- ====== These are the contexts that can be branched to ======= -->
|
||||
|
||||
<!-- ExprDblParen consumes an expression started in command mode till )) -->
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="ExprDblParen">
|
||||
<Detect2Chars attribute="Keyword" context="#pop" char=")" char1=")" endRegion="expression" />
|
||||
<DetectChar attribute="Normal Text" context="ExprSubParen" char="(" />
|
||||
<IncludeRules context="FindMost" />
|
||||
</context>
|
||||
|
||||
<!-- ExprDblParenSubst like ExprDblParen but matches )) as Variable -->
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="ExprDblParenSubst">
|
||||
<Detect2Chars attribute="Variable" context="#pop" char=")" char1=")" endRegion="expression" />
|
||||
<DetectChar attribute="Normal Text" context="ExprSubParen" char="(" />
|
||||
<IncludeRules context="FindMost" />
|
||||
</context>
|
||||
|
||||
<!-- ExprSubParen consumes an expression till ) -->
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="ExprSubParen">
|
||||
<DetectChar attribute="Normal Text" context="#pop" char=")" />
|
||||
<DetectChar attribute="Normal Text" context="ExprSubParen" char="(" />
|
||||
<IncludeRules context="FindMost" />
|
||||
</context>
|
||||
|
||||
<!-- ExprBracket consumes an expression till ] -->
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="ExprBracket">
|
||||
<RegExpr attribute="Builtin" context="#pop" String="\s\](?=($|[\s;|&]))" endRegion="expression" />
|
||||
<RegExpr attribute="Builtin" context="#pop" String="\](?=($|[\s;|&]))" endRegion="expression" column="0"/>
|
||||
<DetectChar attribute="Normal Text" context="ExprSubParen" char="(" />
|
||||
<IncludeRules context="FindTests" />
|
||||
<IncludeRules context="FindMost" />
|
||||
</context>
|
||||
|
||||
<!-- ExprDblBracket consumes an expression till ]] -->
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="ExprDblBracket">
|
||||
<RegExpr attribute="Keyword" context="#pop" String="\s\]\](?=($|[\s;|&]))" endRegion="expression" />
|
||||
<RegExpr attribute="Keyword" context="#pop" String="\]\](?=($|[\s;|&]))" endRegion="expression" column="0"/>
|
||||
<DetectChar attribute="Normal Text" context="ExprSubParen" char="(" />
|
||||
<IncludeRules context="FindTests" />
|
||||
<IncludeRules context="FindMost" />
|
||||
</context>
|
||||
|
||||
<!-- Group consumes shell input till } -->
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="Group">
|
||||
<DetectChar attribute="Keyword" context="#pop" char="}" endRegion="group" />
|
||||
<IncludeRules context="FindAll" />
|
||||
</context>
|
||||
|
||||
<!-- SubShell consumes shell input till ) -->
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="SubShell">
|
||||
<DetectChar attribute="Keyword" context="#pop" char=")" endRegion="subshell" />
|
||||
<IncludeRules context="FindAll" />
|
||||
</context>
|
||||
|
||||
<!-- Assign consumes an expression till EOL or whitespace -->
|
||||
<context attribute="Normal Text" lineEndContext="#pop" name="Assign" fallthrough="true" fallthroughContext="#pop">
|
||||
<DetectChar attribute="Variable" context="AssignArray" char="(" />
|
||||
<IncludeRules context="FindStrings" />
|
||||
<IncludeRules context="FindSubstitutions" />
|
||||
<IncludeRules context="FindOthers" />
|
||||
<RegExpr attribute="Normal Text" context="#stay" String="[\w:,+_./-]" />
|
||||
</context>
|
||||
|
||||
<!-- AssignArray consumes everything till ), marking assignments -->
|
||||
<context attribute="Normal Text" lineEndContext="#pop" name="AssignArray">
|
||||
<DetectChar attribute="Variable" context="#pop" char=")" />
|
||||
<DetectChar attribute="Variable" context="Subscript" char="[" />
|
||||
<DetectChar attribute="Variable" context="Assign" char="=" />
|
||||
<IncludeRules context="FindMost" />
|
||||
</context>
|
||||
|
||||
<!-- AssignSubscr first expects a [ then parses subscript and continues with '=value' -->
|
||||
<context attribute="Normal Text" lineEndContext="#pop" name="AssignSubscr" fallthrough="true" fallthroughContext="#pop">
|
||||
<DetectChar attribute="Variable" context="Subscript" char="[" />
|
||||
<Detect2Chars attribute="Variable" context="Assign" char="+" char1="=" />
|
||||
<DetectChar attribute="Variable" context="Assign" char="=" />
|
||||
<IncludeRules context="FindStrings" />
|
||||
<IncludeRules context="FindSubstitutions" />
|
||||
<IncludeRules context="FindOthers" />
|
||||
</context>
|
||||
|
||||
<!-- Subscript consumes anything till ], marks as Variable -->
|
||||
<context attribute="Variable" lineEndContext="#stay" name="Subscript">
|
||||
<DetectChar attribute="Variable" context="#pop" char="]" />
|
||||
<IncludeRules context="FindStrings" />
|
||||
<IncludeRules context="FindSubstitutions" />
|
||||
<IncludeRules context="FindOthers" />
|
||||
</context>
|
||||
|
||||
<!-- FunctionDef consumes a name, possibly with (), marks as Function -->
|
||||
<context attribute="Function" lineEndContext="#pop" name="FunctionDef" fallthrough="true" fallthroughContext="#pop">
|
||||
<RegExpr attribute="Function" context="#pop" String="\s+&funcname;(\s*\(\))?" />
|
||||
</context>
|
||||
|
||||
<!-- VarName consumes spare variable names and assignments -->
|
||||
<context attribute="Normal Text" lineEndContext="#pop" name="VarName" fallthrough="true" fallthroughContext="#pop">
|
||||
<!-- handle command line options -->
|
||||
<RegExpr attribute="Option" context="#stay" String="-[A-Za-z0-9]+" />
|
||||
<RegExpr attribute="Option" context="#stay" String="--[a-z][A-Za-z0-9_-]*" />
|
||||
<RegExpr attribute="Variable" context="#stay" String="\b&varname;" />
|
||||
<DetectChar attribute="Variable" context="Subscript" char="[" />
|
||||
<DetectChar attribute="Variable" context="Assign" char="=" />
|
||||
<IncludeRules context="FindMost" />
|
||||
<!-- stay here in spaces and other safe characters -->
|
||||
<RegExpr attribute="Normal Text" context="#stay" String="[^]})|;`&><]" />
|
||||
</context>
|
||||
|
||||
<!-- ProcessSubst handles <(command) and >(command) -->
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="ProcessSubst">
|
||||
<DetectChar attribute="Redirection" context="#pop" char=")" />
|
||||
<IncludeRules context="FindCommentsParen" />
|
||||
<IncludeRules context="FindCommands" />
|
||||
<IncludeRules context="FindStrings" />
|
||||
<IncludeRules context="FindSubstitutions" />
|
||||
<IncludeRules context="FindOthers" />
|
||||
</context>
|
||||
|
||||
<!-- StringSQ consumes anything till ' -->
|
||||
<context attribute="String SingleQ" lineEndContext="#stay" name="StringSQ">
|
||||
<DetectChar attribute="String SingleQ" context="#pop" char="'" />
|
||||
</context>
|
||||
|
||||
<!-- StringDQ consumes anything till ", substitutes vars and expressions -->
|
||||
<context attribute="String DoubleQ" lineEndContext="#stay" name="StringDQ">
|
||||
<DetectChar attribute="String DoubleQ" context="#pop" char=""" />
|
||||
<RegExpr attribute="String Escape" context="#stay" String="\\[`"\\$\n]" />
|
||||
<IncludeRules context="FindSubstitutions" />
|
||||
</context>
|
||||
|
||||
<!-- StringEsc eats till ', but escaping many characters -->
|
||||
<context attribute="String SingleQ" lineEndContext="#stay" name="StringEsc">
|
||||
<DetectChar attribute="String SingleQ" context="#pop" char="'" />
|
||||
<RegExpr attribute="String Escape" context="#stay" String="\\[abefnrtv\\']" />
|
||||
<RegExpr attribute="String Escape" context="#stay" String="\\([0-7]{1,3}|x[A-Fa-f0-9]{1,2}|c.)" />
|
||||
</context>
|
||||
|
||||
<!-- VarBrace is called as soon as ${xxx is encoutered -->
|
||||
<context attribute="Error" lineEndContext="#stay" name="VarBrace">
|
||||
<DetectChar attribute="Variable" context="#pop" char="}" />
|
||||
<DetectChar attribute="Variable" context="Subscript" char="[" />
|
||||
<RegExpr attribute="Variable" context="VarAlt" String="(:?[-=?+]|##?|%%?)" />
|
||||
<RegExpr attribute="Variable" context="VarSubst" String="//?" />
|
||||
<DetectChar attribute="Variable" context="VarSub" char=":" />
|
||||
</context>
|
||||
|
||||
<!-- VarAlt is to handle default/alternate/etc values of variables -->
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="VarAlt">
|
||||
<DetectChar attribute="Variable" context="#pop#pop" char="}" />
|
||||
<IncludeRules context="FindStrings" />
|
||||
<IncludeRules context="FindSubstitutions" />
|
||||
</context>
|
||||
|
||||
<!-- VarSubst is to handle substitutions on variables -->
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="VarSubst">
|
||||
<DetectChar attribute="Variable" context="#pop#pop" char="}" />
|
||||
<DetectChar attribute="Variable" context="VarSubst2" char="/" />
|
||||
<IncludeRules context="FindStrings" />
|
||||
<IncludeRules context="FindSubstitutions" />
|
||||
</context>
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="VarSubst2">
|
||||
<DetectChar attribute="Variable" context="#pop#pop#pop" char="}" />
|
||||
<IncludeRules context="FindStrings" />
|
||||
<IncludeRules context="FindSubstitutions" />
|
||||
</context>
|
||||
|
||||
<!-- VarSub is to substrings of variables -->
|
||||
<context attribute="Error" lineEndContext="#stay" name="VarSub">
|
||||
<DetectChar attribute="Variable" context="VarSub2" char=":" />
|
||||
<DetectChar attribute="Variable" context="#pop#pop" char="}" />
|
||||
<RegExpr attribute="Variable" context="#stay" String="&varname;" />
|
||||
<RegExpr attribute="Variable" context="#stay" String="[0-9]+(?=[:}])" />
|
||||
<IncludeRules context="FindSubstitutions" />
|
||||
</context>
|
||||
<context attribute="Error" lineEndContext="#stay" name="VarSub2">
|
||||
<DetectChar attribute="Variable" context="#pop#pop#pop" char="}" />
|
||||
<RegExpr attribute="Variable" context="#stay" String="&varname;" />
|
||||
<RegExpr attribute="Variable" context="#stay" String="[0-9](?=[:}])" />
|
||||
<IncludeRules context="FindSubstitutions" />
|
||||
</context>
|
||||
|
||||
|
||||
<!-- SubstFile is called after a <( or >( is encoutered -->
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="SubstFile">
|
||||
<DetectChar attribute="Redirection" context="#pop" char=")" />
|
||||
<IncludeRules context="FindCommentsParen" />
|
||||
<IncludeRules context="FindStrings" />
|
||||
<IncludeRules context="FindSubstitutions" />
|
||||
<IncludeRules context="FindOthers" />
|
||||
</context>
|
||||
|
||||
<!-- SubstCommand is called after a $( is encountered -->
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="SubstCommand">
|
||||
<DetectChar attribute="Variable" context="#pop" char=")" />
|
||||
<IncludeRules context="FindCommentsParen" />
|
||||
<IncludeRules context="FindCommands" />
|
||||
<IncludeRules context="FindStrings" />
|
||||
<IncludeRules context="FindSubstitutions" />
|
||||
<IncludeRules context="FindOthers" />
|
||||
</context>
|
||||
|
||||
<!-- SubstBackq is called when a backquote is encountered -->
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="SubstBackq">
|
||||
<DetectChar attribute="Backquote" context="#pop" char="`" />
|
||||
<IncludeRules context="FindCommentsBackq" />
|
||||
<IncludeRules context="FindCommands" />
|
||||
<IncludeRules context="FindStrings" />
|
||||
<IncludeRules context="FindSubstitutions" />
|
||||
<IncludeRules context="FindOthers" />
|
||||
</context>
|
||||
|
||||
<!-- Case is called after the case keyword is encoutered. We handle this because of
|
||||
the lonely closing parentheses that would otherwise disturb the expr matching -->
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="Case">
|
||||
<RegExpr attribute="Keyword" context="CaseIn" String="\sin\b" />
|
||||
<IncludeRules context="FindMost" />
|
||||
</context>
|
||||
|
||||
<!-- CaseIn is called when the construct 'case ... in' has been found. -->
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="CaseIn">
|
||||
<RegExpr attribute="Keyword" context="#pop#pop" String="\besac(?=$|[\s;)])" endRegion="case" />
|
||||
<DetectChar attribute="Keyword" context="CaseExpr" char=")" beginRegion="caseexpr" />
|
||||
<AnyChar attribute="Keyword" context="#stay" String="(|" />
|
||||
<IncludeRules context="FindMost" />
|
||||
</context>
|
||||
|
||||
<!-- CaseExpr eats shell input till ;; -->
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="CaseExpr">
|
||||
<Detect2Chars attribute="Keyword" context="#pop" char=";" char1=";" endRegion="caseexpr" />
|
||||
<RegExpr attribute="Keyword" context="#pop" String="esac(?=$|[\s;)])" lookAhead="true" firstNonSpace="true" endRegion="caseexpr"/>
|
||||
<IncludeRules context="FindAll" />
|
||||
</context>
|
||||
|
||||
<!-- HereDoc consumes Here-documents. It is called at the beginning of the "<<" construct. -->
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="HereDoc">
|
||||
<RegExpr attribute="Redirection" context="HereDocIQ" String="(<<-\s*"(&word;)")" lookAhead="true" />
|
||||
<RegExpr attribute="Redirection" context="HereDocIQ" String="(<<-\s*'(&word;)')" lookAhead="true" />
|
||||
<RegExpr attribute="Redirection" context="HereDocIQ" String="(<<-\s*\\(&word;))" lookAhead="true" />
|
||||
<RegExpr attribute="Redirection" context="HereDocINQ" String="(<<-\s*(&word;))" lookAhead="true" />
|
||||
<RegExpr attribute="Redirection" context="HereDocQ" String="(<<\s*"(&word;)")" lookAhead="true" />
|
||||
<RegExpr attribute="Redirection" context="HereDocQ" String="(<<\s*'(&word;)')" lookAhead="true" />
|
||||
<RegExpr attribute="Redirection" context="HereDocQ" String="(<<\s*\\(&word;))" lookAhead="true" />
|
||||
<RegExpr attribute="Redirection" context="HereDocNQ" String="(<<\s*(&word;))" lookAhead="true" />
|
||||
<StringDetect attribute="Redirection" context="#pop" String="<<" /><!-- always met -->
|
||||
</context>
|
||||
|
||||
<context attribute="Normal Text" lineEndContext="#pop" name="HereDocRemainder">
|
||||
<IncludeRules context="FindAll" />
|
||||
</context>
|
||||
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="HereDocQ" dynamic="true">
|
||||
<RegExpr attribute="Redirection" context="HereDocRemainder" String="%1" dynamic="true" />
|
||||
<RegExpr attribute="Redirection" context="#pop#pop" String="^%2\b" dynamic="true" column="0"/>
|
||||
</context>
|
||||
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="HereDocNQ" dynamic="true">
|
||||
<RegExpr attribute="Redirection" context="HereDocRemainder" String="%1" dynamic="true" />
|
||||
<RegExpr attribute="Redirection" context="#pop#pop" String="^%2\b" dynamic="true" column="0"/>
|
||||
<IncludeRules context="FindSubstitutions" />
|
||||
</context>
|
||||
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="HereDocIQ" dynamic="true">
|
||||
<RegExpr attribute="Redirection" context="HereDocRemainder" String="%1" dynamic="true" />
|
||||
<RegExpr attribute="Redirection" context="#pop#pop" String="^\t*%2\b" dynamic="true" column="0"/>
|
||||
</context>
|
||||
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="HereDocINQ" dynamic="true">
|
||||
<RegExpr attribute="Redirection" context="HereDocRemainder" String="%1" dynamic="true" />
|
||||
<RegExpr attribute="Redirection" context="#pop#pop" String="^\t*%2\b" dynamic="true" column="0"/>
|
||||
<IncludeRules context="FindSubstitutions" />
|
||||
</context>
|
||||
|
||||
</contexts>
|
||||
|
||||
<itemDatas>
|
||||
<itemData name="Normal Text" defStyleNum="dsNormal" />
|
||||
<itemData name="Comment" defStyleNum="dsComment" />
|
||||
<itemData name="Keyword" defStyleNum="dsKeyword" />
|
||||
<itemData name="Control" defStyleNum="dsKeyword" />
|
||||
<itemData name="Builtin" defStyleNum="dsKeyword" color="#808" />
|
||||
<itemData name="Command" defStyleNum="dsKeyword" color="#c0c" />
|
||||
<itemData name="Redirection" defStyleNum="dsKeyword" color="#238" />
|
||||
<itemData name="Escape" defStyleNum="dsDataType" />
|
||||
<itemData name="String SingleQ" defStyleNum="dsString" />
|
||||
<itemData name="String DoubleQ" defStyleNum="dsString" />
|
||||
<itemData name="Backquote" defStyleNum="dsKeyword" />
|
||||
<itemData name="String Transl." defStyleNum="dsString" />
|
||||
<itemData name="String Escape" defStyleNum="dsDataType" />
|
||||
<itemData name="Variable" defStyleNum="dsOthers" />
|
||||
<itemData name="Expression" defStyleNum="dsOthers" />
|
||||
<itemData name="Function" defStyleNum="dsFunction" />
|
||||
<itemData name="Path" defStyleNum="dsNormal" />
|
||||
<itemData name="Option" defStyleNum="dsNormal" />
|
||||
<itemData name="Error" defStyleNum="dsError" />
|
||||
</itemDatas>
|
||||
</highlighting>
|
||||
<general>
|
||||
<comments>
|
||||
<comment name="singleLine" start="#"/>
|
||||
</comments>
|
||||
<keywords casesensitive="1" weakDeliminator="^%#[]$._{}:-/" additionalDeliminator="`"/>
|
||||
</general>
|
||||
</language>
|
||||
542
share/qtcreator/generic-highlighter/cmake.xml
Normal file
542
share/qtcreator/generic-highlighter/cmake.xml
Normal file
@@ -0,0 +1,542 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd">
|
||||
<!--
|
||||
This file is part of KDE's kate project.
|
||||
|
||||
Copyright 2004 Alexander Neundorf (neundorf@kde.org)
|
||||
Copyright 2005 Dominik Haumann (dhdev@gmx.de)
|
||||
Copyright 2007,2008 Matthew Woehlke (mw_triad@users.sourceforge.net)
|
||||
|
||||
**********************************************************************
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Lesser General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this library; if not, write to the *
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, *
|
||||
* Boston, MA 02110-1301, USA. *
|
||||
**********************************************************************
|
||||
-->
|
||||
<!-- generated for "cmake version 2.6-patch 3" -->
|
||||
<language name="CMake" version="1.11" kateversion="2.4" section="Other" extensions="CMakeLists.txt;*.cmake;" mimetype="" author="Alexander Neundorf (neundorf@kde.org)" license="LGPL">
|
||||
<highlighting>
|
||||
|
||||
<list name = "commands">
|
||||
<!-- generated list -->
|
||||
<item> add_custom_command </item>
|
||||
<item> add_custom_target </item>
|
||||
<item> add_definitions </item>
|
||||
<item> add_dependencies </item>
|
||||
<item> add_executable </item>
|
||||
<item> add_library </item>
|
||||
<item> add_subdirectory </item>
|
||||
<item> add_test </item>
|
||||
<item> aux_source_directory </item>
|
||||
<item> break </item>
|
||||
<item> build_command </item>
|
||||
<item> build_name </item>
|
||||
<item> cmake_minimum_required </item>
|
||||
<item> cmake_policy </item>
|
||||
<item> configure_file </item>
|
||||
<item> create_test_sourcelist </item>
|
||||
<item> define_property </item>
|
||||
<item> else </item>
|
||||
<item> elseif </item>
|
||||
<item> enable_language </item>
|
||||
<item> enable_testing </item>
|
||||
<item> endforeach </item>
|
||||
<item> endfunction </item>
|
||||
<item> endif </item>
|
||||
<item> endmacro </item>
|
||||
<item> endwhile </item>
|
||||
<item> exec_program </item>
|
||||
<item> execute_process </item>
|
||||
<item> export </item>
|
||||
<item> export_library_dependencies </item>
|
||||
<item> file </item>
|
||||
<item> find_file </item>
|
||||
<item> find_library </item>
|
||||
<item> find_package </item>
|
||||
<item> find_path </item>
|
||||
<item> find_program </item>
|
||||
<item> fltk_wrap_ui </item>
|
||||
<item> foreach </item>
|
||||
<item> function </item>
|
||||
<item> get_cmake_property </item>
|
||||
<item> get_directory_property </item>
|
||||
<item> get_filename_component </item>
|
||||
<item> get_property </item>
|
||||
<item> get_source_file_property </item>
|
||||
<item> get_target_property </item>
|
||||
<item> get_test_property </item>
|
||||
<item> if </item>
|
||||
<item> include </item>
|
||||
<item> include_directories </item>
|
||||
<item> include_external_msproject </item>
|
||||
<item> include_regular_expression </item>
|
||||
<item> install </item>
|
||||
<item> install_files </item>
|
||||
<item> install_programs </item>
|
||||
<item> install_targets </item>
|
||||
<item> link_directories </item>
|
||||
<item> link_libraries </item>
|
||||
<item> list </item>
|
||||
<item> load_cache </item>
|
||||
<item> load_command </item>
|
||||
<item> macro </item>
|
||||
<item> make_directory </item>
|
||||
<item> mark_as_advanced </item>
|
||||
<item> math </item>
|
||||
<item> message </item>
|
||||
<item> option </item>
|
||||
<item> output_required_files </item>
|
||||
<item> project </item>
|
||||
<item> qt_wrap_cpp </item>
|
||||
<item> qt_wrap_ui </item>
|
||||
<item> remove </item>
|
||||
<item> remove_definitions </item>
|
||||
<item> return </item>
|
||||
<item> separate_arguments </item>
|
||||
<item> set </item>
|
||||
<item> set_directory_properties </item>
|
||||
<item> set_property </item>
|
||||
<item> set_source_files_properties </item>
|
||||
<item> set_target_properties </item>
|
||||
<item> set_tests_properties </item>
|
||||
<item> site_name </item>
|
||||
<item> source_group </item>
|
||||
<item> string </item>
|
||||
<item> subdir_depends </item>
|
||||
<item> subdirs </item>
|
||||
<item> target_link_libraries </item>
|
||||
<item> try_compile </item>
|
||||
<item> try_run </item>
|
||||
<item> unset </item>
|
||||
<item> use_mangled_mesa </item>
|
||||
<item> utility_source </item>
|
||||
<item> variable_requires </item>
|
||||
<item> variable_watch </item>
|
||||
<item> while </item>
|
||||
<item> write_file </item>
|
||||
</list>
|
||||
|
||||
<list name="itkvtk_commands">
|
||||
<item> itk_wrap_tcl </item>
|
||||
<item> vtk_make_instantiator </item>
|
||||
<item> vtk_wrap_java </item>
|
||||
<item> vtk_wrap_python </item>
|
||||
<item> vtk_wrap_tcl </item>
|
||||
</list>
|
||||
|
||||
<list name="special_args">
|
||||
<!-- generated list -->
|
||||
<item> ABSOLUTE </item>
|
||||
<item> AFTER </item>
|
||||
<item> ALL </item>
|
||||
<item> ALPHABET </item>
|
||||
<item> AND </item>
|
||||
<item> APPEND </item>
|
||||
<item> ARCHIVE </item>
|
||||
<item> ARGS </item>
|
||||
<item> ASCII </item>
|
||||
<item> BEFORE </item>
|
||||
<item> BRIEF_DOCS </item>
|
||||
<item> BUNDLE </item>
|
||||
<item> C </item>
|
||||
<item> CACHE </item>
|
||||
<item> CLEAR </item>
|
||||
<item> CMAKE_FIND_ROOT_PATH_BOTH </item>
|
||||
<item> CMAKE_FLAGS </item>
|
||||
<item> CODE </item>
|
||||
<item> COMMAND </item>
|
||||
<item> COMMAND_NAME </item>
|
||||
<item> COMMENT </item>
|
||||
<item> COMPARE </item>
|
||||
<item> COMPILE_DEFINITIONS </item>
|
||||
<item> COMPILE_OUTPUT_VARIABLE </item>
|
||||
<item> COMPILE_RESULT_VAR </item>
|
||||
<item> COMPONENT </item>
|
||||
<item> COMPONENTS </item>
|
||||
<item> CONFIGS </item>
|
||||
<item> CONFIGURATIONS </item>
|
||||
<item> CONFIGURE </item>
|
||||
<item> COPYONLY </item>
|
||||
<item> COPY_FILE </item>
|
||||
<item> CXX </item>
|
||||
<item> DEFINED </item>
|
||||
<item> DEPENDS </item>
|
||||
<item> DESTINATION </item>
|
||||
<item> DIRECTORY </item>
|
||||
<item> DIRECTORY_PERMISSIONS </item>
|
||||
<item> DOC </item>
|
||||
<item> DOWNLOAD </item>
|
||||
<item> ENV </item>
|
||||
<item> EQUAL </item>
|
||||
<item> ERROR_FILE </item>
|
||||
<item> ERROR_QUIET </item>
|
||||
<item> ERROR_STRIP_TRAILING_WHITESPACE </item>
|
||||
<item> ERROR_VARIABLE </item>
|
||||
<item> ESCAPE_QUOTES </item>
|
||||
<item> EXACT </item>
|
||||
<item> EXCLUDE </item>
|
||||
<item> EXCLUDE_FROM_ALL </item>
|
||||
<item> EXISTS </item>
|
||||
<item> EXPORT </item>
|
||||
<item> EXPR </item>
|
||||
<item> EXT </item>
|
||||
<item> EXTRA_INCLUDE </item>
|
||||
<item> FATAL_ERROR </item>
|
||||
<item> FILE </item>
|
||||
<item> FILES </item>
|
||||
<item> FILES_MATCHING </item>
|
||||
<item> FILE_PERMISSIONS </item>
|
||||
<item> FIND </item>
|
||||
<item> FOLLOW_SYMLINKS </item>
|
||||
<item> FORCE </item>
|
||||
<item> FRAMEWORK </item>
|
||||
<item> FULL_DOCS </item>
|
||||
<item> FUNCTION </item>
|
||||
<item> GET </item>
|
||||
<item> GLOB </item>
|
||||
<item> GLOB_RECURSE </item>
|
||||
<item> GREATER </item>
|
||||
<item> GROUP_EXECUTE </item>
|
||||
<item> GROUP_READ </item>
|
||||
<item> HEX </item>
|
||||
<item> HINTS </item>
|
||||
<item> IMPLICIT_DEPENDS </item>
|
||||
<item> IMPORTED </item>
|
||||
<item> INCLUDE_INTERNALS </item>
|
||||
<item> INHERITED </item>
|
||||
<item> INPUT_FILE </item>
|
||||
<item> INSERT </item>
|
||||
<item> IS_ABSOLUTE </item>
|
||||
<item> IS_DIRECTORY </item>
|
||||
<item> IS_NEWER_THAN </item>
|
||||
<item> LENGTH </item>
|
||||
<item> LENGTH_MAXIMUM </item>
|
||||
<item> LENGTH_MINIMUM </item>
|
||||
<item> LESS </item>
|
||||
<item> LIBRARY </item>
|
||||
<item> LIMIT </item>
|
||||
<item> LIMIT_COUNT </item>
|
||||
<item> LIMIT_INPUT </item>
|
||||
<item> LIMIT_OUTPUT </item>
|
||||
<item> LINK_INTERFACE_LIBRARIES </item>
|
||||
<item> LOG </item>
|
||||
<item> MACOSX_BUNDLE </item>
|
||||
<item> MAIN_DEPENDENCY </item>
|
||||
<item> MAKE_DIRECTORY </item>
|
||||
<item> MATCH </item>
|
||||
<item> MATCHALL </item>
|
||||
<item> MATCHES </item>
|
||||
<item> MODULE </item>
|
||||
<item> NAME </item>
|
||||
<item> NAMELINK_ONLY </item>
|
||||
<item> NAMELINK_SKIP </item>
|
||||
<item> NAMES </item>
|
||||
<item> NAMESPACE </item>
|
||||
<item> NAME_WE </item>
|
||||
<item> NEW </item>
|
||||
<item> NEWLINE_CONSUME </item>
|
||||
<item> NOT </item>
|
||||
<item> NOTEQUAL </item>
|
||||
<item> NO_CMAKE_BUILDS_PATH </item>
|
||||
<item> NO_CMAKE_ENVIRONMENT_PATH </item>
|
||||
<item> NO_CMAKE_FIND_ROOT_PATH </item>
|
||||
<item> NO_CMAKE_PATH </item>
|
||||
<item> NO_CMAKE_SYSTEM_PATH </item>
|
||||
<item> NO_DEFAULT_PATH </item>
|
||||
<item> NO_HEX_CONVERSION </item>
|
||||
<item> NO_MODULE </item>
|
||||
<item> NO_POLICY_SCOPE </item>
|
||||
<item> NO_SYSTEM_ENVIRONMENT_PATH </item>
|
||||
<item> OFFSET </item>
|
||||
<item> OLD </item>
|
||||
<item> ONLY_CMAKE_FIND_ROOT_PATH </item>
|
||||
<item> OPTIONAL </item>
|
||||
<item> OR </item>
|
||||
<item> OUTPUT </item>
|
||||
<item> OUTPUT_DIRECTORY </item>
|
||||
<item> OUTPUT_FILE </item>
|
||||
<item> OUTPUT_QUIET </item>
|
||||
<item> OUTPUT_STRIP_TRAILING_WHITESPACE </item>
|
||||
<item> OUTPUT_VARIABLE </item>
|
||||
<item> OWNER_EXECUTE </item>
|
||||
<item> OWNER_READ </item>
|
||||
<item> OWNER_WRITE </item>
|
||||
<item> PARENT_SCOPE </item>
|
||||
<item> PATH </item>
|
||||
<item> PATHS </item>
|
||||
<item> PATH_SUFFIXES </item>
|
||||
<item> PATH_TO_MESA </item>
|
||||
<item> PATTERN </item>
|
||||
<item> PERMISSIONS </item>
|
||||
<item> POLICY </item>
|
||||
<item> POP </item>
|
||||
<item> POST_BUILD </item>
|
||||
<item> PREORDER </item>
|
||||
<item> PRE_BUILD </item>
|
||||
<item> PRE_LINK </item>
|
||||
<item> PRIVATE_HEADER </item>
|
||||
<item> PROGRAM </item>
|
||||
<item> PROGRAMS </item>
|
||||
<item> PROGRAM_ARGS </item>
|
||||
<item> PROPERTIES </item>
|
||||
<item> PROPERTY </item>
|
||||
<item> PUBLIC_HEADER </item>
|
||||
<item> PUSH </item>
|
||||
<item> QUIET </item>
|
||||
<item> RANDOM </item>
|
||||
<item> RANGE </item>
|
||||
<item> READ </item>
|
||||
<item> READ_WITH_PREFIX </item>
|
||||
<item> REGEX </item>
|
||||
<item> REGULAR_EXPRESSION </item>
|
||||
<item> RELATIVE </item>
|
||||
<item> RELATIVE_PATH </item>
|
||||
<item> REMOVE </item>
|
||||
<item> REMOVE_AT </item>
|
||||
<item> REMOVE_DUPLICATES </item>
|
||||
<item> REMOVE_ITEM </item>
|
||||
<item> REMOVE_RECURSE </item>
|
||||
<item> RENAME </item>
|
||||
<item> REPLACE </item>
|
||||
<item> REQUIRED </item>
|
||||
<item> REQUIRED_VARIABLE1 </item>
|
||||
<item> REQUIRED_VARIABLE2 </item>
|
||||
<item> RESOURCE </item>
|
||||
<item> RESULT_VAR </item>
|
||||
<item> RESULT_VARIABLE </item>
|
||||
<item> RETURN_VALUE </item>
|
||||
<item> REVERSE </item>
|
||||
<item> RUNTIME </item>
|
||||
<item> RUNTIME_DIRECTORY </item>
|
||||
<item> RUN_OUTPUT_VARIABLE </item>
|
||||
<item> RUN_RESULT_VAR </item>
|
||||
<item> SCRIPT </item>
|
||||
<item> SEND_ERROR </item>
|
||||
<item> SET </item>
|
||||
<item> SHARED </item>
|
||||
<item> SORT </item>
|
||||
<item> SOURCE </item>
|
||||
<item> SOURCES </item>
|
||||
<item> STATIC </item>
|
||||
<item> STATUS </item>
|
||||
<item> STREQUAL </item>
|
||||
<item> STRGREATER </item>
|
||||
<item> STRINGS </item>
|
||||
<item> STRIP </item>
|
||||
<item> STRLESS </item>
|
||||
<item> SUBSTRING </item>
|
||||
<item> SYSTEM </item>
|
||||
<item> TARGET </item>
|
||||
<item> TARGETS </item>
|
||||
<item> TEST </item>
|
||||
<item> TEST_VARIABLE </item>
|
||||
<item> TIMEOUT </item>
|
||||
<item> TOLOWER </item>
|
||||
<item> TOUPPER </item>
|
||||
<item> TO_CMAKE_PATH </item>
|
||||
<item> TO_NATIVE_PATH </item>
|
||||
<item> USE_SOURCE_PERMISSIONS </item>
|
||||
<item> VALUE </item>
|
||||
<item> VAR </item>
|
||||
<item> VAR2 </item>
|
||||
<item> VARIABLE </item>
|
||||
<item> VERBATIM </item>
|
||||
<item> VERSION </item>
|
||||
<item> VERSION_EQUAL </item>
|
||||
<item> VERSION_GREATER </item>
|
||||
<item> VERSION_LESS </item>
|
||||
<item> WIN32 </item>
|
||||
<item> WORKING_DIRECTORY </item>
|
||||
<item> WRITE </item>
|
||||
</list>
|
||||
|
||||
<!-- these are "special" and don't show up in the generated lists -->
|
||||
<list name="extra_special_args">
|
||||
<item> GLOBAL </item>
|
||||
<item> INTERNAL </item>
|
||||
</list>
|
||||
|
||||
<list name="properties">
|
||||
<!-- generated list -->
|
||||
<item> ABSTRACT </item>
|
||||
<item> ADDITIONAL_MAKE_CLEAN_FILES </item>
|
||||
<item> ALLOW_DUPLICATE_CUSTOM_TARGETS </item>
|
||||
<item> ARCHIVE_OUTPUT_DIRECTORY </item>
|
||||
<item> BUILD_WITH_INSTALL_RPATH </item>
|
||||
<item> CACHE_VARIABLES </item>
|
||||
<item> CLEAN_DIRECT_OUTPUT </item>
|
||||
<item> CLEAN_NO_CUSTOM </item>
|
||||
<item> COMPILE_DEFINITIONS </item>
|
||||
<item> COMPILE_FLAGS </item>
|
||||
<item> DEBUG_CONFIGURATIONS </item>
|
||||
<item> DEBUG_POSTFIX </item>
|
||||
<item> DEFINE_SYMBOL </item>
|
||||
<item> DEFINITIONS </item>
|
||||
<item> DISABLED_FEATURES </item>
|
||||
<item> ENABLED_FEATURES </item>
|
||||
<item> ENABLED_LANGUAGES </item>
|
||||
<item> ENABLE_EXPORTS </item>
|
||||
<item> EXCLUDE_FROM_ALL </item>
|
||||
<item> EXTERNAL_OBJECT </item>
|
||||
<item> EchoString </item>
|
||||
<item> FAIL_REGULAR_EXPRESSION </item>
|
||||
<item> FIND_LIBRARY_USE_LIB64_PATHS </item>
|
||||
<item> FRAMEWORK </item>
|
||||
<item> Fortran_MODULE_DIRECTORY </item>
|
||||
<item> GENERATED </item>
|
||||
<item> GENERATOR_FILE_NAME </item>
|
||||
<item> GLOBAL_DEPENDS_DEBUG_MODE </item>
|
||||
<item> HAS_CXX </item>
|
||||
<item> HEADER_FILE_ONLY </item>
|
||||
<item> IMPLICIT_DEPENDS_INCLUDE_TRANSFORM </item>
|
||||
<item> IMPORTED </item>
|
||||
<item> IMPORTED_CONFIGURATIONS </item>
|
||||
<item> IMPORTED_IMPLIB </item>
|
||||
<item> IMPORTED_LINK_DEPENDENT_LIBRARIES </item>
|
||||
<item> IMPORTED_LINK_INTERFACE_LIBRARIES </item>
|
||||
<item> IMPORTED_LOCATION </item>
|
||||
<item> IMPORTED_SONAME </item>
|
||||
<item> IMPORT_PREFIX </item>
|
||||
<item> IMPORT_SUFFIX </item>
|
||||
<item> INCLUDE_DIRECTORIES </item>
|
||||
<item> INCLUDE_REGULAR_EXPRESSION </item>
|
||||
<item> INSTALL_NAME_DIR </item>
|
||||
<item> INSTALL_RPATH </item>
|
||||
<item> INSTALL_RPATH_USE_LINK_PATH </item>
|
||||
<item> IN_TRY_COMPILE </item>
|
||||
<item> KEEP_EXTENSION </item>
|
||||
<item> LANGUAGE </item>
|
||||
<item> LIBRARY_OUTPUT_DIRECTORY </item>
|
||||
<item> LINKER_LANGUAGE </item>
|
||||
<item> LINK_DIRECTORIES </item>
|
||||
<item> LINK_FLAGS </item>
|
||||
<item> LINK_INTERFACE_LIBRARIES </item>
|
||||
<item> LINK_SEARCH_END_STATIC </item>
|
||||
<item> LISTFILE_STACK </item>
|
||||
<item> LOCATION </item>
|
||||
<item> MACOSX_BUNDLE </item>
|
||||
<item> MACOSX_BUNDLE_INFO_PLIST </item>
|
||||
<item> MACOSX_FRAMEWORK_INFO_PLIST </item>
|
||||
<item> MACOSX_PACKAGE_LOCATION </item>
|
||||
<item> MACROS </item>
|
||||
<item> MEASUREMENT </item>
|
||||
<item> OBJECT_DEPENDS </item>
|
||||
<item> OBJECT_OUTPUTS </item>
|
||||
<item> OUTPUT_NAME </item>
|
||||
<item> PACKAGES_FOUND </item>
|
||||
<item> PACKAGES_NOT_FOUND </item>
|
||||
<item> PARENT_DIRECTORY </item>
|
||||
<item> PASS_REGULAR_EXPRESSION </item>
|
||||
<item> POST_INSTALL_SCRIPT </item>
|
||||
<item> PREFIX </item>
|
||||
<item> PRE_INSTALL_SCRIPT </item>
|
||||
<item> PRIVATE_HEADER </item>
|
||||
<item> PROJECT_LABEL </item>
|
||||
<item> PUBLIC_HEADER </item>
|
||||
<item> REPORT_UNDEFINED_PROPERTIES </item>
|
||||
<item> RESOURCE </item>
|
||||
<item> RUNTIME_OUTPUT_DIRECTORY </item>
|
||||
<item> SKIP_BUILD_RPATH </item>
|
||||
<item> SOURCES </item>
|
||||
<item> SOVERSION </item>
|
||||
<item> STATIC_LIBRARY_FLAGS </item>
|
||||
<item> SUFFIX </item>
|
||||
<item> SYMBOLIC </item>
|
||||
<item> TARGET_ARCHIVES_MAY_BE_SHARED_LIBS </item>
|
||||
<item> TARGET_SUPPORTS_SHARED_LIBS </item>
|
||||
<item> TEST_INCLUDE_FILE </item>
|
||||
<item> TIMEOUT </item>
|
||||
<item> TYPE </item>
|
||||
<item> VARIABLES </item>
|
||||
<item> VERSION </item>
|
||||
<item> VS_KEYWORD </item>
|
||||
<item> VS_SCC_LOCALPATH </item>
|
||||
<item> VS_SCC_PROJECTNAME </item>
|
||||
<item> VS_SCC_PROVIDER </item>
|
||||
<item> WILL_FAIL </item>
|
||||
<item> WIN32_EXECUTABLE </item>
|
||||
<item> WRAP_EXCLUDE </item>
|
||||
<item> __CMAKE_DELETE_CACHE_CHANGE_VARS_ </item>
|
||||
</list>
|
||||
|
||||
<!-- these are "special" and don't show up in the generated lists -->
|
||||
<list name="extra_properties">
|
||||
<item> COMMANDS </item> <!-- WARNING: this one looks like a cmake bug, watch for it to migrate to the generated list! -->
|
||||
<item> DEFINITION </item>
|
||||
</list>
|
||||
|
||||
<contexts>
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="Normal Text">
|
||||
<DetectSpaces/>
|
||||
<keyword attribute="Commands" context="Command Args" String="commands" insensitive="true"/>
|
||||
<keyword attribute="Third-Party Commands" context="#stay" String="itkvtk_commands" insensitive="true"/>
|
||||
<RegExpr attribute="Region Marker" context="#stay" String="#\s*BEGIN.*$" beginRegion="block" firstNonSpace="true"/>
|
||||
<RegExpr attribute="Region Marker" context="#stay" String="#\s*END.*$" endRegion="block" firstNonSpace="true"/>
|
||||
<DetectChar attribute="Comment" context="Comment" char="#"/>
|
||||
<RegExpr attribute="Environment Variable" context="#stay" String="\$ENV\{\s*\w+\s*\}"/>
|
||||
<RegExpr attribute="CMake Variable" context="#stay" String="\$\{\s*\w+\s*\}"/>
|
||||
<RegExpr attribute="Macros" context="Macro Args" String="\w+\s*(?=\()"/>
|
||||
</context>
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="Command Args">
|
||||
<DetectChar attribute="Normal Text" context="#pop" char=")"/>
|
||||
<DetectChar attribute="Strings" context="String" char="""/>
|
||||
<keyword attribute="Special Args" context="#stay" String="special_args"/>
|
||||
<keyword attribute="Special Args" context="#stay" String="extra_special_args"/>
|
||||
<keyword attribute="Properties" context="#stay" String="properties"/>
|
||||
<keyword attribute="Properties" context="#stay" String="extra_properties"/>
|
||||
<RegExpr attribute="Comment" context="#stay" String="#.*$"/>
|
||||
<RegExpr attribute="Environment Variable" context="#stay" String="\$ENV\{\s*\w+\s*\}"/>
|
||||
<RegExpr attribute="CMake Variable" context="#stay" String="\$\{\s*\w+\s*\}"/>
|
||||
</context>
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="Macro Args">
|
||||
<DetectChar attribute="Normal Text" context="#pop" char=")"/>
|
||||
<DetectChar attribute="Strings" context="String" char="""/>
|
||||
<RegExpr attribute="Comment" context="#stay" String="#.*$"/>
|
||||
<RegExpr attribute="Environment Variable" context="#stay" String="\$ENV\{\s*\w+\s*\}"/>
|
||||
<RegExpr attribute="CMake Variable" context="#stay" String="\$\{\s*\w+\s*\}"/>
|
||||
</context>
|
||||
<context attribute="Comment" lineEndContext="#pop" name="Comment">
|
||||
<IncludeRules context="##Alerts" />
|
||||
</context>
|
||||
<context attribute="Strings" lineEndContext="#stay" name="String">
|
||||
<DetectChar attribute="Strings" context="#pop" char=""" />
|
||||
<RegExpr attribute="Escapes" context="#stay" String="\\["$n\\]" />
|
||||
<RegExpr attribute="Environment Variable" context="#stay" String="\$ENV\{\s*\w+\s*\}"/>
|
||||
<RegExpr attribute="CMake Variable" context="#stay" String="\$\{\s*\w+\s*\}"/>
|
||||
</context>
|
||||
|
||||
</contexts>
|
||||
<itemDatas>
|
||||
<itemData name="Normal Text" defStyleNum="dsNormal"/>
|
||||
<itemData name="Special Args" defStyleNum="dsOthers"/>
|
||||
<itemData name="Properties" defStyleNum="dsOthers"/>
|
||||
<itemData name="Commands" defStyleNum="dsKeyword"/>
|
||||
<itemData name="Third-Party Commands" defStyleNum="dsFunction"/>
|
||||
<itemData name="Macros" defStyleNum="dsFunction"/>
|
||||
<itemData name="Strings" defStyleNum="dsString"/>
|
||||
<itemData name="Escapes" defStyleNum="dsChar"/>
|
||||
<itemData name="CMake Variable" defStyleNum="dsDecVal"/>
|
||||
<itemData name="Environment Variable" defStyleNum="dsFloat"/>
|
||||
<itemData name="Comment" defStyleNum="dsComment"/>
|
||||
<itemData name="Region Marker" defStyleNum="dsRegionMarker"/>
|
||||
</itemDatas>
|
||||
</highlighting>
|
||||
|
||||
<general>
|
||||
<comments>
|
||||
<comment name="singleLine" start="#"/>
|
||||
</comments>
|
||||
<keywords casesensitive="1"/>
|
||||
</general>
|
||||
</language>
|
||||
699
share/qtcreator/generic-highlighter/css.xml
Normal file
699
share/qtcreator/generic-highlighter/css.xml
Normal file
@@ -0,0 +1,699 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd">
|
||||
|
||||
<!--
|
||||
|
||||
Kate CSS syntax highlighting definition
|
||||
|
||||
|
||||
Changelog:
|
||||
|
||||
- Version 2.02, by Rafał Miłecki:
|
||||
- Added CSS 3 properties "border-*-image" and "border-*-radius".
|
||||
- Added CSS values "clip", "ellipsis" and "ellipsis-word".
|
||||
- Added CSS 3 properties "overflow-x", "overflow-y", "text-overflow", "box-shadow" and "outline-offset".
|
||||
- Added CSS 3 color values: "rgba", "hsl" and "hsla".
|
||||
- Added Gecko CSS properties: "-moz-border-*-colors".
|
||||
- Added background size properties: "background-size" and prefixes: "-o-", "-webkit-" and "-khtml-".
|
||||
|
||||
- Version 2.01, by Mathieu Bonnet:
|
||||
- Added CSS 3 property "border-radius".
|
||||
- Added Gecko CSS properties "-moz-border-radius" and "-moz-box-flex".
|
||||
- Added Gecko CSS value "-moz-box".
|
||||
- Added Trident CSS functional notation "expression".
|
||||
- Extended the id and class syntax specifications, as per CSS 2.1 grammar.
|
||||
|
||||
-->
|
||||
|
||||
<language name="CSS" version="2.02" kateversion="2.4" section="Markup" extensions="*.css" mimetype="text/css" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL">
|
||||
|
||||
<highlighting>
|
||||
<list name="properties">
|
||||
<!-- CSS2 -->
|
||||
<item> azimuth </item>
|
||||
<item> background </item>
|
||||
<item> background-attachment </item>
|
||||
<item> background-color </item>
|
||||
<item> background-image </item>
|
||||
<item> background-position </item>
|
||||
<item> background-repeat </item>
|
||||
<item> border </item>
|
||||
<item> border-bottom </item>
|
||||
<item> border-bottom-color </item>
|
||||
<item> border-bottom-style </item>
|
||||
<item> border-bottom-width </item>
|
||||
<item> border-collapse </item>
|
||||
<item> border-color </item>
|
||||
<item> border-left </item>
|
||||
<item> border-left-color </item>
|
||||
<item> border-left-style </item>
|
||||
<item> border-left-width </item>
|
||||
<item> border-right </item>
|
||||
<item> border-right-color </item>
|
||||
<item> border-right-style </item>
|
||||
<item> border-right-width </item>
|
||||
<item> border-spacing </item>
|
||||
<item> border-style </item>
|
||||
<item> border-top </item>
|
||||
<item> border-top-color </item>
|
||||
<item> border-top-style </item>
|
||||
<item> border-top-width </item>
|
||||
<item> border-width </item>
|
||||
<item> bottom </item>
|
||||
<item> caption-side </item>
|
||||
<item> clear </item>
|
||||
<item> clip </item>
|
||||
<item> color </item>
|
||||
<item> content </item>
|
||||
<item> counter-increment </item>
|
||||
<item> counter-reset </item>
|
||||
<item> cue </item>
|
||||
<item> cue-after </item>
|
||||
<item> cue-before </item>
|
||||
<item> cursor </item>
|
||||
<item> direction </item>
|
||||
<item> display </item>
|
||||
<item> elevation </item>
|
||||
<item> empty-cells </item>
|
||||
<item> float </item>
|
||||
<item> font </item>
|
||||
<item> font-family </item>
|
||||
<item> font-size </item>
|
||||
<item> font-size-adjust </item>
|
||||
<item> font-stretch </item>
|
||||
<item> font-style </item>
|
||||
<item> font-variant </item>
|
||||
<item> font-weight </item>
|
||||
<item> height </item>
|
||||
<item> left </item>
|
||||
<item> letter-spacing </item>
|
||||
<item> line-height </item>
|
||||
<item> list-style </item>
|
||||
<item> list-style-image </item>
|
||||
<item> list-style-keyword </item>
|
||||
<item> list-style-position </item>
|
||||
<item> list-style-type </item>
|
||||
<item> margin </item>
|
||||
<item> margin-bottom </item>
|
||||
<item> margin-left </item>
|
||||
<item> margin-right </item>
|
||||
<item> margin-top </item>
|
||||
<item> marker-offset </item>
|
||||
<item> max-height </item>
|
||||
<item> max-width </item>
|
||||
<item> min-height </item>
|
||||
<item> min-width </item>
|
||||
<item> orphans </item>
|
||||
<item> outline </item>
|
||||
<item> outline-color </item>
|
||||
<item> outline-style </item>
|
||||
<item> outline-width </item>
|
||||
<item> overflow </item>
|
||||
<item> padding </item>
|
||||
<item> padding-bottom </item>
|
||||
<item> padding-left </item>
|
||||
<item> padding-right </item>
|
||||
<item> padding-top </item>
|
||||
<item> page </item>
|
||||
<item> page-break-after </item>
|
||||
<item> page-break-before </item>
|
||||
<item> page-break-inside </item>
|
||||
<item> pause </item>
|
||||
<item> pause-after </item>
|
||||
<item> pause-before </item>
|
||||
<item> pitch </item>
|
||||
<item> pitch-range </item>
|
||||
<item> play-during </item>
|
||||
<item> position </item>
|
||||
<item> quotes </item>
|
||||
<item> richness </item>
|
||||
<item> right </item>
|
||||
<item> size </item>
|
||||
<item> speak </item>
|
||||
<item> speak-header </item>
|
||||
<item> speak-numeral </item>
|
||||
<item> speak-punctuation </item>
|
||||
<item> speech-rate </item>
|
||||
<item> stress </item>
|
||||
<item> table-layout </item>
|
||||
<item> text-align </item>
|
||||
<item> text-decoration </item>
|
||||
<item> text-decoration-color </item>
|
||||
<item> text-indent </item>
|
||||
<item> text-shadow </item>
|
||||
<item> text-transform </item>
|
||||
<item> top </item>
|
||||
<item> unicode-bidi </item>
|
||||
<item> vertical-align </item>
|
||||
<item> visibility </item>
|
||||
<item> voice-family </item>
|
||||
<item> volume </item>
|
||||
<item> white-space </item>
|
||||
<item> widows </item>
|
||||
<item> width </item>
|
||||
<item> word-spacing </item>
|
||||
<item> z-index </item>
|
||||
|
||||
<!-- CSS3 -->
|
||||
<item> border-bottom-image </item>
|
||||
<item> border-bottom-left-image </item>
|
||||
<item> border-bottom-left-radius </item>
|
||||
<item> border-bottom-right-image </item>
|
||||
<item> border-bottom-right-radius </item>
|
||||
<item> border-corner-image </item>
|
||||
<item> border-image </item>
|
||||
<item> border-left-image </item>
|
||||
<item> border-radius </item>
|
||||
<item> border-right-image </item>
|
||||
<item> border-top-image </item>
|
||||
<item> border-top-left-image </item>
|
||||
<item> border-top-left-radius </item>
|
||||
<item> border-top-right-image </item>
|
||||
<item> border-top-right-radius </item>
|
||||
<item> box-shadow </item>
|
||||
<item> box-sizing </item>
|
||||
<item> opacity </item>
|
||||
<item> outline-offset </item>
|
||||
<item> overflow-x </item>
|
||||
<item> overflow-y </item>
|
||||
<item> text-overflow </item>
|
||||
<item> text-shadow </item>
|
||||
|
||||
<!-- Gecko rendering engine CSS property extensions -->
|
||||
<item> -moz-border-bottom-colors </item>
|
||||
<item> -moz-border-left-colors </item>
|
||||
<item> -moz-border-radius </item>
|
||||
<item> -moz-border-right-colors </item>
|
||||
<item> -moz-border-top-colors </item>
|
||||
<item> -moz-box-flex </item>
|
||||
|
||||
<!-- Opera rendering engine CSS property extensions -->
|
||||
<item> -o-background-size </item>
|
||||
<item> -o-text-overflow </item>
|
||||
|
||||
<!-- konq specific -->
|
||||
<item> -khtml-background-size </item>
|
||||
<item> konq_bgpos_x </item>
|
||||
<item> konq_bgpos_y </item>
|
||||
|
||||
<!-- Webkit rendering engine CSS property extensions -->
|
||||
<item> -webkit-background-size </item>
|
||||
|
||||
<!-- font properties in @font-face -->
|
||||
<item> font-family </item>
|
||||
<item> font-size </item>
|
||||
<item> font-stretch </item>
|
||||
<item> font-style </item>
|
||||
<item> font-variant </item>
|
||||
<item> font-weight </item>
|
||||
<item> unicode-range </item>
|
||||
<item> units-per-em </item>
|
||||
<item> src </item>
|
||||
<item> panose-1 </item>
|
||||
<item> stemv </item>
|
||||
<item> stemh </item>
|
||||
<item> slope </item>
|
||||
<item> cap-height </item>
|
||||
<item> x-height </item>
|
||||
<item> ascent </item>
|
||||
<item> descent </item>
|
||||
<item> widths </item>
|
||||
<item> bbox </item>
|
||||
<item> definition-src </item>
|
||||
<item> baseline </item>
|
||||
<item> centerline </item>
|
||||
<item> mathline </item>
|
||||
<item> topline </item>
|
||||
</list>
|
||||
|
||||
<list name="types">
|
||||
<item> inherit </item>
|
||||
<item> none </item>
|
||||
<item> hidden </item>
|
||||
<item> dotted </item>
|
||||
<item> dashed </item>
|
||||
<item> solid </item>
|
||||
<item> double </item>
|
||||
<item> groove </item>
|
||||
<item> ridge </item>
|
||||
<item> inset </item>
|
||||
<item> outset </item>
|
||||
<item> xx-small </item>
|
||||
<item> x-small </item>
|
||||
<item> small </item>
|
||||
<item> medium </item>
|
||||
<item> large </item>
|
||||
<item> x-large </item>
|
||||
<item> xx-large </item>
|
||||
<item> smaller </item>
|
||||
<item> larger </item>
|
||||
<item> italic </item>
|
||||
<item> oblique </item>
|
||||
<item> small-caps </item>
|
||||
<item> normal </item>
|
||||
<item> bold </item>
|
||||
<item> bolder </item>
|
||||
<item> lighter </item>
|
||||
<item> light </item>
|
||||
<item> 100 </item>
|
||||
<item> 200 </item>
|
||||
<item> 300 </item>
|
||||
<item> 400 </item>
|
||||
<item> 500 </item>
|
||||
<item> 600 </item>
|
||||
<item> 700 </item>
|
||||
<item> 800 </item>
|
||||
<item> 900 </item>
|
||||
<item> transparent </item>
|
||||
<item> repeat </item>
|
||||
<item> repeat-x </item>
|
||||
<item> repeat-y </item>
|
||||
<item> no-repeat </item>
|
||||
<item> baseline </item>
|
||||
<item> sub </item>
|
||||
<item> super </item>
|
||||
<item> top </item>
|
||||
<item> text-top </item>
|
||||
<item> middle </item>
|
||||
<item> bottom </item>
|
||||
<item> text-bottom </item>
|
||||
<item> left </item>
|
||||
<item> right </item>
|
||||
<item> center </item>
|
||||
<item> justify </item>
|
||||
<item> konq-center </item>
|
||||
<item> disc </item>
|
||||
<item> circle </item>
|
||||
<item> square </item>
|
||||
<item> box </item>
|
||||
<item> decimal </item>
|
||||
<item> decimal-leading-zero </item>
|
||||
<item> lower-roman </item>
|
||||
<item> upper-roman </item>
|
||||
<item> lower-greek </item>
|
||||
<item> lower-alpha </item>
|
||||
<item> lower-latin </item>
|
||||
<item> upper-alpha </item>
|
||||
<item> upper-latin </item>
|
||||
<item> hebrew </item>
|
||||
<item> armenian </item>
|
||||
<item> georgian </item>
|
||||
<item> cjk-ideographic </item>
|
||||
<item> hiragana </item>
|
||||
<item> katakana </item>
|
||||
<item> hiragana-iroha </item>
|
||||
<item> katakana-iroha </item>
|
||||
<item> inline </item>
|
||||
<item> inline-block </item>
|
||||
<item> block </item>
|
||||
<item> list-item </item>
|
||||
<item> run-in </item>
|
||||
<item> compact </item>
|
||||
<item> marker </item>
|
||||
<item> table </item>
|
||||
<item> inline-table </item>
|
||||
<item> table-row-group </item>
|
||||
<item> table-header-group </item>
|
||||
<item> table-footer-group </item>
|
||||
<item> table-row </item>
|
||||
<item> table-column-group </item>
|
||||
<item> table-column </item>
|
||||
<item> table-cell </item>
|
||||
<item> table-caption </item>
|
||||
<item> auto </item>
|
||||
<item> crosshair </item>
|
||||
<item> default </item>
|
||||
<item> pointer </item>
|
||||
<item> move </item>
|
||||
<item> e-resize </item>
|
||||
<item> ne-resize </item>
|
||||
<item> nw-resize </item>
|
||||
<item> n-resize </item>
|
||||
<item> se-resize </item>
|
||||
<item> sw-resize </item>
|
||||
<item> s-resize </item>
|
||||
<item> w-resize </item>
|
||||
<item> text </item>
|
||||
<item> wait </item>
|
||||
<item> help </item>
|
||||
<item> above </item>
|
||||
<item> absolute </item>
|
||||
<item> always </item>
|
||||
<item> avoid </item>
|
||||
<item> below </item>
|
||||
<item> bidi-override </item>
|
||||
<item> blink </item>
|
||||
<item> both </item>
|
||||
<item> capitalize </item>
|
||||
<item> caption </item>
|
||||
<item> clip </item>
|
||||
<item> close-quote </item>
|
||||
<item> collapse </item>
|
||||
<item> condensed </item>
|
||||
<item> crop </item>
|
||||
<item> cross </item>
|
||||
<item> ellipsis </item>
|
||||
<item> ellipsis-word </item>
|
||||
<item> embed </item>
|
||||
<item> expanded </item>
|
||||
<item> extra-condensed </item>
|
||||
<item> extra-expanded </item>
|
||||
<item> fixed </item>
|
||||
<item> hand </item>
|
||||
<item> hide </item>
|
||||
<item> higher </item>
|
||||
<item> icon </item>
|
||||
<item> inside </item>
|
||||
<item> invert </item>
|
||||
<item> landscape </item>
|
||||
<item> level </item>
|
||||
<item> line-through </item>
|
||||
<item> loud </item>
|
||||
<item> lower </item>
|
||||
<item> lowercase </item>
|
||||
<item> ltr </item>
|
||||
<item> menu </item>
|
||||
<item> message-box </item>
|
||||
<item> mix </item>
|
||||
<item> narrower </item>
|
||||
<item> no-close-quote </item>
|
||||
<item> no-open-quote </item>
|
||||
<item> nowrap </item>
|
||||
<item> open-quote </item>
|
||||
<item> outside </item>
|
||||
<item> overline </item>
|
||||
<item> portrait </item>
|
||||
<item> pre </item>
|
||||
<item> pre-line </item>
|
||||
<item> pre-wrap </item>
|
||||
<item> relative </item>
|
||||
<item> rtl </item>
|
||||
<item> scroll </item>
|
||||
<item> semi-condensed </item>
|
||||
<item> semi-expanded </item>
|
||||
<item> separate </item>
|
||||
<item> show </item>
|
||||
<item> small-caption </item>
|
||||
<item> static </item>
|
||||
<item> static-position </item>
|
||||
<item> status-bar </item>
|
||||
<item> thick </item>
|
||||
<item> thin </item>
|
||||
<item> ultra-condensed </item>
|
||||
<item> ultra-expanded </item>
|
||||
<item> underline </item>
|
||||
<item> uppercase </item>
|
||||
<item> visible </item>
|
||||
<item> wider </item>
|
||||
<item> break </item>
|
||||
<item> serif </item>
|
||||
<item> sans-serif </item>
|
||||
<item> cursive </item>
|
||||
<item> fantasy </item>
|
||||
<item> monospace </item>
|
||||
<item> border-box </item>
|
||||
<item> content-box </item>
|
||||
|
||||
<!-- Gecko rendering engine CSS value extensions -->
|
||||
<item> -moz-box </item>
|
||||
|
||||
</list>
|
||||
|
||||
|
||||
<list name="colors">
|
||||
<item> aqua </item>
|
||||
<item> black </item>
|
||||
<item> blue </item>
|
||||
<item> fuchsia </item>
|
||||
<item> gray </item>
|
||||
<item> green </item>
|
||||
<item> lime </item>
|
||||
<item> maroon </item>
|
||||
<item> navy </item>
|
||||
<item> olive </item>
|
||||
<item> purple </item>
|
||||
<item> red </item>
|
||||
<item> silver </item>
|
||||
<item> teal </item>
|
||||
<item> white </item>
|
||||
<item> yellow </item>
|
||||
<item> ActiveBorder </item>
|
||||
<item> ActiveCaption </item>
|
||||
<item> AppWorkspace </item>
|
||||
<item> Background </item>
|
||||
<item> ButtonFace </item>
|
||||
<item> ButtonHighlight </item>
|
||||
<item> ButtonShadow </item>
|
||||
<item> ButtonText </item>
|
||||
<item> CaptionText </item>
|
||||
<item> GrayText </item>
|
||||
<item> Highlight </item>
|
||||
<item> HighlightText </item>
|
||||
<item> InactiveBorder </item>
|
||||
<item> InactiveCaption </item>
|
||||
<item> InactiveCaptionText </item>
|
||||
<item> InfoBackground </item>
|
||||
<item> InfoText </item>
|
||||
<item> Menu </item>
|
||||
<item> MenuText </item>
|
||||
<item> Scrollbar </item>
|
||||
<item> ThreeDDarkShadow </item>
|
||||
<item> ThreeDFace </item>
|
||||
<item> ThreeDHighlight </item>
|
||||
<item> ThreeDLightShadow </item>
|
||||
<item> ThreeDShadow </item>
|
||||
<item> Window </item>
|
||||
<item> WindowFrame </item>
|
||||
<item> WindowText </item>
|
||||
</list>
|
||||
|
||||
<list name="paren">
|
||||
<item> url </item>
|
||||
<item> attr </item>
|
||||
<item> rect </item>
|
||||
<item> rgb </item>
|
||||
<item> rgba </item>
|
||||
<item> hsl </item>
|
||||
<item> hsla </item>
|
||||
<item> counter </item>
|
||||
<item> counters </item>
|
||||
|
||||
<!-- in @font-face -->
|
||||
<item> local </item>
|
||||
<item> format </item>
|
||||
|
||||
<!-- Trident (a.k.a., MSHTML) rendering engine functional notation extensions -->
|
||||
<item> expression </item>
|
||||
|
||||
</list>
|
||||
|
||||
<list name="mediatypes">
|
||||
<item> all </item>
|
||||
<item> aural </item>
|
||||
<item> braille </item>
|
||||
<item> embossed </item>
|
||||
<item> handheld </item>
|
||||
<item> print </item>
|
||||
<item> projection </item>
|
||||
<item> screen </item>
|
||||
<item> tty </item>
|
||||
<item> tv </item>
|
||||
</list>
|
||||
|
||||
<list name="pseudoclasses">
|
||||
<item> hover </item>
|
||||
<item> link </item>
|
||||
<item> visited </item>
|
||||
<item> active </item>
|
||||
<item> focus </item>
|
||||
<item> first-child </item>
|
||||
<item> last-child </item>
|
||||
<item> only-child </item>
|
||||
<item> first-of-type </item>
|
||||
<item> last-of-type </item>
|
||||
<item> only-of-type </item>
|
||||
<item> first-letter </item>
|
||||
<item> first-line </item>
|
||||
<item> before </item>
|
||||
<item> after </item>
|
||||
<item> selection </item>
|
||||
<item> root </item>
|
||||
<item> empty </item>
|
||||
<item> target </item>
|
||||
<item> enabled </item>
|
||||
<item> disabled </item>
|
||||
<item> checked </item>
|
||||
<item> indeterminate </item>
|
||||
<item> nth-child </item>
|
||||
<item> nth-last-child </item>
|
||||
<item> nth-of-type </item>
|
||||
<item> nth-last-of-type </item>
|
||||
<item> not </item>
|
||||
</list>
|
||||
|
||||
<contexts>
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="Base">
|
||||
<LineContinue/>
|
||||
<DetectSpaces/>
|
||||
<IncludeRules context="FindRuleSets" />
|
||||
</context>
|
||||
|
||||
<!-- to be included -->
|
||||
<!-- finds rules and detects nesting -->
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="FindRuleSets">
|
||||
<RegExpr attribute="Media" context="Media" String="@media\b" />
|
||||
<RegExpr attribute="At Rule" context="Import" String="@import\b" />
|
||||
<RegExpr attribute="At Rule" context="#stay" String="@(font-face|charset)\b" />
|
||||
<DetectChar attribute="Property" context="RuleSet" char="{" beginRegion="ruleset" />
|
||||
<!--parse selectors-->
|
||||
<DetectChar attribute="Selector Attr" context="SelAttr" char="[" />
|
||||
<RegExpr attribute="Selector Id" context="#stay" String="#([a-zA-Z0-9\-_]|[\x80-\xFF]|\\[0-9A-Fa-f]{1,6})*" />
|
||||
<RegExpr attribute="Selector Class" context="#stay" String="\.([a-zA-Z0-9\-_]|[\x80-\xFF]|\\[0-9A-Fa-f]{1,6})*" />
|
||||
<RegExpr attribute="Selector Pseudo" context="#stay" String=":lang\([\w_-]+\)" />
|
||||
<DetectChar attribute="Selector Pseudo" context="SelPseudo" char=":" />
|
||||
<IncludeRules context="FindStrings" />
|
||||
<IncludeRules context="FindComments" />
|
||||
</context>
|
||||
|
||||
<!-- finds arguments to properties -->
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="FindValues">
|
||||
<RegExpr attribute="Value" context="#stay" String="[-+]?[0-9.]+(em|ex|px|in|cm|mm|pt|pc|deg|rad|grad|ms|s|Hz|kHz)\b" />
|
||||
<RegExpr attribute="Value" context="#stay" String="[-+]?[0-9.]+[%]?" />
|
||||
<RegExpr attribute="Normal Text" context="#stay" String="[\w\-]+" />
|
||||
</context>
|
||||
|
||||
<!-- finds strings -->
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="FindStrings">
|
||||
<DetectChar attribute="String" context="StringDQ" char=""" />
|
||||
<DetectChar attribute="String" context="StringSQ" char="'" />
|
||||
</context>
|
||||
|
||||
<!-- finds comments -->
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="FindComments">
|
||||
<RegExpr attribute="Region Marker" context="#stay" String="/\*BEGIN.*\*/" beginRegion="UserDefined" />
|
||||
<RegExpr attribute="Region Marker" context="#stay" String="/\*END.*\*/" endRegion="UserDefined" />
|
||||
<Detect2Chars attribute="Comment" context="Comment" char="/" char1="*" beginRegion="comment" />
|
||||
</context>
|
||||
|
||||
<!-- other contexts -->
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="Media">
|
||||
<DetectChar attribute="Media" context="Media2" char="{" beginRegion="media" />
|
||||
<keyword attribute="Media" context="#stay" String="mediatypes" />
|
||||
<DetectChar attribute="Media" context="#stay" char="," />
|
||||
<IncludeRules context="FindComments" />
|
||||
<RegExpr attribute="Error" context="#stay" String="\S+" />
|
||||
</context>
|
||||
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="Media2">
|
||||
<DetectChar attribute="Media" context="#pop#pop" char="}" endRegion="media" />
|
||||
<IncludeRules context="FindRuleSets" />
|
||||
</context>
|
||||
|
||||
<context attribute="Selector Attr" lineEndContext="#stay" name="SelAttr">
|
||||
<DetectChar attribute="Selector Attr" context="#pop" char="]" />
|
||||
<IncludeRules context="FindStrings" />
|
||||
</context>
|
||||
|
||||
<context attribute="Selector Pseudo" lineEndContext="#pop" name="SelPseudo"
|
||||
fallthrough="true" fallthroughContext="#pop">
|
||||
<keyword attribute="Selector Pseudo" context="#pop" String="pseudoclasses" />
|
||||
</context>
|
||||
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="Import">
|
||||
<DetectChar attribute="At Rule" context="#pop" char=";" />
|
||||
<keyword attribute="Media" context="#stay" String="mediatypes" />
|
||||
<IncludeRules context="FindValues" />
|
||||
<IncludeRules context="FindStrings" />
|
||||
<IncludeRules context="FindComments" />
|
||||
</context>
|
||||
|
||||
<context attribute="Comment" lineEndContext="#stay" name="Comment">
|
||||
<DetectSpaces/>
|
||||
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="comment" />
|
||||
<IncludeRules context="##Alerts" />
|
||||
<DetectIdentifier/>
|
||||
</context>
|
||||
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="RuleSet">
|
||||
<DetectChar attribute="Property" context="#pop" char="}" endRegion="ruleset" />
|
||||
<keyword attribute="Property" context="Rule" String="properties" />
|
||||
<RegExpr attribute="Unknown Property" context="Rule" String="-?[A-Za-z_-]+(?=\s*:)" />
|
||||
<IncludeRules context="FindComments" />
|
||||
<RegExpr attribute="Error" context="#stay" String="\S" />
|
||||
</context>
|
||||
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="Rule">
|
||||
<DetectChar attribute="Property" context="Rule2" char=":" />
|
||||
<RegExpr attribute="Error" context="#stay" String="\S" />
|
||||
</context>
|
||||
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="Rule2">
|
||||
<DetectChar attribute="Property" context="#pop#pop" char=";" />
|
||||
<DetectChar attribute="Property" context="#pop#pop#pop" char="}" endRegion="ruleset" />
|
||||
<!-- parse property values -->
|
||||
<keyword attribute="Value" context="#stay" String="types" />
|
||||
<keyword attribute="Value" context="#stay" String="colors" />
|
||||
<RegExpr attribute="Value" context="#stay" String="#([0-9A-Fa-f]{3}){1,4}\b" />
|
||||
<keyword attribute="Value" context="PropParen" String="paren" />
|
||||
<RegExpr attribute="Important" context="#stay" String="!important\b" />
|
||||
<IncludeRules context="FindValues" />
|
||||
<IncludeRules context="FindStrings" />
|
||||
<IncludeRules context="FindComments" />
|
||||
</context>
|
||||
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="PropParen">
|
||||
<DetectChar attribute="Value" context="PropParen2" char="(" />
|
||||
<IncludeRules context="FindComments" />
|
||||
<RegExpr attribute="Error" context="#stay" String="\S" />
|
||||
</context>
|
||||
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="PropParen2">
|
||||
<DetectChar attribute="Value" context="#pop#pop" char=")" />
|
||||
<IncludeRules context="FindValues" />
|
||||
<IncludeRules context="FindStrings" />
|
||||
<IncludeRules context="FindComments" />
|
||||
</context>
|
||||
|
||||
<!-- string contexts -->
|
||||
<context attribute="String" lineEndContext="#stay" name="StringDQ">
|
||||
<DetectChar attribute="String" context="#pop" char=""" />
|
||||
<IncludeRules context="InsideString" />
|
||||
</context>
|
||||
|
||||
<context attribute="String" lineEndContext="#stay" name="StringSQ">
|
||||
<DetectChar attribute="String" context="#pop" char="'" />
|
||||
<IncludeRules context="InsideString" />
|
||||
</context>
|
||||
|
||||
<context attribute="String" lineEndContext="#stay" name="InsideString">
|
||||
<RegExpr attribute="String" context="#stay" String="\\["']" />
|
||||
<DetectIdentifier/>
|
||||
</context>
|
||||
|
||||
</contexts>
|
||||
<itemDatas>
|
||||
<itemData name="Normal Text" defStyleNum="dsNormal"/>
|
||||
<itemData name="Property" defStyleNum="dsKeyword"/>
|
||||
<itemData name="Unknown Property" defStyleNum="dsKeyword" italic="1"/>
|
||||
<itemData name="Media" defStyleNum="dsDecVal" bold="1"/>
|
||||
<itemData name="At Rule" defStyleNum="dsDecVal" />
|
||||
<itemData name="String" defStyleNum="dsString" />
|
||||
<itemData name="Value" defStyleNum="dsDataType" />
|
||||
<itemData name="Important" defStyleNum="dsKeyword" />
|
||||
<itemData name="Selector Attr" defStyleNum="dsChar" />
|
||||
<itemData name="Selector Id" defStyleNum="dsFloat" bold="1"/>
|
||||
<itemData name="Selector Class" defStyleNum="dsFloat" />
|
||||
<itemData name="Selector Pseudo" defStyleNum="dsDecVal" />
|
||||
<itemData name="Comment" defStyleNum="dsComment" />
|
||||
<itemData name="Region Marker" defStyleNum="dsRegionMarker"/>
|
||||
<itemData name="Alert" defStyleNum="dsAlert"/>
|
||||
<itemData name="Error" defStyleNum="dsError"/>
|
||||
</itemDatas>
|
||||
</highlighting>
|
||||
<general>
|
||||
<keywords casesensitive="0" weakDeliminator="-%"/>
|
||||
<comments>
|
||||
<comment name="multiLine" start="/*" end="*/" />
|
||||
</comments>
|
||||
</general>
|
||||
</language>
|
||||
483
share/qtcreator/generic-highlighter/doxygen.xml
Normal file
483
share/qtcreator/generic-highlighter/doxygen.xml
Normal file
@@ -0,0 +1,483 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd"
|
||||
[
|
||||
<!ENTITY wordsep "([][,?;()]|\.$|\.?\s)"> <!-- things that end a TagWord -->
|
||||
]>
|
||||
<!--
|
||||
This file is part of KDE's kate project.
|
||||
|
||||
Copyright 2004 Dominik Haumann (dhdev@gmx.de)
|
||||
Copyright 2007 Matthew Woehlke (mw_triad@users.sourceforge.net)
|
||||
|
||||
**********************************************************************
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Lesser General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this library; if not, write to the *
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, *
|
||||
* Boston, MA 02110-1301, USA. *
|
||||
**********************************************************************
|
||||
-->
|
||||
<language name="Doxygen" version="1.30" kateversion="2.4" section="Markup" extensions="*.dox;*.doxygen" mimetype="text/x-doxygen" author="Dominik Haumann (dhdev@gmx.de)" license="LGPL" priority="9">
|
||||
<highlighting>
|
||||
<!-- note: all tags may begin with a \ or @ char
|
||||
so if you add/change tags you have to do it twice -->
|
||||
<list name="TagOnly">
|
||||
<item> \arg </item>
|
||||
<item> \attention </item>
|
||||
<item> \author </item>
|
||||
<item> \callgraph </item>
|
||||
<item> \code </item>
|
||||
<item> \dot </item>
|
||||
<item> \else </item>
|
||||
<item> \endcode </item>
|
||||
<item> \endcond </item>
|
||||
<item> \enddot </item>
|
||||
<item> \endhtmlonly </item>
|
||||
<item> \endif </item>
|
||||
<item> \endlatexonly </item>
|
||||
<item> \endlink </item>
|
||||
<item> \endmanonly </item>
|
||||
<item> \endverbatim </item>
|
||||
<item> \endxmlonly </item>
|
||||
<item> \f[ </item>
|
||||
<item> \f] </item>
|
||||
<item> \f$ </item>
|
||||
<item> \hideinitializer </item>
|
||||
<item> \htmlonly </item>
|
||||
<item> \interface </item>
|
||||
<item> \internal </item>
|
||||
<item> \invariant </item>
|
||||
<item> \~ </item>
|
||||
<item> \@ </item>
|
||||
<item> \$ </item>
|
||||
<item> \\ </item>
|
||||
<item> \# </item>
|
||||
<item> \latexonly </item>
|
||||
<item> \li </item>
|
||||
<item> \manonly </item>
|
||||
<item> \n </item>
|
||||
<item> \nosubgrouping </item>
|
||||
<item> \note </item>
|
||||
<item> \only </item>
|
||||
<item> \post </item>
|
||||
<item> \pre </item>
|
||||
<item> \remarks </item>
|
||||
<item> \return </item>
|
||||
<item> \returns </item>
|
||||
<item> \sa </item>
|
||||
<item> \see </item>
|
||||
<item> \showinitializer </item>
|
||||
<item> \since </item>
|
||||
<item> \test </item>
|
||||
<item> \todo </item>
|
||||
<item> \verbatim </item>
|
||||
<item> \warning </item>
|
||||
<item> \xmlonly </item>
|
||||
|
||||
<item> @arg </item>
|
||||
<item> @attention </item>
|
||||
<item> @author </item>
|
||||
<item> @callgraph </item>
|
||||
<item> @code </item>
|
||||
<item> @dot </item>
|
||||
<item> @else </item>
|
||||
<item> @endcode </item>
|
||||
<item> @endcond </item>
|
||||
<item> @enddot </item>
|
||||
<item> @endhtmlonly </item>
|
||||
<item> @endif </item>
|
||||
<item> @endlatexonly </item>
|
||||
<item> @endlink </item>
|
||||
<item> @endmanonly </item>
|
||||
<item> @endverbatim </item>
|
||||
<item> @endxmlonly </item>
|
||||
<item> @f[ </item>
|
||||
<item> @f] </item>
|
||||
<item> @f$ </item>
|
||||
<item> @hideinitializer </item>
|
||||
<item> @htmlonly </item>
|
||||
<item> @interface </item>
|
||||
<item> @internal </item>
|
||||
<item> @invariant </item>
|
||||
<item> @~ </item>
|
||||
<item> @@ </item>
|
||||
<item> @$ </item>
|
||||
<item> @\ </item>
|
||||
<item> @# </item>
|
||||
<item> @latexonly </item>
|
||||
<item> @li </item>
|
||||
<item> @manonly </item>
|
||||
<item> @n </item>
|
||||
<item> @nosubgrouping </item>
|
||||
<item> @note </item>
|
||||
<item> @only </item>
|
||||
<item> @post </item>
|
||||
<item> @pre </item>
|
||||
<item> @remarks </item>
|
||||
<item> @return </item>
|
||||
<item> @returns </item>
|
||||
<item> @sa </item>
|
||||
<item> @see </item>
|
||||
<item> @showinitializer </item>
|
||||
<item> @since </item>
|
||||
<item> @test </item>
|
||||
<item> @todo </item>
|
||||
<item> @verbatim </item>
|
||||
<item> @warning </item>
|
||||
<item> @xmlonly </item>
|
||||
</list>
|
||||
|
||||
<list name="TagWord">
|
||||
<item> \addtogroup </item>
|
||||
<item> \a </item>
|
||||
<item> \anchor </item>
|
||||
<item> \b </item>
|
||||
<item> \c </item>
|
||||
<item> \class </item>
|
||||
<item> \cond </item>
|
||||
<item> \copydoc </item>
|
||||
<item> \def </item>
|
||||
<item> \dontinclude </item>
|
||||
<item> \dotfile </item>
|
||||
<item> \e </item>
|
||||
<item> \elseif </item>
|
||||
<item> \em </item>
|
||||
<item> \enum </item>
|
||||
<item> \example </item>
|
||||
<item> \exception </item>
|
||||
<item> \exceptions </item>
|
||||
<item> \file </item>
|
||||
<item> \htmlinclude </item>
|
||||
<item> \if </item>
|
||||
<item> \ifnot </item>
|
||||
<item> \include </item>
|
||||
<item> \link </item>
|
||||
<item> \namespace </item>
|
||||
<item> \p </item>
|
||||
<item> \package </item>
|
||||
<item> \ref </item>
|
||||
<item> \relatesalso </item>
|
||||
<item> \relates </item>
|
||||
<item> \retval </item>
|
||||
<item> \throw </item>
|
||||
<item> \throws </item>
|
||||
<item> \verbinclude </item>
|
||||
<item> \version </item>
|
||||
<item> \xrefitem </item>
|
||||
|
||||
<item> @addtogroup </item>
|
||||
<item> @a </item>
|
||||
<item> @anchor </item>
|
||||
<item> @b </item>
|
||||
<item> @c </item>
|
||||
<item> @class </item>
|
||||
<item> @cond </item>
|
||||
<item> @copydoc </item>
|
||||
<item> @def </item>
|
||||
<item> @dontinclude </item>
|
||||
<item> @dotfile </item>
|
||||
<item> @e </item>
|
||||
<item> @elseif </item>
|
||||
<item> @em </item>
|
||||
<item> @enum </item>
|
||||
<item> @example </item>
|
||||
<item> @exception </item>
|
||||
<item> @exceptions </item>
|
||||
<item> @file </item>
|
||||
<item> @htmlinclude </item>
|
||||
<item> @if </item>
|
||||
<item> @ifnot </item>
|
||||
<item> @include </item>
|
||||
<item> @link </item>
|
||||
<item> @namespace </item>
|
||||
<item> @p </item>
|
||||
<item> @package </item>
|
||||
<item> @ref </item>
|
||||
<item> @relatesalso </item>
|
||||
<item> @relates </item>
|
||||
<item> @retval </item>
|
||||
<item> @throw </item>
|
||||
<item> @throws </item>
|
||||
<item> @verbinclude </item>
|
||||
<item> @version </item>
|
||||
<item> @xrefitem </item>
|
||||
</list>
|
||||
<list name="TagParam">
|
||||
<item> \param </item>
|
||||
<item> \tparam </item>
|
||||
|
||||
<item> @param </item>
|
||||
<item> @tparam </item>
|
||||
</list>
|
||||
<list name="TagWordWord">
|
||||
<item> \image </item>
|
||||
|
||||
<item> @image </item>
|
||||
</list>
|
||||
<list name="TagWordString">
|
||||
<item> \defgroup </item>
|
||||
<item> \page </item>
|
||||
<item> \paragraph </item>
|
||||
<item> \section </item>
|
||||
<item> \struct </item>
|
||||
<item> \subsection </item>
|
||||
<item> \subsubsection </item>
|
||||
<item> \union </item>
|
||||
<item> \weakgroup </item>
|
||||
|
||||
<item> @defgroup </item>
|
||||
<item> @page </item>
|
||||
<item> @paragraph </item>
|
||||
<item> @section </item>
|
||||
<item> @struct </item>
|
||||
<item> @subsection </item>
|
||||
<item> @subsubsection </item>
|
||||
<item> @union </item>
|
||||
<item> @weakgroup </item>
|
||||
</list>
|
||||
<list name="TagString">
|
||||
<item> \addindex </item>
|
||||
<item> \brief </item>
|
||||
<item> \bug </item>
|
||||
<item> \date </item>
|
||||
<item> \deprecated </item>
|
||||
<item> \fn </item>
|
||||
<item> \ingroup </item>
|
||||
<item> \line </item>
|
||||
<item> \mainpage </item>
|
||||
<item> \name </item>
|
||||
<item> \overload </item>
|
||||
<item> \par </item>
|
||||
<item> \short </item>
|
||||
<item> \skip </item>
|
||||
<item> \skipline </item>
|
||||
<item> \typedef </item>
|
||||
<item> \until </item>
|
||||
<item> \var </item>
|
||||
|
||||
<item> @addindex </item>
|
||||
<item> @brief </item>
|
||||
<item> @bug </item>
|
||||
<item> @date </item>
|
||||
<item> @deprecated </item>
|
||||
<item> @fn </item>
|
||||
<item> @ingroup </item>
|
||||
<item> @line </item>
|
||||
<item> @mainpage </item>
|
||||
<item> @name </item>
|
||||
<item> @overload </item>
|
||||
<item> @par </item>
|
||||
<item> @short </item>
|
||||
<item> @skip </item>
|
||||
<item> @skipline </item>
|
||||
<item> @typedef </item>
|
||||
<item> @until </item>
|
||||
<item> @var </item>
|
||||
</list>
|
||||
<contexts>
|
||||
<!-- different formats:
|
||||
@tag : TagOnly
|
||||
@tag rest_of_line : TagString
|
||||
@tag <word> : TagWord
|
||||
@tag <word> <word> : TagWordWord
|
||||
@tag <word> rest_of_line : TagWordString
|
||||
-->
|
||||
<context attribute="Normal Text" lineEndContext="#stay" name="Normal">
|
||||
<RegExpr attribute="Comment" context="LineComment" String="//(!|(/(?=[^/]|$)))<?"/>
|
||||
<RegExpr attribute="Comment" context="BlockComment" String="/\*(\*[^*/]|!|[*!]<|\*$)" beginRegion="BlockComment"/>
|
||||
<RegExpr attribute="Region" context="#stay" String="//\s*@\{\s*$" beginRegion="MemberGroup"/>
|
||||
<RegExpr attribute="Region" context="#stay" String="//\s*@\}\s*$" endRegion="MemberGroup"/>
|
||||
<RegExpr attribute="Region" context="#stay" String="/\*\s*@\{\s*\*/" beginRegion="MemberGroup"/>
|
||||
<RegExpr attribute="Region" context="#stay" String="/\*\s*@\}\s*\*/" endRegion="MemberGroup"/>
|
||||
</context>
|
||||
<context attribute="Comment" lineEndContext="#pop" name="LineComment">
|
||||
<LineContinue attribute="Comment" context="#stay"/>
|
||||
<DetectSpaces />
|
||||
<IncludeRules context="##Alerts" />
|
||||
<keyword attribute="Tags" context="#stay" String="TagOnly" />
|
||||
<keyword attribute="Tags" context="SL_TagWord" String="TagWord" />
|
||||
<keyword attribute="Tags" context="SL_TagParam" String="TagParam" />
|
||||
<keyword attribute="Tags" context="SL_TagWordWord" String="TagWordWord" />
|
||||
<keyword attribute="Tags" context="SL_TagString" String="TagString" />
|
||||
<keyword attribute="Tags" context="SL_TagWordString" String="TagWordString" />
|
||||
<DetectIdentifier />
|
||||
<StringDetect attribute="HTML Comment" context="SL_htmlcomment" String="<!--" />
|
||||
<Detect2Chars attribute="Comment" context="#stay" char="<" char1="<" />
|
||||
<RegExpr attribute="HTML Tag" context="SL_htmltag" String="<\/?[a-zA-Z_:][a-zA-Z0-9._:-]*" />
|
||||
</context>
|
||||
<context attribute="Comment" lineEndContext="#stay" name="BlockComment">
|
||||
<DetectSpaces />
|
||||
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="BlockComment"/>
|
||||
<IncludeRules context="##Alerts" />
|
||||
<Detect2Chars attribute="Region" context="#stay" char="@" char1="{" />
|
||||
<Detect2Chars attribute="Region" context="#stay" char="@" char1="}" />
|
||||
<keyword attribute="Tags" context="#stay" String="TagOnly" />
|
||||
<keyword attribute="Tags" context="ML_TagWord" String="TagWord" />
|
||||
<keyword attribute="Tags" context="ML_TagParam" String="TagParam" />
|
||||
<keyword attribute="Tags" context="ML_TagWordWord" String="TagWordWord" />
|
||||
<keyword attribute="Tags" context="ML_TagString" String="TagString" />
|
||||
<keyword attribute="Tags" context="ML_TagWordString" String="TagWordString" />
|
||||
<DetectIdentifier />
|
||||
<RegExpr attribute="Tags" context="#stay" String="\\(<|>)" />
|
||||
<Detect2Chars attribute="Comment" context="#stay" char="<" char1="<" />
|
||||
<RegExpr attribute="HTML Tag" context="ML_htmltag" String="<\/?[a-zA-Z_:][a-zA-Z0-9._:-]*" />
|
||||
<StringDetect attribute="HTML Comment" context="ML_htmlcomment" String="<!--" />
|
||||
</context>
|
||||
|
||||
<!-- NOTE: all contexts beginning with ML_ are for multiline comments
|
||||
The following contexts contain a Detect2Chars that looks for a */ sequence to end multiline comments. Singleline comments do not have this limitation - that's why all contexts are copy&pasted and the line <Detect2Chars ... */> is removed. <IncludeRules context="acontext"> could be used instead but it would make context switching much more complex and very hard to understand! (But use IncludeRules where the rules don't refer to another SL_*/ML_* context, to help maintainability.)
|
||||
-->
|
||||
<!-- tag contexts -->
|
||||
<context attribute="Comment" lineEndContext="#pop" name="ML_TagWord">
|
||||
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" lookAhead="true"/>
|
||||
<IncludeRules context="SL_TagWord" />
|
||||
</context>
|
||||
<context attribute="Comment" lineEndContext="#pop" name="ML_TagParam">
|
||||
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" lookAhead="true"/>
|
||||
<DetectSpaces />
|
||||
<StringDetect attribute="Tags" context="ML_Tag2ndWord" String="[in]" />
|
||||
<StringDetect attribute="Tags" context="ML_Tag2ndWord" String="[out]" />
|
||||
<StringDetect attribute="Tags" context="ML_Tag2ndWord" String="[in,out]" />
|
||||
<RegExpr attribute="Word" context="#pop" String="\S(?=&wordsep;)" />
|
||||
<RegExpr attribute="Word" context="#stay" String="\S" />
|
||||
</context>
|
||||
<context attribute="Comment" lineEndContext="#pop" name="ML_TagWordWord">
|
||||
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" lookAhead="true"/>
|
||||
<DetectSpaces />
|
||||
<RegExpr attribute="Word" context="ML_Tag2ndWord" String="\S(?=&wordsep;)" />
|
||||
<RegExpr attribute="Word" context="#stay" String="\S" />
|
||||
</context>
|
||||
<!-- TODO for kate 2.x, convert references to "#pop!ML_TagWord" -->
|
||||
<context attribute="Comment" lineEndContext="#pop#pop" name="ML_Tag2ndWord">
|
||||
<Detect2Chars attribute="Comment" context="#pop#pop" char="*" char1="/" lookAhead="true"/>
|
||||
<IncludeRules context="SL_Tag2ndWord" />
|
||||
</context>
|
||||
<context attribute="Comment" lineEndContext="#pop" name="ML_TagString">
|
||||
<DetectSpaces />
|
||||
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" lookAhead="true"/>
|
||||
<StringDetect attribute="HTML Comment" context="ML_htmlcomment" String="<!--" />
|
||||
<Detect2Chars attribute="Comment" context="#stay" char="<" char1="<" />
|
||||
<RegExpr attribute="HTML Tag" context="ML_htmltag" String="<\/?[a-zA-Z_:][a-zA-Z0-9._:-]*" />
|
||||
<RegExpr attribute="Description" context="#stay" String="." />
|
||||
</context>
|
||||
<context attribute="Comment" lineEndContext="#pop" name="ML_TagWordString">
|
||||
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" lookAhead="true"/>
|
||||
<IncludeRules context="SL_TagWordString" />
|
||||
</context>
|
||||
|
||||
<!-- html contexts -->
|
||||
<context name="ML_htmltag" attribute="Identifier" lineEndContext="#stay">
|
||||
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" lookAhead="true"/>
|
||||
<Detect2Chars attribute="HTML Tag" context="#pop" char="/" char1=">" />
|
||||
<DetectChar attribute="HTML Tag" context="#pop" char=">"/>
|
||||
<RegExpr attribute="Identifier" context="ML_identifiers" String="\s*=\s*"/>
|
||||
</context>
|
||||
<context name="ML_htmlcomment" attribute="HTML Comment" lineEndContext="#stay">
|
||||
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" lookAhead="true"/>
|
||||
<IncludeRules context="##Alerts" />
|
||||
<StringDetect attribute="HTML Comment" context="#pop" String="-->" />
|
||||
</context>
|
||||
<context name="ML_identifiers" attribute="Identifier" lineEndContext="#stay">
|
||||
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" lookAhead="true"/>
|
||||
<RegExpr attribute="String" context="#pop" String="\s*#?[a-zA-Z0-9]*" />
|
||||
<DetectChar attribute="Types" context="ML_types1" char="'" />
|
||||
<DetectChar attribute="Types" context="ML_types2" char=""" />
|
||||
</context>
|
||||
<context name="ML_types1" attribute="Types" lineEndContext="#stay">
|
||||
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" lookAhead="true"/>
|
||||
<DetectChar attribute="Types" context="#pop#pop" char="'" />
|
||||
</context>
|
||||
<context name="ML_types2" attribute="Types" lineEndContext="#stay">
|
||||
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" lookAhead="true"/>
|
||||
<DetectChar attribute="Types" context="#pop#pop" char=""" />
|
||||
</context>
|
||||
|
||||
<!-- NOTE: all contexts beginning with SL_ are for singleline comments -->
|
||||
<!-- tag contexts -->
|
||||
<context attribute="Comment" lineEndContext="#pop" name="SL_TagWord">
|
||||
<DetectSpaces />
|
||||
<keyword attribute="Tags" context="#pop" String="TagWord" lookAhead="true"/>
|
||||
<RegExpr attribute="Word" context="#pop" String="\S(?=&wordsep;)" />
|
||||
<RegExpr attribute="Word" context="#stay" String="\S" />
|
||||
</context>
|
||||
<context attribute="Comment" lineEndContext="#pop" name="SL_TagParam">
|
||||
<DetectSpaces />
|
||||
<StringDetect attribute="Tags" context="SL_Tag2ndWord" String="[in]" />
|
||||
<StringDetect attribute="Tags" context="SL_Tag2ndWord" String="[out]" />
|
||||
<StringDetect attribute="Tags" context="SL_Tag2ndWord" String="[in,out]" />
|
||||
<RegExpr attribute="Word" context="#pop" String="\S(?=&wordsep;)" />
|
||||
<RegExpr attribute="Word" context="#stay" String="\S" />
|
||||
</context>
|
||||
<context attribute="Comment" lineEndContext="#pop" name="SL_TagWordWord">
|
||||
<DetectSpaces />
|
||||
<RegExpr attribute="Word" context="SL_Tag2ndWord" String="\S(?=&wordsep;)" />
|
||||
<RegExpr attribute="Word" context="#stay" String="\S" />
|
||||
</context>
|
||||
<!-- TODO for kate 2.x, convert references to "#pop!SL_TagWord" -->
|
||||
<context attribute="Comment" lineEndContext="#pop#pop" name="SL_Tag2ndWord">
|
||||
<DetectSpaces />
|
||||
<RegExpr attribute="Word" context="#pop#pop" String="\S(?=&wordsep;)" />
|
||||
<RegExpr attribute="Word" context="#stay" String="\S" />
|
||||
</context>
|
||||
<context attribute="Comment" lineEndContext="#pop" name="SL_TagString">
|
||||
<DetectSpaces />
|
||||
<StringDetect attribute="HTML Comment" context="SL_htmlcomment" String="<!--" />
|
||||
<Detect2Chars attribute="Comment" context="#stay" char="<" char1="<" />
|
||||
<RegExpr attribute="HTML Tag" context="SL_htmltag" String="<\/?[a-zA-Z_:][a-zA-Z0-9._:-]*" />
|
||||
<RegExpr attribute="Description" context="#stay" String="." />
|
||||
</context>
|
||||
<context attribute="Comment" lineEndContext="#pop" name="SL_TagWordString">
|
||||
<DetectSpaces />
|
||||
<RegExpr attribute="Word" context="#pop" String="\S(?=&wordsep;)" />
|
||||
<RegExpr attribute="Word" context="#stay" String="\S" />
|
||||
</context>
|
||||
|
||||
<!-- html contexts -->
|
||||
<context name="SL_htmltag" attribute="Identifier" lineEndContext="#pop">
|
||||
<Detect2Chars attribute="HTML Tag" context="#pop" char="/" char1=">" />
|
||||
<DetectChar attribute="HTML Tag" context="#pop" char=">"/>
|
||||
<RegExpr attribute="Identifier" context="SL_identifiers" String="\s*=\s*"/>
|
||||
</context>
|
||||
<context name="SL_htmlcomment" attribute="HTML Comment" lineEndContext="#pop">
|
||||
<IncludeRules context="##Alerts" />
|
||||
<StringDetect attribute="HTML Comment" context="#pop" String="-->" />
|
||||
</context>
|
||||
<context name="SL_identifiers" attribute="Identifier" lineEndContext="#pop">
|
||||
<RegExpr attribute="String" context="#pop" String="\s*#?[a-zA-Z0-9]*" />
|
||||
<DetectChar attribute="Types" context="SL_types1" char="'" />
|
||||
<DetectChar attribute="Types" context="SL_types2" char=""" />
|
||||
</context>
|
||||
<context name="SL_types1" attribute="Types" lineEndContext="#pop">
|
||||
<DetectChar attribute="Types" context="#pop#pop" char="'" />
|
||||
</context>
|
||||
<context name="SL_types2" attribute="Types" lineEndContext="#pop">
|
||||
<DetectChar attribute="Types" context="#pop#pop" char=""" />
|
||||
</context>
|
||||
|
||||
</contexts>
|
||||
<itemDatas>
|
||||
<itemData name="Normal Text" defStyleNum="dsNormal" />
|
||||
<itemData name="Tags" defStyleNum="dsKeyword" color="#ca60ca" selColor="#ffffff" bold="1" italic="0" />
|
||||
<itemData name="Word" defStyleNum="dsKeyword" color="#0095ff" selColor="#ffffff" bold="1" italic="0" />
|
||||
<itemData name="HTML Tag" defStyleNum="dsKeyword" color="#000000" selColor="#ffffff" bold="1" italic="0" />
|
||||
<itemData name="Description" defStyleNum="dsString" color="#ff0000" />
|
||||
<itemData name="Comment" defStyleNum="dsComment" color="#0000ff" selColor="#ffffff" italic="1" />
|
||||
<itemData name="Region" defStyleNum="dsRegionMarker" />
|
||||
<itemData name="Identifier" defStyleNum="dsOthers" />
|
||||
<itemData name="HTML Comment" defStyleNum="dsComment" />
|
||||
<itemData name="Types" defStyleNum="dsDataType" />
|
||||
</itemDatas>
|
||||
</highlighting>
|
||||
<general>
|
||||
<keywords casesensitive="0" weakDeliminator="\$~" />
|
||||
</general>
|
||||
</language>
|
||||
109
share/qtcreator/generic-highlighter/dtd.xml
Normal file
109
share/qtcreator/generic-highlighter/dtd.xml
Normal file
@@ -0,0 +1,109 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd"[
|
||||
<!ENTITY nmtoken "[\-\w\d\.:_]+">
|
||||
<!ENTITY entref "(#[0-9]+|#[xX][0-9A-Fa-f]+|&nmtoken;);">
|
||||
]>
|
||||
<language name="DTD" version="1.02" kateversion="2.4" section="Markup" extensions="*.dtd" mimetype="application/xml-dtd" author="Andriy Lesyuk (s-andy@in.if.ua)" license="LGPL">
|
||||
<highlighting>
|
||||
|
||||
<list name="Category">
|
||||
<item>EMPTY</item>
|
||||
<item>ANY</item>
|
||||
<item>CDATA</item>
|
||||
<item>ID</item>
|
||||
<item>IDREF</item>
|
||||
<item>IDREFS</item>
|
||||
<item>NMTOKEN</item>
|
||||
<item>NMTOKENS</item>
|
||||
<item>ENTITY</item>
|
||||
<item>ENTITIES</item>
|
||||
<item>NOTATION</item>
|
||||
<item>PUBLIC</item>
|
||||
<item>SYSTEM</item>
|
||||
<item>NDATA</item>
|
||||
</list>
|
||||
|
||||
<list name="Keywords">
|
||||
<item>#PCDATA</item>
|
||||
<item>#REQUIRED</item>
|
||||
<item>#IMPLIED</item>
|
||||
<item>#FIXED</item>
|
||||
</list>
|
||||
|
||||
<contexts>
|
||||
<context name="Normal" attribute="Normal" lineEndContext="#stay">
|
||||
<DetectSpaces />
|
||||
<StringDetect attribute="Comment" context="Comment" String="<!--" beginRegion="comment" />
|
||||
<StringDetect attribute="Processing Instruction" context="PI" String="<?xml" beginRegion="pi" />
|
||||
<StringDetect attribute="Declaration" context="Declaration" String="<!ELEMENT" beginRegion="declaration" />
|
||||
<StringDetect attribute="Declaration" context="Declaration" String="<!ATTLIST" beginRegion="declaration" />
|
||||
<StringDetect attribute="Declaration" context="Declaration" String="<!NOTATION" beginRegion="declaration" />
|
||||
<StringDetect attribute="Declaration" context="Declaration" String="<!ENTITY" beginRegion="declaration" />
|
||||
<DetectIdentifier />
|
||||
</context>
|
||||
|
||||
<context name="Comment" attribute="Comment" lineEndContext="#stay">
|
||||
<DetectSpaces />
|
||||
<StringDetect attribute="Comment" context="#pop" String="-->" endRegion="comment" />
|
||||
<IncludeRules context="##Alerts" />
|
||||
<DetectIdentifier />
|
||||
</context>
|
||||
|
||||
<context name="PI" attribute="Normal" lineEndContext="#stay">
|
||||
<Detect2Chars attribute="Processing Instruction" context="#pop" char="?" char1=">" endRegion="pi" />
|
||||
</context>
|
||||
|
||||
<context name="Declaration" attribute="Normal" lineEndContext="#stay">
|
||||
<StringDetect attribute="Comment" context="Comment" String="<!--" beginRegion="comment" />
|
||||
<Detect2Chars attribute="Comment" context="InlineComment" char="-" char1="-" />
|
||||
<DetectChar attribute="Declaration" context="#pop" char=">" endRegion="declaration" />
|
||||
<DetectChar attribute="String" context="String" char=""" />
|
||||
<RegExpr attribute="Declaration" context="#stay" String="(-|O)\s(-|O)" />
|
||||
<AnyChar attribute="Delimiter" context="#stay" String="(|)," />
|
||||
<RegExpr attribute="Entity" context="#stay" String="(%|&)&entref;" />
|
||||
<AnyChar attribute="Symbol" context="#stay" String="?*+-&" />
|
||||
<RegExpr attribute="Local" context="#stay" String="%\s" />
|
||||
<keyword attribute="Keyword" context="#stay" String="Category" />
|
||||
<keyword attribute="Keyword" context="#stay" String="Keywords" />
|
||||
<RegExpr attribute="Name" context="#stay" String="\b&nmtoken;\b" />
|
||||
</context>
|
||||
|
||||
<context name="String" attribute="String" lineEndContext="#stay">
|
||||
<DetectSpaces />
|
||||
<DetectChar attribute="String" context="#pop" char=""" />
|
||||
<RegExpr attribute="Entity" context="#stay" String="%&nmtoken;;" />
|
||||
</context>
|
||||
|
||||
<context name="InlineComment" attribute="Comment" lineEndContext="#pop">
|
||||
<DetectSpaces />
|
||||
<Detect2Chars attribute="Comment" context="#pop" char="-" char1="-" />
|
||||
<IncludeRules context="##Alerts" />
|
||||
<DetectIdentifier />
|
||||
</context>
|
||||
|
||||
</contexts>
|
||||
|
||||
<itemDatas>
|
||||
<itemData name="Normal" defStyleNum="dsNormal" />
|
||||
<itemData name="Comment" defStyleNum="dsComment" />
|
||||
<itemData name="Processing Instruction" defStyleNum="dsKeyword" />
|
||||
<itemData name="Declaration" defStyleNum="dsDataType" bold="1" />
|
||||
<itemData name="Name" defStyleNum="dsFunction" />
|
||||
<itemData name="Delimiter" defStyleNum="dsDecVal" />
|
||||
<itemData name="Symbol" defStyleNum="dsFloat" bold="1" />
|
||||
<itemData name="Keyword" defStyleNum="dsKeyword" />
|
||||
<itemData name="String" defStyleNum="dsString" />
|
||||
<itemData name="Entity" defStyleNum="dsDecVal" />
|
||||
<itemData name="Local" defStyleNum="dsDecVal" bold="1" />
|
||||
</itemDatas>
|
||||
</highlighting>
|
||||
|
||||
<general>
|
||||
<comments>
|
||||
<comment name="multiLine" start="<!--" end="-->" />
|
||||
</comments>
|
||||
</general>
|
||||
|
||||
</language>
|
||||
<!-- kate: indent-width 2; indent-mode normal; tab-indents on; -->
|
||||
|
||||
207
share/qtcreator/generic-highlighter/html.xml
Normal file
207
share/qtcreator/generic-highlighter/html.xml
Normal file
@@ -0,0 +1,207 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd"
|
||||
[
|
||||
<!ENTITY name "[A-Za-z_:][\w.:_-]*">
|
||||
<!ENTITY entref "&(#[0-9]+|#[xX][0-9A-Fa-f]+|&name;);">
|
||||
]>
|
||||
<language name="HTML" version="1.99" kateversion="2.4" section="Markup" extensions="*.htm;*.html;*.shtml;*.shtm" mimetype="text/html" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL" priority="10">
|
||||
|
||||
<highlighting>
|
||||
<contexts>
|
||||
<context name="Start" attribute="Normal Text" lineEndContext="#stay">
|
||||
<IncludeRules context="FindHTML" />
|
||||
</context>
|
||||
|
||||
<context name="FindHTML" attribute="Normal Text" lineEndContext="#stay">
|
||||
<DetectSpaces/>
|
||||
<DetectIdentifier/>
|
||||
<StringDetect attribute="Comment" context="Comment" String="<!--" beginRegion="comment" />
|
||||
<StringDetect attribute="CDATA" context="CDATA" String="<![CDATA[" beginRegion="cdata" />
|
||||
<RegExpr attribute="Doctype" context="Doctype" String="<!DOCTYPE\s+" beginRegion="doctype" />
|
||||
<RegExpr attribute="Processing Instruction" context="PI" String="<\?[\w:-]*" beginRegion="pi" />
|
||||
<RegExpr attribute="Element" context="CSS" String="<style\b" insensitive="TRUE" beginRegion="style" />
|
||||
<RegExpr attribute="Element" context="JS" String="<script\b" insensitive="TRUE" beginRegion="script" />
|
||||
<RegExpr attribute="Element" context="El Open" String="<pre\b" insensitive="TRUE" beginRegion="pre" />
|
||||
<RegExpr attribute="Element" context="El Open" String="<div\b" insensitive="TRUE" beginRegion="div" />
|
||||
<RegExpr attribute="Element" context="El Open" String="<table\b" insensitive="TRUE" beginRegion="table" />
|
||||
<RegExpr attribute="Element" context="El Open" String="<ul\b" insensitive="TRUE" beginRegion="ul" />
|
||||
<RegExpr attribute="Element" context="El Open" String="<ol\b" insensitive="TRUE" beginRegion="ol" />
|
||||
<RegExpr attribute="Element" context="El Open" String="<dl\b" insensitive="TRUE" beginRegion="dl" />
|
||||
<RegExpr attribute="Element" context="El Open" String="<&name;" />
|
||||
<RegExpr attribute="Element" context="El Close" String="</pre\b" insensitive="TRUE" endRegion="pre" />
|
||||
<RegExpr attribute="Element" context="El Close" String="</div\b" insensitive="TRUE" endRegion="div" />
|
||||
<RegExpr attribute="Element" context="El Close" String="</table\b" insensitive="TRUE" endRegion="table" />
|
||||
<RegExpr attribute="Element" context="El Close" String="</ul\b" insensitive="TRUE" endRegion="ul" />
|
||||
<RegExpr attribute="Element" context="El Close" String="</ol\b" insensitive="TRUE" endRegion="ol" />
|
||||
<RegExpr attribute="Element" context="El Close" String="</dl\b" insensitive="TRUE" endRegion="dl" />
|
||||
<RegExpr attribute="Element" context="El Close" String="</&name;" />
|
||||
<!-- as long as kde gives DTDs the text/html mimetype--><IncludeRules context="FindDTDRules" />
|
||||
<IncludeRules context="FindEntityRefs" />
|
||||
</context>
|
||||
|
||||
<context name="FindEntityRefs" attribute="Normal Text" lineEndContext="#stay">
|
||||
<RegExpr attribute="EntityRef" context="#stay" String="&entref;" />
|
||||
<AnyChar attribute="Error" context="#stay" String="&<" />
|
||||
</context>
|
||||
|
||||
<context name="FindPEntityRefs" attribute="Normal Text" lineEndContext="#stay">
|
||||
<RegExpr attribute="EntityRef" context="#stay" String="&entref;" />
|
||||
<RegExpr attribute="PEntityRef" context="#stay" String="%&name;;" />
|
||||
<AnyChar attribute="Error" context="#stay" String="&%" />
|
||||
</context>
|
||||
|
||||
<context name="FindAttributes" attribute="Normal Text" lineEndContext="#stay">
|
||||
<RegExpr attribute="Attribute" context="#stay" String="&name;" column="0"/>
|
||||
<RegExpr attribute="Attribute" context="#stay" String="\s+&name;" />
|
||||
<DetectChar attribute="Attribute" context="Value" char="=" />
|
||||
</context>
|
||||
|
||||
<context name="FindDTDRules" attribute="Normal Text" lineEndContext="#stay">
|
||||
<RegExpr attribute="Doctype" context="Doctype Markupdecl" String="<!(ELEMENT|ENTITY|ATTLIST|NOTATION)\b" />
|
||||
</context>
|
||||
|
||||
|
||||
<context name="Comment" attribute="Comment" lineEndContext="#stay">
|
||||
<DetectSpaces/>
|
||||
<IncludeRules context="##Alerts" />
|
||||
<DetectIdentifier/>
|
||||
<StringDetect attribute="Comment" context="#pop" String="-->" endRegion="comment" />
|
||||
<RegExpr attribute="Error" context="#stay" String="-(-(?!->))+" />
|
||||
</context>
|
||||
|
||||
<context name="CDATA" attribute="Normal Text" lineEndContext="#stay">
|
||||
<DetectSpaces/>
|
||||
<DetectIdentifier/>
|
||||
<StringDetect attribute="CDATA" context="#pop" String="]]>" endRegion="cdata" />
|
||||
<StringDetect attribute="EntityRef" context="#stay" String="]]&gt;" />
|
||||
</context>
|
||||
|
||||
<context name="PI" attribute="Normal Text" lineEndContext="#stay">
|
||||
<Detect2Chars attribute="Processing Instruction" context="#pop" char="?" char1=">" endRegion="pi" />
|
||||
</context>
|
||||
|
||||
<context name="Doctype" attribute="Normal Text" lineEndContext="#stay">
|
||||
<DetectChar attribute="Doctype" context="#pop" char=">" endRegion="doctype" />
|
||||
<DetectChar attribute="Doctype" context="Doctype Internal Subset" char="[" beginRegion="int_subset" />
|
||||
</context>
|
||||
|
||||
<context name="Doctype Internal Subset" attribute="Normal Text" lineEndContext="#stay">
|
||||
<DetectChar attribute="Doctype" context="#pop" char="]" endRegion="int_subset" />
|
||||
<IncludeRules context="FindDTDRules" />
|
||||
<StringDetect attribute="Comment" context="Comment" String="<!--" beginRegion="comment" />
|
||||
<RegExpr attribute="Processing Instruction" context="PI" String="<\?[\w:-]*" beginRegion="pi" />
|
||||
<IncludeRules context="FindPEntityRefs" />
|
||||
</context>
|
||||
|
||||
<context name="Doctype Markupdecl" attribute="Normal Text" lineEndContext="#stay">
|
||||
<DetectChar attribute="Doctype" context="#pop" char=">" />
|
||||
<DetectChar attribute="Value" context="Doctype Markupdecl DQ" char=""" />
|
||||
<DetectChar attribute="Value" context="Doctype Markupdecl SQ" char="'" />
|
||||
</context>
|
||||
|
||||
<context name="Doctype Markupdecl DQ" attribute="Value" lineEndContext="#stay">
|
||||
<DetectChar attribute="Value" context="#pop" char=""" />
|
||||
<IncludeRules context="FindPEntityRefs" />
|
||||
</context>
|
||||
|
||||
<context name="Doctype Markupdecl SQ" attribute="Value" lineEndContext="#stay">
|
||||
<DetectChar attribute="Value" context="#pop" char="'" />
|
||||
<IncludeRules context="FindPEntityRefs" />
|
||||
</context>
|
||||
|
||||
<context name="El Open" attribute="Normal Text" lineEndContext="#stay">
|
||||
<Detect2Chars attribute="Element" context="#pop" char="/" char1=">" />
|
||||
<DetectChar attribute="Element" context="#pop" char=">" />
|
||||
<IncludeRules context="FindAttributes" />
|
||||
<RegExpr attribute="Error" context="#stay" String="\S" />
|
||||
</context>
|
||||
|
||||
<context name="El Close" attribute="Normal Text" lineEndContext="#stay">
|
||||
<DetectChar attribute="Element" context="#pop" char=">" />
|
||||
<RegExpr attribute="Error" context="#stay" String="\S" />
|
||||
</context>
|
||||
|
||||
<context name="El Close 2" attribute="Normal Text" lineEndContext="#stay">
|
||||
<DetectChar attribute="Element" context="#pop#pop#pop" char=">" />
|
||||
<RegExpr attribute="Error" context="#stay" String="\S" />
|
||||
</context>
|
||||
|
||||
<context name="El Close 3" attribute="Normal Text" lineEndContext="#stay">
|
||||
<DetectChar attribute="Element" context="#pop#pop#pop#pop" char=">" />
|
||||
<RegExpr attribute="Error" context="#stay" String="\S" />
|
||||
</context>
|
||||
|
||||
<context name="CSS" attribute="Normal Text" lineEndContext="#stay">
|
||||
<Detect2Chars attribute="Element" context="#pop" char="/" char1=">" endRegion="style" />
|
||||
<DetectChar attribute="Element" context="CSS content" char=">" />
|
||||
<IncludeRules context="FindAttributes" />
|
||||
<RegExpr attribute="Error" context="#stay" String="\S" />
|
||||
</context>
|
||||
|
||||
<context name="CSS content" attribute="Normal Text" lineEndContext="#stay">
|
||||
<RegExpr attribute="Element" context="El Close 2" String="</style\b" insensitive="TRUE" endRegion="style" />
|
||||
<IncludeRules context="##CSS" includeAttrib="true"/>
|
||||
</context>
|
||||
|
||||
<context name="JS" attribute="Normal Text" lineEndContext="#stay">
|
||||
<Detect2Chars attribute="Element" context="#pop" char="/" char1=">" endRegion="script" />
|
||||
<DetectChar attribute="Element" context="JS content" char=">" />
|
||||
<IncludeRules context="FindAttributes" />
|
||||
<RegExpr attribute="Error" context="#stay" String="\S" />
|
||||
</context>
|
||||
|
||||
<context name="JS content" attribute="Normal Text" lineEndContext="#stay">
|
||||
<RegExpr attribute="Element" context="El Close 2" String="</script\b" insensitive="TRUE" endRegion="script" />
|
||||
<RegExpr attribute="Comment" context="JS comment close" String="//(?=.*</script\b)" insensitive="TRUE" />
|
||||
<IncludeRules context="##JavaScript" includeAttrib="true"/>
|
||||
</context>
|
||||
|
||||
<context name="JS comment close" attribute="Comment" lineEndContext="#pop">
|
||||
<RegExpr attribute="Element" context="El Close 3" String="</script\b" insensitive="TRUE" endRegion="script" />
|
||||
<IncludeRules context="##Alerts" />
|
||||
</context>
|
||||
|
||||
<context name="Value" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="Value NQ">
|
||||
<DetectChar attribute="Value" context="Value DQ" char=""" />
|
||||
<DetectChar attribute="Value" context="Value SQ" char="'" />
|
||||
<DetectSpaces />
|
||||
</context>
|
||||
|
||||
<context name="Value NQ" attribute="Normal Text" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="#pop#pop">
|
||||
<IncludeRules context="FindEntityRefs" />
|
||||
<RegExpr attribute="Value" context="#stay" String="/(?!>)" />
|
||||
<RegExpr attribute="Value" context="#stay" String="[^/><"'\s]" />
|
||||
</context>
|
||||
|
||||
<context name="Value DQ" attribute="Value" lineEndContext="#stay">
|
||||
<DetectChar attribute="Value" context="#pop#pop" char=""" />
|
||||
<IncludeRules context="FindEntityRefs" />
|
||||
</context>
|
||||
|
||||
<context name="Value SQ" attribute="Value" lineEndContext="#stay">
|
||||
<DetectChar attribute="Value" context="#pop#pop" char="'" />
|
||||
<IncludeRules context="FindEntityRefs" />
|
||||
</context>
|
||||
|
||||
</contexts>
|
||||
<itemDatas>
|
||||
<itemData name="Normal Text" defStyleNum="dsNormal" />
|
||||
<itemData name="Comment" defStyleNum="dsComment" />
|
||||
<itemData name="CDATA" defStyleNum="dsBaseN" bold="1" />
|
||||
<itemData name="Processing Instruction" defStyleNum="dsKeyword" />
|
||||
<itemData name="Doctype" defStyleNum="dsDataType" bold="1" />
|
||||
<itemData name="Element" defStyleNum="dsKeyword" />
|
||||
<itemData name="Attribute" defStyleNum="dsOthers" />
|
||||
<itemData name="Value" defStyleNum="dsString" color="#a00" />
|
||||
<itemData name="EntityRef" defStyleNum="dsDecVal" />
|
||||
<itemData name="PEntityRef" defStyleNum="dsDecVal" />
|
||||
<itemData name="Error" defStyleNum="dsError" />
|
||||
</itemDatas>
|
||||
|
||||
</highlighting>
|
||||
<general>
|
||||
<comments>
|
||||
<comment name="multiLine" start="<!--" end="-->" />
|
||||
</comments>
|
||||
</general>
|
||||
</language>
|
||||
80
share/qtcreator/generic-highlighter/ini.xml
Normal file
80
share/qtcreator/generic-highlighter/ini.xml
Normal file
@@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd">
|
||||
<language name="INI Files" section="Configuration" extensions="*.ini;*.pls" mimetype="" version="1.0" kateversion="2.0" author="Jan Janssen (medhefgo@web.de)" license="LGPL">
|
||||
|
||||
<highlighting>
|
||||
<list name="keywords">
|
||||
<item>On</item>
|
||||
<item>Off</item>
|
||||
<item>Default</item>
|
||||
<item>Defaults</item>
|
||||
<item>Localhost</item>
|
||||
<item>Null</item>
|
||||
<item>True</item>
|
||||
<item>False</item>
|
||||
<item>Yes</item>
|
||||
<item>No</item>
|
||||
<item>Normal</item>
|
||||
|
||||
<!-- PHP Keywords -->
|
||||
<item>E_ALL</item>
|
||||
<item>E_ERROR</item>
|
||||
<item>E_WARNING</item>
|
||||
<item>E_PARSE</item>
|
||||
<item>E_NOTICE</item>
|
||||
<item>E_STRICT</item>
|
||||
<item>E_CORE_ERROR</item>
|
||||
<item>E_CORE_WARNING</item>
|
||||
<item>E_COMPILE_ERROR</item>
|
||||
<item>E_COMPILE_WARNING</item>
|
||||
<item>E_USER_ERROR</item>
|
||||
<item>E_USER_WARNING</item>
|
||||
<item>E_USER_NOTICE</item>
|
||||
</list>
|
||||
|
||||
<contexts>
|
||||
<context name="ini" attribute="Normal Text" lineEndContext="#stay">
|
||||
<RangeDetect attribute="Section" context="#pop" char="[" char1="]" beginRegion="Section" endRegion="Section" />
|
||||
<DetectChar attribute="Assignment" context="Value" char="=" />
|
||||
<DetectChar char=";" attribute="Comment" context="Comment" firstNonSpace="true" />
|
||||
<DetectChar char="#" attribute="Comment" context="Comment" firstNonSpace="true" />
|
||||
</context>
|
||||
|
||||
<context name="Value" attribute="Value" lineEndContext="#pop" >
|
||||
<Float attribute="Float" />
|
||||
<Int attribute="Int" />
|
||||
<keyword attribute="Keyword" String="keywords" />
|
||||
<RegExpr attribute="Comment" context="#pop" String=";.*$" />
|
||||
<RegExpr attribute="Comment" context="#pop" String="#.*$" />
|
||||
</context>
|
||||
|
||||
<context name="Comment" attribute="Comment" lineEndContext="#pop">
|
||||
<DetectSpaces />
|
||||
<IncludeRules context="##Alerts" />
|
||||
<DetectIdentifier />
|
||||
</context>
|
||||
</contexts>
|
||||
|
||||
|
||||
<itemDatas>
|
||||
<itemData name="Normal Text" defStyleNum="dsDataType" />
|
||||
<itemData name="Section" defStyleNum="dsKeyword" />
|
||||
<itemData name="Comment" defStyleNum="dsComment" />
|
||||
<itemData name="Assignment" defStyleNum="dsOthers" />
|
||||
<itemData name="Value" defStyleNum="dsString" />
|
||||
<itemData name="Float" defStyleNum="dsFloat" />
|
||||
<itemData name="Int" defStyleNum="dsDecVal" />
|
||||
<itemData name="Keyword" defStyleNum="dsKeyword" />
|
||||
</itemDatas>
|
||||
</highlighting>
|
||||
|
||||
|
||||
<general>
|
||||
<comments>
|
||||
<comment name="singleLine" start="#" />
|
||||
<comment name="singleLine" start=";" />
|
||||
</comments>
|
||||
<keywords casesensitive="0" />
|
||||
</general>
|
||||
|
||||
</language>
|
||||
3864
share/qtcreator/generic-highlighter/java.xml
Normal file
3864
share/qtcreator/generic-highlighter/java.xml
Normal file
File diff suppressed because it is too large
Load Diff
108
share/qtcreator/generic-highlighter/javadoc.xml
Normal file
108
share/qtcreator/generic-highlighter/javadoc.xml
Normal file
@@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd">
|
||||
<language name="Javadoc" version="1.04" kateversion="2.4" section="Markup" extensions="" license="LGPL" author="Alfredo Luiz Foltran Fialho (alfoltran@ig.com.br)">
|
||||
<highlighting>
|
||||
<contexts>
|
||||
<context name="Start" attribute="Normal Text" lineEndContext="#stay">
|
||||
<IncludeRules context="FindJavadoc" />
|
||||
</context>
|
||||
<context name="FindJavadoc" attribute="Normal Text" lineEndContext="#stay">
|
||||
<StringDetect attribute="JavadocFS" context="#stay" String="/**/"/>
|
||||
<StringDetect attribute="JavadocFS" context="JavadocFSar" String="/**" beginRegion="Javadoc"/>
|
||||
</context>
|
||||
<context attribute="JavadocFS" lineEndContext="#stay" name="JavadocFSar">
|
||||
<Detect2Chars attribute="JavadocFS" context="#pop" char="*" char1="/" endRegion="Javadoc"/>
|
||||
<RegExpr attribute="JavadocFS" context="Javadocar" String="(!|\?)" />
|
||||
<RegExpr attribute="JavadocFS" context="Javadocar" String="(\.\s*$)" />
|
||||
<RegExpr attribute="JavadocFS" context="Javadocar" String="(\.\s)(?![\da-z])" />
|
||||
<RegExpr attribute="JavadocFS" context="Javadocar" String="\**\s*(?=@(author|deprecated|exception|param|return|see|serial|serialData|serialField|since|throws|version)(\s|$))" firstNonSpace="true"/>
|
||||
<StringDetect attribute="InlineTag" context="LiteralTagar" String="{@code " />
|
||||
<StringDetect attribute="InlineTag" context="LiteralTagar" String="{@code	" />
|
||||
<StringDetect attribute="InlineTag" context="#stay" String="{@docRoot}" />
|
||||
<StringDetect attribute="InlineTag" context="#stay" String="{@inheritDoc}" />
|
||||
<StringDetect attribute="InlineTag" context="InlineTagar" String="{@link " />
|
||||
<StringDetect attribute="InlineTag" context="InlineTagar" String="{@link	" />
|
||||
<StringDetect attribute="InlineTag" context="InlineTagar" String="{@linkplain " />
|
||||
<StringDetect attribute="InlineTag" context="InlineTagar" String="{@linkplain	" />
|
||||
<StringDetect attribute="InlineTag" context="LiteralTagar" String="{@literal " />
|
||||
<StringDetect attribute="InlineTag" context="LiteralTagar" String="{@literal	" />
|
||||
<StringDetect attribute="InlineTag" context="#stay" String="{@value}" />
|
||||
<StringDetect attribute="InlineTag" context="InlineTagar" String="{@value " />
|
||||
<StringDetect attribute="InlineTag" context="InlineTagar" String="{@value	" />
|
||||
<IncludeRules context="##HTML"/>
|
||||
</context>
|
||||
<context attribute="Javadoc" lineEndContext="#stay" name="Javadocar">
|
||||
<Detect2Chars attribute="JavadocFS" context="#pop#pop" char="*" char1="/" endRegion="Javadoc"/>
|
||||
<RegExpr attribute="JavadocFS" context="#stay" String="\*+(?!/)" firstNonSpace="true"/>
|
||||
<StringDetect attribute="BlockTag" context="#stay" String="@author " />
|
||||
<StringDetect attribute="BlockTag" context="#stay" String="@deprecated " />
|
||||
<StringDetect attribute="BlockTag" context="JavadocParam" String="@exception " />
|
||||
<StringDetect attribute="BlockTag" context="JavadocParam" String="@param " />
|
||||
<StringDetect attribute="BlockTag" context="#stay" String="@return " />
|
||||
<StringDetect attribute="BlockTag" context="SeeTag" String="@see "/>
|
||||
<StringDetect attribute="BlockTag" context="#stay" String="@serial " />
|
||||
<StringDetect attribute="BlockTag" context="#stay" String="@serialData " />
|
||||
<StringDetect attribute="BlockTag" context="#stay" String="@serialField " />
|
||||
<StringDetect attribute="BlockTag" context="#stay" String="@since " />
|
||||
<StringDetect attribute="BlockTag" context="JavadocParam" String="@throws " />
|
||||
<StringDetect attribute="BlockTag" context="#stay" String="@version " />
|
||||
<StringDetect attribute="BlockTag" context="#stay" String="@author	" />
|
||||
<StringDetect attribute="BlockTag" context="#stay" String="@deprecated	" />
|
||||
<StringDetect attribute="BlockTag" context="JavadocParam" String="@exception	" />
|
||||
<StringDetect attribute="BlockTag" context="JavadocParam" String="@param	" />
|
||||
<StringDetect attribute="BlockTag" context="#stay" String="@return	" />
|
||||
<StringDetect attribute="BlockTag" context="SeeTag" String="@see	" />
|
||||
<StringDetect attribute="BlockTag" context="#stay" String="@serial	" />
|
||||
<StringDetect attribute="BlockTag" context="#stay" String="@serialData	" />
|
||||
<StringDetect attribute="BlockTag" context="#stay" String="@serialField	" />
|
||||
<StringDetect attribute="BlockTag" context="#stay" String="@since	" />
|
||||
<StringDetect attribute="BlockTag" context="JavadocParam" String="@throws	" />
|
||||
<StringDetect attribute="BlockTag" context="#stay" String="@version	" />
|
||||
<StringDetect attribute="InlineTag" context="LiteralTagar" String="{@code " />
|
||||
<StringDetect attribute="InlineTag" context="LiteralTagar" String="{@code	" />
|
||||
<StringDetect attribute="InlineTag" context="#stay" String="{@docRoot}" />
|
||||
<StringDetect attribute="InlineTag" context="#stay" String="{@inheritDoc}" />
|
||||
<StringDetect attribute="InlineTag" context="InlineTagar" String="{@link " />
|
||||
<StringDetect attribute="InlineTag" context="InlineTagar" String="{@link	" />
|
||||
<StringDetect attribute="InlineTag" context="InlineTagar" String="{@linkplain " />
|
||||
<StringDetect attribute="InlineTag" context="InlineTagar" String="{@linkplain	" />
|
||||
<StringDetect attribute="InlineTag" context="LiteralTagar" String="{@literal " />
|
||||
<StringDetect attribute="InlineTag" context="LiteralTagar" String="{@literal	" />
|
||||
<StringDetect attribute="InlineTag" context="#stay" String="{@value}" />
|
||||
<StringDetect attribute="InlineTag" context="InlineTagar" String="{@value " />
|
||||
<StringDetect attribute="InlineTag" context="InlineTagar" String="{@value	" />
|
||||
<IncludeRules context="##HTML"/>
|
||||
</context>
|
||||
<context attribute="Javadoc" lineEndContext="#pop" name="JavadocParam">
|
||||
<DetectSpaces />
|
||||
<RegExpr attribute="JavadocParam" context="#pop#pop" String="\S*(?=\*/)" />
|
||||
<RegExpr attribute="JavadocParam" context="#pop" String="\S*(\s|$)" />
|
||||
</context>
|
||||
<context attribute="InlineTag" lineEndContext="#pop" name="InlineTagar">
|
||||
<DetectChar attribute="InlineTag" context="#pop" char="}" />
|
||||
<Detect2Chars attribute="JavadocFS" context="#pop#pop#pop" char="*" char1="/" />
|
||||
<IncludeRules context="##HTML"/>
|
||||
</context>
|
||||
<context attribute="InlineTag" lineEndContext="#pop" name="LiteralTagar">
|
||||
<DetectChar attribute="InlineTag" context="#pop" char="}" />
|
||||
<Detect2Chars attribute="JavadocFS" context="#pop#pop#pop" char="*" char1="/" />
|
||||
</context>
|
||||
<context attribute="SeeTag" lineEndContext="#pop" name="SeeTag">
|
||||
<Detect2Chars attribute="JavadocFS" context="#pop#pop#pop" char="*" char1="/" />
|
||||
<IncludeRules context="##HTML"/>
|
||||
</context>
|
||||
</contexts>
|
||||
<itemDatas>
|
||||
<itemData name="Normal Text" defStyleNum="dsNormal"/>
|
||||
<itemData name="BlockTag" defStyleNum="dsKeyword" color="#808080" selColor="#FFFFFF" bold="1" italic="0"/>
|
||||
<itemData name="InlineTag" defStyleNum="dsKeyword" color="#808080" selColor="#FFFFFF" bold="0" italic="0"/>
|
||||
<itemData name="JavadocParam" defStyleNum="dsKeyword" color="#008080" selColor="#FFFFFF" bold="0" italic="1"/>
|
||||
<itemData name="SeeTag" defStyleNum="dsKeyword" color="#008080" selColor="#FFFFFF" bold="0" italic="1"/>
|
||||
<itemData name="JavadocFS" defStyleNum="dsComment" color="#008000" selColor="#FFFFFF" bold="1" italic="0"/>
|
||||
<itemData name="Javadoc" defStyleNum="dsComment" color="#008000" selColor="#FFFFFF"/>
|
||||
</itemDatas>
|
||||
</highlighting>
|
||||
<general>
|
||||
<keywords casesensitive="1"/>
|
||||
</general>
|
||||
</language>
|
||||
833
share/qtcreator/generic-highlighter/perl.xml
Normal file
833
share/qtcreator/generic-highlighter/perl.xml
Normal file
@@ -0,0 +1,833 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd">
|
||||
<!--
|
||||
This file is part of the KDE project
|
||||
Copyright (C) 2001, 2002, 2003, 2004 Anders Lund <anders@alweb.dk>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License version 2 as published by the Free Software Foundation.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public License
|
||||
along with this library; see the file COPYING.LIB. If not, write to
|
||||
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
|
||||
*** NOTICE ***
|
||||
This file is maintained by Anders Lund <anders@alweb.dk>
|
||||
Please do not commit changes without checking with me.
|
||||
|
||||
*** TODO ***
|
||||
|
||||
Work on the comment support in the REPLACEMENT part of s/// - we may support
|
||||
the comment, if the line remainder does not contain the delimiter char.
|
||||
|
||||
Try to support ?PATTERN? (at least in one line, like if "\?(?=.*\?)" matches).
|
||||
|
||||
parse code behind '<<HEREDELIMITER' as code, or at least ignore it, to eol.
|
||||
Requires the ability to pass the delimiter through a context level.
|
||||
|
||||
find a here delimiter like '*END*' (Shell.pm). Requires that when a regex is
|
||||
inserting a dynamic string, it escapes [*(){}$[]
|
||||
|
||||
support for more regex extensions, such as (?>), (?{}), (?(cond)yes|no)
|
||||
|
||||
Enhance tr/// and y/// support.
|
||||
-->
|
||||
<language name="Perl" version="1.23" kateversion="2.4" section="Scripts" extensions="*.pl;*.pm" mimetype="application/x-perl;text/x-perl" author="Anders Lund (anders@alweb.dk)" license="LGPL">
|
||||
<highlighting>
|
||||
<list name="keywords">
|
||||
<item> if </item>
|
||||
<item> unless </item>
|
||||
<item> else </item>
|
||||
<item> elsif </item>
|
||||
<item> while </item>
|
||||
<item> until </item>
|
||||
<item> for </item>
|
||||
<item> each </item>
|
||||
<item> foreach </item>
|
||||
<item> next </item>
|
||||
<item> last </item>
|
||||
<item> break </item>
|
||||
<item> continue </item>
|
||||
<item> return </item>
|
||||
<item> use </item>
|
||||
<item> no </item>
|
||||
<item> require </item>
|
||||
<item> my </item>
|
||||
<item> our </item>
|
||||
<item> local </item>
|
||||
<item> BEGIN </item>
|
||||
<item> END </item>
|
||||
<item>require</item>
|
||||
<item> package </item>
|
||||
<item> sub </item>
|
||||
<item> do </item>
|
||||
<item> __END__ </item>
|
||||
<item> __DATA__ </item>
|
||||
<item> __FILE__ </item>
|
||||
<item> __LINE__ </item>
|
||||
<item> __PACKAGE__ </item>
|
||||
</list>
|
||||
<list name="operators">
|
||||
<item> = </item>
|
||||
<item> != </item>
|
||||
<item> ~= </item>
|
||||
<item> += </item>
|
||||
<item> -= </item>
|
||||
<item> *= </item>
|
||||
<item> /= </item>
|
||||
<item> **= </item>
|
||||
<item> |= </item>
|
||||
<item> ||= </item>
|
||||
<item> &= </item>
|
||||
<item> &&= </item>
|
||||
<item> ?= </item>
|
||||
<item> + </item>
|
||||
<item> - </item>
|
||||
<item> * </item>
|
||||
<!-- <item> / </item>//-->
|
||||
<item> % </item>
|
||||
<item> || </item>
|
||||
<item> && </item>
|
||||
<item> | </item>
|
||||
<item> & </item>
|
||||
<item> < </item>
|
||||
<item> << </item>
|
||||
<item> > </item>
|
||||
<item> >> </item>
|
||||
<item> ^ </item>
|
||||
<item> -> </item>
|
||||
<item> => </item>
|
||||
<item> . </item>
|
||||
<item> , </item>
|
||||
<item> ; </item>
|
||||
<item> :: </item>
|
||||
<item> \ </item>
|
||||
<item> and </item>
|
||||
<item> or </item>
|
||||
<item> not </item>
|
||||
<item> eq </item>
|
||||
<item> ne </item>
|
||||
<item> lt </item>
|
||||
<item> gt </item>
|
||||
<item> le </item>
|
||||
<item> ge </item>
|
||||
<item> cmp </item>
|
||||
</list>
|
||||
<list name="functions">
|
||||
<item>abs</item>
|
||||
<item>accept</item>
|
||||
<item>alarm</item>
|
||||
<item>atan2</item>
|
||||
<item>bind</item>
|
||||
<item>binmode</item>
|
||||
<item>bless</item>
|
||||
<item>caller</item>
|
||||
<item>chdir</item>
|
||||
<item>chmod</item>
|
||||
<item>chomp</item>
|
||||
<item>chop</item>
|
||||
<item>chown</item>
|
||||
<item>chr</item>
|
||||
<item>chroot</item>
|
||||
<item>close</item>
|
||||
<item>closedir</item>
|
||||
<item>connect</item>
|
||||
<item>cos</item>
|
||||
<item>crypt</item>
|
||||
<item>dbmclose</item>
|
||||
<item>dbmopen</item>
|
||||
<item>defined</item>
|
||||
<item>delete</item>
|
||||
<item>die</item>
|
||||
<item>dump</item>
|
||||
<item>endgrent</item>
|
||||
<item>endhostent</item>
|
||||
<item>endnetent</item>
|
||||
<item>endprotoent</item>
|
||||
<item>endpwent</item>
|
||||
<item>endservent</item>
|
||||
<item>eof</item>
|
||||
<item>eval</item>
|
||||
<item>exec</item>
|
||||
<item>exists</item>
|
||||
<item>exit</item>
|
||||
<item>exp</item>
|
||||
<item>fcntl</item>
|
||||
<item>fileno</item>
|
||||
<item>flock</item>
|
||||
<item>fork</item>
|
||||
<item>format</item>
|
||||
<item>formline</item>
|
||||
<item>getc</item>
|
||||
<item>getgrent</item>
|
||||
<item>getgrgid</item>
|
||||
<item>getgrnam</item>
|
||||
<item>gethostbyaddr</item>
|
||||
<item>gethostbyname</item>
|
||||
<item>gethostent</item>
|
||||
<item>getlogin</item>
|
||||
<item>getnetbyaddr</item>
|
||||
<item>getnetbyname</item>
|
||||
<item>getnetent</item>
|
||||
<item>getpeername</item>
|
||||
<item>getpgrp</item>
|
||||
<item>getppid</item>
|
||||
<item>getpriority</item>
|
||||
<item>getprotobyname</item>
|
||||
<item>getprotobynumber</item>
|
||||
<item>getprotoent</item>
|
||||
<item>getpwent</item>
|
||||
<item>getpwnam</item>
|
||||
<item>getpwuid</item>
|
||||
<item>getservbyname</item>
|
||||
<item>getservbyport</item>
|
||||
<item>getservent</item>
|
||||
<item>getsockname</item>
|
||||
<item>getsockopt</item>
|
||||
<item>glob</item>
|
||||
<item>gmtime</item>
|
||||
<item>goto</item>
|
||||
<item>grep</item>
|
||||
<item>hex</item>
|
||||
<item>import</item>
|
||||
<item>index</item>
|
||||
<item>int</item>
|
||||
<item>ioctl</item>
|
||||
<item>join</item>
|
||||
<item>keys</item>
|
||||
<item>kill</item>
|
||||
<item>last</item>
|
||||
<item>lc</item>
|
||||
<item>lcfirst</item>
|
||||
<item>length</item>
|
||||
<item>link</item>
|
||||
<item>listen</item>
|
||||
<item>localtime</item>
|
||||
<item>lock</item>
|
||||
<item>log</item>
|
||||
<item>lstat</item>
|
||||
<item>map</item>
|
||||
<item>mkdir</item>
|
||||
<item>msgctl</item>
|
||||
<item>msgget</item>
|
||||
<item>msgrcv</item>
|
||||
<item>msgsnd</item>
|
||||
<item>oct</item>
|
||||
<item>open</item>
|
||||
<item>opendir</item>
|
||||
<item>ord</item>
|
||||
<item>pack</item>
|
||||
<item>package</item>
|
||||
<item>pipe</item>
|
||||
<item>pop</item>
|
||||
<item>pos</item>
|
||||
<item>print</item>
|
||||
<item>printf</item>
|
||||
<item>prototype</item>
|
||||
<item>push</item>
|
||||
<item>quotemeta</item>
|
||||
<item>rand</item>
|
||||
<item>read</item>
|
||||
<item>readdir</item>
|
||||
<item>readline</item>
|
||||
<item>readlink</item>
|
||||
<item>recv</item>
|
||||
<item>redo</item>
|
||||
<item>ref</item>
|
||||
<item>rename</item>
|
||||
<item>reset</item>
|
||||
<item>return</item>
|
||||
<item>reverse</item>
|
||||
<item>rewinddir</item>
|
||||
<item>rindex</item>
|
||||
<item>rmdir</item>
|
||||
<item>scalar</item>
|
||||
<item>seek</item>
|
||||
<item>seekdir</item>
|
||||
<item>select</item>
|
||||
<item>semctl</item>
|
||||
<item>semget</item>
|
||||
<item>semop</item>
|
||||
<item>send</item>
|
||||
<item>setgrent</item>
|
||||
<item>sethostent</item>
|
||||
<item>setnetent</item>
|
||||
<item>setpgrp</item>
|
||||
<item>setpriority</item>
|
||||
<item>setprotoent</item>
|
||||
<item>setpwent</item>
|
||||
<item>setservent</item>
|
||||
<item>setsockopt</item>
|
||||
<item>shift</item>
|
||||
<item>shmctl</item>
|
||||
<item>shmget</item>
|
||||
<item>shmread</item>
|
||||
<item>shmwrite</item>
|
||||
<item>shutdown</item>
|
||||
<item>sin</item>
|
||||
<item>sleep</item>
|
||||
<item>socket</item>
|
||||
<item>socketpair</item>
|
||||
<item>sort</item>
|
||||
<item>splice</item>
|
||||
<item>split</item>
|
||||
<item>sprintf</item>
|
||||
<item>sqrt</item>
|
||||
<item>srand</item>
|
||||
<item>stat</item>
|
||||
<item>study</item>
|
||||
<item>sub</item>
|
||||
<item>substr</item>
|
||||
<item>symlink</item>
|
||||
<item>syscall</item>
|
||||
<item>sysread</item>
|
||||
<item>sysseek</item>
|
||||
<item>system</item>
|
||||
<item>syswrite</item>
|
||||
<item>tell</item>
|
||||
<item>telldir</item>
|
||||
<item>tie</item>
|
||||
<item>time</item>
|
||||
<item>times</item>
|
||||
<item>truncate</item>
|
||||
<item>uc</item>
|
||||
<item>ucfirst</item>
|
||||
<item>umask</item>
|
||||
<item>undef</item>
|
||||
<item>unlink</item>
|
||||
<item>unpack</item>
|
||||
<item>unshift</item>
|
||||
<item>untie</item>
|
||||
<item>utime</item>
|
||||
<item>values</item>
|
||||
<item>vec</item>
|
||||
<item>wait</item>
|
||||
<item>waitpid</item>
|
||||
<item>wantarray</item>
|
||||
<item>warn</item>
|
||||
<item>write</item>
|
||||
</list>
|
||||
<list name="pragmas">
|
||||
<item>strict</item>
|
||||
<item>english</item>
|
||||
<item>warnings</item>
|
||||
<item>vars</item>
|
||||
<item>subs</item>
|
||||
<item>utf8</item>
|
||||
<item>sigtrap</item>
|
||||
<item>locale</item>
|
||||
<item>open</item>
|
||||
<item>less</item>
|
||||
<item>integer</item>
|
||||
<item>filetest</item>
|
||||
<item>constant</item>
|
||||
<item>bytes</item>
|
||||
<item>diagnostics</item>
|
||||
</list>
|
||||
<contexts>
|
||||
<context name="normal" attribute="Normal Text" lineEndContext="#stay">
|
||||
<RegExpr attribute="Keyword" context="#stay" String="^#!\/.*" />
|
||||
<StringDetect attribute="Keyword" context="data_handle" String="__DATA__" firstNonSpace="true" />
|
||||
<StringDetect attribute="Keyword" context="#stay" String="__END__" firstNonSpace="true"/>
|
||||
<RegExpr attribute="Keyword" context="sub_name_def" String="\bsub\s+" />
|
||||
<keyword attribute="Keyword" context="#stay" String="keywords" />
|
||||
<keyword attribute="Operator" context="#stay" String="operators" />
|
||||
<keyword attribute="Function" context="#stay" String="functions" />
|
||||
<keyword attribute="Pragma" context="#stay" String="pragmas" />
|
||||
<RegExpr attribute="Pod" context="pod" String="\=(?:head[1-6]|over|back|item|for|begin|end|pod)(\s|$)" column="0" beginRegion="POD"/>
|
||||
<DetectSpaces />
|
||||
<DetectChar attribute="Comment" context="comment" char="#" />
|
||||
|
||||
<HlCOct attribute="Octal" context="slash_safe_escape" />
|
||||
<HlCHex attribute="Hex" context="slash_safe_escape" />
|
||||
<Float attribute="Float" context="slash_safe_escape" />
|
||||
<Int attribute="Decimal" context="slash_safe_escape" />
|
||||
|
||||
<RegExpr attribute="Normal Text" context="#stay" String="\\(["'])[^\1]" />
|
||||
<Detect2Chars attribute="Normal Text" context="#stay" char="&" char1="'" /><!-- ??? -->
|
||||
<DetectChar attribute="Operator" context="ip_string" char=""" beginRegion="String" />
|
||||
<DetectChar attribute="Operator" context="string" char="'" beginRegion="String"/>
|
||||
<DetectChar attribute="Operator" context="Backticked" char="`" />
|
||||
|
||||
<RegExpr attribute="Normal Text" context="find_variable" String="(?:[$@]\S|%[\w{]|\*[^\d\*{\$@%=(])" lookAhead="true" />
|
||||
|
||||
<RegExpr attribute="Keyword" context="#stay" String="<[A-Z0-9_]+>" />
|
||||
|
||||
<RegExpr attribute="Operator" context="find_here_document" String="\s*<<(?=\w+|\s*["'])" beginRegion="HereDocument" />
|
||||
|
||||
<RegExpr attribute="Normal Text" context="#stay" String="\s*\}\s*/" endRegion="Block"/>
|
||||
<RegExpr attribute="Normal Text" context="#stay" String="\s*[)]\s*/" />
|
||||
<RegExpr attribute="Function" context="sub_name_def" String="\w+::" />
|
||||
<RegExpr attribute="Normal Text" context="#stay" String="\w+[=]" />
|
||||
|
||||
<RegExpr attribute="Operator" context="find_quoted" String="\bq(?=[qwx]?\s*[^\w\s])" />
|
||||
<RegExpr attribute="Operator" context="find_subst" String="\bs(?=\s*[^\w\s\]})])" />
|
||||
<RegExpr attribute="Operator" context="tr" String="\b(?:tr|y)\s*(?=[^\w\s\]})])" />
|
||||
|
||||
<RegExpr attribute="Operator" context="find_pattern" String="\b(?:m|qr)(?=\s*[^\w\s\]})])" />
|
||||
|
||||
<RegExpr attribute="Normal Text" context="#stay" String="[\w_]+\s*/" />
|
||||
<RegExpr attribute="Normal Text" context="#stay" String="[<>"':]/" />
|
||||
<DetectChar attribute="Operator" context="pattern_slash" char="/" beginRegion="Pattern" />
|
||||
<RegExpr attribute="Operator" context="#stay" String="-[rwxoRWXOeszfdlpSbctugkTBMAC]" />
|
||||
|
||||
<DetectChar attribute="Normal Text" context="#stay" char="{" beginRegion="Block" />
|
||||
<DetectChar attribute="Normal Text" context="#stay" char="}" endRegion="Block" />
|
||||
</context>
|
||||
|
||||
<!-- ====== quoted construct central ===== -->
|
||||
<context name="find_quoted" attribute="Normal Text" lineEndContext="#stay" >
|
||||
<!-- NOTE - qx'not interpolated regex' does not cover newline between "qr" and "'" -->
|
||||
<RegExpr attribute="Operator" context="string_6" String="x\s*(')" beginRegion="String" />
|
||||
<AnyChar attribute="Operator" context="find_qqx" String="qx" />
|
||||
<DetectChar attribute="Operator" context="find_qw" char="w" />
|
||||
<DetectChar attribute="Operator" context="string_2" char="(" beginRegion="String" />
|
||||
<DetectChar attribute="Operator" context="string_3" char="{" beginRegion="String" />
|
||||
<DetectChar attribute="Operator" context="string_4" char="[" beginRegion="String" />
|
||||
<DetectChar attribute="Operator" context="string_5" char="<" beginRegion="String" />
|
||||
<RegExpr attribute="Operator" context="string_6" String="([^a-zA-Z0-9_\s[\]{}()])" beginRegion="String" />
|
||||
<RegExpr attribute="Comment" context="#stay" String="\s+#.*" /><!-- q[qwx] # == comment, look for the delim on the next line -->
|
||||
</context>
|
||||
<context name="find_qqx" attribute="Normal Text" lineEndContext="#stay" >
|
||||
<DetectChar attribute="Operator" context="ip_string_2" char="(" beginRegion="String" />
|
||||
<DetectChar attribute="Operator" context="ip_string_3" char="{" beginRegion="String" />
|
||||
<DetectChar attribute="Operator" context="ip_string_4" char="[" beginRegion="String" />
|
||||
<DetectChar attribute="Operator" context="ip_string_5" char="<" beginRegion="String" />
|
||||
<RegExpr attribute="Operator" context="ip_string_6" String="([^a-zA-Z0-9_\s[\]{}()])" beginRegion="String" />
|
||||
<RegExpr attribute="Comment" context="#stay" String="\s+#.*" /><!-- q[qwx] # == comment, look for the delim on the next line -->
|
||||
</context>
|
||||
<context name="find_qw" attribute="Normal Text" lineEndContext="#stay" >
|
||||
<DetectChar attribute="Operator" context="quote_word_paren" char="(" beginRegion="Wordlist" />
|
||||
<DetectChar attribute="Operator" context="quote_word_brace" char="{" beginRegion="Wordlist" />
|
||||
<DetectChar attribute="Operator" context="quote_word_bracket" char="[" beginRegion="Wordlist" />
|
||||
<RegExpr attribute="Operator" context="quote_word" String="([^a-zA-Z0-9_\s[\]{}()])" beginRegion="Wordlist" />
|
||||
<RegExpr attribute="Comment" context="#stay" String="\s+#.*" /><!-- q[qwx] # == comment, look for the delim on the next line -->
|
||||
</context>
|
||||
|
||||
<!-- ====== Contexts for strings ===== -->
|
||||
<context name="ipstring_internal" attribute="String (interpolated)" lineEndContext="#stay">
|
||||
<DetectIdentifier />
|
||||
<RegExpr attribute="String Special Character" context="#stay" String="\\[UuLlEtnaefr]" />
|
||||
<RegExpr attribute="String (interpolated)" context="#stay" String="\\." />
|
||||
<RegExpr attribute="Normal Text" context="find_variable_unsafe" String="(?:[\$@]\S|%[\w{])" lookAhead="true" />
|
||||
</context>
|
||||
<context name="ip_string" attribute="String (interpolated)" lineEndContext="#stay">
|
||||
<DetectChar attribute="Operator" context="#pop" char=""" endRegion="String"/>
|
||||
<IncludeRules context="ipstring_internal" />
|
||||
</context>
|
||||
<context name="ip_string_2" attribute="String (interpolated)" lineEndContext="#stay">
|
||||
<RangeDetect attribute="String (interpolated)" context="#stay" char="(" char1=")" />
|
||||
<DetectChar attribute="Operator" context="#pop#pop#pop" char=")" endRegion="String" />
|
||||
<IncludeRules context="ipstring_internal" />
|
||||
</context>
|
||||
<context name="ip_string_3" attribute="String (interpolated)" lineEndContext="#stay">
|
||||
<RangeDetect attribute="String (interpolated)" context="#stay" char="{" char1="}" />
|
||||
<DetectChar attribute="Operator" context="#pop#pop#pop" char="}" endRegion="String" />
|
||||
<IncludeRules context="ipstring_internal" />
|
||||
</context>
|
||||
<context name="ip_string_4" attribute="String (interpolated)" lineEndContext="#stay">
|
||||
<RangeDetect attribute="String (interpolated)" context="#stay" char="[" char1="]" />
|
||||
<DetectChar attribute="Operator" context="#pop#pop#pop" char="]" endRegion="String" />
|
||||
<IncludeRules context="ipstring_internal" />
|
||||
</context>
|
||||
<context name="ip_string_5" attribute="String (interpolated)" lineEndContext="#stay">
|
||||
<RangeDetect attribute="String (interpolated)" context="#stay" char="<" char1=">" />
|
||||
<DetectChar attribute="Operator" context="#pop#pop#pop" char=">" endRegion="String" />
|
||||
<IncludeRules context="ipstring_internal" />
|
||||
</context>
|
||||
<context name="ip_string_6" attribute="String (interpolated)" lineEndContext="#stay" dynamic="true">
|
||||
<RegExpr attribute="String (interpolated)" context="#stay" String="\%1" dynamic="true" />
|
||||
<DetectChar attribute="Operator" context="#pop#pop#pop" char="1" dynamic="true" endRegion="String"/>
|
||||
<IncludeRules context="ipstring_internal" />
|
||||
</context>
|
||||
|
||||
<context name="string" attribute="String" lineEndContext="#stay">
|
||||
<DetectIdentifier />
|
||||
<Detect2Chars attribute="String Special Character" context="#stay" char="\" char1="'" />
|
||||
<Detect2Chars attribute="String Special Character" context="#stay" char="\" char1="\" />
|
||||
<DetectChar attribute="Operator" context="#pop" char="'" endRegion="String" />
|
||||
</context>
|
||||
<context name="string_2" attribute="String" lineEndContext="#stay">
|
||||
<DetectIdentifier />
|
||||
<Detect2Chars attribute="String Special Character" context="#stay" char="\" char1=")" />
|
||||
<Detect2Chars attribute="String Special Character" context="#stay" char="\" char1="\" />
|
||||
<RangeDetect attribute="String" context="#stay" char="(" char1=")" />
|
||||
<DetectChar attribute="Operator" context="#pop#pop" char=")" endRegion="String" />
|
||||
</context>
|
||||
<context name="string_3" attribute="String" lineEndContext="#stay">
|
||||
<DetectIdentifier />
|
||||
<Detect2Chars attribute="String Special Character" context="#stay" char="\" char1="}" />
|
||||
<Detect2Chars attribute="String Special Character" context="#stay" char="\" char1="\" />
|
||||
<RangeDetect attribute="String" context="#stay" char="{" char1="}" />
|
||||
<DetectChar attribute="Operator" context="#pop#pop" char="}" endRegion="String" />
|
||||
</context>
|
||||
<context name="string_4" attribute="String" lineEndContext="#stay">
|
||||
<DetectIdentifier />
|
||||
<Detect2Chars attribute="String Special Character" context="#stay" char="\" char1="]" />
|
||||
<Detect2Chars attribute="String Special Character" context="#stay" char="\" char1="\" />
|
||||
<RangeDetect attribute="String" context="#stay" char="[" char1="]" />
|
||||
<DetectChar attribute="Operator" context="#pop#pop" char="]" endRegion="String" />
|
||||
</context>
|
||||
<context name="string_5" attribute="String" lineEndContext="#stay">
|
||||
<DetectIdentifier />
|
||||
<Detect2Chars attribute="String Special Character" context="#stay" char="\" char1="<" />
|
||||
<Detect2Chars attribute="String Special Character" context="#stay" char="\" char1="\" />
|
||||
<Detect2Chars attribute="String" context="#stay" char="\" char1=">" />
|
||||
<RangeDetect attribute="String" context="#stay" char="<" char1=">" />
|
||||
<DetectChar attribute="Operator" context="#pop#pop" char=">" endRegion="String" />
|
||||
</context>
|
||||
<context name="string_6" attribute="String" lineEndContext="#stay" dynamic="true">
|
||||
<DetectIdentifier />
|
||||
<Detect2Chars attribute="String Special Character" context="#stay" char="\" char1="\" />
|
||||
<RegExpr attribute="String Special Character" context="#stay" String="\%1" dynamic="true"/>
|
||||
<DetectChar attribute="Operator" context="#pop#pop" char="1" dynamic="true" endRegion="String" />
|
||||
</context>
|
||||
|
||||
<!-- ====== contexts for s/// ====== -->
|
||||
<context name="find_subst" attribute="Normal Text" lineEndContext="#stay" >
|
||||
<RegExpr attribute="Comment" context="#stay" String="\s+#.*" /><!-- s # == comment, look for the delim on the next line -->
|
||||
<DetectChar attribute="Operator" context="subst_curlybrace_pattern" char="{" beginRegion="Pattern" />
|
||||
<DetectChar attribute="Operator" context="subst_paren_pattern" char="(" beginRegion="Pattern" />
|
||||
<DetectChar attribute="Operator" context="subst_bracket_pattern" char="[" beginRegion="Pattern" />
|
||||
<DetectChar attribute="Operator" context="subst_sq_pattern" char="'" beginRegion="Pattern" />
|
||||
<RegExpr attribute="Operator" context="subst_slash_pattern" String="([^\w\s[\]{}()])" beginRegion="Pattern" />
|
||||
</context>
|
||||
|
||||
<!-- Fully parse s {} {}.
|
||||
This means that
|
||||
- comments are legal between PATTERN and REPLACEMENT
|
||||
- REPLACEMENT can contain resursive {} blocks -->
|
||||
<context name="subst_curlybrace_pattern" attribute="Pattern" lineEndContext="#stay">
|
||||
<RegExpr attribute="Comment" context="#stay" String="\s+#.*$" />
|
||||
<IncludeRules context="regex_pattern_internal_ip" />
|
||||
<DetectChar attribute="Operator" context="subst_curlybrace_middle" char="}" endRegion="Pattern" />
|
||||
</context>
|
||||
<context name="subst_curlybrace_middle" attribute="Normal Text" lineEndContext="#stay" >
|
||||
<RegExpr attribute="Comment" context="#stay" String="#.*$" />
|
||||
<DetectChar attribute="Operator" context="subst_curlybrace_replace" char="{" beginRegion="Replacement" />
|
||||
</context>
|
||||
<context name="subst_curlybrace_replace" attribute="String (interpolated)" lineEndContext="#stay">
|
||||
<IncludeRules context="ipstring_internal" />
|
||||
<DetectChar attribute="Normal Text" context="subst_curlybrace_replace_recursive" char="{" beginRegion="Block" />
|
||||
<RegExpr attribute="Operator" context="#pop#pop#pop#pop" String="\}[cegimosx]*" endRegion="Replacement" />
|
||||
</context>
|
||||
<context name="subst_curlybrace_replace_recursive" attribute="String (interpolated)" lineEndContext="#stay" >
|
||||
<DetectChar attribute="String (interpolated)" context="subst_curlybrace_replace_recursive" char="{" beginRegion="Block" />
|
||||
<DetectChar attribute="Normal Text" context="#pop" char="}" endRegion="Block" />
|
||||
<IncludeRules context="ipstring_internal" />
|
||||
</context>
|
||||
|
||||
<context name="subst_paren_pattern" attribute="Pattern" lineEndContext="#stay">
|
||||
<RegExpr attribute="Comment" context="#stay" String="\s+#.*$" />
|
||||
<IncludeRules context="regex_pattern_internal_ip" />
|
||||
<DetectChar attribute="Operator" context="subst_paren_replace" char="}" endRegion="Pattern" />
|
||||
</context>
|
||||
<context name="subst_paren_replace" attribute="String (interpolated)" lineEndContext="#stay">
|
||||
<IncludeRules context="ipstring_internal" />
|
||||
<DetectChar attribute="Operator" context="#stay" char="(" beginRegion="Replacement" />
|
||||
<RegExpr attribute="Operator" context="#pop#pop#pop" String="\)[cegimosx]*" endRegion="Replacement" />
|
||||
</context>
|
||||
|
||||
<context name="subst_bracket_pattern" attribute="Pattern" lineEndContext="#stay">
|
||||
<RegExpr attribute="Comment" context="#stay" String="\s+#.*$" />
|
||||
<IncludeRules context="regex_pattern_internal_ip" />
|
||||
<DetectChar attribute="Operator" context="subst_bracket_replace" char="]" endRegion="Pattern" />
|
||||
</context>
|
||||
<context name="subst_bracket_replace" attribute="String (interpolated)" lineEndContext="#stay">
|
||||
<IncludeRules context="ipstring_internal" />
|
||||
<DetectChar attribute="Operator" context="#stay" char="[" beginRegion="Replacement" />
|
||||
<RegExpr attribute="Operator" context="#pop#pop#pop" String="\][cegimosx]*" endRegion="Replacement" />
|
||||
</context>
|
||||
|
||||
<context name="subst_slash_pattern" attribute="Pattern" lineEndContext="#stay" dynamic="true">
|
||||
<RegExpr attribute="Pattern Internal Operator" context="#stay" String="\$(?=%1)" dynamic="true" />
|
||||
<RegExpr attribute="Operator" context="subst_slash_replace" String="(%1)" dynamic="true" endRegion="Pattern" beginRegion="Replacement" />
|
||||
<IncludeRules context="regex_pattern_internal_ip" />
|
||||
</context>
|
||||
<context name="subst_slash_replace" attribute="String (interpolated)" lineEndContext="#stay" dynamic="true">
|
||||
<RegExpr attribute="Operator" context="#pop#pop#pop" String="%1[cegimosx]*" dynamic="true" endRegion="Replacement" />
|
||||
<IncludeRules context="ipstring_internal" />
|
||||
|
||||
</context>
|
||||
|
||||
<context name="subst_sq_pattern" attribute="Pattern" lineEndContext="#stay">
|
||||
<RegExpr attribute="Comment" context="#stay" String="\s+#.*$" />
|
||||
<IncludeRules context="regex_pattern_internal" />
|
||||
<DetectChar attribute="Operator" context="subst_sq_replace" char="'" endRegion="Pattern" beginRegion="Pattern" />
|
||||
</context>
|
||||
<context name="subst_sq_replace" attribute="String" lineEndContext="#stay">
|
||||
<RegExpr attribute="Operator" context="#pop#pop#pop" String="'[cegimosx]*" endRegion="Replacement" />
|
||||
</context>
|
||||
|
||||
<context name="tr" attribute="Pattern" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop" >
|
||||
<RegExpr attribute="Pattern" context="#pop" String="([^)]*\)\s*\(?:[^)]*\)" />
|
||||
<RegExpr attribute="Pattern" context="#pop" String="{[^}]*\}\s*\{[^}]*\}" />
|
||||
<RegExpr attribute="Pattern" context="#pop" String="\[[^}]*\]\s*\[[^\]]*\]" />
|
||||
<RegExpr attribute="Pattern" context="#pop" String="([^a-zA-Z0-9_\s[\]{}()]).*\1.*\1" minimal="true"/>
|
||||
</context>
|
||||
|
||||
<!-- ====== PATTERNs ====== -->
|
||||
<context name="find_pattern" attribute="Pattern" lineEndContext="#stay">
|
||||
<RegExpr attribute="Comment" context="#stay" String="\s+#.*" /><!-- s # == comment, look for the delim on the next line -->
|
||||
<DetectChar attribute="Operator" context="pattern_brace" char="{" beginRegion="Pattern" />
|
||||
<DetectChar attribute="Operator" context="pattern_paren" char="(" beginRegion="Pattern" />
|
||||
<DetectChar attribute="Operator" context="pattern_bracket" char="[" beginRegion="Pattern" />
|
||||
<DetectChar attribute="Operator" context="pattern_sq" char="'" beginRegion="Pattern" />
|
||||
<RegExpr attribute="Operator" context="pattern" String="([^\w\s])" beginRegion="Pattern" />
|
||||
</context>
|
||||
<context name="pattern_slash" attribute="Pattern" lineEndContext="#stay">
|
||||
<RegExpr attribute="Pattern Internal Operator" context="#stay" String="\$(?=/)" />
|
||||
<IncludeRules context="regex_pattern_internal_ip" />
|
||||
<RegExpr attribute="Operator" context="#pop" String="/[cgimosx]*" endRegion="Pattern" />
|
||||
</context>
|
||||
<context name="pattern" attribute="Pattern" lineEndContext="#stay" dynamic="true">
|
||||
<RegExpr attribute="Pattern Internal Operator" context="#stay" String="\$(?=%1)" dynamic="true" />
|
||||
<RegExpr attribute="Operator" context="#pop#pop" String="%1[cgimosx]*" dynamic="true" endRegion="Pattern" />
|
||||
<IncludeRules context="regex_pattern_internal_ip" />
|
||||
<RegExpr attribute="Pattern Internal Operator" context="#stay" String="\$(?=\%1)" dynamic="true" />
|
||||
</context>
|
||||
<context name="pattern_brace" attribute="Pattern" lineEndContext="#stay">
|
||||
<RegExpr attribute="Operator" context="#pop#pop" String="\}[cgimosx]*" endRegion="Pattern" />
|
||||
<IncludeRules context="regex_pattern_internal_ip" />
|
||||
</context>
|
||||
<context name="pattern_bracket" attribute="Pattern" lineEndContext="#stay">
|
||||
<RegExpr attribute="Operator" context="#pop#pop" String="\][cgimosx]*" endRegion="Pattern" />
|
||||
<IncludeRules context="regex_pattern_internal_ip" />
|
||||
</context>
|
||||
<context name="pattern_paren" attribute="Pattern" lineEndContext="#stay">
|
||||
<RegExpr attribute="Operator" context="#pop#pop" String="\)[cgimosx]*" endRegion="Pattern" />
|
||||
<IncludeRules context="regex_pattern_internal_ip" />
|
||||
</context>
|
||||
<context name="pattern_sq" attribute="Pattern" lineEndContext="#stay">
|
||||
<RegExpr attribute="Operator" context="#pop#pop" String="'[cgimosx]*" endRegion="Pattern" />
|
||||
<IncludeRules context="regex_pattern_internal" />
|
||||
</context>
|
||||
|
||||
<!-- rules internal stuff wrt regex patterns -->
|
||||
<context name="regex_pattern_internal_rules_1" lineEndContext="#stay">
|
||||
<RegExpr attribute="Comment" context="#stay" String="#.*$" firstNonSpace="true" />
|
||||
<RegExpr attribute="Pattern Character Class" context="#stay" String="\\[anDdSsWw]" />
|
||||
<RegExpr attribute="Pattern Internal Operator" context="#stay" String="\\[ABbEGLlNUuQdQZz]" />
|
||||
<RegExpr attribute="Special Variable" context="#stay" String="\\[\d]+" />
|
||||
<RegExpr attribute="Pattern" context="#stay" String="\\." />
|
||||
</context>
|
||||
<context name="regex_pattern_internal_rules_2" lineEndContext="#stay">
|
||||
<Detect2Chars attribute="Pattern Internal Operator" context="pat_ext" char="(" char1="?" />
|
||||
<DetectChar attribute="Pattern Internal Operator" context="pat_char_class" char="[" />
|
||||
<RegExpr attribute="Pattern Internal Operator" context="#stay" String="[()?^*+|]" />
|
||||
<RegExpr attribute="Pattern Internal Operator" context="#stay" String="\{[\d, ]+\}" />
|
||||
<DetectChar attribute="Pattern Internal Operator" context="#stay" char="$" />
|
||||
<RegExpr attribute="Comment" context="#stay" String="\s{3,}#.*$" />
|
||||
</context>
|
||||
<context name="regex_pattern_internal" attribute="Pattern" lineEndContext="#stay">
|
||||
<IncludeRules context="regex_pattern_internal_rules_1" />
|
||||
<IncludeRules context="regex_pattern_internal_rules_2" />
|
||||
</context>
|
||||
<context name="regex_pattern_internal_ip" attribute="Pattern" lineEndContext="#stay" >
|
||||
<IncludeRules context="regex_pattern_internal_rules_1" />
|
||||
<!-- NOTE the below means that the special variables $' $], $} and $> are not supported
|
||||
within interpolated PATTERNs (apart from $(, $) and ${ and $| not supported by perl).
|
||||
This is because perl considers
|
||||
s{foo$} {bar} OK as well as s{foo$}} {bar}, and detecting that is a huge work overload
|
||||
for something that is unlikely to happen. -->
|
||||
<RegExpr attribute="Data Type" context="find_variable_unsafe" String="[$@][^]\s{}()|>']" lookAhead="true" />
|
||||
<IncludeRules context="regex_pattern_internal_rules_2" />
|
||||
</context>
|
||||
<context name="pat_ext" attribute="Pattern Internal Operator" lineEndContext="#stay">
|
||||
<RegExpr attribute="Comment" context="#pop" String="\#[^)]*" />
|
||||
<RegExpr attribute="Pattern Internal Operator" context="#pop" String="[:=!><]+" />
|
||||
<DetectChar attribute="Pattern Internal Operator" context="#pop" char=")" />
|
||||
</context>
|
||||
<context name="pat_char_class" attribute="Pattern Character Class" lineEndContext="#stay">
|
||||
<DetectChar attribute="Pattern Internal Operator" context="#stay" char="^" />
|
||||
<Detect2Chars attribute="Pattern Character Class" context="#stay" char="\" char1="\" />
|
||||
<Detect2Chars attribute="Pattern Character Class" context="#stay" char="\" char1="]" />
|
||||
<RegExpr attribute="Pattern Character Class" context="#stay" String="\[:^?[a-z]+:\]" />
|
||||
<DetectChar attribute="Pattern Internal Operator" context="#pop" char="]" />
|
||||
</context>
|
||||
|
||||
<!-- ====== Variables ====== -->
|
||||
<context name="find_variable" attribute="Data Type" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop" >
|
||||
<RegExpr attribute="Special Variable" context="var_detect" String="\$[0-9]+" />
|
||||
<RegExpr attribute="Special Variable" context="var_detect" String="[@\$](?:[\+\-_]\B|ARGV\b|INC\b)" />
|
||||
<RegExpr attribute="Special Variable" context="var_detect" String="[%\$](?:INC\b|ENV\b|SIG\b)" />
|
||||
<RegExpr attribute="Data Type" context="var_detect" String="\$\$[\$\w_]" />
|
||||
<RegExpr attribute="Data Type" context="var_detect" String="\$[#_][\w_]" />
|
||||
<RegExpr attribute="Data Type" context="var_detect" String="\$+::" />
|
||||
<RegExpr attribute="Special Variable" context="#stay" String="\$[^a-zA-Z0-9\s{][A-Z]?" />
|
||||
<RegExpr attribute="Data Type" context="var_detect" String="[\$@%]\{[\w_]+\}" />
|
||||
<AnyChar attribute="Data Type" context="var_detect" String="$@%" />
|
||||
<RegExpr attribute="Data Type" context="var_detect" String="\*[a-zA-Z_]+" />
|
||||
<RegExpr attribute="Special Variable" context="#stay" String="\*[^a-zA-Z0-9\s{][A-Z]?" />
|
||||
<!-- this should be a rare case! -->
|
||||
<AnyChar attribute="Operator" context="#pop" String="$@%*" />
|
||||
</context>
|
||||
<!-- This does not check fo a trailing slash, for usage in strings. -->
|
||||
<context name="find_variable_unsafe" attribute="Data Type" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop" >
|
||||
<RegExpr attribute="Special Variable" context="var_detect_unsafe" String="\$[0-9]+" />
|
||||
<RegExpr attribute="Special Variable" context="var_detect_unsafe" String="[@\$](?:[\+\-_]\B|ARGV\b|INC\b)" />
|
||||
<RegExpr attribute="Special Variable" context="var_detect_unsafe" String="[%\$](?:INC\b|ENV\b|SIG\b)" />
|
||||
<RegExpr attribute="Data Type" context="var_detect_unsafe" String="\$\$[\$\w_]" />
|
||||
<RegExpr attribute="Data Type" context="var_detect_unsafe" String="\$[#_][\w_]" />
|
||||
<RegExpr attribute="Data Type" context="var_detect_unsafe" String="\$+::" />
|
||||
<RegExpr attribute="Special Variable" context="#stay" String="\$[^a-zA-Z0-9\s{][A-Z]?" />
|
||||
<RegExpr attribute="Data Type" context="var_detect_unsafe" String="[\$@%]\{[\w_]+\}" />
|
||||
<RegExpr attribute="Data Type" context="var_detect_unsafe" String="[\$@%]" />
|
||||
<RegExpr attribute="Data Type" context="var_detect_unsafe" String="\*\w+" />
|
||||
<AnyChar attribute="Operator" context="#pop" String="$@%*" />
|
||||
</context>
|
||||
<context name="var_detect" attribute="Data Type" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="#pop#pop">
|
||||
<IncludeRules context="var_detect_rules" />
|
||||
<IncludeRules context="slash_safe_escape" />
|
||||
</context>
|
||||
<context name="var_detect_unsafe" attribute="Data Type" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="#pop#pop">
|
||||
<IncludeRules context="var_detect_rules" />
|
||||
</context>
|
||||
<context name="var_detect_rules" attribute="Data Type" lineEndContext="#pop#pop" >
|
||||
<RegExpr attribute="Data Type" context="#stay" String="[\w_]+" />
|
||||
<Detect2Chars attribute="Normal Text" context="#stay" char=":" char1=":" />
|
||||
<DetectChar attribute="Operator" context="#stay" char="'" />
|
||||
<Detect2Chars attribute="Normal Text" context="#stay" char="-" char1=">" />
|
||||
<!-- safe with operator / -->
|
||||
<Detect2Chars attribute="Normal Text" context="#stay" char="+" char1="+" />
|
||||
<Detect2Chars attribute="Normal Text" context="#stay" char="-" char1="-" />
|
||||
</context>
|
||||
|
||||
|
||||
<!-- ====== Word lists ====== -->
|
||||
<context name="quote_word" attribute="Normal Text" lineEndContext="#stay" dynamic="true">
|
||||
<DetectSpaces />
|
||||
<DetectIdentifier />
|
||||
<RegExpr attribute="Normal Text" context="#stay" String="\\%1" dynamic="true" />
|
||||
<DetectChar attribute="Operator" context="#pop#pop#pop" char="1" dynamic="true" endRegion="Wordlist" />
|
||||
</context>
|
||||
<context name="quote_word_paren" attribute="Normal Text" lineEndContext="#stay">
|
||||
<DetectSpaces />
|
||||
<DetectIdentifier />
|
||||
<Detect2Chars attribute="Normal Text" context="#stay" char="\" char1=")" />
|
||||
<DetectChar attribute="Operator" context="#pop#pop#pop" char=")" endRegion="Wordlist" />
|
||||
</context>
|
||||
<context name="quote_word_brace" attribute="Normal Text" lineEndContext="#stay">
|
||||
<DetectSpaces />
|
||||
<DetectIdentifier />
|
||||
<Detect2Chars attribute="Normal Text" context="#stay" char="\" char1="}" />
|
||||
<DetectChar attribute="Operator" context="#pop#pop#pop" char="}" endRegion="Wordlist" />
|
||||
</context>
|
||||
<context name="quote_word_bracket" attribute="Normal Text" lineEndContext="#stay">
|
||||
<DetectSpaces />
|
||||
<DetectIdentifier />
|
||||
<Detect2Chars attribute="Normal Text" context="#stay" char="\" char1="]" />
|
||||
<DetectChar attribute="Operator" context="#pop#pop#pop" char="]" endRegion="Wordlist" />
|
||||
</context>
|
||||
|
||||
<!-- ====== Here Documents ====== -->
|
||||
<context name="find_here_document" attribute="Normal Text" lineEndContext="#pop" >
|
||||
<RegExpr attribute="Keyword" context="here_document" String="(\w+)\s*;?" />
|
||||
<RegExpr attribute="Keyword" context="here_document" String="\s*"([^"]+)"\s*;?" />
|
||||
<RegExpr attribute="Keyword" context="here_document" String="\s*`([^`]+)`\s*;?" />
|
||||
<RegExpr attribute="Keyword" context="here_document_dumb" String="\s*'([^']+)'\s*;?" />
|
||||
</context>
|
||||
<context name="here_document" attribute="String (interpolated)" lineEndContext="#stay" dynamic="true">
|
||||
<DetectSpaces />
|
||||
<RegExpr attribute="Keyword" context="#pop#pop" String="%1" column="0" dynamic="true" endRegion="HereDocument"/>
|
||||
<RegExpr attribute="Keyword" context="here_document" String="\=\s*<<\s*["']?([A-Z0-9_\-]+)["']?" beginRegion="HEREDoc" />
|
||||
<IncludeRules context="ipstring_internal" />
|
||||
</context>
|
||||
<context name="here_document_dumb" attribute="Normal Text" lineEndContext="#stay" dynamic="true">
|
||||
<DetectSpaces />
|
||||
<RegExpr attribute="Keyword" context="#pop#pop" String="%1" column="0" dynamic="true" endRegion="HereDocument"/>
|
||||
<DetectIdentifier />
|
||||
</context>
|
||||
|
||||
<!-- ====== Misc ====== -->
|
||||
<context name="data_handle" attribute="Data" lineEndContext="#stay">
|
||||
<RegExpr attribute="Pod" context="pod" String="\=(?:head[1-6]|over|back|item|for|begin|end|pod)\s+.*" column="0" beginRegion="POD"/>
|
||||
<StringDetect attribute="Keyword" context="normal" String="__END__" firstNonSpace="true" />
|
||||
</context>
|
||||
<context name="end_handle" attribute="Nothing" lineEndContext="#stay">
|
||||
<RegExpr attribute="Pod" context="pod" String="^\=(?:head[1-6]|over|back|item|for|begin|end|pod)\s*.*"/>
|
||||
<StringDetect attribute="Keyword" context="data_handle" String="__DATA__" firstNonSpace="true" />
|
||||
</context>
|
||||
|
||||
<context name="Backticked" attribute="String (interpolated)" lineEndContext="#stay">
|
||||
<IncludeRules context="ipstring_internal"/>
|
||||
<DetectChar attribute="Operator" context="#pop" char="`"/>
|
||||
</context>
|
||||
|
||||
<context name="slash_safe_escape" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
|
||||
<RegExpr attribute="Normal Text" context="#pop" String="\s*\]?\s*/" />
|
||||
<RegExpr attribute="Normal Text" context="#pop" String="\s*\}?\s*/" endRegion="Block" />
|
||||
<RegExpr attribute="Normal Text" context="#pop" String="\s*\)?\s*/" />
|
||||
<keyword attribute="Keyword" context="#pop" String="keywords" />
|
||||
</context>
|
||||
|
||||
<context name="package_qualified_blank" attribute="Normal Text" lineEndContext="#stay">
|
||||
<RegExpr attribute="Normal Text" context="#pop" String="[\w_]+" />
|
||||
</context>
|
||||
|
||||
<context name="sub_name_def" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
|
||||
<RegExpr attribute="Function" context="#stay" String="\w+" />
|
||||
<RegExpr attribute="Normal Text" context="find_variable" String="\$\S" lookAhead="true" />
|
||||
<RegExpr attribute="Normal Text" context="sub_arg_definition" String="\s*\(" />
|
||||
<Detect2Chars attribute="Normal Text" context="#stay" char=":" char1=":" />
|
||||
</context>
|
||||
|
||||
<context name="sub_arg_definition" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop#pop">
|
||||
<AnyChar attribute="Data Type" context="#stay" String="*$@%" />
|
||||
<AnyChar attribute="Normal Text" context="#stay" String="&\[];" />
|
||||
<DetectChar attribute="Normal Text" context="slash_safe_escape" char=")" />
|
||||
</context>
|
||||
|
||||
<context name="pod" attribute="Pod" lineEndContext="#stay">
|
||||
<DetectSpaces />
|
||||
<DetectIdentifier />
|
||||
<RegExpr attribute="Pod" context="#stay" String="\=(?:head[1-6]|over|back|item|for|begin|end|pod)\s*.*" column="0" beginRegion="POD" endRegion="POD"/>
|
||||
<RegExpr attribute="Pod" context="#pop" String="\=cut.*$" column="0" endRegion="POD"/>
|
||||
</context>
|
||||
|
||||
<context name="comment" attribute="Comment" lineEndContext="#pop">
|
||||
<DetectSpaces />
|
||||
<IncludeRules context="##Alerts" />
|
||||
<DetectIdentifier />
|
||||
</context>
|
||||
|
||||
</contexts>
|
||||
<itemDatas>
|
||||
<itemData name="Normal Text" defStyleNum="dsNormal" />
|
||||
<itemData name="Keyword" defStyleNum="dsKeyword" />
|
||||
<itemData name="Pragma" defStyleNum="dsKeyword" />
|
||||
<itemData name="Function" defStyleNum="dsFunction" />
|
||||
<itemData name="Operator" defStyleNum="dsKeyword" color="#008000"/>
|
||||
<itemData name="Data Type" defStyleNum="dsDataType" />
|
||||
<itemData name="Special Variable" defStyleNum="dsDataType" color="#C00000" selColor="#C00000" bold="0" italic="0" />
|
||||
<itemData name="Decimal" defStyleNum="dsDecVal" />
|
||||
<itemData name="Octal" defStyleNum="dsBaseN" />
|
||||
<itemData name="Hex" defStyleNum="dsBaseN" />
|
||||
<itemData name="Float" defStyleNum="dsFloat" />
|
||||
<itemData name="String" defStyleNum="dsString" color="#FF6C6C" selColor="#FF6C6C" bold="0" italic="0" />
|
||||
<itemData name="String (interpolated)" defStyleNum="dsString" />
|
||||
<itemData name="String Special Character" defStyleNum="dsChar" />
|
||||
<itemData name="Pattern" defStyleNum="dsOthers" />
|
||||
<itemData name="Pattern Internal Operator" defStyleNum="dsChar" />
|
||||
<itemData name="Pattern Character Class" defStyleNum="dsBaseN" />
|
||||
<itemData name="Data" defStyleNum="dsNormal" />
|
||||
<itemData name="Comment" defStyleNum="dsComment" />
|
||||
<itemData name="Pod" defStyleNum="dsComment" />
|
||||
<itemData name="Nothing" defStyleNum="dsComment" />
|
||||
</itemDatas>
|
||||
</highlighting>
|
||||
<general>
|
||||
<comments>
|
||||
<comment name="singleLine" start="#" />
|
||||
</comments>
|
||||
<keywords casesensitive="1" />
|
||||
</general>
|
||||
</language>
|
||||
<!-- kate: space-indent on; indent-width 2; replace-tabs on; -->
|
||||
915
share/qtcreator/generic-highlighter/ruby.xml
Normal file
915
share/qtcreator/generic-highlighter/ruby.xml
Normal file
@@ -0,0 +1,915 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd">
|
||||
|
||||
<!--
|
||||
Ruby syntax highlighting definition for Kate.
|
||||
|
||||
Copyright (C) 2004 by Sebastian Vuorinen (sebastian dot vuorinen at helsinki dot fi)
|
||||
Copyright (C) 2004 by Stefan Lang (langstefan@gmx.at)
|
||||
Copyright (C) 2008 by Robin Pedersen (robinpeder@gmail.com)
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the
|
||||
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA.
|
||||
-->
|
||||
|
||||
<!--
|
||||
TODO: * "Nested" HERE documents aren't recognized.
|
||||
* Division after gdl contexts is interpreted as regexp
|
||||
-->
|
||||
|
||||
<!-- Hold the "language" opening tag on a single line, as mentioned in "language.dtd". -->
|
||||
<language name="Ruby" section="Scripts"
|
||||
version="1.18" kateversion="2.4"
|
||||
extensions="*.rb;*.rjs;*.rxml;*.xml.erb;*.js.erb"
|
||||
mimetype="application/x-ruby"
|
||||
style="ruby" indenter="ruby"
|
||||
author="Stefan Lang (langstefan@gmx.at), Sebastian Vuorinen (sebastian.vuorinen@helsinki.fi), Robin Pedersen (robinpeder@gmail.com)" license="LGPL">
|
||||
|
||||
<highlighting>
|
||||
|
||||
<list name="keywords">
|
||||
<item> BEGIN </item>
|
||||
<item> END </item>
|
||||
<item> and </item>
|
||||
<item> begin </item>
|
||||
<item> break </item>
|
||||
<item> case </item>
|
||||
<item> defined? </item>
|
||||
<item> do </item>
|
||||
<item> else </item>
|
||||
<item> elsif </item>
|
||||
<item> end </item>
|
||||
<item> ensure </item>
|
||||
<item> for </item>
|
||||
<item> if </item>
|
||||
<item> in </item>
|
||||
<item> include </item>
|
||||
<item> next </item>
|
||||
<item> not </item>
|
||||
<item> or </item>
|
||||
<item> redo </item>
|
||||
<item> rescue </item>
|
||||
<item> retry </item>
|
||||
<item> return </item>
|
||||
<item> then </item>
|
||||
<item> unless </item>
|
||||
<item> until </item>
|
||||
<item> when </item>
|
||||
<item> while </item>
|
||||
<item> yield </item>
|
||||
</list>
|
||||
|
||||
<list name="access-control">
|
||||
<item> private_class_method </item>
|
||||
<item> private </item>
|
||||
<item> protected </item>
|
||||
<item> public_class_method </item>
|
||||
<item> public </item>
|
||||
</list>
|
||||
|
||||
<list name="attribute-definitions">
|
||||
<item> attr_reader </item>
|
||||
<item> attr_writer </item>
|
||||
<item> attr_accessor </item>
|
||||
</list>
|
||||
|
||||
<list name="definitions">
|
||||
<item> alias </item>
|
||||
<item> module </item>
|
||||
<item> class </item>
|
||||
<item> def </item>
|
||||
<item> undef </item>
|
||||
</list>
|
||||
|
||||
<list name="pseudo-variables">
|
||||
<item> self </item>
|
||||
<item> super </item>
|
||||
<item> nil </item>
|
||||
<item> false </item>
|
||||
<item> true </item>
|
||||
<item> caller </item>
|
||||
<item> __FILE__ </item>
|
||||
<item> __LINE__ </item>
|
||||
</list>
|
||||
|
||||
<list name="default-globals">
|
||||
<item> $stdout </item>
|
||||
<item> $defout </item>
|
||||
<item> $stderr </item>
|
||||
<item> $deferr </item>
|
||||
<item> $stdin </item>
|
||||
</list>
|
||||
|
||||
<!-- Kernel module methods.
|
||||
NOTE: Methods ending in ? or !
|
||||
are included below as regexes.
|
||||
-->
|
||||
<list name="kernel-methods">
|
||||
<!-- backquote ` -->
|
||||
<item> abort </item>
|
||||
<item> at_exit </item>
|
||||
<item> autoload </item>
|
||||
<item> autoload? </item>
|
||||
<item> binding </item>
|
||||
<item> block_given? </item>
|
||||
<item> callcc </item>
|
||||
<item> caller </item>
|
||||
<item> catch </item>
|
||||
<item> chomp </item>
|
||||
<item> chomp! </item>
|
||||
<item> chop </item>
|
||||
<item> chop! </item>
|
||||
<item> eval </item>
|
||||
<item> exec </item>
|
||||
<item> exit </item>
|
||||
<item> exit! </item>
|
||||
<item> fail </item>
|
||||
<item> fork </item>
|
||||
<item> format </item>
|
||||
<item> getc </item>
|
||||
<item> gets </item>
|
||||
<item> global_variables </item>
|
||||
<item> gsub </item>
|
||||
<item> gsub! </item>
|
||||
<item> iterator? </item>
|
||||
<item> lambda </item>
|
||||
<item> load </item>
|
||||
<item> local_variables </item>
|
||||
<item> loop </item>
|
||||
<item> method_missing </item>
|
||||
<item> open </item>
|
||||
<item> p </item>
|
||||
<item> print </item>
|
||||
<item> printf </item>
|
||||
<item> proc </item>
|
||||
<item> putc </item>
|
||||
<item> puts </item>
|
||||
<item> raise </item>
|
||||
<item> rand </item>
|
||||
<item> readline </item>
|
||||
<item> readlines </item>
|
||||
<item> require </item>
|
||||
<item> scan </item>
|
||||
<item> select </item>
|
||||
<item> set_trace_func </item>
|
||||
<item> sleep </item>
|
||||
<item> split </item>
|
||||
<item> sprintf </item>
|
||||
<item> srand </item>
|
||||
<item> sub </item>
|
||||
<item> sub! </item>
|
||||
<item> syscall </item>
|
||||
<item> system </item>
|
||||
<item> test </item>
|
||||
<item> throw </item>
|
||||
<item> trace_var </item>
|
||||
<item> trap </item>
|
||||
<item> untrace_var </item>
|
||||
<item> warn </item>
|
||||
</list>
|
||||
|
||||
<list name="attention">
|
||||
<item> TODO </item>
|
||||
<item> FIXME </item>
|
||||
<item> NOTE </item>
|
||||
</list>
|
||||
|
||||
<contexts>
|
||||
<context name="Normal" attribute="Normal Text" lineEndContext="#stay">
|
||||
<!-- ruby ignores newline after \ -->
|
||||
<LineContinue attribute="Normal Text" context="Line Continue"/>
|
||||
|
||||
<!-- __END__ token on own line. -->
|
||||
<RegExpr attribute="Keyword" String="__END__$" context="DATA" column="0"/>
|
||||
|
||||
<!-- "shebang" line -->
|
||||
<RegExpr attribute="Keyword" String="#!\/.*" context="#stay" column="0"/>
|
||||
|
||||
<!-- "def" - "end" blocks -->
|
||||
<!-- check for statement modifiers with regexes -->
|
||||
<DetectChar attribute="Operator" char="{" context="Find closing block brace" beginRegion="def block"/>
|
||||
<RegExpr attribute="Keyword" String="(\=|\(|\[|\{)\s*(if|unless|while|until)\b" context="#stay" beginRegion="def block"/>
|
||||
<RegExpr attribute="Keyword" String="(while|until)\b(?!.*\bdo\b)" context="#stay" beginRegion="def block" firstNonSpace="true"/>
|
||||
<RegExpr attribute="Keyword" String="\;\s*(while|until)\b(?!.*\bdo\b)" context="#stay" beginRegion="def block"/>
|
||||
<RegExpr attribute="Keyword" String="(if|unless)\b" context="#stay" beginRegion="def block" firstNonSpace="true"/>
|
||||
<RegExpr attribute="Keyword" String="\;\s*(if|unless)\b" context="#stay" beginRegion="def block"/>
|
||||
<RegExpr attribute="Keyword" String="\bclass\b" context="#stay" beginRegion="def block"/>
|
||||
<RegExpr attribute="Keyword" String="\bmodule\b" context="#stay" beginRegion="def block"/>
|
||||
<RegExpr attribute="Keyword" String="\bbegin\b" context="#stay" beginRegion="def block"/>
|
||||
<RegExpr attribute="Keyword" String="\bfor\b(?!.*\bdo\b)" context="#stay" beginRegion="def block"/>
|
||||
<RegExpr attribute="Keyword" String="\bcase\b" context="#stay" beginRegion="def block"/>
|
||||
<RegExpr attribute="Keyword" String="\bdo\b" context="#stay" beginRegion="def block"/>
|
||||
<RegExpr attribute="Keyword" String="\bdef\b" context="#stay" beginRegion="def block"/>
|
||||
<RegExpr attribute="Keyword" String="\bend\b" context="#stay" endRegion="def block"/>
|
||||
<!-- elsif/else close the current block and start a new one -->
|
||||
<RegExpr attribute="Keyword" String="\b(else|elsif|rescue|ensure)\b" context="#stay" endRegion="def block" beginRegion="def block"/>
|
||||
|
||||
<StringDetect attribute="Operator" String="..." context="#stay"/>
|
||||
<Detect2Chars attribute="Operator" char="." char1="." context="#stay"/>
|
||||
|
||||
<!-- marks a message (being sent, not defined) -->
|
||||
<RegExpr attribute="Message" String="\.[_a-z][_a-zA-Z0-9]*(\?|\!|\b)" context="check_div_2"/>
|
||||
|
||||
<!-- Check for "ASCII code operator". e.g.: ?a -->
|
||||
<RegExpr attribute="Dec" String="\s\?(\\M\-)?(\\C\-)?\\?\S" context="check_div_1"/>
|
||||
|
||||
<keyword attribute="Keyword" String="keywords" context="#stay"/>
|
||||
<keyword attribute="Attribute Definition" String="attribute-definitions" context="check_div_2"/>
|
||||
<keyword attribute="Access Control" String="access-control" context="check_div_2"/>
|
||||
<keyword attribute="Definition" String="definitions" context="#stay" />
|
||||
<keyword attribute="Pseudo variable" String="pseudo-variables" context="check_div_1"/>
|
||||
<keyword attribute="Default globals" String="default-globals" context="check_div_2"/>
|
||||
<keyword attribute="Kernel methods" String="kernel-methods" context="check_div_2"/>
|
||||
|
||||
<!-- (global) vars starting with $
|
||||
Match them before $_.
|
||||
-->
|
||||
<RegExpr attribute="Global Variable" String="\$[a-zA-Z_0-9]+" context="check_div_1"/>
|
||||
<RegExpr attribute="Global Variable" String="\$\-[a-zA-z_]\b" context="check_div_1"/>
|
||||
<!-- special-character globals -->
|
||||
<RegExpr attribute="Default globals" String="\$[\d_*`\!:?'/\\\-\&"]" context="check_div_1"/>
|
||||
<RegExpr attribute="Global Constant" String="\b[_A-Z]+[A-Z_0-9]+\b" context="check_div_2"/>
|
||||
<!-- Generally a module or class name like "File", "MyModule_1", .. -->
|
||||
<RegExpr attribute="Constant" String="\b[A-Z]+_*([0-9]|[a-z])[_a-zA-Z0-9]*\b" context="check_div_2"/>
|
||||
|
||||
<RegExpr attribute="Hex" String="\b\-?0[xX][_0-9a-fA-F]+" context="check_div_1"/>
|
||||
<RegExpr attribute="Bin" String="\b\-?0[bB][_01]+" context="check_div_1"/>
|
||||
<RegExpr attribute="Octal" String="\b\-?0[1-7][_0-7]*" context="check_div_1"/>
|
||||
<RegExpr attribute="Float" String="\b\-?[0-9][0-9_]*\.[0-9][0-9_]*([eE]\-?[1-9][0-9]*(\.[0-9]*)?)?" context="check_div_1"/>
|
||||
<RegExpr attribute="Dec" String="\b\-?[1-9][0-9_]*\b" context="check_div_1"/>
|
||||
<Int attribute="Dec" context="check_div_1"/>
|
||||
<HlCChar attribute="Char" context="check_div_1"/>
|
||||
|
||||
<!-- Check for =begin before assignment operator. -->
|
||||
<RegExpr attribute="Blockcomment" String="^=begin(?:\s|$)" context="Embedded documentation" beginRegion="comment block" column="0"/>
|
||||
|
||||
<!-- recognize the beginning of a HEREDOC
|
||||
This uses new features in Kate 2.3 and later
|
||||
|
||||
There is no other chance of keeping heredoc apart from the
|
||||
push operator '<<' than requiring to put space between the operator
|
||||
and the string.
|
||||
-->
|
||||
<RegExpr attribute="Operator" context="find_indented_heredoc" String="\s*<<-(?=\w+|["'])" beginRegion="HereDocument" />
|
||||
<RegExpr attribute="Operator" context="find_heredoc" String="\s*<<(?=\w+|["'])" beginRegion="HereDocument" />
|
||||
|
||||
<DetectChar attribute="Operator" char="." context="#stay"/>
|
||||
<Detect2Chars attribute="Operator" char="&" char1="&" context="#stay"/>
|
||||
<Detect2Chars attribute="Operator" char="|" char1="|" context="#stay"/>
|
||||
<RegExpr attribute="Operator" String="\s[\?\:\%]\s" context="#stay"/>
|
||||
<RegExpr attribute="Operator" String="[|&<>\^\+*~\-=]+" context="#stay"/>
|
||||
<!-- regexp hack -->
|
||||
<RegExpr attribute="Operator" String="\s!" context="#stay"/>
|
||||
<RegExpr attribute="Operator" String="/=\s" context="#stay" insensitive="0"/>
|
||||
<StringDetect attribute="Operator" String="%=" context="#stay" insensitive="0"/>
|
||||
<Detect2Chars attribute="Operator" char=":" char1=":" context="Member Access"/>
|
||||
|
||||
<RegExpr attribute="Symbol" String=":(@{1,2}|\$)?[a-zA-Z_][a-zA-Z0-9_]*[=?!]?" context="check_div_1"/>
|
||||
<RegExpr attribute="Symbol" String=":\[\]=?" contex="check_div_1"/>
|
||||
|
||||
<DetectChar attribute="String" char=""" context="Quoted String"/>
|
||||
<DetectChar attribute="Raw String" char="'" context="Apostrophed String"/>
|
||||
<DetectChar attribute="Command" char="`" context="Command String"/>
|
||||
|
||||
<StringDetect attribute="Normal Text" String="?#" context="#stay"/>
|
||||
|
||||
<RegExpr attribute="Comment" String="#\s*BEGIN.*$" context="#stay" beginRegion="marker" column="0"/>
|
||||
<RegExpr attribute="Comment" String="#\s*END.*$" context="#stay" endRegion="marker" column="0"/>
|
||||
<DetectChar attribute="Comment" char="#" context="General Comment"/>
|
||||
|
||||
<DetectChar attribute="Delimiter" char="[" context="#stay"/>
|
||||
<DetectChar attribute="Delimiter" char="]" context="check_div_1"/>
|
||||
<DetectChar attribute="Delimiter" char="{" context="#stay" beginRegion="def block"/>
|
||||
<DetectChar attribute="Delimiter" char="}" context="check_div_1" endRegion="def block"/>
|
||||
|
||||
<RegExpr attribute="Instance Variable" String="@[a-zA-Z_0-9]+" context="check_div_1"/>
|
||||
<RegExpr attribute="Class Variable" String="@@[a-zA-Z_0-9]+" context="check_div_1"/>
|
||||
|
||||
<!-- handle the different regular expression formats -->
|
||||
<DetectChar attribute="Regular Expression" char="/" context="RegEx 1"/>
|
||||
|
||||
<!-- recognize the beginning of a general delimited input format -->
|
||||
<!-- this moves to the next context to separate out the exact nature of the GDL input -->
|
||||
<RegExpr attribute="GDL input" context="find_gdl_input" String="\s*[%](?=[Qqxw]?[^\s])" beginRegion="GdlInput" />
|
||||
|
||||
<DetectChar attribute="Normal Text" char=")" context="check_div_1"/>
|
||||
<DetectIdentifier attribute="Normal Text" context="check_div_2"/>
|
||||
|
||||
</context>
|
||||
|
||||
<!-- In the following contexts, a slash character ('/') is a division operator -->
|
||||
<!-- Everywhere else, it's a regular expression delimiter -->
|
||||
|
||||
<!-- A slash is always a division operator, even if preceeded by whitespace -->
|
||||
<context name="check_div_1" attribute="Normal Text" fallthrough="true" fallthroughContext="#pop" lineEndContext="#pop">
|
||||
<RegExpr attribute="Normal Text" String="\s*" context="#stay"/>
|
||||
<AnyChar attribute="Operator" String="/%" context="#pop"/>
|
||||
</context>
|
||||
|
||||
<!-- Same as check_div_1, but with double pop to exit the surrounding context -->
|
||||
<context name="check_div_1_pop" attribute="Normal Text" fallthrough="true" fallthroughContext="#pop#pop" lineEndContext="#pop#pop">
|
||||
<RegExpr attribute="Normal Text" String="\s*" context="#stay"/>
|
||||
<AnyChar attribute="Operator" String="/%" context="#pop#pop"/>
|
||||
</context>
|
||||
|
||||
<!-- A slash is division operator if it's the first character, or if preceeded and followed by whitespace -->
|
||||
<context name="check_div_2" attribute="Normal Text" fallthrough="true" fallthroughContext="#pop" lineEndContext="#pop">
|
||||
<AnyChar attribute="Operator" String="/%" context="#pop"/>
|
||||
<RegExpr attribute="Normal Text" String="\s+" context="check_div_2_internal"/>
|
||||
</context>
|
||||
|
||||
<!-- Internal context used by check_div_2 -->
|
||||
<context name="check_div_2_internal" attribute="Normal Text" fallthrough="true" fallthroughContext="#pop#pop" lineEndContext="#pop#pop">
|
||||
<!-- <DetectChar attribute="Operator" char="%" context="#pop#pop"/> -->
|
||||
<RegExpr attribute="Operator" String="[/%](?=\s)" context="#pop#pop"/>
|
||||
</context>
|
||||
|
||||
<!-- Same as check_div_2, but with double pop to exit the surrounding context -->
|
||||
<context name="check_div_2_pop" attribute="Normal Text" fallthrough="true" fallthroughContext="#pop#pop" lineEndContext="#pop#pop">
|
||||
<AnyChar attribute="Operator" String="/%" context="#pop#pop"/>
|
||||
<RegExpr attribute="Normal Text" String="\s+" context="check_div_2_pop_internal"/>
|
||||
</context>
|
||||
|
||||
<!-- Internal context used by check_div_2_pop -->
|
||||
<context name="check_div_2_pop_internal" attribute="Normal Text" fallthrough="true" fallthroughContext="#pop#pop#pop" lineEndContext="#pop#pop#pop">
|
||||
<DetectChar attribute="Operator" char="%" context="#pop#pop#pop"/>
|
||||
<RegExpr attribute="Operator" String="/(?=\s)" context="#pop#pop#pop"/>
|
||||
</context>
|
||||
|
||||
<context name="Line Continue" attribute="Normal Text" lineEndContext="#pop">
|
||||
<RegExpr attribute="Keyword" String="(while|until)\b(?!.*\bdo\b)" context="#stay" firstNonSpace="true"/>
|
||||
<RegExpr attribute="Keyword" String="(if|unless)\b" context="#stay" firstNonSpace="true"/>
|
||||
<IncludeRules context="Normal"/>
|
||||
</context>
|
||||
|
||||
<context name="Find closing block brace" attribute="Normal Text" lineEndContext="#stay">
|
||||
<DetectChar attribute="Operator" char="}" context="check_div_1_pop" endRegion="def block"/>
|
||||
<IncludeRules context="Normal"/>
|
||||
</context>
|
||||
|
||||
<context name="Quoted String" attribute="String" lineEndContext="#stay">
|
||||
<StringDetect attribute="String" String="\\" context="#stay"/>
|
||||
<RegExpr attribute="String" String="\\\"" context="#stay"/>
|
||||
<RegExpr attribute="Substitution" String="#@{1,2}" context="Short Subst"/>
|
||||
<Detect2Chars attribute="Substitution" char="#" char1="{" context="Subst"/>
|
||||
<DetectChar char=""" attribute="String" context="check_div_1_pop"/>
|
||||
</context>
|
||||
|
||||
<context name="Apostrophed String" attribute="Raw String" lineEndContext="#stay">
|
||||
<StringDetect attribute="String" String="\\" context="#stay"/>
|
||||
<RegExpr attribute="String" String="\\\'" context="#stay"/>
|
||||
<DetectChar char="'" attribute="Raw String" context="check_div_1_pop"/>
|
||||
</context>
|
||||
|
||||
<context name="Command String" attribute="Command" lineEndContext="#stay">
|
||||
<StringDetect attribute="String" String="\\" context="#stay"/>
|
||||
<RegExpr attribute="String" String="\\\`" context="#stay"/>
|
||||
<RegExpr attribute="Substitution" String="#@{1,2}" context="Short Subst"/>
|
||||
<Detect2Chars attribute="Substitution" char="#" char1="{" context="Subst"/>
|
||||
<DetectChar char="`" attribute="Command" context="check_div_1_pop"/>
|
||||
</context>
|
||||
|
||||
<context name="Embedded documentation" attribute="Blockcomment" lineEndContext="#stay">
|
||||
<RegExpr attribute="Comment" String="^=end(?:\s.*|$)" context="#pop" endRegion="comment block" column="0"/>
|
||||
</context>
|
||||
|
||||
<context name="RegEx 1" attribute="Regular Expression" lineEndContext="#stay">
|
||||
<RegExpr attribute="Regular Expression" String="\\\/" context="#stay"/>
|
||||
<RegExpr attribute="Substitution" String="#@{1,2}" context="Short Subst"/>
|
||||
<Detect2Chars attribute="Substitution" char="#" char1="{" context="Subst"/>
|
||||
<RegExpr attribute="Regular Expression" String="/[uiomxn]*" context="check_div_1_pop"/>
|
||||
</context>
|
||||
|
||||
<!-- Substitutions can be nested -->
|
||||
<context name="Subst" attribute="Normal Text" lineEndContext="#stay">
|
||||
<DetectChar attribute="Substitution" char="}" context="#pop"/>
|
||||
<!-- Highlight substitution as code. -->
|
||||
<IncludeRules context="Normal"/>
|
||||
</context>
|
||||
|
||||
<context name="Short Subst" attribute="Substitution" lineEndContext="#pop">
|
||||
<!-- Check for e.g.: "#@var#@@xy" -->
|
||||
<RegExpr attribute="Substitution" String="#@{1,2}" context="#stay"/>
|
||||
<RegExpr attribute="Substitution" String="\w(?!\w)" context="#pop"/>
|
||||
</context>
|
||||
|
||||
<!-- This handles access of nested module classes and class methods -->
|
||||
<context name="Member Access" attribute="Member" lineEndContext="#pop">
|
||||
<!-- marks a message (being sent, not defined) -->
|
||||
<RegExpr attribute="Message" String="\.?[_a-z]\w*(\?|\!)?(?=[^\w\d\.\:])" context="check_div_2_pop"/>
|
||||
<RegExpr attribute="Message" String="\.?[_a-z]\w*(\?|\!)?" context="#stay"/>
|
||||
<RegExpr attribute="Constant" String="[A-Z]+_*(\d|[a-z])\w*(?=[^\w\d\.\:])" context="check_div_2_pop"/>
|
||||
<RegExpr attribute="Constant" String="[A-Z]+_*([0-9]|[a-z])\w*" context="#stay"/>
|
||||
<RegExpr attribute="Constant Value" String="[_A-Z][_A-Z0-9]*(?=[^\w\d\.\:])" context="check_div_2_pop"/>
|
||||
<RegExpr attribute="Constant Value" String="[_A-Z][_A-Z0-9]*" context="#stay"/>
|
||||
<Detect2Chars attribute="Operator" char=":" char1=":" context="#stay"/>
|
||||
<DetectChar attribute="Member" char="." context="#stay"/>
|
||||
|
||||
<AnyChar attribute="Operator" String="=+-*/%|&[]{}~" context="#pop"/>
|
||||
<DetectChar attribute="Comment" char="#" context="#pop"/>
|
||||
<AnyChar attribute="Normal Text" String="()\" context="#pop"/>
|
||||
<RegExpr attribute="Member" String="\W" context="#pop"/>
|
||||
</context>
|
||||
|
||||
<context name="Comment Line" attribute="Comment" lineEndContext="#pop">
|
||||
<RegExpr attribute="Comment" String="\w\:\:\s" context="RDoc Label"/>
|
||||
<keyword attribute="Alert" String="attention" context="#stay"/>
|
||||
</context>
|
||||
|
||||
<context name="General Comment" attribute="Comment" lineEndContext="#pop">
|
||||
<keyword attribute="Dec" String="attention" context="#stay"/>
|
||||
</context>
|
||||
|
||||
<context name="RDoc Label" attribute="RDoc Value" lineEndContext="#pop"/>
|
||||
|
||||
<!-- HEREDOC support
|
||||
The contexts below support both normal and indented heredocs
|
||||
-->
|
||||
<!-- here we markup the heredoc markers -->
|
||||
<context name="find_heredoc" attribute="Normal Text" lineEndContext="#pop" >
|
||||
<RegExpr attribute="Keyword" context="apostrophed_normal_heredoc" String="'(\w+)'" />
|
||||
<RegExpr attribute="Keyword" context="normal_heredoc" String=""?(\w+)"?" />
|
||||
</context>
|
||||
<context name="find_indented_heredoc" attribute="Normal Text" lineEndContext="#pop" >
|
||||
<RegExpr attribute="Keyword" context="apostrophed_indented_heredoc" String="'(\w+)'" />
|
||||
<RegExpr attribute="Keyword" context="indented_heredoc" String=""?(\w+)"?" />
|
||||
</context>
|
||||
<!-- these are the real heredoc contexts -->
|
||||
<context name="indented_heredoc" attribute="Here Document" lineEndContext="#stay" dynamic="true">
|
||||
<!-- <RegExpr attribute="Keyword" context="#pop#pop" String="^\s*%1$" dynamic="true" endRegion="HereDocument"/>-->
|
||||
<RegExpr attribute="Keyword" context="#pop#pop" String="%1$" dynamic="true" endRegion="HereDocument" firstNonSpace="true"/>
|
||||
<IncludeRules context="heredoc_rules" />
|
||||
</context>
|
||||
<context name="apostrophed_indented_heredoc" attribute="Here Document" lineEndContext="#stay" dynamic="true">
|
||||
<!-- <RegExpr attribute="Keyword" context="#pop#pop" String="^\s*%1$" dynamic="true" endRegion="HereDocument"/>-->
|
||||
<RegExpr attribute="Keyword" context="#pop#pop" String="%1$" dynamic="true" endRegion="HereDocument" firstNonSpace="true"/>
|
||||
</context>
|
||||
|
||||
<context name="normal_heredoc" attribute="Here Document" lineEndContext="#stay" dynamic="true">
|
||||
<!-- <RegExpr attribute="Keyword" context="#pop#pop" String="^%1$" dynamic="true" endRegion="HereDocument"/>-->
|
||||
<RegExpr attribute="Keyword" context="#pop#pop" String="%1$" dynamic="true" endRegion="HereDocument" column="0"/>
|
||||
<IncludeRules context="heredoc_rules" />
|
||||
</context>
|
||||
<context name="apostrophed_normal_heredoc" attribute="Here Document" lineEndContext="#stay" dynamic="true">
|
||||
<!-- <RegExpr attribute="Keyword" context="#pop#pop" String="^%1$" dynamic="true" endRegion="HereDocument"/>-->
|
||||
<RegExpr attribute="Keyword" context="#pop#pop" String="%1$" dynamic="true" endRegion="HereDocument" column="0"/>
|
||||
</context>
|
||||
|
||||
<!-- rules for heredoc types -->
|
||||
<context name="heredoc_rules" attribute="Normal Text" lineEndContext="#stay">
|
||||
<RegExpr attribute="Substitution" String="#@{1,2}" context="Short Subst"/>
|
||||
<Detect2Chars attribute="Substitution" char="#" char1="{" context="Subst"/>
|
||||
</context>
|
||||
|
||||
<!-- General delimited input support
|
||||
The contexts below handle the various gdl formats
|
||||
-->
|
||||
<context name="find_gdl_input" attribute="Normal Text" lineEndContext="#pop">
|
||||
|
||||
<!-- handle token arrays -->
|
||||
<RegExpr attribute="GDL input" context="gdl_token_array_1" String="w\(" />
|
||||
<RegExpr attribute="GDL input" context="gdl_token_array_2" String="w\{" />
|
||||
<RegExpr attribute="GDL input" context="gdl_token_array_3" String="w\[" />
|
||||
<RegExpr attribute="GDL input" context="gdl_token_array_4" String="w<" />
|
||||
<!-- then we handle the 'any char' format -->
|
||||
<RegExpr attribute="GDL input" context="gdl_token_array_5" String="w([^\s\w])" />
|
||||
|
||||
<!-- handle apostrophed strings -->
|
||||
<RegExpr attribute="GDL input" context="gdl_apostrophed_1" String="q\(" />
|
||||
<RegExpr attribute="GDL input" context="gdl_apostrophed_2" String="q\{" />
|
||||
<RegExpr attribute="GDL input" context="gdl_apostrophed_3" String="q\[" />
|
||||
<RegExpr attribute="GDL input" context="gdl_apostrophed_4" String="q<" />
|
||||
<!-- then we handle the 'any char' format -->
|
||||
<RegExpr attribute="GDL input" context="gdl_apostrophed_5" String="q([^\s\w])" />
|
||||
|
||||
<!-- handle shell commands -->
|
||||
<RegExpr attribute="GDL input" context="gdl_shell_command_1" String="x\(" />
|
||||
<RegExpr attribute="GDL input" context="gdl_shell_command_2" String="x\{" />
|
||||
<RegExpr attribute="GDL input" context="gdl_shell_command_3" String="x\[" />
|
||||
<RegExpr attribute="GDL input" context="gdl_shell_command_4" String="x<" />
|
||||
<!-- then we handle the 'any char' format -->
|
||||
<RegExpr attribute="GDL input" context="gdl_shell_command_5" String="x([^\s\w])" />
|
||||
|
||||
<!-- handle regular expressions -->
|
||||
<RegExpr attribute="GDL input" context="gdl_regexpr_1" String="r\(" />
|
||||
<RegExpr attribute="GDL input" context="gdl_regexpr_2" String="r\{" />
|
||||
<RegExpr attribute="GDL input" context="gdl_regexpr_3" String="r\[" />
|
||||
<RegExpr attribute="GDL input" context="gdl_regexpr_4" String="r<" />
|
||||
<!-- then we handle the 'any char' format -->
|
||||
<RegExpr attribute="GDL input" context="gdl_regexpr_5" String="r([^\s\w])" />
|
||||
|
||||
<!-- handle double-quoted strings -->
|
||||
<!--
|
||||
be careful to make this the last GDL ruleset, because the rule for
|
||||
the short form %?foo? will otherwise catch any of the other formats
|
||||
-->
|
||||
<RegExpr attribute="GDL input" context="gdl_dq_string_1" String="Q?\(" />
|
||||
<RegExpr attribute="GDL input" context="gdl_dq_string_2" String="Q?\{" />
|
||||
<RegExpr attribute="GDL input" context="gdl_dq_string_3" String="Q?\[" />
|
||||
<RegExpr attribute="GDL input" context="gdl_dq_string_4" String="Q?<" />
|
||||
<!-- then we handle the 'any char' format -->
|
||||
<RegExpr attribute="GDL input" context="gdl_dq_string_5" String="Q?([^\s\w])" />
|
||||
|
||||
</context>
|
||||
<!-- double-quoted string specific contexts follow -->
|
||||
<context name="gdl_dq_string_1" attribute="String" lineEndContext="#stay" >
|
||||
<IncludeRules context="dq_string_rules" />
|
||||
<Detect2Chars attribute="String" char="\" char1=")" context="#stay"/>
|
||||
<DetectChar attribute="String" context="gdl_dq_string_1_nested" char="(" />
|
||||
<DetectChar attribute="GDL input" context="#pop#pop" char=")" endRegion="GdlInput" />
|
||||
</context>
|
||||
<context name="gdl_dq_string_1_nested" attribute="String" lineEndContext="#stay" >
|
||||
<IncludeRules context="dq_string_rules" />
|
||||
<DetectChar attribute="String" context="gdl_dq_string_1_nested" char="(" />
|
||||
<DetectChar attribute="String" context="#pop" char=")" />
|
||||
</context>
|
||||
<!-- note that here substitution should win over nesting -->
|
||||
<context name="gdl_dq_string_2" attribute="String" lineEndContext="#stay" >
|
||||
<IncludeRules context="dq_string_rules" />
|
||||
<Detect2Chars attribute="String" char="\" char1="}" context="#stay"/>
|
||||
<DetectChar attribute="GDL input" context="#pop#pop" char="}" endRegion="GdlInput" />
|
||||
<DetectChar attribute="String" context="gdl_dq_string_2_nested" char="{" />
|
||||
</context>
|
||||
<context name="gdl_dq_string_2_nested" attribute="String" lineEndContext="#stay" >
|
||||
<DetectChar attribute="String" context="gdl_dq_string_2_nested" char="{" />
|
||||
<DetectChar attribute="String" context="#pop" char="}" />
|
||||
<IncludeRules context="dq_string_rules" />
|
||||
</context>
|
||||
|
||||
<context name="gdl_dq_string_3" attribute="String" lineEndContext="#stay" >
|
||||
<IncludeRules context="dq_string_rules" />
|
||||
<Detect2Chars attribute="String" char="\" char1="]" context="#stay"/>
|
||||
<DetectChar attribute="String" context="gdl_dq_string_3_nested" char="[" />
|
||||
<DetectChar attribute="GDL input" context="#pop#pop" char="]" endRegion="GdlInput" />
|
||||
</context>
|
||||
<context name="gdl_dq_string_3_nested" attribute="String" lineEndContext="#stay" >
|
||||
<DetectChar attribute="String" context="gdl_dq_string_3_nested" char="[" />
|
||||
<DetectChar attribute="String" context="#pop" char="]" />
|
||||
<IncludeRules context="dq_string_rules" />
|
||||
</context>
|
||||
|
||||
<context name="gdl_dq_string_4" attribute="String" lineEndContext="#stay" >
|
||||
<IncludeRules context="dq_string_rules" />
|
||||
<Detect2Chars attribute="String" char="\" char1=">" context="#stay"/>
|
||||
<DetectChar attribute="String" context="gdl_dq_string_4_nested" char="<" />
|
||||
<DetectChar attribute="GDL input" context="#pop#pop" char=">" endRegion="GdlInput" />
|
||||
</context>
|
||||
<context name="gdl_dq_string_4_nested" attribute="String" lineEndContext="#stay" >
|
||||
<DetectChar attribute="String" context="gdl_dq_string_4_nested" char="<" />
|
||||
<DetectChar attribute="String" context="#pop" char=">" />
|
||||
<IncludeRules context="dq_string_rules" />
|
||||
</context>
|
||||
|
||||
<!-- this format doesn't allow nesting. it is terminated by the next occurence of the
|
||||
delimiter character
|
||||
-->
|
||||
<context name="gdl_dq_string_5" attribute="String" lineEndContext="#stay" dynamic="true">
|
||||
<IncludeRules context="dq_string_rules" />
|
||||
<RegExpr attribute="String" String="\\%1" context="#stay" dynamic="true" />
|
||||
<RegExpr attribute="GDL input" context="#pop#pop" String="\s*%1" dynamic="true" endRegion="GdlInput" />
|
||||
</context>
|
||||
<!-- rules to be included in all dq_string contexts -->
|
||||
<context name="dq_string_rules" attribute="String" lineEndContext="#stay" >
|
||||
<Detect2Chars attribute="String" char="\" char1="\" context="#stay"/>
|
||||
<RegExpr attribute="Substitution" String="#@{1,2}" context="Short Subst"/>
|
||||
<Detect2Chars attribute="Substitution" char="#" char1="{" context="Subst"/>
|
||||
</context>
|
||||
|
||||
<!-- token array specific contexts -->
|
||||
|
||||
<context name="gdl_token_array_1" attribute="String" lineEndContext="#stay" >
|
||||
<IncludeRules context="token_array_rules" />
|
||||
<Detect2Chars attribute="String" char="\" char1=")" context="#stay"/>
|
||||
<DetectChar attribute="String" context="gdl_token_array_1_nested" char="(" />
|
||||
<DetectChar attribute="GDL input" context="#pop#pop" char=")" endRegion="GdlInput" />
|
||||
</context>
|
||||
<context name="gdl_token_array_1_nested" attribute="String" lineEndContext="#stay" >
|
||||
<IncludeRules context="token_array_rules" />
|
||||
<DetectChar attribute="String" context="gdl_token_array_1_nested" char="(" />
|
||||
<DetectChar attribute="String" context="#pop" char=")" />
|
||||
</context>
|
||||
|
||||
<context name="gdl_token_array_2" attribute="String" lineEndContext="#stay" >
|
||||
<IncludeRules context="token_array_rules" />
|
||||
<Detect2Chars attribute="String" char="\" char1="}" context="#stay"/>
|
||||
<DetectChar attribute="GDL input" context="#pop#pop" char="}" endRegion="GdlInput" />
|
||||
<DetectChar attribute="String" context="gdl_token_array_2_nested" char="{" />
|
||||
</context>
|
||||
<context name="gdl_token_array_2_nested" attribute="String" lineEndContext="#stay" >
|
||||
<IncludeRules context="token_array_rules" />
|
||||
<DetectChar attribute="String" context="gdl_token_array_2_nested" char="{" />
|
||||
<DetectChar attribute="String" context="#pop" char="}" />
|
||||
</context>
|
||||
|
||||
<context name="gdl_token_array_3" attribute="String" lineEndContext="#stay" >
|
||||
<IncludeRules context="token_array_rules" />
|
||||
<Detect2Chars attribute="String" char="\" char1="]" context="#stay"/>
|
||||
<DetectChar attribute="String" context="gdl_token_array_3_nested" char="[" />
|
||||
<DetectChar attribute="GDL input" context="#pop#pop" char="]" endRegion="GdlInput" />
|
||||
</context>
|
||||
<context name="gdl_token_array_3_nested" attribute="String" lineEndContext="#stay" >
|
||||
<IncludeRules context="token_array_rules" />
|
||||
<DetectChar attribute="String" context="gdl_token_array_3_nested" char="[" />
|
||||
<DetectChar attribute="String" context="#pop" char="]" />
|
||||
</context>
|
||||
|
||||
<context name="gdl_token_array_4" attribute="String" lineEndContext="#stay" >
|
||||
<IncludeRules context="token_array_rules" />
|
||||
<Detect2Chars attribute="String" char="\" char1=">" context="#stay"/>
|
||||
<DetectChar attribute="String" context="gdl_token_array_4_nested" char="<" />
|
||||
<DetectChar attribute="GDL input" context="#pop#pop" char=">" endRegion="GdlInput" />
|
||||
</context>
|
||||
<context name="gdl_token_array_4_nested" attribute="String" lineEndContext="#stay" >
|
||||
<IncludeRules context="token_array_rules" />
|
||||
<DetectChar attribute="String" context="gdl_token_array_4_nested" char="<" />
|
||||
<DetectChar attribute="String" context="#pop" char=">" />
|
||||
</context>
|
||||
|
||||
<!-- this format doesn't allow nesting. it is terminated by the next occurence of the
|
||||
delimiter character
|
||||
-->
|
||||
<context name="gdl_token_array_5" attribute="String" lineEndContext="#stay" dynamic="true">
|
||||
<IncludeRules context="token_array_rules" />
|
||||
<RegExpr attribute="String" String="\\%1" context="#stay" dynamic="true"/>
|
||||
<RegExpr attribute="GDL input" context="#pop#pop" String="\s*%1" dynamic="true" endRegion="GdlInput" />
|
||||
</context>
|
||||
|
||||
<!-- rules to be included in all token_array contexts -->
|
||||
<context name="token_array_rules" attribute="String" lineEndContext="#stay" >
|
||||
<StringDetect attribute="String" String="\\" context="#stay"/>
|
||||
</context>
|
||||
|
||||
<!-- apostrophed string specific contexts -->
|
||||
|
||||
<context name="gdl_apostrophed_1" attribute="Raw String" lineEndContext="#stay" >
|
||||
<IncludeRules context="apostrophed_rules" />
|
||||
<Detect2Chars attribute="Raw String" char="\" char1=")" context="#stay"/>
|
||||
<DetectChar attribute="Raw String" context="gdl_apostrophed_1_nested" char="(" />
|
||||
<DetectChar attribute="GDL input" context="#pop#pop" char=")" endRegion="GdlInput" />
|
||||
</context>
|
||||
<context name="gdl_apostrophed_1_nested" attribute="Raw String" lineEndContext="#stay" >
|
||||
<IncludeRules context="apostrophed_rules" />
|
||||
<DetectChar attribute="Raw String" context="gdl_apostrophed_1_nested" char="(" />
|
||||
<DetectChar attribute="Raw String" context="#pop" char=")" />
|
||||
</context>
|
||||
|
||||
<context name="gdl_apostrophed_2" attribute="Raw String" lineEndContext="#stay" >
|
||||
<IncludeRules context="apostrophed_rules" />
|
||||
<Detect2Chars attribute="Raw String" char="\" char1="}" context="#stay"/>
|
||||
<DetectChar attribute="GDL input" context="#pop#pop" char="}" endRegion="GdlInput" />
|
||||
<DetectChar attribute="Raw String" context="gdl_apostrophed_2_nested" char="{" />
|
||||
</context>
|
||||
<context name="gdl_apostrophed_2_nested" attribute="Raw String" lineEndContext="#stay" >
|
||||
<IncludeRules context="apostrophed_rules" />
|
||||
<DetectChar attribute="Raw String" context="gdl_apostrophed_2_nested" char="{" />
|
||||
<DetectChar attribute="Raw String" context="#pop" char="}" />
|
||||
</context>
|
||||
|
||||
<context name="gdl_apostrophed_3" attribute="Raw String" lineEndContext="#stay" >
|
||||
<IncludeRules context="apostrophed_rules" />
|
||||
<Detect2Chars attribute="Raw String" char="\" char1="]" context="#stay"/>
|
||||
<DetectChar attribute="Raw String" context="gdl_apostrophed_3_nested" char="[" />
|
||||
<DetectChar attribute="GDL input" context="#pop#pop" char="]" endRegion="GdlInput" />
|
||||
</context>
|
||||
<context name="gdl_apostrophed_3_nested" attribute="Raw String" lineEndContext="#stay" >
|
||||
<IncludeRules context="apostrophed_rules" />
|
||||
<DetectChar attribute="Raw String" context="gdl_apostrophed_3_nested" char="[" />
|
||||
<DetectChar attribute="Raw String" context="#pop" char="]" />
|
||||
</context>
|
||||
|
||||
<context name="gdl_apostrophed_4" attribute="Raw String" lineEndContext="#stay" >
|
||||
<IncludeRules context="apostrophed_rules" />
|
||||
<Detect2Chars attribute="Raw String" char="\" char1=">" context="#stay"/>
|
||||
<DetectChar attribute="Raw String" context="gdl_apostrophed_4_nested" char="<" />
|
||||
<DetectChar attribute="GDL input" context="#pop#pop" char=">" endRegion="GdlInput" />
|
||||
</context>
|
||||
<context name="gdl_apostrophed_4_nested" attribute="Raw String" lineEndContext="#stay" >
|
||||
<IncludeRules context="apostrophed_rules" />
|
||||
<DetectChar attribute="Raw String" context="gdl_apostrophed_4_nested" char="<" />
|
||||
<DetectChar attribute="Raw String" context="#pop" char=">" />
|
||||
</context>
|
||||
|
||||
<!-- this format doesn't allow nesting. it is terminated by the next occurence of the
|
||||
delimiter character
|
||||
-->
|
||||
<context name="gdl_apostrophed_5" attribute="Raw String" lineEndContext="#stay" dynamic="true">
|
||||
<IncludeRules context="apostrophed_rules" />
|
||||
<RegExpr attribute="Raw String" String="\\%1" context="#stay" dynamic="true"/>
|
||||
<RegExpr attribute="GDL input" context="#pop#pop" String="\s*%1" dynamic="true" endRegion="GdlInput" />
|
||||
</context>
|
||||
|
||||
<!-- rules to be included in all apostrophed contexts -->
|
||||
<context name="apostrophed_rules" attribute="Raw String" lineEndContext="#stay" >
|
||||
<Detect2Chars attribute="Raw String" char="\" char1="\" context="#stay"/>
|
||||
</context>
|
||||
|
||||
<!-- shell command specific contexts -->
|
||||
|
||||
<context name="gdl_shell_command_1" attribute="Command" lineEndContext="#stay" >
|
||||
<IncludeRules context="shell_command_rules" />
|
||||
<Detect2Chars attribute="Command" char="\" char1=")" context="#stay"/>
|
||||
<DetectChar attribute="Command" context="gdl_shell_command_1_nested" char="(" />
|
||||
<DetectChar attribute="GDL input" context="#pop#pop" char=")" endRegion="GdlInput" />
|
||||
</context>
|
||||
<context name="gdl_shell_command_1_nested" attribute="Command" lineEndContext="#stay" >
|
||||
<IncludeRules context="shell_command_rules" />
|
||||
<DetectChar attribute="Command" context="gdl_shell_command_1_nested" char="(" />
|
||||
<DetectChar attribute="Command" context="#pop" char=")" />
|
||||
</context>
|
||||
|
||||
<context name="gdl_shell_command_2" attribute="Command" lineEndContext="#stay" >
|
||||
<IncludeRules context="shell_command_rules" />
|
||||
<Detect2Chars attribute="Command" char="\" char1="}" context="#stay"/>
|
||||
<DetectChar attribute="GDL input" context="#pop#pop" char="}" endRegion="GdlInput" />
|
||||
<DetectChar attribute="Command" context="gdl_shell_command_2_nested" char="{" />
|
||||
</context>
|
||||
<context name="gdl_shell_command_2_nested" attribute="Command" lineEndContext="#stay" >
|
||||
<IncludeRules context="shell_command_rules" />
|
||||
<DetectChar attribute="Command" context="gdl_shell_command_2_nested" char="{" />
|
||||
<DetectChar attribute="Command" context="#pop" char="}" />
|
||||
</context>
|
||||
|
||||
<context name="gdl_shell_command_3" attribute="Command" lineEndContext="#stay" >
|
||||
<IncludeRules context="shell_command_rules" />
|
||||
<Detect2Chars attribute="Command" char="\" char1="]" context="#stay"/>
|
||||
<DetectChar attribute="Command" context="gdl_shell_command_3_nested" char="[" />
|
||||
<DetectChar attribute="GDL input" context="#pop#pop" char="]" endRegion="GdlInput" />
|
||||
</context>
|
||||
<context name="gdl_shell_command_3_nested" attribute="Command" lineEndContext="#stay" >
|
||||
<IncludeRules context="shell_command_rules" />
|
||||
<DetectChar attribute="Command" context="gdl_shell_command_3_nested" char="[" />
|
||||
<DetectChar attribute="Command" context="#pop" char="]" />
|
||||
</context>
|
||||
|
||||
<context name="gdl_shell_command_4" attribute="Command" lineEndContext="#stay" >
|
||||
<IncludeRules context="shell_command_rules" />
|
||||
<Detect2Chars attribute="Command" char="\" char1=">" context="#stay"/>
|
||||
<DetectChar attribute="Command" context="gdl_shell_command_4_nested" char="<" />
|
||||
<DetectChar attribute="GDL input" context="#pop#pop" char=">" endRegion="GdlInput" />
|
||||
</context>
|
||||
<context name="gdl_shell_command_4_nested" attribute="Command" lineEndContext="#stay" >
|
||||
<IncludeRules context="shell_command_rules" />
|
||||
<DetectChar attribute="Command" context="gdl_shell_command_4_nested" char="<" />
|
||||
<DetectChar attribute="Command" context="#pop" char=">" />
|
||||
</context>
|
||||
|
||||
<!-- this format doesn't allow nesting. it is terminated by the next occurence of the
|
||||
delimiter character
|
||||
-->
|
||||
<context name="gdl_shell_command_5" attribute="Command" lineEndContext="#stay" dynamic="true">
|
||||
<IncludeRules context="shell_command_rules" />
|
||||
<RegExpr attribute="Command" String="\\%1" context="#stay" dynamic="true" />
|
||||
<RegExpr attribute="GDL input" context="#pop#pop" String="\s*%1" dynamic="true" endRegion="GdlInput" />
|
||||
</context>
|
||||
|
||||
<!-- rules to be included in all shell_command contexts -->
|
||||
<context name="shell_command_rules" attribute="Command" lineEndContext="#stay" >
|
||||
<Detect2Chars attribute="Command" char="\" char1="\" context="#stay"/>
|
||||
<RegExpr attribute="Substitution" String="#@{1,2}" context="Short Subst"/>
|
||||
<Detect2Chars attribute="Substitution" char="#" char1="{" context="Subst"/>
|
||||
</context>
|
||||
|
||||
<!-- regular expression specific contexts -->
|
||||
|
||||
<context name="gdl_regexpr_1" attribute="Regular Expression" lineEndContext="#stay" >
|
||||
<IncludeRules context="regexpr_rules" />
|
||||
<Detect2Chars attribute="Regular Expression" char="\" char1=")" context="#stay"/>
|
||||
<DetectChar attribute="Regular Expression" context="gdl_regexpr_1_nested" char="(" />
|
||||
<RegExpr attribute="GDL input" context="#pop#pop" String="\)[uiomxn]*" endRegion="GdlInput" />
|
||||
</context>
|
||||
<context name="gdl_regexpr_1_nested" attribute="Regular Expression" lineEndContext="#stay" >
|
||||
<IncludeRules context="regexpr_rules" />
|
||||
<DetectChar attribute="Regular Expression" context="gdl_regexpr_1_nested" char="(" />
|
||||
<DetectChar attribute="Regular Expression" context="#pop" char=")" />
|
||||
</context>
|
||||
|
||||
<context name="gdl_regexpr_2" attribute="Regular Expression" lineEndContext="#stay" >
|
||||
<IncludeRules context="regexpr_rules" />
|
||||
<Detect2Chars attribute="Regular Expression" char="\" char1="}" context="#stay"/>
|
||||
<RegExpr attribute="GDL input" context="#pop#pop" String="\}[uiomxn]*" endRegion="GdlInput" />
|
||||
<DetectChar attribute="Regular Expression" context="gdl_regexpr_2_nested" char="{" />
|
||||
</context>
|
||||
<context name="gdl_regexpr_2_nested" attribute="Regular Expression" lineEndContext="#stay" >
|
||||
<IncludeRules context="regexpr_rules" />
|
||||
<DetectChar attribute="Regular Expression" context="gdl_regexpr_2_nested" char="{" />
|
||||
<DetectChar attribute="Regular Expression" context="#pop" char="}" />
|
||||
</context>
|
||||
|
||||
<context name="gdl_regexpr_3" attribute="Regular Expression" lineEndContext="#stay" >
|
||||
<IncludeRules context="regexpr_rules" />
|
||||
<Detect2Chars attribute="Regular Expression" char="\" char1="]" context="#stay"/>
|
||||
<DetectChar attribute="Regular Expression" context="gdl_regexpr_3_nested" char="[" />
|
||||
<RegExpr attribute="GDL input" context="#pop#pop" String="\][uiomxn]*" endRegion="GdlInput" />
|
||||
</context>
|
||||
<context name="gdl_regexpr_3_nested" attribute="Regular Expression" lineEndContext="#stay" >
|
||||
<IncludeRules context="regexpr_rules" />
|
||||
<DetectChar attribute="Regular Expression" context="gdl_regexpr_3_nested" char="[" />
|
||||
<DetectChar attribute="Regular Expression" context="#pop" char="]" />
|
||||
</context>
|
||||
|
||||
<context name="gdl_regexpr_4" attribute="Regular Expression" lineEndContext="#stay" >
|
||||
<IncludeRules context="regexpr_rules" />
|
||||
<Detect2Chars attribute="Regular Expression" char="\" char1=">" context="#stay"/>
|
||||
<DetectChar attribute="Regular Expression" context="gdl_regexpr_4_nested" char="<" />
|
||||
<RegExpr attribute="GDL input" context="#pop#pop" String=">[uiomxn]*" endRegion="GdlInput" />
|
||||
</context>
|
||||
<context name="gdl_regexpr_4_nested" attribute="Regular Expression" lineEndContext="#stay" >
|
||||
<IncludeRules context="regexpr_rules" />
|
||||
<DetectChar attribute="Regular Expression" context="gdl_regexpr_4_nested" char="<" />
|
||||
<DetectChar attribute="Regular Expression" context="#pop" char=">" />
|
||||
</context>
|
||||
|
||||
<!-- this format doesn't allow nesting. it is terminated by the next occurence of the
|
||||
delimiter character
|
||||
-->
|
||||
<context name="gdl_regexpr_5" attribute="Regular Expression" lineEndContext="#stay" dynamic="true">
|
||||
<IncludeRules context="regexpr_rules" />
|
||||
<RegExpr attribute="Regular Expression" String="\\%1" context="#stay" dynamic="true" />
|
||||
<RegExpr attribute="GDL input" context="#pop#pop" String="\s*%1[uiomxn]*" dynamic="true" endRegion="GdlInput" />
|
||||
</context>
|
||||
|
||||
<!-- rules to be included in all regexpr contexts -->
|
||||
<context name="regexpr_rules" attribute="Regular Expression" lineEndContext="#stay" >
|
||||
<Detect2Chars attribute="Regular Expression" char="\" char1="\" context="#stay"/>
|
||||
<RegExpr attribute="Substitution" String="#@{1,2}" context="Short Subst"/>
|
||||
<Detect2Chars attribute="Substitution" char="#" char1="{" context="Subst"/>
|
||||
</context>
|
||||
|
||||
<!-- END of General delimited input support -->
|
||||
|
||||
<!-- handle data in script -->
|
||||
<context name="DATA" attribute="Data" lineEndContext="#stay"/>
|
||||
</contexts>
|
||||
|
||||
<itemDatas>
|
||||
<itemData name="Normal Text" defStyleNum="dsNormal"/>
|
||||
|
||||
<itemData name="Keyword" defStyleNum="dsKeyword"/>
|
||||
<itemData name="Attribute Definition" defStyleNum="dsOthers"/>
|
||||
<itemData name="Access Control" defStyleNum="dsKeyword" color="#0000FF"/>
|
||||
<itemData name="Definition" defStyleNum="dsKeyword"/>
|
||||
<itemData name="Pseudo variable" defStyleNum="dsDecVal"/>
|
||||
|
||||
<itemData name="Dec" defStyleNum="dsDecVal"/>
|
||||
<itemData name="Float" defStyleNum="dsFloat"/>
|
||||
<itemData name="Char" defStyleNum="dsChar"/>
|
||||
<itemData name="Octal" defStyleNum="dsBaseN"/>
|
||||
<itemData name="Hex" defStyleNum="dsBaseN"/>
|
||||
<itemData name="Bin" defStyleNum="dsBaseN"/>
|
||||
|
||||
<itemData name="Symbol" defStyleNum="dsString" color="#D40000"/>
|
||||
<itemData name="String" defStyleNum="dsString"/>
|
||||
<itemData name="Raw String" defStyleNum="dsString" color="#DD4A4A" selColor="#DD4A4A"/>
|
||||
<itemData name="Command" defStyleNum="dsString" color="#AA3000"/>
|
||||
<itemData name="Message" defStyleNum="dsNormal" color="#4000A7"/> <!-- #4A00C0 -->
|
||||
<itemData name="Regular Expression" defStyleNum="dsOthers" color="#4A5704"/>
|
||||
<itemData name="Substitution" defStyleNum="dsOthers"/>
|
||||
<itemData name="Data" defStyleNum="dsNormal"/>
|
||||
<!-- short for 'general delimited input' -->
|
||||
<itemData name="GDL input" defStyleNum="dsOthers" />
|
||||
|
||||
<itemData name="Default globals" defStyleNum="dsDataType" color="#C00000" bold="1"/>
|
||||
<itemData name="Global Variable" defStyleNum="dsDataType" color="#C00000"/>
|
||||
<itemData name="Global Constant" defStyleNum="dsDataType" color="#bb1188" bold="1"/>
|
||||
<itemData name="Constant" defStyleNum="dsDataType"/>
|
||||
<itemData name="Constant Value" defStyleNum="dsDataType" color="#bb1188"/>
|
||||
<itemData name="Kernel methods" defStyleNum="dsNormal" color="#000080" selColor="#ffffff"/> <!-- #CC0E86 -->
|
||||
<itemData name="Member" defStyleNum="dsNormal"/>
|
||||
<itemData name="Instance Variable" defStyleNum="dsOthers"/>
|
||||
<itemData name="Class Variable" defStyleNum="dsOthers"/>
|
||||
|
||||
<itemData name="Comment" defStyleNum="dsComment"/>
|
||||
<itemData name="Blockcomment" defStyleNum="dsComment"/>
|
||||
<itemData name="Region Marker" defStyleNum="dsNormal" color="#0000ff"/>
|
||||
<itemData name="RDoc Value" defStyleNum="dsOthers"/>
|
||||
|
||||
<itemData name="Here Document" defStyleNum="dsOthers"/>
|
||||
|
||||
<!-- use these to mark errors and alerts things -->
|
||||
<itemData name="Error" defStyleNum="dsError" />
|
||||
<itemData name="Alert" defStyleNum="dsAlert" />
|
||||
|
||||
<itemData name="Delimiter" defStyleNum="dsNormal" color="#FF9FEC"/>
|
||||
<itemData name="Expression" defStyleNum="dsOthers"/>
|
||||
<itemData name="Operator" defStyleNum="dsNormal" color="#FF9FEC"/>
|
||||
</itemDatas>
|
||||
</highlighting>
|
||||
<general>
|
||||
<comments>
|
||||
<comment name="singleLine" start="#"/>
|
||||
</comments>
|
||||
<keywords casesensitive="1" weakDeliminator="!?"/>
|
||||
</general>
|
||||
</language>
|
||||
147
share/qtcreator/generic-highlighter/xml.xml
Normal file
147
share/qtcreator/generic-highlighter/xml.xml
Normal file
@@ -0,0 +1,147 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd"
|
||||
[
|
||||
<!ENTITY name "[A-Za-z_:][\w.:_-]*">
|
||||
<!ENTITY entref "&(#[0-9]+|#[xX][0-9A-Fa-f]+|&name;);">
|
||||
]>
|
||||
<language name="XML" version="1.97" kateversion="2.4" section="Markup" extensions="*.docbook;*.xml;*.rc;*.daml;*.rdf;*.rss;*.xspf" mimetype="text/xml;text/book;text/daml;text/rdf;application/rss+xml;application/xspf+xml" casesensitive="1" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL">
|
||||
|
||||
<highlighting>
|
||||
<contexts>
|
||||
<context name="Start" attribute="Normal Text" lineEndContext="#stay">
|
||||
<IncludeRules context="FindXML" />
|
||||
</context>
|
||||
|
||||
<context name="FindXML" attribute="Normal Text" lineEndContext="#stay">
|
||||
<DetectSpaces />
|
||||
<StringDetect attribute="Comment" context="Comment" String="<!--" beginRegion="comment" />
|
||||
<StringDetect attribute="CDATA" context="CDATA" String="<![CDATA[" beginRegion="cdata" />
|
||||
<RegExpr attribute="Doctype" context="Doctype" String="<!DOCTYPE\s+" beginRegion="doctype" />
|
||||
<RegExpr attribute="Processing Instruction" context="PI" String="<\?[\w:_-]*" beginRegion="pi" />
|
||||
<RegExpr attribute="Element" context="Element" String="<&name;" beginRegion="element" />
|
||||
<IncludeRules context="FindEntityRefs" />
|
||||
<DetectIdentifier />
|
||||
</context>
|
||||
|
||||
<context name="FindEntityRefs" attribute="Normal Text" lineEndContext="#stay">
|
||||
<RegExpr attribute="EntityRef" context="#stay" String="&entref;" />
|
||||
<AnyChar attribute="Error" context="#stay" String="&<" />
|
||||
</context>
|
||||
|
||||
<context name="FindPEntityRefs" attribute="Normal Text" lineEndContext="#stay">
|
||||
<RegExpr attribute="EntityRef" context="#stay" String="&entref;" />
|
||||
<RegExpr attribute="PEntityRef" context="#stay" String="%&name;;" />
|
||||
<AnyChar attribute="Error" context="#stay" String="&%" />
|
||||
</context>
|
||||
|
||||
|
||||
<context name="Comment" attribute="Comment" lineEndContext="#stay">
|
||||
<DetectSpaces />
|
||||
<StringDetect attribute="Comment" context="#pop" String="-->" endRegion="comment" />
|
||||
<RegExpr attribute="Error" context="#stay" String="-(-(?!->))+" />
|
||||
<IncludeRules context="##Alerts" />
|
||||
<DetectIdentifier />
|
||||
</context>
|
||||
|
||||
<context name="CDATA" attribute="Normal Text" lineEndContext="#stay">
|
||||
<DetectSpaces />
|
||||
<DetectIdentifier />
|
||||
<StringDetect attribute="CDATA" context="#pop" String="]]>" endRegion="cdata" />
|
||||
<StringDetect attribute="EntityRef" context="#stay" String="]]&gt;" />
|
||||
</context>
|
||||
|
||||
<context name="PI" attribute="Normal Text" lineEndContext="#stay">
|
||||
<Detect2Chars attribute="Processing Instruction" context="#pop" char="?" char1=">" endRegion="pi" />
|
||||
</context>
|
||||
|
||||
<context name="Doctype" attribute="Normal Text" lineEndContext="#stay">
|
||||
<DetectChar attribute="Doctype" context="#pop" char=">" endRegion="doctype" />
|
||||
<DetectChar attribute="Doctype" context="Doctype Internal Subset" char="[" beginRegion="int_subset" />
|
||||
</context>
|
||||
|
||||
<context name="Doctype Internal Subset" attribute="Normal Text" lineEndContext="#stay">
|
||||
<DetectChar attribute="Doctype" context="#pop" char="]" endRegion="int_subset" />
|
||||
<RegExpr attribute="Doctype" context="Doctype Markupdecl" String="<!(ELEMENT|ENTITY|ATTLIST|NOTATION)\b" />
|
||||
<StringDetect attribute="Comment" context="Comment" String="<!--" beginRegion="comment" />
|
||||
<RegExpr attribute="Processing Instruction" context="PI" String="<\?[\w:_-]*" beginRegion="pi" />
|
||||
<IncludeRules context="FindPEntityRefs" />
|
||||
</context>
|
||||
|
||||
<context name="Doctype Markupdecl" attribute="Normal Text" lineEndContext="#stay">
|
||||
<DetectChar attribute="Doctype" context="#pop" char=">" />
|
||||
<DetectChar attribute="Value" context="Doctype Markupdecl DQ" char=""" />
|
||||
<DetectChar attribute="Value" context="Doctype Markupdecl SQ" char="'" />
|
||||
</context>
|
||||
|
||||
<context name="Doctype Markupdecl DQ" attribute="Value" lineEndContext="#stay">
|
||||
<DetectChar attribute="Value" context="#pop" char=""" />
|
||||
<IncludeRules context="FindPEntityRefs" />
|
||||
</context>
|
||||
|
||||
<context name="Doctype Markupdecl SQ" attribute="Value" lineEndContext="#stay">
|
||||
<DetectChar attribute="Value" context="#pop" char="'" />
|
||||
<IncludeRules context="FindPEntityRefs" />
|
||||
</context>
|
||||
|
||||
<context name="Element" attribute="Normal Text" lineEndContext="#stay">
|
||||
<Detect2Chars attribute="Element" context="#pop" char="/" char1=">" endRegion="element" />
|
||||
<DetectChar attribute="Element" context="El Content" char=">" />
|
||||
<RegExpr attribute="Attribute" context="Attribute" String="^&name;" />
|
||||
<RegExpr attribute="Attribute" context="Attribute" String="\s+&name;" />
|
||||
<RegExpr attribute="Error" context="#stay" String="\S" />
|
||||
</context>
|
||||
|
||||
<context name="El Content" attribute="Normal Text" lineEndContext="#stay">
|
||||
<RegExpr attribute="Element" context="El End" String="</&name;" />
|
||||
<IncludeRules context="FindXML" />
|
||||
</context>
|
||||
|
||||
<context name="El End" attribute="Normal Text" lineEndContext="#stay">
|
||||
<DetectChar attribute="Element" context="#pop#pop#pop" char=">" endRegion="element" />
|
||||
<RegExpr attribute="Error" context="#stay" String="\S" />
|
||||
</context>
|
||||
|
||||
<context name="Attribute" attribute="Normal Text" lineEndContext="#stay">
|
||||
<DetectChar attribute="Attribute" context="Value" char="=" />
|
||||
<RegExpr attribute="Error" context="#stay" String="\S" />
|
||||
</context>
|
||||
|
||||
<context name="Value" attribute="Normal Text" lineEndContext="#stay">
|
||||
<DetectChar attribute="Value" context="Value DQ" char=""" />
|
||||
<DetectChar attribute="Value" context="Value SQ" char="'" />
|
||||
<RegExpr attribute="Error" context="#stay" String="\S" />
|
||||
</context>
|
||||
|
||||
<context name="Value DQ" attribute="Value" lineEndContext="#stay">
|
||||
<DetectChar attribute="Value" context="#pop#pop#pop" char=""" />
|
||||
<IncludeRules context="FindEntityRefs" />
|
||||
</context>
|
||||
|
||||
<context name="Value SQ" attribute="Value" lineEndContext="#stay">
|
||||
<DetectChar attribute="Value" context="#pop#pop#pop" char="'" />
|
||||
<IncludeRules context="FindEntityRefs" />
|
||||
</context>
|
||||
|
||||
</contexts>
|
||||
<itemDatas>
|
||||
<itemData name="Normal Text" defStyleNum="dsNormal" />
|
||||
<itemData name="Comment" defStyleNum="dsComment" />
|
||||
<itemData name="CDATA" defStyleNum="dsBaseN" bold="1" />
|
||||
<itemData name="Processing Instruction" defStyleNum="dsKeyword" />
|
||||
<itemData name="Doctype" defStyleNum="dsDataType" bold="1" />
|
||||
<itemData name="Element" defStyleNum="dsKeyword" />
|
||||
<itemData name="Attribute" defStyleNum="dsOthers" />
|
||||
<itemData name="Value" defStyleNum="dsString" color="#a00" />
|
||||
<itemData name="EntityRef" defStyleNum="dsDecVal" />
|
||||
<itemData name="PEntityRef" defStyleNum="dsDecVal" />
|
||||
<itemData name="Error" defStyleNum="dsError" />
|
||||
</itemDatas>
|
||||
|
||||
</highlighting>
|
||||
<general>
|
||||
<comments>
|
||||
<comment name="multiLine" start="<!--" end="-->" />
|
||||
</comments>
|
||||
<indentation mode="xml" />
|
||||
</general>
|
||||
</language>
|
||||
164
share/qtcreator/generic-highlighter/yacc.xml
Normal file
164
share/qtcreator/generic-highlighter/yacc.xml
Normal file
@@ -0,0 +1,164 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE language SYSTEM "language.dtd">
|
||||
<!--
|
||||
========================================================================
|
||||
YACC.XML supports syntax highlighting for Yacc/Bison source under Kate.
|
||||
|
||||
Copyright (C) 2004, Jan Villat <jan.villat@net2000.ch>
|
||||
This code is released under the LGPL as part of kdelibs/kate.
|
||||
========================================================================
|
||||
|
||||
|
||||
== UPDATE HISTORY ==
|
||||
2007-10-01 // Sebastian Pipping <webmaster@hartwork.org>
|
||||
|
||||
Added: Extension "*.yy" for Bison
|
||||
|
||||
2004-05-26 // Jan Villat <jan.villat@net2000.ch>
|
||||
|
||||
YACC.XML 1.00 - First released.
|
||||
|
||||
|
||||
== TODO ==
|
||||
- Add a mime type (cannot find it !?)
|
||||
|
||||
|
||||
========================================================================
|
||||
-->
|
||||
<language name="Yacc/Bison" version="1.03" kateversion="2.4" section="Sources" extensions="*.y;*.yy" author="Jan Villat (jan.villat@net2000.ch)" license="LGPL">
|
||||
|
||||
<highlighting>
|
||||
<contexts>
|
||||
<context name="Pre Start" attribute="Normal Text" lineEndContext="#stay">
|
||||
<IncludeRules context="Comment" />
|
||||
<DetectSpaces />
|
||||
<Detect2Chars attribute="Content-Type Delimiter" context="C Declarations" char="%" char1="{" beginRegion="cdeclarations" column="0" />
|
||||
<RegExpr attribute="Normal Text" context="Declarations" String="." beginRegion="declarations" lookAhead="true" />
|
||||
</context>
|
||||
|
||||
<context name="C Declarations" attribute="Normal Text" lineEndContext="#stay">
|
||||
<IncludeRules context="Comment" />
|
||||
<Detect2Chars attribute="Content-Type Delimiter" context="#pop" char="%" char1="}" endRegion="cdeclarations" column="0" />
|
||||
<IncludeRules context="##C++" />
|
||||
</context>
|
||||
|
||||
<context name="Declarations" attribute="Normal Text" lineEndContext="#stay">
|
||||
<IncludeRules context="Comment" />
|
||||
<StringDetect attribute="Directive" context="Union Start" String="%union" />
|
||||
<Detect2Chars attribute="Content-Type Delimiter" context="Rules" char="%" char1="%" beginRegion="rules" endRegion="declarations" />
|
||||
|
||||
<!-- not sure that strict yacc allows that ... but it is commonly used -->
|
||||
<Detect2Chars attribute="Content-Type Delimiter" context="C Declarations" char="%" char1="{" beginRegion="cdeclarations" column="0" />
|
||||
|
||||
<DetectChar attribute="Directive" context="Percent Command" char="%" />
|
||||
</context>
|
||||
|
||||
<context name="Union Start" attribute="Normal Text" lineEndContext="#stay">
|
||||
<IncludeRules context="Comment" />
|
||||
<DetectSpaces />
|
||||
<DetectChar attribute="Normal Text" context="Union In" char="{" beginRegion="union" />
|
||||
<RegExpr attribute="Alert" context="#pop" String="." />
|
||||
</context>
|
||||
<context name="Union In" attribute="Normal Text" lineEndContext="#stay">
|
||||
<DetectChar attribute="Normal Text" context="Union InIn" char="{" />
|
||||
<DetectChar attribute="Normal Text" context="#pop#pop" char="}" endRegion="union" />
|
||||
<IncludeRules context="##C++" />
|
||||
</context>
|
||||
<context name="Union InIn" attribute="Normal Text" lineEndContext="#stay">
|
||||
<DetectChar attribute="Normal Text" context="Union InIn" char="{" />
|
||||
<DetectChar attribute="Normal Text" context="#pop" char="}" />
|
||||
<IncludeRules context="##C++" />
|
||||
</context>
|
||||
|
||||
<context name="Rules" attribute="Rule" lineEndContext="#stay">
|
||||
<IncludeRules context="Comment" />
|
||||
<Detect2Chars attribute="Content-Type Delimiter" context="User Code" char="%" char1="%" beginRegion="code" endRegion="rules" />
|
||||
<DetectChar attribute="Normal Text" context="Rule In" char=":" beginRegion="rule" />
|
||||
</context>
|
||||
|
||||
<context name="Rule In" attribute="Definition" lineEndContext="#stay">
|
||||
<IncludeRules context="Comment" />
|
||||
<DetectChar attribute="Normal Text" context="#pop" char=";" endRegion="rule" />
|
||||
<DetectChar attribute="Normal Text" context="Normal C Bloc" char="{" beginRegion="bloc" />
|
||||
<DetectChar attribute="Normal Text" context="#stay" char="|" />
|
||||
<IncludeRules context="StringOrChar" />
|
||||
</context>
|
||||
|
||||
<context name="User Code" attribute="Normal Text" lineEndContext="#stay">
|
||||
<IncludeRules context="##C++" />
|
||||
</context>
|
||||
|
||||
<context name="Percent Command" attribute="Directive" lineEndContext="#pop">
|
||||
<IncludeRules context="Comment" />
|
||||
<RegExpr attribute="Normal Text" context="Percent Command In" String="\W" lookAhead="true" />
|
||||
</context>
|
||||
<context name="Percent Command In" attribute="NormalText" lineEndContext="#pop#pop">
|
||||
<IncludeRules context="StringOrChar" />
|
||||
<DetectChar attribute="Data Type" context="PC type" char="<" />
|
||||
</context>
|
||||
<context name="PC type" attribute="Data Type" lineEndContext="#pop#pop#pop">
|
||||
<DetectChar attribute="Data Type" context="#pop" char=">" />
|
||||
</context>
|
||||
|
||||
<context name="Comment" attribute="Comment">
|
||||
<Detect2Chars attribute="Comment" context="CommentStar" char="/" char1="*" />
|
||||
<!-- not sure that strict yacc allows that ... but I saw it in some sources ... -->
|
||||
<Detect2Chars attribute="Comment" context="CommentSlash" char="/" char1="/" />
|
||||
</context>
|
||||
<context name="CommentStar" attribute="Comment" lineEndContext="#stay">
|
||||
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" />
|
||||
</context>
|
||||
<context name="CommentSlash" attribute="Comment" lineEndContext="#stay">
|
||||
<RegExpr attribute="Comment" context="#pop" String="[^\\]$" />
|
||||
</context>
|
||||
|
||||
<context name="StringOrChar" attribute="NormalText">
|
||||
<DetectChar attribute="String Char" context="Char" char="'" />
|
||||
<DetectChar attribute="String" context="String" char=""" />
|
||||
</context>
|
||||
<context name="String" attribute="String" lineEndContext="#pop">
|
||||
<RegExpr attribute="Backslash Code" context="#stay" String="\\." />
|
||||
<DetectChar attribute="String" context="#pop" char=""" />
|
||||
</context>
|
||||
<context name="Char" attribute="String Char" lineEndContext="#pop">
|
||||
<RegExpr attribute="Backslash Code" context="#stay" String="\\." />
|
||||
<DetectChar attribute="String Char" context="#pop" char="'" />
|
||||
</context>
|
||||
|
||||
<context name="Normal C Bloc" attribute="Normal Text" lineEndContext="#stay">
|
||||
<DetectChar attribute="Normal Text" context="Normal C Bloc" char="{" beginRegion="bloc" />
|
||||
<DetectChar attribute="Normal Text" context="#pop" char="}" endRegion="bloc" />
|
||||
<IncludeRules context="##C++" />
|
||||
<DetectChar attribute="Directive" context="Dol" char="$" />
|
||||
</context>
|
||||
<context name="Dol" attribute="Normal Text" fallthrough="true" fallthroughContext="DolEnd">
|
||||
<RegExpr attribute="Data Type" context="DolEnd" String="<[^>]+>" />
|
||||
</context>
|
||||
<context name="DolEnd" attribute="Normal Text">
|
||||
<RegExpr attribute="Directive" context="#pop#pop" String="\d+" />
|
||||
<DetectChar attribute="Directive" context="#pop#pop" char="$" />
|
||||
</context>
|
||||
</contexts>
|
||||
|
||||
<itemDatas>
|
||||
<itemData name="Normal Text" defStyleNum="dsNormal" />
|
||||
<itemData name="Definition" defStyleNum="dsNormal" />
|
||||
<itemData name="Comment" defStyleNum="dsComment" />
|
||||
<itemData name="Content-Type Delimiter" defStyleNum="dsBaseN" bold="1" />
|
||||
<itemData name="Directive" defStyleNum="dsKeyword"/>
|
||||
<itemData name="Rule" defStyleNum="dsString" />
|
||||
<itemData name="Backslash Code" defStyleNum="dsString" bold="1" />
|
||||
<itemData name="Alert" defStyleNum="dsAlert" />
|
||||
<itemData name="String" defStyleNum="dsString"/>
|
||||
<itemData name="String Char" defStyleNum="dsChar"/>
|
||||
<itemData name="Data Type" defStyleNum="dsDataType"/>
|
||||
</itemDatas>
|
||||
|
||||
</highlighting>
|
||||
<general>
|
||||
<comments>
|
||||
<comment name="multiLine" start="/*" end="*/" />
|
||||
</comments>
|
||||
</general>
|
||||
</language>
|
||||
<!-- kate: space-indent on; indent-width 2; replace-tabs on; -->
|
||||
@@ -79,8 +79,10 @@ QDeclarativeViewObserver::QDeclarativeViewObserver(QDeclarativeView *view, QObje
|
||||
data->subcomponentEditorTool = new SubcomponentEditorTool(this);
|
||||
data->currentTool = data->selectionTool;
|
||||
|
||||
data->view->setMouseTracking(true);
|
||||
data->view->viewport()->installEventFilter(this);
|
||||
// to capture ChildRemoved event when viewport changes
|
||||
data->view->installEventFilter(this);
|
||||
|
||||
data->setViewport(data->view->viewport());
|
||||
|
||||
data->debugService = QDeclarativeObserverService::instance();
|
||||
connect(data->debugService, SIGNAL(designModeBehaviorChanged(bool)), SLOT(setDesignModeBehavior(bool)));
|
||||
@@ -138,6 +140,22 @@ void QDeclarativeViewObserverPrivate::_q_reloadView()
|
||||
emit q->reloadRequested();
|
||||
}
|
||||
|
||||
void QDeclarativeViewObserverPrivate::setViewport(QWidget *widget)
|
||||
{
|
||||
if (viewport.data() == widget)
|
||||
return;
|
||||
|
||||
if (viewport) {
|
||||
viewport->removeEventFilter(q);
|
||||
}
|
||||
viewport = widget;
|
||||
if (viewport) {
|
||||
// make sure we get mouse move events
|
||||
viewport->setMouseTracking(true);
|
||||
viewport->installEventFilter(q);
|
||||
}
|
||||
}
|
||||
|
||||
void QDeclarativeViewObserverPrivate::clearEditorItems()
|
||||
{
|
||||
clearHighlight();
|
||||
@@ -146,6 +164,17 @@ void QDeclarativeViewObserverPrivate::clearEditorItems()
|
||||
|
||||
bool QDeclarativeViewObserver::eventFilter(QObject *obj, QEvent *event)
|
||||
{
|
||||
if (obj == data->view) {
|
||||
// Event from view
|
||||
if (event->type() == QEvent::ChildRemoved) {
|
||||
// Might mean that viewport has changed
|
||||
if (data->view->viewport() != data->viewport.data())
|
||||
data->setViewport(data->view->viewport());
|
||||
}
|
||||
return QObject::eventFilter(obj, event);
|
||||
}
|
||||
|
||||
//Event from viewport
|
||||
switch (event->type()) {
|
||||
case QEvent::Leave: {
|
||||
if (leaveEvent(event))
|
||||
|
||||
@@ -66,6 +66,7 @@ public:
|
||||
QDeclarativeView *view;
|
||||
QDeclarativeViewObserver *q;
|
||||
QDeclarativeObserverService *debugService;
|
||||
QWeakPointer<QWidget> viewport;
|
||||
|
||||
QPointF cursorPos;
|
||||
QList<QWeakPointer<QGraphicsObject> > currentSelection;
|
||||
@@ -88,6 +89,8 @@ public:
|
||||
|
||||
QmlToolbar *toolbar;
|
||||
|
||||
void setViewport(QWidget *widget);
|
||||
|
||||
void clearEditorItems();
|
||||
void createToolbar();
|
||||
void changeToSelectTool();
|
||||
|
||||
@@ -4157,6 +4157,11 @@ Qt Creator не может подключиться к нему.</translation>
|
||||
<extracomment>Arguments: New value, name, (type): Error</extracomment>
|
||||
<translation>Невозможно присвоить "%2" значение "%1" (%3): %4</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The CDB debug engine does not support the %1 toolchain.</source>
|
||||
<extracomment>%1 is something like "GCCE" or "Intel C++ Compiler (Linux)" (see ToolChain context)</extracomment>
|
||||
<translation>Движок отладчика CDB не поддерживает инструментарий %1.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Attaching to core files is not supported.</source>
|
||||
<translation>Подключение к файлам дампа не поддерживается.</translation>
|
||||
@@ -4225,10 +4230,6 @@ Qt Creator не может подключиться к нему.</translation>
|
||||
<source>Watchpoint: %1</source>
|
||||
<translation>Точка наблюдения: %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The CDB debug engine does not support the '%1</source>
|
||||
<translation>Движок отладчика CDB не поддерживает "%1"</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Debugger::Internal::CdbOptionsPage</name>
|
||||
@@ -4527,7 +4528,7 @@ Qt Creator не может подключиться к нему.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Create Full Backtrace</source>
|
||||
<translation type="unfinished">Вывести полный стек вызовов</translation>
|
||||
<translation>Вывести полный стек вызовов</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Execute Line</source>
|
||||
@@ -9468,7 +9469,7 @@ You can choose between stashing the changes or discarding them.</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>Use fallback location</source>
|
||||
<translation>Использовать запасное размещение</translation>
|
||||
<translation>Использовать дополнительный путь</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source><html><head/><body>
|
||||
@@ -9552,7 +9553,7 @@ You can choose between stashing the changes or discarding them.</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>Switch outline</source>
|
||||
<translation>Включить/отключить контур</translation>
|
||||
<translation>Включить/отключить обзор</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Ctrl+]</source>
|
||||
@@ -9567,7 +9568,7 @@ You can choose between stashing the changes or discarding them.</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show outline</source>
|
||||
<translation>Показывать контур</translation>
|
||||
<translation>Показывать обзор</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Fit image in the screen</source>
|
||||
@@ -9630,6 +9631,14 @@ Ids must begin with a lowercase letter.</source>
|
||||
<source>Anchors</source>
|
||||
<translation>Привязки</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Set anchors</source>
|
||||
<translation>Установить привязки</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Setting anchors in states is not supported.</source>
|
||||
<translation>Установка привязок на состояния не поддерживается.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Target</source>
|
||||
<translation>Цель</translation>
|
||||
@@ -10205,7 +10214,7 @@ To do this, you type this shortcut and a space in the Locator entry field, and t
|
||||
</message>
|
||||
<message>
|
||||
<source>Working...</source>
|
||||
<translation>Исполнение...</translation>
|
||||
<translation>Выполнение...</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -13441,11 +13450,11 @@ Reason: %2</source>
|
||||
<name>ProjectExplorer::RunControl</name>
|
||||
<message>
|
||||
<source>Application Still Running</source>
|
||||
<translation>Приложение ещё исполняется</translation>
|
||||
<translation>Приложение ещё выполняется</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1 is still running.</source>
|
||||
<translation>%1 ещё исполняется.</translation>
|
||||
<translation>%1 ещё выполняется.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Force it to quit?</source>
|
||||
@@ -13457,7 +13466,7 @@ Reason: %2</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>Keep Running</source>
|
||||
<translation>Продолжить исполнение</translation>
|
||||
<translation>Продолжить выполнение</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -13600,6 +13609,10 @@ Do you still want to load the settings file?</source>
|
||||
<source>Parent folder "%1" for file "%2" does not exist.</source>
|
||||
<translation>Родительский каталог "%1" файла "%2" не существует.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Error</source>
|
||||
<translation>Ошибка</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cannot write file: "%1".</source>
|
||||
<translation>Не удалось записать файл: "%1".</translation>
|
||||
@@ -13613,7 +13626,7 @@ Do you still want to load the settings file?</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show bounding rectangles (A)</source>
|
||||
<translation type="unfinished">Отображать границы (A)</translation>
|
||||
<translation>Отображать границы (A)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Only select items with content (S)</source>
|
||||
@@ -14540,7 +14553,7 @@ You can review Qt Quick UI projects in the QML Viewer and you need not build the
|
||||
<source>List of plugin directories passed to QML runtime</source>
|
||||
<comment>qmlproject Template</comment>
|
||||
<extracomment>Comment added to generated .qmlproject file</extracomment>
|
||||
<translation>Список каталогов модулей, передаваемый среде исполнения QML</translation>
|
||||
<translation>Список каталогов модулей, передаваемый среде выполнения QML</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -15265,7 +15278,7 @@ Preselects a desktop Qt for building the application if available.</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>Featured</source>
|
||||
<translation type="unfinished">Известное</translation>
|
||||
<translation>Полезное</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Explore Qt C++ examples:</source>
|
||||
@@ -16165,6 +16178,10 @@ stderr was: %1</source>
|
||||
<source>No device configuration set for run configuration.</source>
|
||||
<translation>Не выбрана конфигурация устройства для запуска.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Run configuration no longer available.</source>
|
||||
<translation>Конфигурация запуска больше недоступна.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Starting remote process ...</source>
|
||||
<translation>Запуск внешнего процесса...</translation>
|
||||
@@ -16175,7 +16192,7 @@ stderr was: %1</source>
|
||||
</message>
|
||||
<message>
|
||||
<source>Remote Execution Failure</source>
|
||||
<translation>Ошибка внешнего исполнения</translation>
|
||||
<translation>Ошибка внешнего выполнения</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -16992,6 +17009,10 @@ You can build the application and deploy it on desktop and mobile target platfor
|
||||
<source>Debugging helpers:</source>
|
||||
<translation>Помощники отладчика:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>SBS v2 directory:</source>
|
||||
<translation>Каталог SBS v2:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Qt4ProjectManager::Internal::S60CreatePackageStep</name>
|
||||
@@ -19713,14 +19734,14 @@ Please check the directory's access rights.</source>
|
||||
<name>TextEditor::Internal::OutlineFactory</name>
|
||||
<message>
|
||||
<source>Outline</source>
|
||||
<translation>Контур</translation>
|
||||
<translation>Обзор</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>TextEditor::Internal::OutlineWidgetStack</name>
|
||||
<message>
|
||||
<source>No outline available</source>
|
||||
<translation>Контур недоступен</translation>
|
||||
<translation>Обзор недоступен</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Synchronize with Editor</source>
|
||||
@@ -21439,11 +21460,11 @@ p, li { white-space: pre-wrap; }
|
||||
</message>
|
||||
<message>
|
||||
<source>Clip</source>
|
||||
<translation type="unfinished">Обрезка</translation>
|
||||
<translation>Обрезка</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Opacity</source>
|
||||
<translation type="unfinished">Непрозрачность</translation>
|
||||
<translation>Непрозрачность</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
||||
@@ -250,7 +250,8 @@ static inline void padString(QString *s, int len)
|
||||
|
||||
static inline QStringList parseLists(QIODevice *io)
|
||||
{
|
||||
enum State { OutsideRecentPostList, InsideRecentPostBox, InsideRecentPost };
|
||||
enum State { OutsideRecentPostList, InsideRecentPostList,
|
||||
InsideRecentPostBox, InsideRecentPost };
|
||||
|
||||
QStringList rc;
|
||||
QXmlStreamReader reader(io);
|
||||
@@ -282,7 +283,13 @@ static inline QStringList parseLists(QIODevice *io)
|
||||
}
|
||||
} else if (reader.name() == divElement) { // "<div>" state switching
|
||||
switch (state) {
|
||||
// Check on the contents as there are several lists.
|
||||
case OutsideRecentPostList:
|
||||
if (reader.attributes().value(classAttribute) == QLatin1String("content_left_title")
|
||||
&& reader.readElementText() == QLatin1String("Recent Posts"))
|
||||
state = InsideRecentPostList;
|
||||
break;
|
||||
case InsideRecentPostList:
|
||||
if (reader.attributes().value(classAttribute) == QLatin1String("content_left_box"))
|
||||
state = InsideRecentPostBox;
|
||||
break;
|
||||
|
||||
@@ -261,6 +261,21 @@ void FormEditorWidget::setFeedbackNode(const QmlItemNode &node)
|
||||
m_graphicsView->setFeedbackNode(node);
|
||||
}
|
||||
|
||||
QString FormEditorWidget::contextHelpId() const
|
||||
{
|
||||
if (!m_formEditorView)
|
||||
return QString();
|
||||
|
||||
QList<ModelNode> nodes = m_formEditorView->selectedModelNodes();
|
||||
QString helpId;
|
||||
if (!nodes.isEmpty()) {
|
||||
helpId = nodes.first().type();
|
||||
helpId.replace("Qt/", "QML.");
|
||||
}
|
||||
|
||||
return helpId;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -68,6 +68,7 @@ public:
|
||||
|
||||
void setFeedbackNode(const QmlItemNode &node);
|
||||
|
||||
QString contextHelpId() const;
|
||||
|
||||
protected:
|
||||
void enterEvent(QEvent *event);
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "designmodecontext.h"
|
||||
#include "qmldesignerconstants.h"
|
||||
#include "designmodewidget.h"
|
||||
#include "formeditorwidget.h"
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
@@ -39,7 +40,7 @@ namespace Internal {
|
||||
DesignModeContext::DesignModeContext(DesignModeWidget *widget)
|
||||
: IContext(widget),
|
||||
m_widget(widget),
|
||||
m_context(Constants::C_FORMEDITOR, Constants::C_QT_QUICK_TOOLS_MENU)
|
||||
m_context(Constants::C_QMLDESIGNER, Constants::C_QT_QUICK_TOOLS_MENU)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -62,6 +63,33 @@ QString DesignModeContext::contextHelpId() const
|
||||
return m_widget->contextHelpId();
|
||||
}
|
||||
|
||||
|
||||
FormEditorContext::FormEditorContext(FormEditorWidget *widget)
|
||||
: IContext(widget),
|
||||
m_widget(widget),
|
||||
m_context(Constants::C_QMLFORMEDITOR, Constants::C_QT_QUICK_TOOLS_MENU)
|
||||
{
|
||||
}
|
||||
|
||||
FormEditorContext::~FormEditorContext()
|
||||
{
|
||||
}
|
||||
|
||||
Core::Context FormEditorContext::context() const
|
||||
{
|
||||
return m_context;
|
||||
}
|
||||
|
||||
QWidget *FormEditorContext::widget()
|
||||
{
|
||||
return m_widget;
|
||||
}
|
||||
|
||||
QString FormEditorContext::contextHelpId() const
|
||||
{
|
||||
return m_widget->contextHelpId();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,6 +38,9 @@ class QWidget;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace QmlDesigner {
|
||||
|
||||
class FormEditorWidget;
|
||||
|
||||
namespace Internal {
|
||||
|
||||
class DesignModeWidget;
|
||||
@@ -61,6 +64,22 @@ private:
|
||||
const Core::Context m_context;
|
||||
};
|
||||
|
||||
class FormEditorContext : public Core::IContext
|
||||
{
|
||||
public:
|
||||
FormEditorContext(FormEditorWidget *widget);
|
||||
~FormEditorContext();
|
||||
|
||||
Core::Context context() const;
|
||||
QWidget *widget();
|
||||
|
||||
QString contextHelpId() const;
|
||||
|
||||
private:
|
||||
FormEditorWidget *m_widget;
|
||||
const Core::Context m_context;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "designmodewidget.h"
|
||||
#include "qmldesignerconstants.h"
|
||||
#include "styledoutputpaneplaceholder.h"
|
||||
#include "designmodecontext.h"
|
||||
|
||||
#include <model.h>
|
||||
#include <rewriterview.h>
|
||||
@@ -685,6 +686,9 @@ void DesignModeWidget::setup()
|
||||
//### we now own these here
|
||||
rightLayout->addWidget(m_statesEditorWidget.data());
|
||||
|
||||
FormEditorContext *context = new FormEditorContext(m_formEditorView->widget());
|
||||
Core::ICore::instance()->addContextObject(context);
|
||||
|
||||
// editor and output panes
|
||||
m_outputPlaceholderSplitter->addWidget(m_formEditorView->widget());
|
||||
m_outputPlaceholderSplitter->addWidget(m_outputPanePlaceholder);
|
||||
|
||||
@@ -37,7 +37,8 @@ const char * const DELETE = "QmlDesigner.Delete";
|
||||
|
||||
// context
|
||||
const char * const C_DESIGN_MODE = "QmlDesigner::DesignMode";
|
||||
const char * const C_FORMEDITOR = "QmlDesigner::QmlFormEditor";
|
||||
const char * const C_QMLDESIGNER = "QmlDesigner::QmlDesignerMain";
|
||||
const char * const C_QMLFORMEDITOR = "QmlDesigner::FormEditor";
|
||||
|
||||
// special context for preview menu, shared b/w designer and text editor
|
||||
const char * const C_QT_QUICK_TOOLS_MENU = "QmlDesigner::ToolsMenu";
|
||||
|
||||
@@ -118,7 +118,7 @@ bool BauhausPlugin::initialize(const QStringList & /*arguments*/, QString *error
|
||||
{
|
||||
Core::ICore *core = Core::ICore::instance();
|
||||
|
||||
const Core::Context switchContext(QmlDesigner::Constants::C_FORMEDITOR,
|
||||
const Core::Context switchContext(QmlDesigner::Constants::C_QMLDESIGNER,
|
||||
QmlJSEditor::Constants::C_QMLJSEDITOR_ID);
|
||||
|
||||
Core::ActionManager *am = core->actionManager();
|
||||
@@ -163,85 +163,86 @@ void BauhausPlugin::createDesignModeWidget()
|
||||
|
||||
m_context = new DesignModeContext(m_mainWidget);
|
||||
creatorCore->addContextObject(m_context);
|
||||
Core::Context formEditorContext(Constants::C_FORMEDITOR);
|
||||
Core::Context qmlDesignerMainContext(Constants::C_QMLDESIGNER);
|
||||
Core::Context qmlDesignerFormEditorContext(Constants::C_QMLFORMEDITOR);
|
||||
|
||||
// Revert to saved
|
||||
actionManager->registerAction(m_revertToSavedAction,
|
||||
Core::Constants::REVERTTOSAVED, formEditorContext);
|
||||
Core::Constants::REVERTTOSAVED, qmlDesignerMainContext);
|
||||
connect(m_revertToSavedAction, SIGNAL(triggered()), m_editorManager, SLOT(revertToSaved()));
|
||||
|
||||
//Save
|
||||
actionManager->registerAction(m_saveAction, Core::Constants::SAVE, formEditorContext);
|
||||
actionManager->registerAction(m_saveAction, Core::Constants::SAVE, qmlDesignerMainContext);
|
||||
connect(m_saveAction, SIGNAL(triggered()), m_editorManager, SLOT(saveFile()));
|
||||
|
||||
//Save As
|
||||
actionManager->registerAction(m_saveAsAction, Core::Constants::SAVEAS, formEditorContext);
|
||||
actionManager->registerAction(m_saveAsAction, Core::Constants::SAVEAS, qmlDesignerMainContext);
|
||||
connect(m_saveAsAction, SIGNAL(triggered()), m_editorManager, SLOT(saveFileAs()));
|
||||
|
||||
//Close Editor
|
||||
actionManager->registerAction(m_closeCurrentEditorAction, Core::Constants::CLOSE, formEditorContext);
|
||||
actionManager->registerAction(m_closeCurrentEditorAction, Core::Constants::CLOSE, qmlDesignerMainContext);
|
||||
connect(m_closeCurrentEditorAction, SIGNAL(triggered()), m_editorManager, SLOT(closeEditor()));
|
||||
|
||||
//Close All
|
||||
actionManager->registerAction(m_closeAllEditorsAction, Core::Constants::CLOSEALL, formEditorContext);
|
||||
actionManager->registerAction(m_closeAllEditorsAction, Core::Constants::CLOSEALL, qmlDesignerMainContext);
|
||||
connect(m_closeAllEditorsAction, SIGNAL(triggered()), m_editorManager, SLOT(closeAllEditors()));
|
||||
|
||||
//Close All Others Action
|
||||
actionManager->registerAction(m_closeOtherEditorsAction, Core::Constants::CLOSEOTHERS, formEditorContext);
|
||||
actionManager->registerAction(m_closeOtherEditorsAction, Core::Constants::CLOSEOTHERS, qmlDesignerMainContext);
|
||||
connect(m_closeOtherEditorsAction, SIGNAL(triggered()), m_editorManager, SLOT(closeOtherEditors()));
|
||||
|
||||
// Undo / Redo
|
||||
actionManager->registerAction(m_mainWidget->undoAction(), Core::Constants::UNDO, formEditorContext);
|
||||
actionManager->registerAction(m_mainWidget->redoAction(), Core::Constants::REDO, formEditorContext);
|
||||
actionManager->registerAction(m_mainWidget->undoAction(), Core::Constants::UNDO, qmlDesignerMainContext);
|
||||
actionManager->registerAction(m_mainWidget->redoAction(), Core::Constants::REDO, qmlDesignerMainContext);
|
||||
|
||||
Core::Command *command;
|
||||
command = actionManager->registerAction(m_mainWidget->deleteAction(),
|
||||
QmlDesigner::Constants::DELETE, formEditorContext);
|
||||
QmlDesigner::Constants::DELETE, qmlDesignerFormEditorContext);
|
||||
command->setDefaultKeySequence(QKeySequence::Delete);
|
||||
command->setAttribute(Core::Command::CA_Hide); // don't show delete in other modes
|
||||
editMenu->addAction(command, Core::Constants::G_EDIT_COPYPASTE);
|
||||
|
||||
command = actionManager->registerAction(m_mainWidget->cutAction(),
|
||||
Core::Constants::CUT, formEditorContext);
|
||||
Core::Constants::CUT, qmlDesignerFormEditorContext);
|
||||
command->setDefaultKeySequence(QKeySequence::Cut);
|
||||
editMenu->addAction(command, Core::Constants::G_EDIT_COPYPASTE);
|
||||
|
||||
command = actionManager->registerAction(m_mainWidget->copyAction(),
|
||||
Core::Constants::COPY, formEditorContext);
|
||||
Core::Constants::COPY, qmlDesignerFormEditorContext);
|
||||
command->setDefaultKeySequence(QKeySequence::Copy);
|
||||
editMenu->addAction(command, Core::Constants::G_EDIT_COPYPASTE);
|
||||
|
||||
command = actionManager->registerAction(m_mainWidget->pasteAction(),
|
||||
Core::Constants::PASTE, formEditorContext);
|
||||
Core::Constants::PASTE, qmlDesignerFormEditorContext);
|
||||
command->setDefaultKeySequence(QKeySequence::Paste);
|
||||
editMenu->addAction(command, Core::Constants::G_EDIT_COPYPASTE);
|
||||
|
||||
command = actionManager->registerAction(m_mainWidget->selectAllAction(),
|
||||
Core::Constants::SELECTALL, formEditorContext);
|
||||
Core::Constants::SELECTALL, qmlDesignerFormEditorContext);
|
||||
command->setDefaultKeySequence(QKeySequence::SelectAll);
|
||||
editMenu->addAction(command, Core::Constants::G_EDIT_SELECTALL);
|
||||
|
||||
Core::ActionContainer *viewsMenu = actionManager->actionContainer(Core::Constants::M_WINDOW_VIEWS);
|
||||
|
||||
command = actionManager->registerAction(m_mainWidget->toggleLeftSidebarAction(),
|
||||
Constants::TOGGLE_LEFT_SIDEBAR, formEditorContext);
|
||||
Constants::TOGGLE_LEFT_SIDEBAR, qmlDesignerMainContext);
|
||||
command->setAttribute(Core::Command::CA_Hide);
|
||||
command->setDefaultKeySequence(QKeySequence("Ctrl+Alt+0"));
|
||||
viewsMenu->addAction(command);
|
||||
|
||||
command = actionManager->registerAction(m_mainWidget->toggleRightSidebarAction(),
|
||||
Constants::TOGGLE_RIGHT_SIDEBAR, formEditorContext);
|
||||
Constants::TOGGLE_RIGHT_SIDEBAR, qmlDesignerMainContext);
|
||||
command->setAttribute(Core::Command::CA_Hide);
|
||||
command->setDefaultKeySequence(QKeySequence("Ctrl+Alt+Shift+0"));
|
||||
viewsMenu->addAction(command);
|
||||
|
||||
command = actionManager->registerAction(m_mainWidget->restoreDefaultViewAction(),
|
||||
Constants::RESTORE_DEFAULT_VIEW, formEditorContext);
|
||||
Constants::RESTORE_DEFAULT_VIEW, qmlDesignerMainContext);
|
||||
command->setAttribute(Core::Command::CA_Hide);
|
||||
viewsMenu->addAction(command);
|
||||
|
||||
command = actionManager->registerAction(m_mainWidget->hideSidebarsAction(),
|
||||
Core::Constants::TOGGLE_SIDEBAR, formEditorContext);
|
||||
Core::Constants::TOGGLE_SIDEBAR, qmlDesignerMainContext);
|
||||
|
||||
#ifdef Q_OS_MACX
|
||||
// add second shortcut to trigger delete
|
||||
|
||||
@@ -65,6 +65,7 @@ namespace Internal {
|
||||
|
||||
const char ExamplePathPropertyName[] = "__qt_ExamplePath";
|
||||
const char HelpPathPropertyName[] = "__qt_HelpPath";
|
||||
const char QmlMainFileName[] = "__qt_QmlMainFileName";
|
||||
|
||||
void PixmapDownloader::populatePixmap(QNetworkReply *reply) {
|
||||
QImage image;
|
||||
@@ -191,21 +192,32 @@ void GettingStartedWelcomePageWidget::parseXmlFile(QFile *file, QMenuHash &cppSu
|
||||
const QString name = reader.attributes().value(QLatin1String("name")).toString();
|
||||
const bool isQml = reader.attributes().value(QLatin1String("qml")).toString() == "true";
|
||||
const QString localDir = reader.attributes().value(QLatin1String("filename")).toString();
|
||||
const QString extension = isQml ? QLatin1String(".qmlproject") : QLatin1String(".pro");
|
||||
const QString fileName = localDir.section(',', -1);
|
||||
const QString relativeProPath = slash + dirName + slash + localDir + slash + fileName + extension;
|
||||
const QString fileName = localDir.section('/', -1);
|
||||
QString replacedFileName = fileName;
|
||||
replacedFileName.replace(QLatin1Char('-'), QString());
|
||||
QString relativeProPath = slash + dirName + slash + localDir + slash + replacedFileName;
|
||||
|
||||
QString finaleFileName = examplePath + relativeProPath;
|
||||
if (!QFile::exists(finaleFileName))
|
||||
finaleFileName = sourcePath + QLatin1String("/examples") + relativeProPath;
|
||||
QString finalFileName = examplePath + relativeProPath + QLatin1String(".pro");
|
||||
|
||||
if (!QFile::exists(finaleFileName))
|
||||
if (!QFile::exists(finalFileName))
|
||||
finalFileName = sourcePath + QLatin1String("/examples") + relativeProPath + QLatin1String(".pro");
|
||||
|
||||
if (isQml && !QFile::exists(finalFileName)) {
|
||||
// maybe it's an old-style QML project?
|
||||
relativeProPath = slash + dirName + slash + localDir + slash + fileName;
|
||||
finalFileName = examplePath + relativeProPath + QLatin1String(".qmlproject");
|
||||
|
||||
if (!QFile::exists(finalFileName))
|
||||
finalFileName = sourcePath + QLatin1String("/examples") + relativeProPath + QLatin1String(".qmlproject");;
|
||||
}
|
||||
|
||||
if (!QFile::exists(finalFileName))
|
||||
break;
|
||||
|
||||
QString dirName1 = dirName;
|
||||
dirName1.replace(slash, QLatin1Char('-'));
|
||||
QString dirNameforHelp = dirName;
|
||||
dirNameforHelp.replace(slash, QLatin1Char('-'));
|
||||
QString helpPath = QLatin1String("qthelp://com.trolltech.qt/qdoc/") +
|
||||
dirName1 +
|
||||
dirNameforHelp +
|
||||
QLatin1Char('-') + fileName + QLatin1String(".html");
|
||||
|
||||
QAction *exampleAction = 0;
|
||||
@@ -230,8 +242,10 @@ void GettingStartedWelcomePageWidget::parseXmlFile(QFile *file, QMenuHash &cppSu
|
||||
exampleAction = new QAction(name, subMenu);
|
||||
subMenu->insertAction(beforeAction, exampleAction);
|
||||
connect(exampleAction, SIGNAL(triggered()), SLOT(slotOpenExample()));
|
||||
exampleAction->setProperty(ExamplePathPropertyName, finaleFileName);
|
||||
exampleAction->setProperty(ExamplePathPropertyName, finalFileName);
|
||||
exampleAction->setProperty(HelpPathPropertyName, helpPath);
|
||||
if (isQml)
|
||||
exampleAction->setProperty(QmlMainFileName, fileName);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -338,6 +352,12 @@ void GettingStartedWelcomePageWidget::slotOpenExample()
|
||||
|
||||
QString helpFile = action->property(HelpPathPropertyName).toString();
|
||||
QString proFile = action->property(ExamplePathPropertyName).toString();
|
||||
QString qmlMainFileName;
|
||||
bool isQmlProject = false;
|
||||
if (action->dynamicPropertyNames().contains(QmlMainFileName)) {
|
||||
qmlMainFileName = action->property(QmlMainFileName).toString();
|
||||
isQmlProject = true;
|
||||
}
|
||||
QStringList files;
|
||||
|
||||
QFileInfo proFileInfo(proFile);
|
||||
@@ -398,18 +418,22 @@ void GettingStartedWelcomePageWidget::slotOpenExample()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
QString tryFile = proFileInfo.path() + "/main.cpp";
|
||||
QString tryFile;
|
||||
files << proFile;
|
||||
if(!QFile::exists(tryFile))
|
||||
tryFile = proFileInfo.path() + '/' + proFileInfo.baseName() + ".cpp";
|
||||
// maybe it's a QML project?
|
||||
if(!QFile::exists(tryFile))
|
||||
if (isQmlProject) {
|
||||
tryFile = proFileInfo.path() + '/' + "/main.qml";
|
||||
if(!QFile::exists(tryFile))
|
||||
tryFile = proFileInfo.path() + '/' + proFileInfo.baseName() + ".qml";
|
||||
tryFile = proFileInfo.path() + "/qml/" + qmlMainFileName + ".qml";
|
||||
// legacy qmlproject case
|
||||
if(!QFile::exists(tryFile))
|
||||
tryFile = proFileInfo.path() + '/' + qmlMainFileName + ".qml";
|
||||
if(QFile::exists(tryFile))
|
||||
files << tryFile;
|
||||
} else {
|
||||
tryFile = proFileInfo.path() + "/main.cpp";
|
||||
if(!QFile::exists(tryFile))
|
||||
tryFile = proFileInfo.path() + '/' + proFileInfo.baseName() + ".cpp";
|
||||
}
|
||||
Core::ICore::instance()->openFiles(files, static_cast<Core::ICore::OpenFilesFlags>(Core::ICore::SwitchMode | Core::ICore::StopOnLoadFail));
|
||||
if (!tryFile.isEmpty() && Core::EditorManager::instance()->hasEditor(tryFile) && !helpFile.isEmpty())
|
||||
slotOpenContextHelpPage(helpFile);
|
||||
|
||||
@@ -541,10 +541,23 @@ QList<ProjectExplorer::HeaderPath> S60ToolChainMixin::epocHeaderPaths() const
|
||||
|
||||
void S60ToolChainMixin::addEpocToEnvironment(Utils::Environment *env) const
|
||||
{
|
||||
#if defined(Q_OS_WIN)
|
||||
QString winDir = QLatin1String(qgetenv("WINDIR"));
|
||||
if (!winDir.isEmpty())
|
||||
env->prependOrSetPath(QDir(winDir).filePath(QLatin1String("system32")));
|
||||
#endif
|
||||
|
||||
QDir epocDir(m_device.epocRoot);
|
||||
|
||||
env->prependOrSetPath(epocDir.filePath(QLatin1String("epoc32/tools"))); // e.g. make.exe
|
||||
env->prependOrSetPath(epocDir.filePath(QLatin1String("epoc32/gcc/bin"))); // e.g. gcc.exe
|
||||
env->prependOrSetPath(epocDir.filePath(QLatin1String("perl/bin"))); // e.g. perl.exe (special SDK version)
|
||||
|
||||
if (epocDir.exists(QLatin1String("epoc32/gcc/bin")))
|
||||
env->prependOrSetPath(epocDir.filePath(QLatin1String("epoc32/gcc/bin"))); // e.g. cpp.exe, *NOT* gcc.exe
|
||||
// Find perl in the special Symbian flavour:
|
||||
if (epocDir.exists(QLatin1String("../../tools/perl/bin")))
|
||||
env->prependOrSetPath(epocDir.filePath(QLatin1String("../../tools/perl/bin")));
|
||||
else
|
||||
env->prependOrSetPath(epocDir.filePath(QLatin1String("perl/bin")));
|
||||
|
||||
addBaseToEnvironment(env);
|
||||
}
|
||||
@@ -592,13 +605,9 @@ void S60ToolChainMixin::addGnuPocToEnvironment(Utils::Environment *env) const
|
||||
|
||||
void S60ToolChainMixin::addBaseToEnvironment(Utils::Environment *env) const
|
||||
{
|
||||
QString sbsHome(env->value(QLatin1String("SBS_HOME"))); // Do we use Raptor/SBSv2?
|
||||
if (!sbsHome.isEmpty())
|
||||
env->prependOrSetPath(sbsHome + QDir::separator() + QLatin1String("bin"));
|
||||
|
||||
QString epocRootPath(m_device.epocRoot);
|
||||
if (!epocRootPath.endsWith(QChar('/')))
|
||||
epocRootPath.append(QChar('/'));
|
||||
if (!epocRootPath.endsWith(QLatin1Char('/')))
|
||||
epocRootPath.append(QLatin1Char('/'));
|
||||
env->set(QLatin1String("EPOCROOT"), QDir::toNativeSeparators(S60Devices::cleanedRootPath(epocRootPath)));
|
||||
}
|
||||
|
||||
|
||||
@@ -241,8 +241,15 @@ void QtVersionManager::updateExamples()
|
||||
}
|
||||
|
||||
// in SDKs, we want to prefer the Qt version shipping with the SDK
|
||||
QString preferred = Core::ICore::instance()->settings()->value("General/PreferredQMakePath").toString();
|
||||
QSettings *settings = Core::ICore::instance()->settings();
|
||||
QString preferred = settings->value(QLatin1String("PreferredQMakePath")).toString();
|
||||
preferred = QDir::fromNativeSeparators(preferred);
|
||||
if (!preferred.isEmpty()) {
|
||||
#ifdef Q_OS_WIN
|
||||
preferred = preferred.toLower();
|
||||
if (!preferred.endsWith(QLatin1String(".exe")))
|
||||
preferred.append(QLatin1String(".exe"));
|
||||
#endif
|
||||
foreach (version, candidates) {
|
||||
if (version->qmakeCommand() == preferred) {
|
||||
emit updateExamples(version->examplesPath(), version->demosPath(), version->sourcePath());
|
||||
@@ -1557,8 +1564,13 @@ void QtVersion::setMsvcVersion(const QString &version)
|
||||
void QtVersion::addToEnvironment(Utils::Environment &env) const
|
||||
{
|
||||
env.set("QTDIR", QDir::toNativeSeparators(versionInfo().value("QT_INSTALL_DATA")));
|
||||
if (isBuildWithSymbianSbsV2() && !m_sbsV2Directory.isEmpty())
|
||||
if (isBuildWithSymbianSbsV2()) {
|
||||
QString sbsHome(env.value(QLatin1String("SBS_HOME")));
|
||||
if (!m_sbsV2Directory.isEmpty())
|
||||
env.prependOrSetPath(m_sbsV2Directory);
|
||||
else if (!sbsHome.isEmpty())
|
||||
env.prependOrSetPath(sbsHome + QLatin1Char('/') + QLatin1String("bin"));
|
||||
}
|
||||
env.prependOrSetPath(versionInfo().value("QT_INSTALL_BINS"));
|
||||
}
|
||||
|
||||
|
||||
@@ -165,10 +165,12 @@ QPainterPath TextEditorOverlay::createSelectionPath(const QTextCursor &begin, co
|
||||
|
||||
int beginChar = 0;
|
||||
if (!inSelection) {
|
||||
if (block == begin.block()) {
|
||||
beginChar = begin.positionInBlock();
|
||||
line = blockLayout->lineForTextPosition(beginChar);
|
||||
inSelection = true;
|
||||
firstOrLastBlock = true;
|
||||
}
|
||||
inSelection = true;
|
||||
} else {
|
||||
// while (beginChar < block.length() && document->characterAt(block.position() + beginChar).isSpace())
|
||||
// ++beginChar;
|
||||
|
||||
Reference in New Issue
Block a user