www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/05/05/18:43:39

From: "Christopher Nelson" <paradox AT gye DOT satnet DOT net>
To: <djgpp AT delorie DOT com>
Subject: Re: Scripting language
Date: Wed, 5 May 1999 14:46:19 -0600
Message-ID: <01be9738$5444a460$LocalHost@thendren>
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.71.1712.3
X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3
Reply-To: djgpp AT delorie DOT com

>I would like to make a scripting language where I can go into another
program and type, say "walk W 5", and by character would walk five spaces
west.  I would like to know how you would program the commands in, how they
would work, how to store them.  To store them, I guess I would just put it
in an extremely large array, or a linked list of some sort.  Does anyone
have any ideas?  Thanks.



:-)  YOU KNOW, this is a VERY broad question.  this list isn't here to do
your work for you.  it appears, from your questions, that you have very
little idea how scripting even works.  the first thing you need to do is
read about that.  decide how the language is setup (does it have variables,
functions? is it juts a list of commands?  what ends a command?)

do a good search on the internet about scripting and HOW-TO's.  there are
hundreds of ways to implement scripting, and it all depends upon the
environment you're implementing it in.  how does the scripting engine get
input?  how does it get output?

there are a variety of ways to store the commands as well: an array, a set
of case statements that sort on a hash-key of the input command, a
hash-table...

download Flex and Bison from the djgpp site.  they are built for making
compilers and scripting engines.  read their documentation thoroughly, and
that will give you a much, much better idea what it is you want to do.

    -={C}=-

- Raw text -


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