www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/12/21:07:18

Xref: news2.mv.net comp.os.msdos.djgpp:3748
From: br516 AT FreeNet DOT Carleton DOT CA (Nicholas Lynch)
Newsgroups: comp.os.msdos.djgpp
Subject: Bison, Yacc realted question
Date: 12 May 1996 19:22:03 GMT
Organization: The National Capital FreeNet
Lines: 28
Sender: br516 AT freenet3 DOT carleton DOT ca (Nicholas Lynch)
Message-ID: <4n5dor$d1h@freenet-news.carleton.ca>
Reply-To: br516 AT FreeNet DOT Carleton DOT CA (Nicholas Lynch)
NNTP-Posting-Host: freenet3.carleton.ca
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

 I've been trying to use Bison to create a script language for an RPG. I
downloaded a little something about YACC off the net, it has helped a bit
(I don't remember what the file was called exactly) but I still have a 
few questions.

 I want to encorporate subroutines in my language. So, I thought that I might
be able to do that like this:

 subroutine:      sub_name '(' arguments ')' '{' expressions '}'
 ;

 But I am lost as to how I would define arguments and expressions. For
arguments I need some way of passing muliple arguments, even no arguments,
with ',' characters separating each.

 Something else that is starting to bother me, would I have to do a sweep
of my entire script looking for subroutines before I could run it? Because
I'ld have to know what subroutines are defined, where they are and the 
arguments for each.

 I think this may be a bit tricky for a beginner :)

<< If there is a better newsgroup to take this to, please tell me, I feel
   extremely off-topic >>
--
   O                   Nicholas Lynch
  -|-                 br516 AT freenet DOT carleton DOT ca
  / \

- Raw text -


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