TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: CHRIS CRANFORD
from: Pascal Schmidt
date: 2004-02-09 13:56:28
subject: Scripting/Basic Compiler/Interpretor

Hi CHRIS! :-)

 CC> Can anyone offer some suggestions on how you would go about defining
 CC> your functions, keywords/syntax parser and then how to execute it in
 CC> the internal interpretor engine?
On Unix/Linux: for the parser, come up with a decent grammar, then use lex
(or flex) and yacc (or bison) to automatically generate most of the C code
for the parser. You'd also need to define some data structures to hold the
contents of a script, filled out by the parser.

For the interpreter, you need to come up with a runtime system, basically
abstractions for all the actions a script can take. So if your scripts are
allowed to declare arrays, you'd need a full memory management system for
that.

Ciao
Pascal

--- Msged/LNX 6.1.1
* Origin: sed s/$(echo $HOME | sed 's/[[:punct:]]/\\&/g')/~/ (1:153/401.2)
SEEN-BY: 633/267 270
@PATH: 153/401 307 140/1 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.