Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QB vs C++
#21
Quote:This compiler phase seems to be dwindling already - trying to write a qb compiler teaches you that BASIC syntax is easy on the programmer and hard on the compiler, and gives you an appreciation for the simplicity (especially from the compiler's perspective) of C. But I'm not going to give up.

If you sat down an penned out the entire grammar for QB and then used tools such as flex and bison, you could have a working parser/lexer in less than a weeks work, this would also remove the necessity of splitting up the if-then-else and colon separated statements because they would just get tokenised along with the rest of the input. Then you can spend most of your time coding the interesting stuff such as type checking and code generation.
esus saves.... Passes to Moses, shoots, he scores!
Reply
#22
I hate bison and flex. It can be done without them, and it's not that hard.
Anyways, I'm working on a project that kinda requires my attention right now. The first group project that has ever really worked out for me. And I'm doing a script compiler - easier, but it still outputs to asm, and it could easily be modified to spit out real asm.

Good luck with your projects.
Reply
#23
C++ and its OOP is superb! I have worked hard enough with QB to feel its limitations. Forget speed, pointers in C++ make it atleast a million times better than QB. :wink:
he Magical Me!
Reply
#24
Pointers are not OOP :roll: references are, but C++ uses pointers...
That's why C++ is so odd Big Grin
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#25
Quote:Pointers are not OOP :roll: references are, but C++ uses pointers...
That's why C++ is so odd Big Grin
You can use both.. C++ is a party and everybody is invited Big Grin
In a world without walls and doors, who needs Windows and Gates?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)