Programming with the PBASIC Tokenizer

I downloaded the tokenizer stuff from the Parallax site, and loaded the dll into Visual Basic 6, but then I figured it’s probably the DLL code is probably in C++, so I made MSVC++ 6 load the dll, but it still won’t compile. I’ve read all three of the pdf’s from top to bottom that came with the download, and no help…can someone please help me get either VB (preferred), or MSVC++ to load the dll and compile without errors?

[Edit] Forgot to say I’m using Windows XP [/Edit]

Do you know if the dll tokenizer supports the newer syntax? Are you trying to “compile” the innovation first default code? I think several of us are noticing that the default code is using a new syntax and the 1.33 editor does not support it. Parallax is supposed to be releasing a new version soon. But its not clear if it is soon (tomorrow) or soon (February).

*Originally posted by iscrc2 *
**Do you know if the dll tokenizer supports the newer syntax? Are you trying to “compile” the innovation first default code? I think several of us are noticing that the default code is using a new syntax and the 1.33 editor does not support it. Parallax is supposed to be releasing a new version soon. But its not clear if it is soon (tomorrow) or soon (February). **

The tokenizer version is straight off of the offical Parallax site (tokenizer version: 1.16.0.0). I know about the error, but all I’m trying to do is make a small (testing) program, but no functions from the DLL are even working.

What errors are you getting? Is the c++ compiling? Does the tokenier report an error? What pbasic source are you feeding it?

*Originally posted by iscrc2 *
**What errors are you getting? Is the c++ compiling? Does the tokenier report an error? What pbasic source are you feeding it? **

I get errors about “Compile not found” (the function for compiling code. The tokenizer I think isn’t even being included (if it is, it’s nothing but references and not functions). I’m feeding no pbasic to it, because I can’t even get the class manager or whatnot to show a thing (it would show something if the dll was being linked, but since it’s not in a “*.lib” format, it won’t link just my thought of why)

I’ve not slogged thru and made a VB defn to use compile (the TModuleRec has quite the structure) but I’ve made a quicky that calls the version function. Using a Declare of:
Private Declare Function Version Lib “C: okenizer.dll” () As integer

then calling it with code:
Label1.Caption = Str(Version())

in some button event code.

But why do you want to use this? This seems like a hard project without much return for our robots.

Anyway, can you get a version call to work? Thats a simpler way to see if you’ve got the basics (heh) in place.

Finally, someone else is trying to use this stuff!

I wrote a paper on using it in VC++ that you can get at my website: http://www.robbayer.com. Look under the How-To’s section.

Remember: DLL’s do not “link” in the traditional sense. They are called Dynamic Link Libraries for a reason: they link in at runtime. I explained most of this stuff in my paper, but if you still have questions, PM/email me or continue replying to this thread.

As for usefulness to FIRST, I have used it in two different programs with very positive results. The first is a PBASIC IDE that runs under Linux (RoboIDE). The second is my program generator (RoboGUI), which uses the tokenizer to send code directly to the RC.

*Originally posted by rbayer *
**Finally, someone else is trying to use this stuff!
**

lol…i’ve attempted it before

I wrote a paper on using it in VC++ that you can get at my website: http://www.robbayer.com. Look under the How-To’s section.

Do you know if you can do this in vb 6?

Remember: DLL’s do not “link” in the traditional sense. They are called Dynamic Link Libraries for a reason: they link in at runtime. I explained most of this stuff in my paper, but if you still have questions, PM/email me or continue replying to this thread.

Thanks (for the info and contact)

As for usefulness to FIRST, I have used it in two different programs with very positive results. The first is a PBASIC IDE that runs under Linux (RoboIDE). The second is my program generator (RoboGUI), which uses the tokenizer to send code directly to the RC.

I’ve seen, used, and liked them both…good job and keep it up

*Originally posted by Raven_Writer *
**
Do you know if you can do this in vb 6?
**

I’ve never used VB, but I know you can. The function names (ie LoadLibrary) are probably very similar–just look them up in the MSDN Library. Otherwise, I found this from google. As I said, I’ve never used VB, but it looks vaguely like what you need.

*Originally posted by rbayer *
**I’ve never used VB, but I know you can. The function names (ie LoadLibrary) are probably very similar–just look them up in the MSDN Library. Otherwise, I found this from google. As I said, I’ve never used VB, but it looks vaguely like what you need. **

Thank you. Yes, it seems like it might work. Just one for question, you can use the DLL in a C/++ Console, right?

I’ve not slogged thru and made a VB defn to use compile (the TModuleRec has quite the structure) but I’ve made a quicky that calls the version function. Using a Declare of:
Private Declare Function Version Lib “C: okenizer.dll” () As integer

then calling it with code:
Label1.Caption = Str(Version())

in some button event code.

But why do you want to use this? This seems like a hard project without much return for our robots.

Anyway, can you get a version call to work? Thats a simpler way to see if you’ve got the basics (heh) in place.

Thank you for this (sorry for the long reply, didn’t know you replied before). I’m gonna try your code.

Again, thank you both.

I didn’t want to edit my above post, but for the getting the version, here’s the answer:

Yes. Thank you for your help.

The declare I posted (above) is from VB6. But you’ll have to deal with the large structure of the TModuleRec without any handy c include files. That will be a pain.

Make a VB program that calls the version function first. That way you know if you have things setup to work correctly.

Are you trying to make a new IDE like rbayer?

*Originally posted by iscrc2 *
**The declare I posted (above) is from VB6. But you’ll have to deal with the large structure of the TModuleRec without any handy c include files. That will be a pain.

Make a VB program that calls the version function first. That way you know if you have things setup to work correctly.

Are you trying to make a new IDE like rbayer? **

Already tested the version thing, and it worked w/o any errors. Right now, I have it in a *.bas file. No, I’m not looking for making an IDE right now, just to mess around, and maybe call the stamp editor to load the file and such, or whatever…but mainly just mess around w/ it and see what I come up with.