Damson/assets/syntax/spice.xml
astar76 11c1a7808b Build the syntax definitions into the app
Highlighting relied on the syntax-highlighting package, so removing it
left every file uncoloured. The 462 definitions now live in assets/syntax
and are compressed into the binary at build time, unpacked per language
when used. User .xml files still add to or replace them, and the licence
each file declares is recorded in assets/syntax/LICENSES.md.

Also moves files to the trash without needing gio.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-06 20:35:27 -06:00

1 line
No EOL
8.7 KiB
XML

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE language><language name="Spice" section="Hardware" version="7" kateversion="5.62" extensions="*.sp;*.hsp;*.cir" mimetype="text/spice" author="Steven Robson ([email protected]) and Anders Lund" license="LGPL"><highlighting><list name="A-devices model"><item>and</item><item>buf</item><item>counter</item><item>dflop</item><item>inv</item><item>modulator</item><item>or</item><item>ota</item><item>phasedet</item><item>samplehold</item><item>schmitbuf</item><item>schmitinv</item><item>schmitt</item><item>srflop</item><item>varistor</item><item>xor</item></list><list name="directives"><item>.backanno</item><item>.endmach</item><item>.endmachine</item><item>.ferret</item><item>.global</item><item>.ic</item><item>.inc</item><item>.include</item><item>.lib</item><item>.load</item><item>.loadbias</item><item>.mach</item><item>.machine</item><item>.meas</item><item>.nodealias</item><item>.nodeset</item><item>.opt</item><item>.option</item><item>.options</item><item>.opts</item><item>.save</item><item>.savebias</item><item>.step</item><item>.temp</item><item>.wave</item></list><list name="state-machine"><item>.output</item><item>.rule</item><item>.state</item></list><list name="simulation commands"><item>.ac</item><item>.dc</item><item>.disto</item><item>.endl</item><item>.four</item><item>.global</item><item>.net</item><item>.noise</item><item>.op</item><item>.option</item><item>.plot</item><item>.print</item><item>.pz</item><item>.sens</item><item>.temp</item><item>.tf</item><item>.tran</item></list><list name="subckt model"><item>.ends</item><item>.model</item><item>.subckt</item></list><list name="commands"><item>.end</item><item>.ic</item><item>.include</item><item>.lib</item><item>.nodeset</item><item>.param</item><item>.probe</item></list><list name="functions"><item>abs</item><item>ac</item><item>acos</item><item>asin</item><item>atan</item><item>cos</item><item>cosh</item><item>db</item><item>dc</item><item>dec</item><item>exp</item><item>int</item><item>lin</item><item>log</item><item>log10</item><item>lv</item><item>lx</item><item>max</item><item>min</item><item>oct</item><item>pow</item><item>pulse</item><item>pwl</item><item>pwr</item><item>sffm</item><item>sgn</item><item>sign</item><item>sin</item><item>sinh</item><item>sqrt</item><item>tan</item><item>tanh</item></list><contexts><context name="Normal" attribute="Normal Text" fallthroughContext="Command"><keyword String="functions" context="Function" lookAhead="1"/><AnyChar String="VIEFGHSviefghs" context="Source" lookAhead="1"/><AnyChar String="RCLKYTrclkyt" context="Passives" lookAhead="1"/><AnyChar String="DQMJXdqmjx" context="Actives" lookAhead="1"/><AnyChar String="$*#;" attribute="Comment" context="Commentar 1"/><keyword String="directives" attribute="Directive" context="Command"/><keyword String="state-machine" attribute="State Machine" context="Command"/><keyword String="simulation commands" attribute="Simulation Command" context="Command"/><keyword String="commands" attribute="Keyword" context="Command"/><keyword String="subckt model" attribute="Preprocessor" context="subckt"/><DetectChar char="+" attribute="Normal Text" context="Command"/><DetectIdentifier attribute="Normal Text" context="Command"/><RegExpr String="[.]\w+|" attribute="Unknown Command" context="Command"/></context><context name="Command" attribute="Normal Text" lineEndContext="checkContinuation"><DetectSpaces attribute="Normal Text"/><IncludeRules context="findLiteral"/><IncludeRules context="findOther"/></context><context name="Commentar 1" attribute="Comment" lineEndContext="#pop"><DetectSpaces/><IncludeRules context="##Comments"/><DetectIdentifier/></context><context name="checkContinuation" attribute="Normal Text" fallthroughContext="#pop#pop"><DetectChar char="+" attribute="Normal Text" context="#pop"/></context><context name="Actives" attribute="Actives" lineEndContext="#pop"><DetectIdentifier attribute="Actives" context="#pop!Command"/></context><context name="Passives" attribute="Passives" lineEndContext="#pop"><DetectIdentifier attribute="Passives" context="#pop!Command"/></context><context name="Source" attribute="Source" fallthroughContext="#pop!Command" lineEndContext="#pop"><DetectIdentifier attribute="Source" context="#pop!Command"/></context><context name="findLiteral" attribute="Normal Text" lineEndContext="#pop"><AnyChar String=">&lt;&amp;+-*^/=!~|" attribute="Symbol Operator"/><AnyChar String="(){}[]," attribute="Symbol"/><RegExpr String="(\b[0-9]+\.[0-9]*|\.?\b[0-9]+)([eE][-+]?[0-9]+)?(?![a-zA-Z_]+[0-9])" attribute="Number" context="Unit"/><DetectChar char='"' attribute="String" context="String"/><DetectChar char="'" attribute="String" context="TickString"/><DetectChar char=";" attribute="Comment" context="#pop!Commentar 1"/><StringDetect String="$ " attribute="Comment" context="#pop!Commentar 1"/></context><context name="findOther" attribute="Normal Text" lineEndContext="#pop"><RegExpr String="\b[^\s>&lt;&amp;(){}[];,=/+\-*\^~!]+\s*(?==(?!=))" attribute="Variable" context="Variable"/><keyword String="functions" attribute="Function"/><keyword String="A-devices model" attribute="A-device"/><DetectIdentifier attribute="Normal Text"/></context><context name="subcktParams" attribute="Normal Text" lineEndContext="checkContinuation"><DetectSpaces attribute="Normal Text"/><IncludeRules context="findLiteral"/><WordDetect String="params:" attribute="Subckt Params" insensitive="1"/><IncludeRules context="findOther"/></context><context name="Function" attribute="Normal Text" lineEndContext="#pop"><RegExpr String="\w+(?=\s*\()|" attribute="Function" context="#pop!Command"/><AnyChar String="VIEFGHSviefghs" context="#pop!Source" lookAhead="1"/><AnyChar String="RCLKYTrclkyt" context="#pop!Passives" lookAhead="1"/><AnyChar String="DQMJXdqmjx" context="#pop!Actives" lookAhead="1"/><DetectIdentifier attribute="Unknown Command" context="#pop!Command"/></context><context name="String" attribute="String" lineEndContext="#pop"><LineContinue attribute="String"/><HlCStringChar attribute="String Char"/><DetectChar char='"' attribute="String" context="#pop"/></context><context name="TickString" attribute="String" lineEndContext="#pop"><LineContinue attribute="String"/><HlCStringChar attribute="String Char"/><DetectChar char="'" attribute="String" context="#pop"/></context><context name="Unit" attribute="Unit" fallthroughContext="#pop" lineEndContext="#pop"><RegExpr String="(([fpnumckgt]|mil|meg)(Hz?|sec|Amp|[sAvCF]|dB|DRV[FZ])?|(Hz?|sec|Amp|[sAvCF]|dB|DRV[FZ]))\b" attribute="Unit" context="#pop" insensitive="1"/></context><context name="Variable" attribute="Normal Text" lineEndContext="#pop"><DetectSpaces attribute="Normal Text"/><DetectChar char="=" attribute="Variable Separator" context="#pop"/></context><context name="subckt" attribute="Normal Text" fallthroughContext="subcktParams" lineEndContext="checkContinuation"><DetectSpaces attribute="Normal Text"/><RegExpr String="(?!params:\s)[^\s{}(),;'=]+|" attribute="Subckt Note" context="#pop!subcktParams" insensitive="1"/></context></contexts><itemDatas><itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="0"/><itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="0"/><itemData name="State Machine" defStyleNum="dsKeyword" spellChecking="0" italic="1"/><itemData name="Simulation Command" defStyleNum="dsKeyword" spellChecking="0"/><itemData name="Unknown Command" defStyleNum="dsSpecialString" spellChecking="0"/><itemData name="Preprocessor" defStyleNum="dsPreprocessor" spellChecking="0" bold="1"/><itemData name="Directive" defStyleNum="dsOperator" spellChecking="0"/><itemData name="Source" defStyleNum="dsAttribute" spellChecking="0"/><itemData name="Actives" defStyleNum="dsAttribute" spellChecking="0"/><itemData name="Passives" defStyleNum="dsAttribute" spellChecking="0"/><itemData name="Subckt Note" defStyleNum="dsAnnotation" spellChecking="0"/><itemData name="String" defStyleNum="dsString"/><itemData name="String Char" defStyleNum="dsSpecialChar"/><itemData name="Comment" defStyleNum="dsComment"/><itemData name="Number" defStyleNum="dsDecVal" spellChecking="0"/><itemData name="Unit" defStyleNum="dsDataType" spellChecking="0"/><itemData name="Symbol Operator" defStyleNum="dsOperator" spellChecking="0"/><itemData name="Symbol" defStyleNum="dsNormal" spellChecking="0"/><itemData name="Function" defStyleNum="dsFunction" spellChecking="0"/><itemData name="A-device" defStyleNum="dsOthers" spellChecking="0"/><itemData name="Subckt Params" defStyleNum="dsConstant" spellChecking="0"/><itemData name="Variable" defStyleNum="dsVariable" spellChecking="0"/><itemData name="Variable Separator" defStyleNum="dsOperator" spellChecking="0"/></itemDatas></highlighting><general><comments><comment name="singleLine" start="*"/></comments><keywords casesensitive="0" weakDeliminator="."/></general></language>