|newbie: making a BASIC comiler Gernot.Frisch@Dream-D-Sign.de (Gernot) (2003-02-06)|
|Re: newbie: making a BASIC comiler email@example.com (Robert Dimond) (2003-02-12)|
|Re: newbie: making a BASIC comiler firstname.lastname@example.org (2003-02-21)|
|Date:||6 Feb 2003 00:14:25 -0500|
|Keywords:||design, question, Basic|
|Posted-Date:||06 Feb 2003 00:14:25 EST|
I did a BASIC compiler on my own, but now, that files are getting
bigger&bigger, it's too slow. (I used lot's of string replacements - pretty
I want to make a new version using LEX/YACC (at least I think I want to).
- Can I do this with LEX/YACC, or what is best to use?
- Can the BASIC contain user defined functions?
- What about local variables?
// Sample of what should work
FUNCTION name: arg1, arg2$
temp=arg1 * arg2$ // See: arg2$ is cased to number!
PRINT name(5, "7") // See: function with and w/o braces!
- And process include files or multiple file input?
- Can I define structures? That would be cool, but neccessary.
DIM veh AS Car
veh.brand$ = "Fauxpas"
veh.color = RGB(255,0,0)
- On the other hand, I wish to have name and name$ automatically
as global numbers and strings defined.
- Has anybody some experience with BASIC and can give me
some tips to avoid mistakes in the beginning?
- Will the produced code be fast? My compiled code was
(in contrary to the compiler) fast as heck. Will it be?
- Will YACC create C-code or ASM?
- What is a BNF?
- Can I compile YACC with Visual Studio or only with GCC?
- When inserting new commands: Do I have to recompile the
compiler, or can it read a file?
I'm sorry for the stupid beginners questions, and appreciate any help.
DREAM DESIGN ENTERTAINMENT
DiNGS Game Basic/ClipMagic
Return to the
Search the comp.compilers archives again.