delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/07/09/20:05:31

From: ams AT ludd DOT luth DOT se (Martin Str|mberg)
Newsgroups: comp.os.msdos.djgpp,comp.programming
Subject: Re: Bison and [f]lexical tie-ins
Followup-To: comp.os.msdos.djgpp,comp.programming
Date: 9 Jul 1999 21:54:14 GMT
Organization: University of Lulea, Sweden
Lines: 26
Message-ID: <7m5r26$see$1@news.luth.se>
References: <37863AAA DOT BF85DE25 AT americasm01 DOT nt DOT com>
NNTP-Posting-Host: queeg.ludd.luth.se
X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Campbell, Rolf [SKY:1U32:EXCH] (cp1v45 AT americasm01 DOT nt DOT com) wrote:
: struct a {int a; int b;};
: struct b {int a; int b;};
: 
: int main()
: {
:   int a, m(b j), b;

Maybe I'm tired but what is m(b j) above? Is it valid C code? If it is
what does it mean?

Anyway in the code there isn't a type called "b". There's a type
called "struct b", right?

[Klippa, klapp, kluppit rest of program and bison horror story.]

I think the trick is to delay interpreting the lex/yacc output
somewhat. Like building an incomplete syntax tree, which you then fill
in with more information when you have the information that is
necessary (the easiest is to do this when the whole source file has
been parsed so you know there won't be any more information).


Skunk Anansie, Paranoid & Sunburnt,

							MartinS

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019