让Source Insight支持ARM汇编.S文件关键字高亮

欧大琛 2019-01-31 PM 2251℃ 0条
  1. 首先去Source Insight的官网下载ARM.CLF 文件:http://www.sourceinsight.com/public/languages/
    201901161848389161b
  1. 导入ARM.CLF 文件:

打开 "Options"->"Preference"->"Languages"
20190116184838de72b

  1. 设置关键字和属性

a) 新建个文本文件,保存以下内容

!, Delimiter
#, Delimiter
%, Delimiter
&, Delimiter
', Delimiter
(, Delimiter
), Delimiter
*, Delimiter
+, Delimiter
",", Delimiter
-, Delimiter
.align, Keyword
.ascii, Keyword
.BREAK, Keyword
.bss, Keyword
.byte, Keyword
.CODE, Keyword
.CONST, Keyword
.CONTINUE, Keyword
.CREF, Keyword
.data, Keyword
.DATA?, Keyword
.define, Keyword
.ELSE, Keyword
.ELSEIF, Keyword
.ENDIF, Keyword
.ENDW, Keyword
.ERR, Keyword
.ERRB, Keyword
.ERRDEF, Keyword
.ERRDEFI, Keyword
.ERRE, Keyword
.ERRIDNI, Keyword
.ERRNB, Keyword
.ERRNDEF, Keyword
.ERRNZ, Keyword
.fill, Keyword
.globl, Keyword
.IF, Keyword
.long, Keyword
.MODEL, Keyword
.NOCREF, Keyword
.quad, Keyword
.RADIX, Keyword
.REPEAT, Keyword
.STACK, Keyword
.text, Keyword
.UNTIL, Keyword
.UNTILCXZ, Keyword
.WHILE, Keyword
.word, Keyword
/, Delimiter
:, Delimiter
;, Delimiter
<, Delimiter
=, Delimiter
>, Delimiter
?, Delimiter
@CATSTR, Keyword
@INSTR, Keyword
@SIZESTR, Keyword
@SUBSTR, Keyword
define, Keyword
elif, Directive
else, Directive
endif, Directive
if, Directive
ifdef, Directive
defined, Directive
ifndef, Directive
include, Keyword
pragma, Keyword
undef, Keyword

b) 保存完后,将关键字导入:

点"Options"->"Preference"->"Languages"->"ARM Assembly"->"keywords" ,然后按照以下图示导入:
20190116184838427d8

  1. 设置"Comments and Ranges"

a) 双击"ARM Assembly",进入Custom Parsing,如图所示添加注释定义:
201901161848385d731

b) 设置"Custom Parsing"
201901161848384f545

20190116184838e4f30

\([A-Za-z0-9_]+\)=.

2019011618483863d7d

^\([_A-Za-z][A-Za-z0-9_]+\):*
  1. 添加文件类型

点击"Options"->"Document Options"
20190116184838f11b1

注意:将别的地方File filter 有关.S .s删除,不然显示会有问题

最后点击Close即可,效果图如下:

20190116184838a3c23

标签: none

「一键投喂 软糖/蛋糕/布丁/牛奶/冰阔乐!」

欧大琛

(๑>ڡ<)☆谢谢老板~

使用微信扫描二维码完成赞赏

非特殊说明,本博所有文章均为博主原创。

评论啦~