On 24 Apr 2005 06:12:49 -0700, [EMAIL PROTECTED] wrote:

>Roger Leigh wrote:
>> [EMAIL PROTECTED] writes:
>>
>> > Paul Jarc wrote:
>> define([%include], [include([$1])])
>>
>> or whatever variation you like.  You can extend m4 with you own
>custom
>> macros to do whatever you like.
>>
>
>     Okay, how about "do loops", "procedures", "if/then/else" and
>"goto". Would m4 make it easy to do all these. I am working on a
>preprocessor for pl/1 which has all these as macros! Before I start
>writing a parser etc, I was wondering if I should rather do it using
>m4.
>
>Thank You,
>Himanshu.
M4 is very powerful. It is also hard to debug, most "garbage" gets
included in a macro which is emitted much later, maybe correctly,
probably not.

M4 wants m4 macro syntax. All the functions (above) you want are
available through m4. However, if you want some arbitrary syntax like
C or pl/1, good luck. It is very possible to do a multiple stage
preprocessor where m4 is one of the stages and some other stage like
awk or cpp continues the transform towards the eventual destination
syntax.


There is no "x" in my email address.
_______________________________________________
help-gnu-utils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gnu-utils

Reply via email to