Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 990707
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:59:03+00:00 2026-05-16T05:59:03+00:00

I was wondering if someone uses a generic preprocessor for manipulating text files. The

  • 0

I was wondering if someone uses a generic preprocessor for manipulating text files.

The idea came up, as Java does not have a preprocessor, but I’d like to have conditional code compilation, etc.

Now, taking that idea further, I might as well use a generic preprocessor for any kind of files that need frequent editing, but all edits are in a similar manner.

Now, there’s good ol’ m4 which I’d like to use as I use the C-preprocessor and there is GPP, that one however, stopped being developed in 2007.

I’d like some suggestions which preprocessor is preferable, if possible, it should take directives the same way C-preprocessor takes them #define SOMETHING.

Since m4 doesn’t use sigils or something, it might collide with other code, when m4 is the way to go, I’d need advice on how to prefix every directive with a sigil or a different prefix or something.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T05:59:03+00:00Added an answer on May 16, 2026 at 5:59 am

    Most C/C++ compilers allow you to just run the preprocessor and save the output, and can be used on generic input. (for Visual C++, I blieve the option is /P)

    But remember the preprocessors cause as many problems as they solve. The designers of both C++ and Java have tried hard to eliminate the need for using the preprocessor. For example, in Java, code like this:

    if (true)
         CallThis();
    else
         DoNotCallThis();
    

    will just generate code for the CallThis() call and not generate code for the condition or the else branch. (This is not a quality of Implementation issue — it is a requirement of the Java language definition).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.