delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/31/02:53:07

From: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Flex, Bison & How to use them
Date: 31 Jan 1998 05:55:31 GMT
Organization: The National Capital FreeNet
Lines: 19
Message-ID: <6auecj$p9o@freenet-news.carleton.ca>
References: <6au6nc$d50$1 AT news1 DOT tor DOT acc DOT ca>
Reply-To: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
NNTP-Posting-Host: freenet2.carleton.ca
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp


This is not really all that DJGPP-specific, but...



Your yyparse() automatically looks for a yylex() function. So all you need
to do is call yyparse(); and make sure your yylex() looks in the right
place for what it is to parse.

As for modifying variables, the code that ends up in the parser can fiddle
global variables, but it can't access class member variables as yyparse()
is just a global function. (You could, I suppose, generaye a yyparse() and
then modify the stuff Bison output to make it Foo::yyparse() though.)
--
    .*.  Friendship, companionship, love, and having fun are the reasons for
 -()  <  life. All else; sex, money, fame, etc.; are just to get/express these.
    `*'  Send any and all mail with attachments to the hotmail address please.
Paul Derbyshire ao950 AT freenet DOT carleton DOT ca pgd73 AT hotmail DOT com

- Raw text -


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