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

时间:2022-04-26 12:45:43

转载:http://hi.baidu.com/381082014/item/109a7315e31dde416926bbee

1. 首先去Source Insight的官网下载ARM.CLF 文件:http://www.sourceinsight.com/public/languages/

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

 

2. 导入ARM.CLF 文件:

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

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

 

3. 设置关键字和属性

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" ,然后按照以下图示导入:

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

 

4. 设置"Comments and Ranges"

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

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

 

b) 设置"Custom Parsing"

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

 

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

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

 

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

 

^\([_A-Za-z][A-Za-z0-9_]+\):*

 

5. 添加文件类型

点击"Options"->"Document Options"

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

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



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

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