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

本文介绍如何在Source Insight中配置ARM汇编语言的语法高亮,包括导入ARM.CLF文件、设置关键字、定义注释及范围、添加文件类型等步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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

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

 

2. 导入ARM.CLF 文件:

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

 

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

 

4. 设置"Comments and Ranges"

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

 

b) 设置"Custom Parsing"

 


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

 

 

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

 

5. 添加文件类型

点击"Options"->"Document Options"

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



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


评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值