|
Post by dgmsoft on Sept 11, 2005 20:48:57 GMT -5
Well, fist of all I want to see you that BasiEgaXorz is a great thing Good job man. But I have one question: How do you do the parsing? Do you use any parsing library or you do it by yourself? Ok, it's just it I had to ask. Keep BasiEgaXorz alive, man. Bye.
|
|
oompa loompa
I AM THE GOVERNATOR
"Git 'Er Dun!"
Posts: 1,301
|
Post by oompa loompa on Sept 12, 2005 17:38:01 GMT -5
thanks ;-D!
the basic job of the syntax parser is to first distinguish between a line acting as a statement, or a label, or both. the parser will then check if the statement is a store operation (eg: A=4+A) or a regular command. the parser will then seperate all arguments seperated by a comma, or by a defined character and will store the arguments in an array. the parser will then check the specific command, and will then run a dedicated command script to make meaning of the arguments. if necessary, the command script can run the expression parser (different from the syntax parser in that the expression parser can be recursized). the parser doesn't take up very many lines of code, probably around 500, and isn't very complicated when programming. just gotta start somewhere first, then build on that
i use my own parsing code, no libraries. everything in basiegaxorz is 100% coded by one person (me =D), except maybe for some class modules =P
|
|
|
Post by dgmsoft on Sept 15, 2005 0:08:33 GMT -5
|
|
oompa loompa
I AM THE GOVERNATOR
"Git 'Er Dun!"
Posts: 1,301
|
Post by oompa loompa on Sept 15, 2005 1:50:43 GMT -5
hehe, i like what you've done to the command reference, it makes the text a whole lot easier for people to read, and commands are easier to get to. any effort to help others lives easier coding on the compiler is highly appreciated =)
i've also seen that the command descriptions could be very hard to understand for people. some of the descriptions were written in a rush, during christmas time usually ;P, and under pressure to get the release out (usually because the documentation is written after the compiler's finished). some things are even really outdated x.x, like the for...next description where it says DO NOT USE GOTO ;D!
what i plan to do, and have been planning to do for a long time is to make more consistant syntax, and simple, shorter, easy to understand descriptions.
i've already started to make changes to the main page of BasiEgaXorz, with parts which have already been uploaded =P. also, i'd like people's input on the "getting started" section of the main page, will that section actually help people that have never touched a compiler before?
okay, now for expression parsers........... my main advice is to start with a small parser, and work on from there. i really can't explain how the basiegaxorz expression parser was made since not everything has been created systematically =P, lots of it were just updates to the original parser. there were many time were i had to redo the entire parser just to include more features. this is what i've learned from creating parsers: once you get a feature to work, like say adding two entities together, other operators will be easy to implement. Also, i learned that you don't have to create a way to deal with parenthesis, the feature will just be there automatically once the parser matures =D
|
|
|
Post by dgmsoft on Sept 16, 2005 22:46:06 GMT -5
I'm rewriting a game that I wrote in 1998/99 for PC, called DGM Bomb 2, that can be found on: www.dgmsoft.rg3.net/jogos.htmlI'm rewriting this game for Sega Genesis using BasiEgaXorz, you can check the progress here: geocities.yahoo.com.br/dgmsoft2/basiegaxorz/test.binWhen I finish the game, if you think it'd be usefull, I can give you the source to be included with the next release of BasiEgaXorz, as a full-featured game using BEX. Ok, but I want to add FM Music, but Devster Noise Machine is a pain in da b*tt to make songs Can you explain how is the format of the song, so that I can make my own music editor? Thank you very much in advance. Bye
|
|
oompa loompa
I AM THE GOVERNATOR
"Git 'Er Dun!"
Posts: 1,301
|
Post by oompa loompa on Sept 20, 2005 1:42:17 GMT -5
mmmmmaybe =P
don't use the devster noise machine, it doesn't work =D (unless you want to make songs that only have one FM track =P). don't worry about FM music yet, i'm still working on a new version of the "noise machine" that has a more convenient tracker, and a lot better z80 driver to do more stuff in smaller space. you don't want to know the format of the music, its like frequency+delay+key operation+channel combined in a 12-bit long data type with the last 4 nibbles alternating between every even and odd bytes =D
|
|