Hi,
I have been playing around with 'libpcre' for Parrot m4. For some reason I couldn't compile two regular expressions in the same PIR script. I created a sample C program and that worked like it should.
It looks like the error has nothing to do with 'libpcre'. So I boiled down my code to a small test script. When a macro contains a '.sub' call, and that macro is used twice, then I get a 'memory error'.
[EMAIL PROTECTED]:~/devel/Parrot/parrot/languages/m4> ../../parrot t/regex/macro_used_twice.imc Speicherzugriffsfehler
Could sombody test the attached script on another machine? I'm working here on a Linux laptop:
Two answers here.
1) We probably have a bug in macro expansion
2) Dan has declared that macros are coming out of IMCC. (Mainly because I told him
I don't want them and they make the lexer more complicated than I want it to be.. and..
macros are less useful for compilers than people hand-writing IMC code)
I prefer macros to be a part of a preprocessor tool external to the builtin IMC language.
If enough people really have strong opinions on macros, now is the time to voice it, because
otherwise I'm removing them.
-Melvin