|
Post by n00b on Aug 21, 2019 0:05:46 GMT -6
sdlbasic This code does not compile for me. I don't have a whole lot of time during the week but I will try to look at it this weekend.
|
|
|
Post by sdlbasic on Aug 21, 2019 1:42:33 GMT -6
Damn, those it pop up some errors?
|
|
|
Post by sdlbasic on Aug 21, 2019 3:11:12 GMT -6
I had some errors in the name of some vars, i did manage to solve those, i can't say if it will work, maybe you could test this one too.
|
|
|
Post by n00b on Aug 25, 2019 15:32:12 GMT -6
I just tried this again and it still has a bunch of compile errors. I forgot to ask but what exactly are you trying to fix? I have not had any errors reported that are related to the tokenizer.
If it is just a speed improvement then thats fine. I would say just fork the RCBASIC3 code and integrate it into that and then submit those changes through git. That will make it easier to integrate.
But if you are looking for something that actually does need fixed then there are a number of things with the parser that needs to be changed. Here are some of the issues: *Arrays can't currently be used for counters in FOR loops *Arrays can't be referenced by index in a BYREF argument in a function. Look at this example:
Function tst(byref a) Print a End Function
Dim x[3] x[0] = 1 x[1] = 4 x[2] = 5
'All 3 of these lines will print 1 since byref will automatically reference arrays from index 0 tst(x[0]) tst(x[1]) tst(x[2])
*This is more of a convenience but it would also be a plus to be able to define multiple variables on a single line. I would say that this is the least important in the things to change with the parser.
There are also some bugs that need to be fixed in the runtime that I can't quite figure out. *The video playback on Android can't play the sound. *Touch Pressure is being reporting as 0 or 1 when it should be a floating point value between 0 and 1. This could be because of the API version being used though.
|
|
|
Post by sdlbasic on Oct 3, 2019 7:56:51 GMT -6
Hey sorry for the late response, i have to try to build a dev with rc, we are in process of updating sdlbasic for the new 64 bits and also trying to port to sdl2.
Thanks.
|
|
|
Post by n00b on Oct 3, 2019 9:09:55 GMT -6
sdlBasic is moving to SDL2, that is awesome. I have a lot of experience with SDL2 at this point so if you run into any issues feel free to reach out. When do you think you will have a test build out?
|
|
|
Post by johnno56 on Oct 3, 2019 17:24:32 GMT -6
Aww... I was getting SO used to SDL 1.2 .... Nah! Kidding. Sounds great! Looking forward to it...
|
|
|
Post by johnno56 on Mar 8, 2020 4:46:57 GMT -6
I have just left a quick message for an update on sdlbasic 2.0... Will get back to you as soon as I hear anything...
J
|
|
|
Post by aurel on Mar 8, 2020 8:36:17 GMT -6
If you are interested i can post my tokenizer written in basic.
|
|
|
Post by johnno56 on Mar 8, 2020 12:20:27 GMT -6
I have heard the term 'tokenizer' in the past but I have no idea what it is. Would you be so kind as to offer a little education? Many thanks.
J
|
|
|
Post by aurel on Mar 8, 2020 12:53:01 GMT -6
Hi Johnno Yeah sounds fancy but is not , it job is to to lexicaly analyze source code and transform it to list of token or better to say array of tokens. Some people like to call it Symbol Table and i fine with that too. There are few options , ordinary 2 arrays, one with token (string) and one with his token type (integer/number) and there is option with UDT like Type tokenList token as STRING tokenType as INTEGER End Type or can be used with linked list or any other data structure I used first option because i don't like to work with UDT even i can it is not that much complex. But for symplicity i like first solution. Today i just do few fixes and add some error checking to. Look in picture:
|
|
|
Post by johnno56 on Mar 8, 2020 21:09:43 GMT -6
Cool. Thanks for explaining that...
|
|
|
Post by n00b on Jul 23, 2023 9:20:59 GMT -6
matty47 I can't recover my old project files from Mac OS. That computer is completely unusable at this point. It takes an eternity to load up and then instantly crashes. I will outline the steps to build with XCode here. NOTE: Before getting started, make sure you have the RCBasic source code downloaded: RCBasic Source Code1. Install XCode from the apple store. Its free but you have to install it from the apple store and you will probably have to setup an Apple developer account. 2. You need to install homebrew if you do not have it already. You can find instructions for installing homebrew here: brew.sh/3. Once you have homebrew installed, run the following commands: brew install sdl2 brew install sdl2_image brew install sdl2_gfx brew install sdl2_ttf brew install sdl2_mixer brew install sdl2_net brew install libogg brew install libvorbis brew install theora 4. Create a new XCode project ( select command-line for type ) 5. Add all the *.cpp, *.c, and *.h files from the rcbasic_runtime folder to your project 6. Here is a youtube video explaining how to setup a homebrew library with XCode (he uses GLFW but its the same process for all the libraries you installed in step 3): How to write an OpenGL "Hello World" on Xcode (use Homebrew!)7. In the rc_os_defines.h file, uncomment the line that defines RC_MAC and make sure every other OS is commented out. 8. If everything went well, you should be able to build and hopefully get a success. I don't have a Mac right now so I can't be sure if the current source code will build but I can help troubleshoot errors if you get them. Just post them here.
|
|