help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question/Feature Request - #include


From: Hans Aberg
Subject: Re: Question/Feature Request - #include
Date: Thu, 15 Mar 2007 23:22:16 +0100

On 15 Mar 2007, at 16:34, Matt Cupp wrote:

I was wondering if there is currently a way to include other files in
a Bison source file at run time?  Like C/C++'s #include preprocessor
directive.  If not is this something I could add to feature requests?

(You probably mean compile time - "run time" usually refers to the running of the compiled code.)

The C/C++ preprocessor is just another language the input file is being run through, the result being passed to the actual C/C++ compiler. So you can run any file through the it, if your compiler admits it (for example, by turning off the following C/C++ compilation), write the output to a file, and then pass that file to Bison.

Otherwise, Bison does not have that preprocessor built in, though you may use preprocessor commands in code that will become embedded in the output file that will be compiled by a C/C++ compiler.

  Hans Aberg






reply via email to

[Prev in Thread] Current Thread [Next in Thread]