Author Topic: TokenIDE - TI-BASIC IDE  (Read 82943 times)

0 Members and 1 Guest are viewing this topic.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Tokens
« Reply #300 on: July 31, 2012, 01:46:50 pm »
Although I am no longer involved in calculator programming anymore, I am glad this is still progressing. :)

Offline merthsoft

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 241
  • Rating: +63/-1
    • View Profile
Re: Tokens
« Reply #301 on: July 31, 2012, 02:17:23 pm »
Thanks! I'm just glad people use it and find it helpful :) I wish I had some more time to focus on it and nail out some of the harder features that I want to get done before a 1.0 release.
Shaun

Offline merthsoft

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 241
  • Rating: +63/-1
    • View Profile
Re: Tokens
« Reply #302 on: July 31, 2012, 08:18:27 pm »
I hope it's not too soon for a double post--I've added some much-asked-for functionality.

Due to some rather incessant nagging on tifreak's part (thank you, Daniel :)), I have added the functionality to count blocks, such as While/End etc. Here's an example:

You can specify any number of groups. It's under Tools > Block Counts.
Limitations:
- It currently doesn't handle "Else" gracefully. It just treats it as another token. Ideally it would unindent the "else" line and indent the following line.

- The indentation is automatic, so if you're doing this with Axe and have included your own indentation, it'll extra indent it.
- The AxeTokens.xml file doesn't have any groups defined, so check out Tokens.xml and see how it's doing it if you want to add them to it. I don't know if Axe does it the same way or what.
- Eventually this will be integrated into the main editor so that you don't have to go to a tool to use it. For now, though, it's separate.

Technical details:
There are two new tags that you'll use in the XML:
- indentGroup - String - Which group this token belongs in.
- indentGroupTerminator - Boolean - If it's a terminator.

For example, here's what the Tokens.xml looks like:
Code: [Select]
<Token byte="$CE" string="If " />
<Token byte="$CF" string="Then" indentGroup="End Group" />
<Token byte="$D0" string="Else" />
<Token byte="$D1" string="While " indentGroup="End Group" />
<Token byte="$D2" string="Repeat " indentGroup="End Group" />
<Token byte="$D3" string="For(" indentGroup="End Group" />
<Token byte="$D4" string="End" indentGroup="End Group" indentGroupTerminator="true" />

I hope that makes sense!

Download in the normal spot:
http://merthsoft.com/Tokens.zip
« Last Edit: July 31, 2012, 08:25:38 pm by merthsoft »
Shaun

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Tokens
« Reply #303 on: July 31, 2012, 11:59:01 pm »
Wow that's a nice idea actually. You can't imagine how hectic it was to count blocks in Illusiat 13 boss programs (which are 15 KB each). One suggestion would be to add optional color support for nested blocks, like in Cooliojazz's TI editor a few years ago, although it's up to you.

Offline Juju

  • Incredibly sexy mare
  • Coder Of Tomorrow
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 5730
  • Rating: +500/-19
  • Weird programmer
    • View Profile
    • juju2143's shed
Re: Tokens
« Reply #304 on: August 01, 2012, 12:11:09 am »
Syntax highlighting, it's always a good idea.

Remember the day the walrus started to fly...

I finally cleared my sig after 4 years you're happy now?
THEGAME
This signature is ridiculously large you've been warned.

The cute mare that used to be in my avatar is Yuki Kagayaki, you can follow her on Facebook and Tumblr.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Tokens
« Reply #305 on: August 01, 2012, 01:15:47 am »
Block counting. Now that's one enormously useful feature for TI-BASIC. There've been plenty of times while editing a TI-BASIC program (or Axe program for that matter) in the calculator editor where I wished I had some way to quickly find that one missing End screwing up the flow of the entire program :P And the feature you just added to count tokens in a selection too—they're both really useful!




Offline merthsoft

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 241
  • Rating: +63/-1
    • View Profile
Re: Tokens
« Reply #306 on: August 01, 2012, 09:25:31 am »
Wow that's a nice idea actually. You can't imagine how hectic it was to count blocks in Illusiat 13 boss programs (which are 15 KB each). One suggestion would be to add optional color support for nested blocks, like in Cooliojazz's TI editor a few years ago, although it's up to you.
I think for consistency I'll just keep the syntax highlighting as it is and let people define colors for tokens.

Syntax highlighting, it's always a good idea.
Indeed, and that's why you're able to do it... Was this supposed to be a feature request or what?

Block counting. Now that's one enormously useful feature for TI-BASIC. There've been plenty of times while editing a TI-BASIC program (or Axe program for that matter) in the calculator editor where I wished I had some way to quickly find that one missing End screwing up the flow of the entire program :P And the feature you just added to count tokens in a selection too—they're both really useful!
I'm glad you think so! Tifreak has been bugging me for this feature for a while and I've been dragging my feet, but I think it definitely adds a lot to it :)
Shaun

Offline blue_bear_94

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 801
  • Rating: +25/-35
  • Touhou Enthusiast / Former Troll / 68k Programmer
    • View Profile
Re: Tokens
« Reply #307 on: August 01, 2012, 11:09:26 am »
As a sidenote, how do you insert the actual ~ token?
Due to dissatisfaction, I will be inactive on Omnimaga until further notice. (?? THP hasn't been much success and there's also the CE. I might possibly be here for a while.)
If you want to implore me to come back, or otherwise contact me, I can be found on GitHub (bluebear94), Twitter (@melranosF_), Reddit (/u/Fluffy8x), or e-mail (if you know my address). As a last resort, send me a PM on Cemetech (bluebear94) or join Touhou Prono (don't be fooled by the name). I've also enabled notifications for PMs on Omnimaga, but I don't advise using that since I might be banned.
Elvyna (Sunrise) 4 5%
TI-84+SE User (2.30 2.55 MP 2.43)
TI-89 Titanium User (3.10)
Casio Prizm User? (1.02)
Bag  東方ぷろの

Offline merthsoft

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 241
  • Rating: +63/-1
    • View Profile
Re: Tokens
« Reply #308 on: August 01, 2012, 11:30:39 am »
|~
To find tokens, it's useful to search the Tokens.xml file for what you need, and you might find it. For example, searching for "~" shows up:
Code: [Select]
<Token byte="$CF" string="|~" />And while those can sometimes be misleading, a quick tokenization and throwing it on an emulator can show that it's the right token. And, of course, if you want to change it to just a tilde, you certainly can, but you'll want to update the other entry as well:
Code: [Select]
<Token byte="$B0" string="~">
<Alt string="|-" />
<Alt string="⁻" />
</Token>

In this case, though, I choose ~ for negative because I assume in general there will be many more negatives that tildes.
Shaun

Offline bilyp

  • LV2 Member (Next: 40)
  • **
  • Posts: 21
  • Rating: +9/-1
  • Axing the z80
    • View Profile
Re: TokenIDE - TI-BASIC IDE
« Reply #309 on: September 07, 2012, 05:47:30 pm »
I think I found a bug...

whenever you use the #define command, if the text that the variable equals is longer than the name of the variable, it throws an unhandled exception.

for example,
Code: [Select]
#define word k

disp "k"
works, but
Code: [Select]
#define word applesauce

disp "word"
does not, and it appears that it is because applesauce is longer than word.
The bug appears to be in the latest version.

Offline merthsoft

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 241
  • Rating: +63/-1
    • View Profile
Re: TokenIDE - TI-BASIC IDE
« Reply #310 on: December 10, 2012, 12:17:58 pm »
I've uploaded a new version at ticalc. Here's a screenshot:

Download: http://www.ticalc.org/archives/files/fileinfo/433/43315.html
Follow the link for some nice screenshots from Linux, too :)

bilyp, thanks for the bug report, I think I know why that's going on, and the fix should be pretty easy.

Offline 133794m3r

  • LV2 Member (Next: 40)
  • **
  • Posts: 21
  • Rating: +1/-3
    • View Profile
Re: TokenIDE - TI-BASIC IDE
« Reply #311 on: December 21, 2012, 12:45:46 am »
OK, quick question... am I crazy... or is the last time it was compiled was december 5th? I'm just making sure I'm running the latest version. Btw, absolutely amazing program, like seriously, I am so glad this thing exists. Being able to type out code on my calculator then be able to open it in Tilem2, and see if it works is _sooo_ much faster than writing it on my calc, and then compiling it, then running it. Effeciency has gone up by like a bajillion.

Also a feature that I'd suggest for the future is when you're clicking on the "reference" when you type a letter, jump to that letter's selection. Ala the catalog on the calculator. This'd make it much better/faster for me when I'm trying to figure out how you called a token, so I can double click it faster. That's probably the only feature that I _really_ want. That and projects working(since that feature sounds like an awesome one too). Finally, the last thing I can think of(I've not checked it yet), is that if you click on a prgrmSOMETHING, it'll take you to that program's tab(if it's in the same directory). Those are my feature requests, I don't know what your roadmap is, or if you've already had those things in the roadmap, I can't wait, if not I'd love to see them in it. I don't speak c#, so I can't help at all, but anyway keep it up, this is an awesome project.

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: TokenIDE - TI-BASIC IDE
« Reply #312 on: December 21, 2012, 04:33:02 pm »
Mhmm, how is it possible for custome variable names? What if you use then more than 27 variables?
EDIT: just noticed the pre-prozessor, lol
« Last Edit: December 21, 2012, 04:33:44 pm by Sorunome »

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: TokenIDE - TI-BASIC IDE
« Reply #313 on: January 13, 2013, 06:05:43 pm »
Congrats on the feature and interview Merth :D

Offline merthsoft

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 241
  • Rating: +63/-1
    • View Profile
Re: TokenIDE - TI-BASIC IDE
« Reply #314 on: January 19, 2013, 05:28:35 pm »
Thanks Kevin :)
Alright, I've made a small update:
- Fixed saving error where it wouldn't save if it was a new file
- Fixed error where if you had a preprocesser directive that was shorter than the replace string it would crash (now it just highlights the line incorrectly :) )
- Moved some settings to INI file: Font and default tokens file.
- Grammer XML file included in download

Download at the normal place:
http://merthsoft.com/Tokens.zip