Permalink
Browse files

updated grammar files from Kate, bump version

  • Loading branch information...
1 parent 2668a19 commit e508eb80075f587a6bdb930d06ab44d5e863727f @tianyicui committed Dec 8, 2010
Showing with 8,594 additions and 7,297 deletions.
  1. +4 −1 ParseSyntaxFiles.hs
  2. +5 −1 highlighting-kate.cabal
  3. +9 −3 xml/alert.xml
  4. +62 −0 xml/alert_indent.xml
  5. +86 −43 xml/bibtex.xml
  6. +31 −17 xml/c.xml
  7. +442 −127 xml/cmake.xml
  8. +30 −3 xml/commonlisp.xml
  9. +68 −50 xml/cpp.xml
  10. +71 −22 xml/css.xml
  11. +553 −219 xml/d.xml
  12. +229 −42 xml/doxygen.xml
  13. +481 −0 xml/doxygenlua.xml
  14. +12 −11 xml/dtd.xml
  15. +22 −11 xml/fortran.xml
  16. +29 −28 xml/html.xml
  17. +4 −3 xml/javadoc.xml
  18. +8 −4 xml/json.xml
  19. +281 −41 xml/latex.xml
  20. +16 −11 xml/lua.xml
  21. +52 −7 xml/makefile.xml
  22. +9 −1 xml/matlab.xml
  23. +102 −11 xml/ocaml.xml
  24. +21 −4 xml/pascal.xml
  25. +5,439 −6,421 xml/php.xml
  26. +270 −81 xml/python.xml
  27. +1 −2 xml/rhtml.xml
  28. +104 −62 xml/ruby.xml
  29. +20 −22 xml/sql-mysql.xml
  30. +16 −2 xml/sql-postgresql.xml
  31. +11 −9 xml/sql.xml
  32. +27 −24 xml/xml.xml
  33. +62 −2 xml/xslt.xml
  34. +17 −12 xml/yacc.xml
View
@@ -125,7 +125,7 @@ processOneFile src = do
[syntax] <- runX $ application src
let name = nameFromPath src
let outFile = joinPath [libraryPath, "Syntax", addExtension name "hs"]
- let includeLangs = nub $ map (drop 2 . parserContext) $
+ let includeLangs = nub $ filter (/= name) $ map (drop 2 . parserContext) $
filter (\p -> (parserType p) == "IncludeRules" && "##" `isPrefixOf` (parserContext p)) $
concatMap contParsers $ synContexts syntax
let includeImports = map (("import qualified " ++) . langNameToModule) includeLangs
@@ -335,12 +335,15 @@ switchContext next =
langNameToModule str = "Text.Highlighting.Kate.Syntax." ++
case str of
"Alerts" -> "Alert"
+ "Alerts_indent" -> "Alert_indent"
"C++" -> "Cpp"
"CSS" -> "Css"
"Doxygen" -> "Doxygen"
"HTML" -> "Html"
"Javadoc" -> "Javadoc"
"JavaScript" -> "Javascript"
+ "SQL (MySQL)" -> "SqlMysql"
+ "DoxygenLua" -> "Doxygenlua"
x -> x
listName :: String -> String
View
@@ -1,5 +1,5 @@
Name: highlighting-kate
-Version: 0.2.7.1
+Version: 0.2.7.2
Cabal-Version: >= 1.2
Build-Type: Simple
Category: Text
@@ -28,6 +28,7 @@ Extra-Source-Files: README
css/hk-kate.css
css/hk-pyg.css
xml/ada.xml
+ xml/alert_indent.xml
xml/alert.xml
xml/asp.xml
xml/awk.xml
@@ -41,6 +42,7 @@ Extra-Source-Files: README
xml/css.xml
xml/c.xml
xml/djangotemplate.xml
+ xml/doxygenlua.xml
xml/doxygen.xml
xml/dtd.xml
xml/d.xml
@@ -116,6 +118,7 @@ Library
Text.Highlighting.Kate.Definitions
Text.Highlighting.Kate.Format
Text.Highlighting.Kate.Syntax.Alert
+ Text.Highlighting.Kate.Syntax.Alert_indent
Text.Highlighting.Kate.Syntax.Ada
Text.Highlighting.Kate.Syntax.Asp
Text.Highlighting.Kate.Syntax.Awk
@@ -130,6 +133,7 @@ Library
Text.Highlighting.Kate.Syntax.D
Text.Highlighting.Kate.Syntax.Djangotemplate
Text.Highlighting.Kate.Syntax.Doxygen
+ Text.Highlighting.Kate.Syntax.Doxygenlua
Text.Highlighting.Kate.Syntax.Dtd
Text.Highlighting.Kate.Syntax.Eiffel
Text.Highlighting.Kate.Syntax.Erlang
View
@@ -26,18 +26,24 @@
This file is included in every file that highlights the "alerts" keywords.
That's why extensions and mimetype are empty.
-->
-<language version="1.07" kateversion="2.3" name="Alerts" section="Other" extensions="" mimetype="" author="Dominik Haumann (dhdev@gmx.de)" license="LGPL" hidden="true">
+<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> DEPRECATED </item>
<item> WARNING </item>
- <item> ### </item>
</list>
<contexts>
<context attribute="Normal Text" lineEndContext="#pop" name="Normal Text" >
View
@@ -0,0 +1,62 @@
+<?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_indent" 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>
+ <folding indentationsensitive="1" />
+ <keywords casesensitive="1"/>
+ </general>
+</language>
View
@@ -1,63 +1,106 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE language SYSTEM "language.dtd">
-<language name="BibTeX" version="1.13" kateversion="2.4" extensions="*.bib" section="Markup" mimetype="text/x-bib" casesensitive="1" author="Jeroen Wijnhout (Jeroen.Wijnhout@kdemail.net)" license="LGPL">
+<!DOCTYPE language SYSTEM "language.dtd"
+ [
+ <!ENTITY stringVariable "[a-zA-Z0-9\-]+">
+ <!ENTITY fieldFormat "[a-zA-Z0-9\-_\.]+">
+ <!ENTITY latexCmd "\\([a-zA-Z@]+|[^ ])">
+ <!ENTITY refKeyFormat "[a-zA-Z0-9_@\\-\\:]+"> <!--taken from kile 2.0.3-->
+ ]>
+<language name="BibTeX" version="1.17" kateversion="2.3" extensions="*.bib" section="Markup" mimetype="text/x-bib" casesensitive="1" author="Jeroen Wijnhout (Jeroen.Wijnhout@kdemail.net)+Thomas Braun (thomas.braun@virtuell-zuhause.de)" license="LGPL">
<highlighting>
<list name="kw_entry">
- <item>@article</item>
- <item>@book</item>
- <item>@booklet</item>
- <item>@conference</item>
- <item>@inbook</item>
- <item>@incollection</item>
- <item>@inproceedings</item>
- <item>@manual</item>
- <item>@mastersthesis</item>
+ <item>@article</item>
+ <item>@book</item>
+ <item>@booklet</item>
+ <item>@conference</item>
+ <item>@collection</item>
+ <item>@electronic</item>
+ <item>@inbook</item>
+ <item>@incollection</item>
+ <item>@inproceedings</item>
+ <item>@manual</item>
+ <item>@mastersthesis</item>
<item>@misc</item>
- <item>@phdthesis</item>
+ <item>@online</item>
+ <item>@patent</item>
+ <item>@periodical</item>
<item>@proceedings</item>
- <item>@techreport</item>
+ <item>@report</item>
+ <item>@phdthesis</item>
+ <item>@set</item>
+ <item>@thesis</item>
+ <item>@techreport</item>
<item>@unpublished</item>
- <item>@collection</item>
- <item>@patent</item>
- </list>
- <list name="kw_command">
- <item>@string</item>
- <item>@preamble</item>
- <item>@comment</item>
+ <item>@www</item>
+ <item>@person</item> <!--all three from the directory package-->
+ <item>@company</item>
+ <item>@place</item>
</list>
<contexts>
- <context name="Normal" attribute="Normal Text" lineEndContext="#stay">
- <RegExpr String="([a-zA-Z]+)\s*=" attribute="Field" context="#stay" firstNonSpace="true" />
+ <context name="Normal" attribute="Comment" lineEndContext="#stay">
<keyword String="kw_entry" attribute="Entry" context="Entry"/>
- <keyword String="kw_command" attribute="Command" context="#stay"/>
- <DetectChar char="{" attribute="Normal Text" context="#stay" beginRegion="block" />
- <DetectChar char="}" attribute="Normal Text" context="#stay" endRegion="block" />
- <RegExpr String="\\([a-zA-Z]+|.)" attribute="Char" context="#stay"/>
- <DetectChar char="&quot;" attribute="String" context="String"/>
+ <StringDetect String="@string" attribute="Command" insensitive="true" context="StringCommand"/>
+ <StringDetect String="@preamble" attribute="Command" insensitive="true" context="PreambleCommand"/>
+ <StringDetect String="@comment" attribute="Comment" insensitive="true" context="#stay"/> <!--nothing special needed here-->
+ </context>
+
+ <context name="PreambleCommand" attribute="Normal Text" fallthrough="true" fallthroughContext="#pop" lineEndContext="#stay" >
+ <DetectChar char="{" context="CurlyBracket" />
+ </context>
+
+ <context name="StringCommand" attribute="Normal Text" fallthrough="true" fallthroughContext="#pop" lineEndContext="#stay" >
+ <DetectChar char="{" context="CurlyBracket" />
+ <RegExpr String="&stringVariable;" attribute="String" context="CurlyBracket"/>
+ </context>
+
+ <context name="Entry" attribute="Normal Text" lineEndContext="#stay">
+ <DetectChar char="{" context="#stay" beginRegion="block" />
+ <RegExpr String="&refKeyFormat;" attribute="Ref Key" context="#stay"/>
+ <DetectChar char="," context="Field"/>
+ <DetectChar char="}" attribute="Normal Text" context="#pop" endRegion="block" />
</context>
- <context name="Entry" attribute="Ref Key" lineEndContext="#stay">
- <DetectChar char="," attribute="Normal Text" context="#pop"/>
- <DetectChar char="{" attribute="Normal Text" context="#stay" beginRegion="block" />
- <DetectChar char="}" attribute="Normal Text" context="#stay" endRegion="block" />
- <RegExpr String="\\([a-zA-Z]+|.)" attribute="Char" context="#stay"/>
- <DetectChar char="&quot;" attribute="String" context="#pop"/>
+ <context name="Field" attribute="Normal Text" lineEndContext="#stay">
+ <RegExpr String="&fieldFormat;" attribute="Field" firstNonSpace="true"/>
+ <DetectSpaces/>
+ <DetectChar char="=" context="#stay"/>
+ <DetectSpaces/>
+ <DetectChar char="{" context="CurlyBracket"/>
+ <DetectChar char="}" context="#pop" lookAhead="true"/>
+ <DetectChar char="&quot;" attribute="Normal Text" context="QuotedText"/>
+ <DetectChar char="," context="#stay"/>
+ <DetectChar char="#" context="#stay"/> <!-- the bibtex string concatenate character -->
+ <RegExpr String="[0-9]+" context="#stay"/>
+ <RegExpr String="&stringVariable;" attribute="String" /> <!-- assume this is a variable created with @String -->
+ <DetectSpaces/>
+ <RegExpr String="." attribute="Error" context="#stay"/> <!--this rule catches all errors-->
</context>
- <context name="String" attribute="String" lineEndContext="#stay">
- <RegExpr String="\\([a-zA-Z]+|.)" attribute="Char" context="#stay"/>
- <DetectChar char="&quot;" attribute="String" context="#pop"/>
+ <context name="CurlyBracket" attribute="Normal Text" lineEndContext="#stay">
+ <DetectChar char="{" context="CurlyBracket"/>
+ <RegExpr String="&latexCmd;" attribute="LatexCommand" context="#stay"/>
+ <RegExpr String="}$" context="#pop#pop"/>
+ <DetectChar char="}" context="#pop"/>
</context>
+
+ <context name="QuotedText" attribute="String" lineEndContext="#stay">
+ <DetectChar char="&quot;" attribute="Normal Text" context="#pop"/>
+ <RegExpr String="&latexCmd;" attribute="LatexCommand" context="#stay"/>
+ </context>
+
</contexts>
+
<itemDatas>
<itemData name="Normal Text" defStyleNum="dsNormal"/>
- <itemData name="Entry" defStyleNum="dsKeyword" color="#0000ff"/>
- <itemData name="Command" defStyleNum="dsFunction"/>
- <itemData name="Field" defStyleNum="dsDataType"/>
- <itemData name="Ref Key" defStyleNum="dsOthers"/>
- <itemData name="String" defStyleNum="dsString"/>
- <itemData name="Char" defStyleNum="dsChar"/>
- </itemDatas>
+ <itemData name="Entry" defStyleNum="dsKeyword" color="#0000ff" spellChecking="false"/>
+ <itemData name="Command" defStyleNum="dsFunction" spellChecking="false"/>
+ <itemData name="Field" defStyleNum="dsDataType" spellChecking="false"/>
+ <itemData name="Ref Key" defStyleNum="dsOthers" spellChecking="false"/>
+ <itemData name="LatexCommand" defStyleNum="dsChar" spellChecking="false"/>
+ <itemData name="Comment" defStyleNum="dsComment" spellChecking="false"/>
+ <itemData name="Error" defStyleNum="dsAlert" spellChecking="false"/>
+ <itemData name="String" defStyleNum="dsString" spellChecking="true"/>
+</itemDatas>
</highlighting>
<general>
<keywords casesensitive="0" weakDeliminator="\" wordWrapDeliminator=",{}[]"/>
View
@@ -1,6 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
-<language name="C" version="1.41" kateversion="2.4" section="Sources" extensions="*.c;*.C;*.h" mimetype="text/x-csrc;text/x-c++src;text/x-chdr" priority="5">
+<language name="C" section="Sources"
+ version="1.44" kateversion="2.4"
+ indenter="cstyle"
+ extensions="*.c;*.C;*.h"
+ mimetype="text/x-csrc;text/x-c++src;text/x-chdr"
+ priority="5">
<!--
##########################################################################
## Fixes by Sebastian Pipping (webmaster@hartwork.org)
@@ -46,14 +51,23 @@
<item> unsigned </item>
<item> void </item>
<item> volatile </item>
+ <item> int8_t </item>
+ <item> int16_t </item>
+ <item> int32_t </item>
+ <item> int64_t </item>
+ <item> uint8_t </item>
+ <item> uint16_t </item>
+ <item> uint32_t </item>
+ <item> uint64_t </item>
+ <item> wchar_t </item>
<item> _Imaginary </item>
<item> _Complex </item>
<item> _Bool </item>
</list>
<contexts>
<context attribute="Normal Text" lineEndContext="#stay" name="Normal">
<DetectSpaces />
- <RegExpr attribute="Preprocessor" context="Outscoped" String="#\s*if\s+0" beginRegion="PP" firstNonSpace="true" />
+ <RegExpr attribute="Preprocessor" context="Outscoped" String="#\s*if\s+0\s*$" beginRegion="PP" firstNonSpace="true" />
<DetectChar context="AfterHash" char="#" firstNonSpace="true" lookAhead="true" />
<StringDetect attribute="Region Marker" context="Region Marker" String="//BEGIN" beginRegion="Region1" firstNonSpace="true" />
<StringDetect attribute="Region Marker" context="Region Marker" String="//END" endRegion="Region1" firstNonSpace="true" />
@@ -155,30 +169,30 @@
</context>
</contexts>
<itemDatas>
- <itemData name="Normal Text" defStyleNum="dsNormal"/>
- <itemData name="Keyword" defStyleNum="dsKeyword"/>
- <itemData name="Data Type" defStyleNum="dsDataType"/>
- <itemData name="Decimal" defStyleNum="dsDecVal"/>
- <itemData name="Octal" defStyleNum="dsBaseN"/>
- <itemData name="Hex" defStyleNum="dsBaseN"/>
- <itemData name="Float" defStyleNum="dsFloat"/>
- <itemData name="Char" defStyleNum="dsChar"/>
+ <itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false"/>
+ <itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false"/>
+ <itemData name="Data Type" defStyleNum="dsDataType" spellChecking="false"/>
+ <itemData name="Decimal" defStyleNum="dsDecVal" spellChecking="false"/>
+ <itemData name="Octal" defStyleNum="dsBaseN" spellChecking="false"/>
+ <itemData name="Hex" defStyleNum="dsBaseN" spellChecking="false"/>
+ <itemData name="Float" defStyleNum="dsFloat" spellChecking="false"/>
+ <itemData name="Char" defStyleNum="dsChar" spellChecking="false"/>
<itemData name="String" defStyleNum="dsString"/>
<itemData name="String Char" defStyleNum="dsChar"/>
<itemData name="Comment" defStyleNum="dsComment"/>
- <itemData name="Symbol" defStyleNum="dsNormal"/>
- <itemData name="Preprocessor" defStyleNum="dsOthers"/>
- <itemData name="Prep. Lib" defStyleNum="dsOthers"/> <!--,Qt::darkYellow,Qt::yellow,false,false)); -->
- <itemData name="Alert" defStyleNum="dsAlert" />
- <itemData name="Region Marker" defStyleNum="dsRegionMarker" />
- <itemData name="Error" defStyleNum="dsError" />
+ <itemData name="Symbol" defStyleNum="dsNormal" spellChecking="false"/>
+ <itemData name="Preprocessor" defStyleNum="dsOthers" spellChecking="false"/>
+ <itemData name="Prep. Lib" defStyleNum="dsOthers" spellChecking="false"/> <!--,Qt::darkYellow,Qt::yellow,false,false)); -->
+ <itemData name="Alert" defStyleNum="dsAlert" spellChecking="false"/>
+ <itemData name="Region Marker" defStyleNum="dsRegionMarker" spellChecking="false"/>
+ <itemData name="Error" defStyleNum="dsError" spellChecking="false"/>
</itemDatas>
</highlighting>
<general>
<comments>
<comment name="singleLine" start="//" />
<comment name="multiLine" start="/*" end="*/" />
</comments>
- <keywords casesensitive="1" />
+ <keywords casesensitive="1" additionalDeliminator="'&quot;" />
</general>
</language>
Oops, something went wrong.

0 comments on commit e508eb8

Please sign in to comment.