[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-kant
Subject: [Kde-kant] Bug#32199: kate syntax crashes
From: "Ivan E. Moore II" <rkrusty () tdyc ! com>
Date: 2001-09-07 21:16:22
[Download RAW message or body]
Package: kate
Version: 2.2.x
(Originally submitted to the Debian BTS by \
<debian-bugs-T.Rep1Qf058s@ruediger-kuhlmann.de> as Bug#106469)
When extending the syntax hingliting definition for LaTeX, I ended up with a
config that crashed kate. The first file crashes kate, while the latter two
don't. The difference between the first two ist just the extra keyword in
the "keyword" list.
ruediger@wh36-a402:~/.kde/share/apps/kate/syntax> cat latex.xml.crash
<?xml version="1.01" encoding="UTF-8"?><!DOCTYPE language>
<language name="LaTeX" \
extensions="*.tex;*.TEX;*.bib;*.BIB;*.ltx;*.LTX;*.sty;*.STY;*.cls;*.CLS" \
mimetype="text/x-tex" casesensitive="1"> <highlighting>
<list name="environments">
<item>abstract</item>
<item>array</item>
</list>
<list name="keywords">
<item>ABB>/item>
<item>Abb</item>
<item>abb</item>
</list>
<contexts>
<context name="0-Normal" attribute="0" lineEndContext="0">
<StringDetect String="\begin{" attribute="4" context="1"/>
<StringDetect String="\end{" attribute="4" context="1"/>
<DetectChar char="\" attribute="2" context="2"/>
<RegExpr String="%.*$" attribute="3" context="0"/>
<Detect2Chars char="$" char1="$" attribute="7" context="6"/>
<DetectChar char="$" attribute="7" context="3"/>
</context>
<context name="1-BeginEnd" attribute="6" lineEndContext="1">
<keyword String="environments" attribute="2" context="1"/>
<DetectChar char="}" attribute="4" context="0"/>
<RegExpr String="." attribute="5" context="1"/>
</context>
<context name="2-Command" attribute="6" lineEndContext="0">
<keyword String="keywords" attribute="2" context="0"/>
<RegExpr String="[A-Za-z@]+" attribute="5" context="0"/>
<RegExpr String="." attribute="5" context="0"/>
</context>
<context name="3-Math" attribute="7" lineEndContext="3">
<StringDetect String="\begin{" attribute="4" context="4"/>
<StringDetect String="\end{" attribute="4" context="4"/>
<DetectChar char="\" attribute="2" context="5"/>
<RegExpr String="%.*$" attribute="3" context="3"/>
<DetectChar char="$" attribute="7" context="0"/>
</context>
<context name="4-MathBeginEnd" attribute="6" lineEndContext="4">
<keyword String="environments" attribute="2" context="4"/>
<DetectChar char="}" attribute="4" context="3"/>
<RegExpr String="." attribute="5" context="4"/>
</context>
<context name="5-MathCommand" attribute="6" lineEndContext="3">
<keyword String="keywords" attribute="2" context="3"/>
<RegExpr String="[A-Za-z@]+" attribute="5" context="3"/>
<RegExpr String="." attribute="5" context="3"/>
</context>
<context name="6-DispMath" attribute="7" lineEndContext="6">
<StringDetect String="\begin{" attribute="4" context="7"/>
<StringDetect String="\end{" attribute="4" context="7"/>
<DetectChar char="\" attribute="2" context="8"/>
<RegExpr String="%.*$" attribute="3" context="6"/>
<Detect2Chars char="$" char1="$" attribute="7" context="0"/>
</context>
<context name="7-DispMathBeginEnd" attribute="6" lineEndContext="7">
<keyword String="environments" attribute="2" context="7"/>
<DetectChar char="}" attribute="4" context="6"/>
<RegExpr String="." attribute="5" context="7"/>
</context>
<context name="8-DispMathCommand" attribute="6" lineEndContext="6">
<keyword String="keywords" attribute="2" context="6"/>
<RegExpr String="[A-Za-z@]+" attribute="5" context="6"/>
<RegExpr String="." attribute="5" context="6"/>
</context>
</contexts>
<itemDatas>
<itemData name="Unused" defStyleNum="dsNormal"/>
<itemData name="Normal Text" defStyleNum="dsNormal"/>
<itemData name="Command" defStyleNum="dsNormal" color="#0000ff" \
selColor="#ff0000" bold="1" italic="1"/> <itemData name="Comment" \
defStyleNum="dsComment"/> <itemData name="Begin End" defStyleNum="dsNormal" \
color="#000000" selColor="#ffffff" bold="1" italic="1"/> <itemData \
name="Unknown Command" defStyleNum="dsNormal" color="#ff0000" \
selColor="#ff0000"/>
<itemData name="Test" defStyleNum="dsNormal" color="#ffff00" selColor="#ffff00" \
bold="0" italic="0"/>
<itemData name="Math mode" defStyleNum="dsNormal" color="#00ff00" \
selColor="#00ff00" bold="0" italic="0"/> </itemDatas> </highlighting>
<general>
<comments>
<comment name="singleLine" start="%" />
</comments>
</general>
</language>
ruediger@wh36-a402:~/.kde/share/apps/kate/syntax> cat latex.xml.nocrash
<?xml version="1.01" encoding="UTF-8"?><!DOCTYPE language>
<language name="LaTeX" \
extensions="*.tex;*.TEX;*.bib;*.BIB;*.ltx;*.LTX;*.sty;*.STY;*.cls;*.CLS" \
mimetype="text/x-tex" casesensitive="1"> <highlighting>
<list name="environments">
<item>abstract</item>
<item>array</item>
</list>
<list name="keywords">
<item>Abb</item>
<item>abb</item>
</list>
<contexts>
<context name="0-Normal" attribute="0" lineEndContext="0">
<StringDetect String="\begin{" attribute="4" context="1"/>
<StringDetect String="\end{" attribute="4" context="1"/>
<DetectChar char="\" attribute="2" context="2"/>
<RegExpr String="%.*$" attribute="3" context="0"/>
<Detect2Chars char="$" char1="$" attribute="7" context="6"/>
<DetectChar char="$" attribute="7" context="3"/>
</context>
<context name="1-BeginEnd" attribute="6" lineEndContext="1">
<keyword String="environments" attribute="2" context="1"/>
<DetectChar char="}" attribute="4" context="0"/>
<RegExpr String="." attribute="5" context="1"/>
</context>
<context name="2-Command" attribute="6" lineEndContext="0">
<keyword String="keywords" attribute="2" context="0"/>
<RegExpr String="[A-Za-z@]+" attribute="5" context="0"/>
<RegExpr String="." attribute="5" context="0"/>
</context>
<context name="3-Math" attribute="7" lineEndContext="3">
<StringDetect String="\begin{" attribute="4" context="4"/>
<StringDetect String="\end{" attribute="4" context="4"/>
<DetectChar char="\" attribute="2" context="5"/>
<RegExpr String="%.*$" attribute="3" context="3"/>
<DetectChar char="$" attribute="7" context="0"/>
</context>
<context name="4-MathBeginEnd" attribute="6" lineEndContext="4">
<keyword String="environments" attribute="2" context="4"/>
<DetectChar char="}" attribute="4" context="3"/>
<RegExpr String="." attribute="5" context="4"/>
</context>
<context name="5-MathCommand" attribute="6" lineEndContext="3">
<keyword String="keywords" attribute="2" context="3"/>
<RegExpr String="[A-Za-z@]+" attribute="5" context="3"/>
<RegExpr String="." attribute="5" context="3"/>
</context>
<context name="6-DispMath" attribute="7" lineEndContext="6">
<StringDetect String="\begin{" attribute="4" context="7"/>
<StringDetect String="\end{" attribute="4" context="7"/>
<DetectChar char="\" attribute="2" context="8"/>
<RegExpr String="%.*$" attribute="3" context="6"/>
<Detect2Chars char="$" char1="$" attribute="7" context="0"/>
</context>
<context name="7-DispMathBeginEnd" attribute="6" lineEndContext="7">
<keyword String="environments" attribute="2" context="7"/>
<DetectChar char="}" attribute="4" context="6"/>
<RegExpr String="." attribute="5" context="7"/>
</context>
<context name="8-DispMathCommand" attribute="6" lineEndContext="6">
<keyword String="keywords" attribute="2" context="6"/>
<RegExpr String="[A-Za-z@]+" attribute="5" context="6"/>
<RegExpr String="." attribute="5" context="6"/>
</context>
</contexts>
<itemDatas>
<itemData name="Unused" defStyleNum="dsNormal"/>
<itemData name="Normal Text" defStyleNum="dsNormal"/>
<itemData name="Command" defStyleNum="dsNormal" color="#0000ff" \
selColor="#ff0000" bold="1" italic="1"/> <itemData name="Comment" \
defStyleNum="dsComment"/>
<itemData name="Begin End" defStyleNum="dsNormal" color="#000000" \
selColor="#ffffff" bold="1" italic="1"/>
<itemData name="Unknown Command" defStyleNum="dsNormal" color="#ff0000" \
selColor="#ff0000"/>
<itemData name="Test" defStyleNum="dsNormal" color="#ffff00" selColor="#ffff00" \
bold="0" italic="0"/>
<itemData name="Math mode" defStyleNum="dsNormal" color="#00ff00" \
selColor="#00ff00" bold="0" italic="0"/> </itemDatas>
</highlighting>
<general>
<comments>
<comment name="singleLine" start="%" />
</comments>
</general>
</language>
ruediger@wh36-a402:~/.kde/share/apps/kate/syntax> cat latex.xml
<?xml version="1.01" encoding="UTF-8"?><!DOCTYPE language>
<language name="LaTeX" \
extensions="*.tex;*.TEX;*.bib;*.BIB;*.ltx;*.LTX;*.sty;*.STY;*.cls;*.CLS" \
mimetype="text/x-tex" casesensitive="1"> <highlighting>
<list name="environments">
<item>abstract</item>
<item>array</item>
</list>
<list name="keywords">
<item>ABB</item>
<item>Abb</item>
<item>abb</item>
</list>
<contexts>
<context name="0-Normal" attribute="0" lineEndContext="0">
<StringDetect String="\begin{" attribute="4" context="1"/>
<StringDetect String="\end{" attribute="4" context="1"/>
<DetectChar char="\" attribute="2" context="2"/>
<RegExpr String="%.*$" attribute="3" context="0"/>
</context>
<context name="1-BeginEnd" attribute="6" lineEndContext="1">
<keyword String="environments" attribute="2" context="1"/>
<DetectChar char="}" attribute="4" context="0"/>
<RegExpr String="." attribute="5" context="1"/>
</context>
<context name="2-Command" attribute="6" lineEndContext="0">
<keyword String="keywords" attribute="2" context="0"/>
<RegExpr String="[A-Za-z@]+" attribute="5" context="0"/>
<RegExpr String="." attribute="5" context="0"/>
</context>
</contexts>
<itemDatas>
<itemData name="Unused" defStyleNum="dsNormal"/>
<itemData name="Normal Text" defStyleNum="dsNormal"/>
<itemData name="Command" defStyleNum="dsNormal" color="#0000ff" \
selColor="#ff0000" bold="1" italic="1"/> <itemData name="Comment" \
defStyleNum="dsComment"/>
<itemData name="Begin End" defStyleNum="dsNormal" color="#000000" \
selColor="#ffffff" bold="1" italic="1"/>
<itemData name="Unknown Command" defStyleNum="dsNormal" color="#ff0000" \
selColor="#ff0000"/>
<itemData name="Test" defStyleNum="dsNormal" color="#ffff00" selColor="#ffff00" \
bold="0" italic="0"/>
<itemData name="Math mode" defStyleNum="dsNormal" color="#00ff00" \
selColor="#00ff00" bold="0" italic="0"/> </itemDatas>
</highlighting>
<general>
<comments>
<comment name="singleLine" start="%" />
</comments>
</general>
</language>
ruediger@wh36-a402:~/.kde/share/apps/kate/syntax>
_______________________________________________
Kde-kant mailing list
Kde-kant@mail.kde.org
http://mail.kde.org/mailman/listinfo/kde-kant
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic