[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: m4 process hang
From: |
Verma, Nitin \(GE Consumer & Industrial\) |
Subject: |
RE: m4 process hang |
Date: |
Thu, 27 May 2004 14:14:32 +0530 |
Even
this feed will hang.
---------------
define(`x', `y')
x
define(`y',
`x')
y
---------------
It's a infinite loop, y
expands to x then x expands to y then y expands to x ... and so on so
for
Am I
right?
and better way to write this
feed is:
-----------------
define(`x', ``y'')
x
define(`y',
``x'')
y
-----------------
or
My old feed
as
------------------
define(`x', `y')
x
define(x,
``y'')
y
------------------
i.e:
x = y
y = `y'
so, now y's expansion is y
quoted
not
------------------
define(x, y)
x
define(x,
y)
y
------------------
i.e.
x=y
y=y
so, now y's expansion is y unquoted ... and the problem
starts
Hi
Team,
I am very new to
m4 macros, I effort to learn m4 macro writing. I can across this
behavior.
I just made a
file `try'
[neo]$ cat
try
define(x, y)
x
define(x, y)
y
[neo]$
And fed to
m4
[neo]$ m4
try
y
(hangs)
Now if I write
[neo]$ cat try
define(x, y)
x
define(x, y)
[neo]$
and the feed to
m4
[neo]$ m4
try
y
[neo]$
it works as
expected.
Am I doing
something wrong?
[neo]$ m4
--version
GNU m4 1.4.1
[neo]$
Regards,
Nitin
- m4 process hang, Verma, Nitin \(GE Consumer & Industrial\), 2004/05/26
- RE: m4 process hang,
Verma, Nitin \(GE Consumer & Industrial\) <=