Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / parse string from file

Author
Message
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 10th Mar 2006 09:45
just as the name implies, i need to parse a string using DBPRO code, from a .dvx file (text file, differant extension) i would prefer a code snippet please.
here is one of the strings that needs to be parsed (well 3 strings incase you wish to include more than 1)

rem as com
make object cube as dvxmakobjcube
make matrix as dvxmaklnd

there you go. thanx all!

DarkSONIC -signatures change quickly...
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 10th Mar 2006 10:45
There isn't one parsing solution for all scenarios. For example, your first 2 lines (REM and MAKE) both require different rules.

You need to start by defining what you want to acheive, and how the statements will be constructed to meet those criteria. Then, you can create a parser to interprete the commands.

My last comment would be that the question you have asked suggests you're trying to do too much too fast. If you don't understand the implications of parsing, you need to take a step back and do some research.

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 10th Mar 2006 10:49
i need to hurry so forgive my text if its bad.
i do under stand parsing, im just trying to do define type parsing (like i define make object cube as dvxmakobjcube using the same parameters. so in other words... im still using the darkbasic language, just with other words, and without darkbasics, but reading it from a .dvx file(text file).

i hope that explains it.

DarkSONIC -signatures change quickly...
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 12th Mar 2006 08:11 Edited at: 13th Mar 2006 10:48
anyone?

[EDIT} Its been 3 days now...
or more exactly, here is my question, instead of using arrays, cant i just use open to read and writes?

DarkSONIC -signatures change quickly...

Login to post a reply

Server time is: 2024-09-24 19:22:45
Your offset time is: 2024-09-24 19:22:45