help-bison
[Top][All Lists]
Advanced

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

Re: lex/yacc/gcc help


From: Akim Demaille
Subject: Re: lex/yacc/gcc help
Date: Wed, 6 Nov 2013 09:19:05 +0100

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?

> 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.


reply via email to

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