English 中文(简体)
• 在宏观目标与宏观后扼杀具有相同特性时,将m4视为宏观目标。
原标题:make m4 see macro when macro ends with same character as string following macro
  • 时间:2011-07-25 09:31:19
  •  标签:
  • macros
  • m4

我正在开发一种利用M4来扩大某些档案的系统,但在某些案件中,我会遇到扩大问题。 定义/宏观命名公约(如果可能的话,I d并不变化)为__< 名称与“>;(即双重领导和挂图)。 因此,这种扩大是正确的:

define(`__ROOT__ , `/home/mydir )
...
__ROOT__/bin

专 员

/home/mydir/bin

define(`__PREFIX__ , `App_Mnemonic )
...
__PREFIX___some_service

应当:

App_Mnemonic_some_service

but 专 员

__PREFIX___some_service

(即它忽略了扩大)

我认为,在宏观的拖拉线和基本案文的有效强调之间缺乏空间令人困惑。 我是否可以这样做? Can 例如,我用沉默的镜子对宏观进行划界,就像冲积变量一样?

最佳回答

显而易见的是,在根本案文中,我必须做的是改变:

__PREFIX___some_service

为此:

__PREFIX__()_some_service

这或许是一个小cl,但毕竟是宏观的,没有必要改变宏观定义。 因此,这可以停留在:

define(`__PREFIX__ , `App_Mnemonic )
问题回答

暂无回答




相关问题
C macro processing

I m thinking about best way to write C define processor that would be able to handle macros. Unfortunately nothing intelligent comes to my mind. It should behave exactly like one in C, so it handles ...

Macros as arguments to preprocessor directives

Being faced with the question whether it s possible to choose #includes in the preprocessor I immediately thought not possible. .. Only to later find out that it is indeed possible and you only need ...

Is there a profitable way to record user actions in textarea?

I need to send bunch of commands to the server on timer - like: put(0,"hello") del(4,1) put(4," is around the corner") so I need to monitor and record all of the user input and compile/flush it on ...

taking java method names as function arg in clojure

All, I want to create a function that takes a symbol representing a java method and applies it to some object: (user=> (defn f [m] (. "foo" (m))) When I execute this, I get a result much ...

Removing macro in legacy code

I have a lot of legacy code using macro of the form: #define FXX(x) pField->GetValue(x) The macro forces variable pField be in the scope: ..... FIELD *pField = .... ..... int i = FXX(3); int j = ...

eval during emacs lisp macro expansion

How can I fix the simple macro foo in (elisp)Eval During Expansion? None of the followings work: (defmacro foo1 (a) `(setq (eval ,a) t)) (defmacro foo2 (a) `(setq ,(eval a) t)) (defmacro foo3 (...

热门标签