View previous topic - View next topic |
Author |
Message |
BigManJones Scholar
Joined: 22 Mar 2003 Posts: 196
|
Posted: Sun Aug 10, 2003 4:01 pm Post subject: |
[quote] |
|
Well, I hate to keep double posting my own thread but what the heck...
I made alot of 'progress' on my BASIC 'compiler'. I've really done quiet a job on this thing. I stuck with Java, I didn't use any of the freetools mentioned. I really took my goal of a 'super simple scripting language' to heart. Since its a BASIC I only put a switch statement with the commands then called functions to convert them into bytecode. I did whatever grammar checking there is in the functions. The result is some UGLY code. This is a test scipt I'm compiling:
Code: |
let a = 1
while a != 10
if a == 9 then
print a
endif
let a = a +1
endwhile
|
|
|
Back to top |
|
|
valderman Mage
Joined: 29 Aug 2002 Posts: 334 Location: Gothenburg, Sweden
|
Posted: Sun Aug 10, 2003 6:21 pm Post subject: |
[quote] |
|
You really should use tools like Bison and Flex... It's so much easier when you have a good lexer doing the hard work for you...I haven't tried Bison yet, though. _________________ http://www.weeaboo.se
|
|
Back to top |
|
|
|
Page 3 of 3 |
All times are GMT Goto page Previous 1, 2, 3
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|