TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: CHRIS CRANFORD
from: Jasen Betts
date: 2004-02-16 18:45:04
subject: Scripting/Basic Compiler/Interpretor

Hi CHRIS.

08-Feb-04 23:21:12, CHRIS CRANFORD wrote to ALL

 CC>   // Basic Example
 CC>   Dim hFile as Integer = Open "filename.log" for Append
 CC>  if hFile >> 0 Then
 CC>     Print #hFile, "This is a log entry"
 CC>     Close #hFile
 CC>   end if

 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?

first you need to define the language.

then you need to write a porogram that can understand it...

often this involves many tables and arrays of keywords etc, as was
mentioned flex and bison are tools that can handle much of the
drudge work for you making it easier to tweak the definition of the
language without having to make,

Theses tools are avaialble primarily for unix(etc) but also avaialble for
all popular operating systems (dos/windows/mac/amiga etc) these are GNU
tools so they're free, but downlooad the binary because the source needs
other unix tools to compile...

the syntax these tools use to define the symboi-set and the syntax used by
your langage is rather inviolved, but IIRC Oreilly prroduced a good book on
it - check your library.

flex and bison from their input files produce C code that can make sense of
yor language it then up you to put in the C code to do the actual work....

 -=> Bye <=-

---
* Origin: Black Holes were created when God divided by zero! (3:640/1042)
SEEN-BY: 633/267 270
@PATH: 640/1042 531 954 774/605 123/500 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™.