Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
generating .h with bison
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
mike burrell  
View profile  
 More options Jul 10 2000, 3:00 am
Newsgroups: gnu.utils.help
From: mike burrell <mik...@home.com>
Date: 2000/07/10
Subject: generating .h with bison
i'd like bison to generate a header file for me.  e.g. if i have:

        %token BAR

        %%

        /* ... */

        %%

        /* ... */

and then compile it with 'bison foo.y', i get the definition of BAR at
the top of foo.tab.c:

        #define BAR  257

but what i would really like is for it to be defined in a header file (such
as foo.tab.h) so that i can #include it in the flex part of my parser.

sorry, i've just started learning lex and yacc and i'm not entirely sure of
the conventions for these sorts of things, but this would sure be useful :).
i've gone through the man page for bison and can't find any command-line
option that would be useful.

cheers

--
             /"\                                m i k e    b u r r e l l
             \ /     ASCII RIBBON CAMPAIGN               mik...@home.com
              X        AGAINST HTML MAIL,
             / \      AND NEWS TOO, dammit


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ken Pizzini  
View profile  
 More options Jul 12 2000, 3:00 am
Newsgroups: gnu.utils.help
From: k...@halcyon.com (Ken Pizzini)
Date: 2000/07/12
Subject: Re: generating .h with bison

On Mon, 10 Jul 2000 23:27:58 GMT, mike burrell <mik...@home.com> wrote:
>i'd like bison to generate a header file for me.  e.g. if i have:
[snip]
>and then compile it with 'bison foo.y', i get the definition of BAR at
>the top of foo.tab.c:

>        #define BAR  257

>but what i would really like is for it to be defined in a header file (such
>as foo.tab.h) so that i can #include it in the flex part of my parser.

bison -d foo.y

                --Ken Pizzini


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »