Projects / Filepp / Comments

RSS Comments for Filepp

07 Feb 2002 11:52 KernelKludge

Re: I don't understand

> Why did someone feel the need to rewrite
> the C pre-processor?

CPP is not a good general-purpose macro processor.
The question is why would one reimplement m4?
E.g.
GNU m4 (www.gnu.org/software/m4/).

26 Mar 2001 04:57 cabaret

Re: I don't understand
The short answer is Perl. I wanted to write a generic file preprocessor which had a core set of keywords (same as cpp), but which was easy to modify and extend by adding further keywords. As I wanted to write the new keywords in Perl, it made sense to write it all in Perl.

12 Mar 2001 20:26 pixelbeat

Re: I don't understand

>
> % Why did someone feel the need to
> rewrite
> % the C pre-processor? There's
> nothing
> % preventing you from using the C
> % pre-processor on files that aren't
> C
> % sources.
> %
>
>
> cpp is designed specifically to
> generate output for the C compiler.
> Yes, you can use any file type with it,
> but the output it creates includes loads
> of blank lines and lines of the style:
>
> # 1 "file.c"
>
> Obviously these lines are very useful
> to the C compiler, but no use in say an
> HTML file.
>
> Also, as filepp is written in Perl, it
> is 8-bit clean and so works on any
> character set, not just ASCII
> characters.
>
> Filepp is also customisable and
> hopefully more user friendly than cpp.
>

If the output from cpp is not what's required,

why didn't you modify cpp slightly and provide

a switch to choose the new functionality, instead

of reinventing 95% of cpp again.

20 Feb 2001 12:59 mikpos

C-centricity

> % Why did someone feel the need to rewrite

> % the C pre-processor? There's nothing

> % preventing you from using the C

> % pre-processor on files that aren't C

> % sources.

> cpp is designed specifically to

> generate output for the C compiler.

> Yes, you can use any file type with it,

> but the output it creates includes loads

> of blank lines and lines of the style:

>

> # 1 "file.c"

>

> Obviously these lines are very useful

> to the C compiler, but no use in say an

> HTML file.

>

> Also, as filepp is written in Perl, it

> is 8-bit clean and so works on any

> character set, not just ASCII

> characters.

>

> Filepp is also customisable and

> hopefully more user friendly than cpp.

Also, I should point out that the C pre-processor is C-centric in other ways. For example, something like:

#if 0

"

#endif

is illegal and would cause cpp to choke. Everything must be made up of valid C pre-processor tokens, and " is not one of them (because it is an unterminated string).

19 Feb 2001 17:25 cabaret

Re: I don't understand

> Why did someone feel the need to rewrite
> the C pre-processor? There's nothing
> preventing you from using the C
> pre-processor on files that aren't C
> sources.
>

cpp is designed specifically to generate output for the C compiler. Yes, you can use any file type with it, but the output it creates includes loads of blank lines and lines of the style:

# 1 "file.c"

Obviously these lines are very useful to the C compiler, but no use in say an HTML file.

Also, as filepp is written in Perl, it is 8-bit clean and so works on any character set, not just ASCII characters.

Filepp is also customisable and hopefully more user friendly than cpp.

19 Feb 2001 08:55 Avatar danielpearson

I don't understand
Why did someone feel the need to rewrite the C pre-processor? There's nothing
preventing you from using the C pre-processor on files that aren't C sources.

Screenshot

Project Spotlight

onQuery

A advanced event querying engine.

Screenshot

Project Spotlight

juntaDados

A GNU/Linux multimedia distribution that is targeted at audio, video, and graphics producers.