Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
I've had an idea for some PC-side calculator related things, so I've been messing around with some ideas. What I have right now is a "detokenizer". That is, it takes in an .8xp file and converts it into readable text. I took the tokens file from Kerm, and modified it a bit for my use. It's not 100% there yet (formatting-wise), but you should be able to load just about any file and read it. I've been designing this to be as extendable as possible, so it'll fit nicely into anything else I make. The Tokens.dll drives most of it. I'll be working on various parts of this on and off. Here's a screen shot:

And here is the program:
http://merthsoft.calcg.org/Detokenize.zip
This form was whipped together in a few minutes, so I realize it's not the greatest, it was just an easy way to show off the detokenizer.


Edit:

You can find the TokenIDE program here as an alternate download: http://tifreakware.net/forum/viewtopic.php?f=47&t=123
Looks like you're on the way to something great there, Merth. Smile Good luck with it, and I'm glad the tokens file I gave you is coming in handy.
Merth, let me know how this actually turns out. I'm planning sometime in the near future to write a program that will allow the user to write programs using AXE or BASIC in a Visual Studios-Type program. This way the user can execute the program, visualize it using a built in emulator, compile it to .8xp, and open .8xp files to be editited. I would be very interested to see how this works out, since it might make my job a little easier...
This is actually a small step in that direction. This is part of what will be, hopefully, a pretty full-featured TI-BASIC IDE.
Svakk wrote:
Merth, let me know how this actually turns out. I'm planning sometime in the near future to write a program that will allow the user to write programs using AXE or BASIC in a Visual Studios-Type program. This way the user can execute the program, visualize it using a built in emulator, compile it to .8xp, and open .8xp files to be editited. I would be very interested to see how this works out, since it might make my job a little easier...
Sounds like an offline SourceCoder plus an emulator. Razz There have been so many SourceCoder-replacement projects over the five years it's been around that I'm surprised none of them seem to have gained particular popularity.
How do you plan to convert some symbols that don't really have real unicode equivalents? For instance, the xth root sign and the radian symbol, or do those actually have equivalents?
quigibo wrote:
How do you plan to convert some symbols that don't really have real unicode equivalents? For instance, the xth root sign and the radian symbol, or do those actually have equivalents?
As far as I have been able to find, there's no such Unicode symbols for those and several other TI characters.
Yep, Kerm is right, I cant find any too x.x
qazz42 wrote:
Yep, Kerm is right, I cant find any too x.x
It's unfortunate considering how many weird and random symbols are in Unicode. :/ You'd think they'd have room for some math symbols.
quigibo wrote:
How do you plan to convert some symbols that don't really have real unicode equivalents? For instance, the xth root sign and the radian symbol, or do those actually have equivalents?
Anything that can't be easily typed in with a standard US keyboard will have a different string associated with it. There will be sqrt(, xrt(, !=, <=, >=, etc.
merthsoft wrote:
quigibo wrote:
How do you plan to convert some symbols that don't really have real unicode equivalents? For instance, the xth root sign and the radian symbol, or do those actually have equivalents?
Anything that can't be easily typed in with a standard US keyboard will have a different string associated with it. There will be sqrt(, xrt(, !=, <=, >=, etc.
I think this is the best way to handle it, using funky unicode just leads to issues.
It would be nice to see this done oncalc to complement the tokenizer.
elfprince13 wrote:
It would be nice to see this done oncalc to complement the tokenizer.
Actually, detokenizing oncalc is beyond trivial; it's just a loop of _get_tok_strng and _isa2bytetok. Very very easy.
elfprince13 wrote:
It would be nice to see this done oncalc to complement the tokenizer.
I'm not sure how that would be too useful, either. Especially since this is geared toward on-comp dev.
merthsoft wrote:
elfprince13 wrote:
It would be nice to see this done oncalc to complement the tokenizer.
I'm not sure how that would be too useful, either. Especially since this is geared toward on-comp dev.


editing with DDE7 Wink


KermM: So I figured Wink
Round two: Tokenzier.
I have added the ability to tokenize text. For now the test program is pretty simple, you open a program, and it gives you four text boxes, which are (in order): raw hex, detokenized text, tokenized hex, detokenized text of the tokenized hex. This way you can see that the hex and the text match up.

So here you can see that they match up. Here's a download link if you want to test it out:
http://merthsoft.calcg.org/Tokens.zip
Tomorrow I will be working on taking text that you actually edit yourself and turning it into a program that you can actually put on your calculator.

There are sometimes some inconsistencies, but they tend to be due to ambiguities in the Tokens.xml file, which you're able to edit to suit your needs.

Please let me know, if you test it, whether you find any errors or not. This will, hopefully in the future, be integrating with SourceCoder so that you can post from the program. I'm in talks with Kerm about that.

Also, Kerm, could you change the name of this topic to "Tokens" for me?
Wow, this looks cool, we now have a TI-BASIC editor for out computer kinda
We already have a couple of TI Basic editors out there, like TI Coder, but it will be quite nice to see something new for once.
SirCmpwn wrote:
We already have a couple of TI Basic editors out there, like TI Coder, but it will be quite nice to see something new for once.
I don't want to get ahead of myself, but to at least have the .dll there that others can use in their projects should help out. My expectations, however, will have macros for lib stuff, and variable naming, i.e. you'll type in PlayerX and it'll translate to the variable F or whatever.
I actually have a pretty extensive .NET library for mucking about with calculator files. It can create, read, and sign .8xp, .8xu, .8xk and .8xi. It can also convert an 8xi to a bitmap, which is nice Smile
I should publish it at some point, it's d@mn useful.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 32
» All times are GMT - 5 Hours
 
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