gnu.gcc.help
[Top] [All Lists]

Re: using gcc preprocessor on custom control script

Subject: Re: using gcc preprocessor on custom control script
From: Paul Pluzhnikov
Date: Wed, 14 Jun 2006 17:38:29 -0700
Newsgroups: gnu.gcc.help
isaacyho@xxxxxxxxx writes:

> I have a script written in a custom control language, and would like to
> be able to feed it through gcc's preprocessor ( using -E ).   All I
> need is the #ifdef/#endif behavior to allow for customization of the
> script at run-time.

gcc is ill-suited for the task. Use 'm4' instead.

> The problem is that the scripting language uses "#" to signal
> "comment".   

That's only the first problem. You'll discover many more if you
continue on that path.

> What's the easiest way to get around this? 

Not using 'gcc' is the easiest solution.

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.

<Prev in Thread] Current Thread [Next in Thread>