On Sat, Feb 28, 2015 at 09:37:30PM +0000, Zack Piper wrote: > Hello, > > I'm currently trying to figure out how to make m4 only call macros within > certain brackets, for example: > > ``` > define(`test', '2') > test > ->test > > <test> > ->2 > ``` > > It would be even better if this was possible. > > ``` > define(`test', '2') > <test> > -><test> > > <#test> > ->2 > ``` > > Above is exactly what the `-H` flag does on GPP (Generic Preprocessor) > (http://files.nothingisreal.com/software/gpp/gpp.html). > > Any help would be great, thanks! > -- > I have nothing fancy or intelligent to put here.
Hm, I found out how to do it. Unfortuently it seems to segfault when using "changeword(`#<\([_a-zA-Z0-9]*\)>)')", and then trying to invoke a macro: (gdb) run gpp.m4 Starting program: /usr/local/bin/m4 gpp.m4 Got object file from memory but can't read symbols: File truncated. Program received signal SIGSEGV, Segmentation fault. next_token (td=td@entry=0x7fffffffd0b0, line=line@entry=0x7fffffffd0ac) at input.c:918 918 if (regs.start[1] != -1) -- I have nothing fancy or intelligent to put here.
pgpLTmcSg4dVX.pgp
Description: PGP signature
