[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fix bash misscompilation with latest bison
From: |
Jan Hubicka |
Subject: |
Fix bash misscompilation with latest bison |
Date: |
Sat, 9 Nov 2002 16:14:12 +0100 |
User-agent: |
Mutt/1.3.28i |
Hi,
I am having problems with new m4 support. The bash uses string
"\"address@hidden""
to pass into function call (that is later expanded in the standard way
as $@ in bash). M4 interprets $@ as argument and thus the string comes
out as \"\""\".
I didn't found any way how to escape $ in m4 macro cleanly, only way I
found is the suggestion from manual, to simply parenthese the operand
and close parenthesis and open it again just after $, as m4 pass all
unrecognized $ combination trought.
Parenthesis are overwriten into [ .. ] by bison m4 preambule, so I
replace every $ occuring in string literal or comment of input template
by $][ that will hopefully open and close the parethesis assuming that
they come out parenthesed in all cases. I tried some cases and it seems
to work. However $ is not the only special purpose character in m4. I
believe at least @ can also cause problems. [] are already escaped into
"trigraphs" by bison looking like @:>@ and later postprocesed from m4
output, that looks also broken to me, as passing @:>@ will get magically
converted into ].
I am attaching the testcase and fix I made
Honza
bisf
Description: Text document
t.y
Description: Text document
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Fix bash misscompilation with latest bison,
Jan Hubicka <=