help-bison
[Top][All Lists]
Advanced

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

Re: lex/yacc/gcc help


From: Mark Hounschell
Subject: Re: lex/yacc/gcc help
Date: Wed, 06 Nov 2013 07:57:41 -0500
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.0

On 11/06/2013 03:19 AM, Akim Demaille wrote:

Le 5 nov. 2013 ? 14:11, Mark Hounschell <address@hidden> a Ècrit :

Thanks Akim,

Hi!

Like I said in my original post, I am yacc/lex ignorant. The strange thing, 
that I haven't mentioned is that this all built successfully 4, 5, or more 
years ago on Linux.

I would not have expected that, given what you sent.

I was recently able to find that executable that I had checked into CVS those 
years back and it works. I also found some notes of what I originally had to do 
to get it to build. All I had to do back then was:

1. Changed all ocurrances of yylval.ntype
                          to yylval.nvaltype.ntype
2. Changed all occurances of yylval.nval
                          to yylval.nvaltype.nval

3. Changed all occurances of yybgin to yy_start

4. Changed all occurrences of "k =/ 10" to "k /= 10"

Wow, that piece of software _is_ old!  Could you tell us what
it is?


It's a micro code assembler for a legacy CPU boards micro engine. It is an early 80s generation CPU board. From back in the days when powerfull CPUs were not yet on a chip. I still repair these boards and often a micro diagnostic has to be modified to create tight scope loops. The peice of software I'm trying to build creates the assembler used to compile the micros and firmware for this board. There was a time this peice of software was "Company private". That was long ago though. I would have no problem providing the code if it would help me get it to build again?

As far as including the whole scanner in the yacc file, the y.tab.c file does 
include the lex file but at the very end of it. After this BEGIN shows up.

BEGIN is a macro, so it must be #defined before it is
used.

I assume lex.yy.c is the whole scanner?

Yes, that's what I meant.

And I also assume you mean trying to include it before the BEGIN?

To include it before the body of the parser.  You'll have to find
the right place, as the scanner certainly also wants to "see" things
from the parser, such as YYSTYPE I guess.


Since I don't remember what version of SuSE Linux I used when it actually did built right, I might just get out all my old dist CDs and see if I can pin down the versions that did work.

Regards
Mark



reply via email to

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