本文介绍了etags的默认正则表达式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建额外的正则表达式用于etags,但我希望他们基于已经存在的内容(特别是我想将[\t] *添加到当前集合正则表达式使用)。 .lisp文件使用的默认正则表达式是什么?

I'd like to create additional regular expressions for use with etags, but I'd like them to be based upon what's already there (in particular, I'd like to add [ \t]* to the current set of regular expressions that etags uses). What are the default set of regular expressions that etags uses for .lisp files?

推荐答案

etags通常不会使用正则表达式实现内置的语言。相反,它为每个内置语言提供了自定义解析器代码。

etags doesn't generally use regular expressions to implement the languages that are built-in. Instead, it has custom parser code for each built-in language.

这就是说,Lisp似乎只寻找几种形式,可以通过常规表达式:

That said, it seems for Lisp to look for just a few forms, that could be handled by regular expressions:


  • 它在第一列中查找(

  • 它跳过defvar

  • 它忽略出现在(

  • 之后的cl-或CL-然后,def和DEF li>
  • 它还检查(package :: def作为导入

我发现这通过在Emacs源代码树中阅读lib-src / etags.c来搜索Lisp_functions。

I found this by reading lib-src/etags.c in the Emacs source tree. Search for "Lisp_functions".

这篇关于etags的默认正则表达式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-12 00:40