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 7787711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:45:24+00:00 2026-06-01T20:45:24+00:00

I have written a simple assembler using flex+bison. I’d like to add a preprocessor

  • 0

I have written a simple assembler using flex+bison. I’d like to add a preprocessor (macros) to the assembly language. This is my first time trying to use flex+bison, I’m not sure how to go about this.

Is it appropriate to add a separate instance of flex+bison and do the preprocessing completely separately? Or do they support expressing different constructs for different phases of processing?

If curious, the assembler is here, for the DCPU-16 architecture.

  • 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-06-01T20:45:26+00:00Added an answer on June 1, 2026 at 8:45 pm

    You definitely want a separate parser. That’s the way gcc does it – you can stop the compilation after just the preprocessing (-E, I believe). It may be technically possible to write as a single parser, but it’ll be a lot more trouble, and I don’t see a particular reason why it would be useful, whereas keeping it separate will allow you to stop compilation after just preprocessing, making it easier to track down errors not just in the preprocessor/assembler itself, but any programs written with it.

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

Sidebar

Related Questions

Ok so I have an assembly, written in C#, using Visual Studio 2010. This
I have written a simple test application using asp.net mvc with C#. The application
I have written some simple and working assembly code on 8085 trainer hardware. But
I have written a simple code using getopt for understanding perspective. #include <stdio.h> #include
I have written a simple program in MASM, like: .386 .model flat, stdcall option
this is more theoretical question. I have written simple chat with my friend. We
I have written simple first stage bootloader which displays Hello world using interrupt to
I have written a simple facebook application using PHP SDK. Application works well but
I have written following simple code to see the behavior of rendering. In this
I have a simple function written in ARM assembler. The first time it's ran,

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.