闪烁网lexer(XML)功能不正常
我正在为我正在处理的一些gcode文件准备一个lexer。至少可以说,斯金特拉的激光雷达信息非常稀少。到目前为止,我所做的只是复制和粘贴XML lexer,并将其重命名为gcodelexer。XML版本运行良好,但gcodelexer没有做任何事情。有人能帮我吗闪烁网lexer(XML)功能不正常,xml,lexer,scintilla,Xml,Lexer,Scintilla,我正在为我正在处理的一些gcode文件准备一个lexer。至少可以说,斯金特拉的激光雷达信息非常稀少。到目前为止,我所做的只是复制和粘贴XML lexer,并将其重命名为gcodelexer。XML版本运行良好,但gcodelexer没有做任何事情。有人能帮我吗 <?xml version="1.0" encoding="utf-8"?> <ScintillaNET> <Language Name="gcode"> <!--
<?xml version="1.0" encoding="utf-8"?>
<ScintillaNET>
<Language Name="gcode">
<!--
This is a bit of a hack that I picked up from SciTE, We keep the Stream
Comments as HTML Style and the Line Comments JavaScript Style. The better
way to do it would be to change the comment strings whenever the selection
changes based on if the current style is HTML or JavaScript (or VBScript,
PHP, etc)
-->
<Lexer LineCommentPrefix="//" StreamCommentPrefix="<!-- " StreamCommentSuffix=" -->" />
<!--
Additionally the HTML comment scheme lends itself better to having CTRL+Q toggle
Line comments and CTRL+SHIFT+Q add Stream comments rather than having VS style
comments.
-->
<Commands Inherit="True">
<Binding Key="Q" Modifier="Control" Command="ToggleLineComment" ReplaceCurrent="True"/>
<Binding Key="Q" Modifier="Shift Control" Command="StreamComment" ReplaceCurrent="True"/>
</Commands>
<!--
I saved the best for last. Styles, yeck. This is why the HTML config
is so damned complicated.
In order for any of the SubLangage Styles to inherit from the default config
they have to be declared here even if they don't have any values set.
-->
<Styles Inherit="True">
<!--
As sort of a neat side-effect of how the SubLanguage inheritance works
any styles declared here will be inherited by the sublanguage styles.
Note that they have to be decalared before any of the sublanguages for
it to work.
-->
<Style Name="DOUBLESTRING" ForeColor="Orchid" />
<Style Name="SINGLESTRING" ForeColor="Orchid" />
<SubLanguage Name="HTML">
<Style Name="DEFAULT" />
<Style Name="TAG" />
<Style Name="TAGUNKNOWN" />
<Style Name="ATTRIBUTE" />
<Style Name="ATTRIBUTEUNKNOWN" />
<Style Name="NUMBER" />
<Style Name="DOUBLESTRING" />
<Style Name="SINGLESTRING" />
<Style Name="OTHER" />
<Style Name="COMMENT" />
<Style Name="ENTITY" />
<Style Name="TAGEND" />
<Style Name="XMLSTART" />
<Style Name="XMLEND" />
<Style Name="SCRIPT" />
<Style Name="ASP" />
<Style Name="ASPAT" />
<Style Name="CDATA" />
<Style Name="QUESTION" />
<Style Name="VALUE" />
<Style Name="XCCOMMENT" />
</SubLanguage>
</Styles>
</Language>
</ScintillaNET>
<?xml version="1.0" encoding="utf-8"?>
<ScintillaNET>
<Language Name="xml">
<!--
This is a bit of a hack that I picked up from SciTE, We keep the Stream
Comments as HTML Style and the Line Comments JavaScript Style. The better
way to do it would be to change the comment strings whenever the selection
changes based on if the current style is HTML or JavaScript (or VBScript,
PHP, etc)
-->
<Lexer LineCommentPrefix="//" StreamCommentPrefix="<!-- " StreamCommentSuffix=" -->" />
<!--
Additionally the HTML comment scheme lends itself better to having CTRL+Q toggle
Line comments and CTRL+SHIFT+Q add Stream comments rather than having VS style
comments.
-->
<Commands Inherit="True">
<Binding Key="Q" Modifier="Control" Command="ToggleLineComment" ReplaceCurrent="True"/>
<Binding Key="Q" Modifier="Shift Control" Command="StreamComment" ReplaceCurrent="True"/>
</Commands>
<!--
I saved the best for last. Styles, yeck. This is why the HTML config
is so damned complicated.
In order for any of the SubLangage Styles to inherit from the default config
they have to be declared here even if they don't have any values set.
-->
<Styles Inherit="True">
<!--
As sort of a neat side-effect of how the SubLanguage inheritance works
any styles declared here will be inherited by the sublanguage styles.
Note that they have to be decalared before any of the sublanguages for
it to work.
-->
<Style Name="DOUBLESTRING" ForeColor="Orchid" />
<Style Name="SINGLESTRING" ForeColor="Orchid" />
<SubLanguage Name="HTML">
<Style Name="DEFAULT" />
<Style Name="TAG" />
<Style Name="TAGUNKNOWN" />
<Style Name="ATTRIBUTE" />
<Style Name="ATTRIBUTEUNKNOWN" />
<Style Name="NUMBER" />
<Style Name="DOUBLESTRING" />
<Style Name="SINGLESTRING" />
<Style Name="OTHER" />
<Style Name="COMMENT" />
<Style Name="ENTITY" />
<Style Name="TAGEND" />
<Style Name="XMLSTART" />
<Style Name="XMLEND" />
<Style Name="SCRIPT" />
<Style Name="ASP" />
<Style Name="ASPAT" />
<Style Name="CDATA" />
<Style Name="QUESTION" />
<Style Name="VALUE" />
<Style Name="XCCOMMENT" />
</SubLanguage>
</Styles>
</Language>
</ScintillaNET>