Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: ben_g on June 02, 2014, 06:44:42 pm

Title: Looking for a better way to edit axe code
Post by: ben_g on June 02, 2014, 06:44:42 pm
Hi,


I started getting more active in programming axe lately, but there are a few things bugging me with the options I have to code it.
Currently, I program axe in wabbitemu, with a dumped ROM image. Unfortunately, programming this way is rather hard and slow, since I can't type fast in the emulator, I often have to scroll trough the catalog for some functions, not much of your code is visible, and there is no copy-paste. And on top of that, wabbitemu is rather unstable, which means that I regularly loose some of my work, even though I often take backups. (if you know a way to recover the information lost in such a crash (basically an error message saying "wabbitemu has stopped working"), please share)


I've also looked into some computer editors (tokenizers) for axe, but while they probably work great with basic, they don't seem to work well with axe, since all the ones I found also attempt to tokenize label/variable names with no way to stop that, which generates errors. I know that when you work on your own project, you can try to avoid giving your variables names in which the tokenizer can recougnize tokens, but when you use a library, it can take a long time to rename everything in the library that causes errors after tokenizing, especially if it's still WIP so you have to do that again after every update. And when you are making a library yourself, it's better to give your unctions straightforward and easy to remember names instead of awkward names to avoid them from getting tokenized.


So here comes my question: Does anyone know a better alternative to programming axe? (note that I can't just always program it on my calc) If so, please share.
Title: Re: Looking for a better way to edit axe code
Post by: aeTIos on June 02, 2014, 06:49:32 pm
Sourcecoder3 and TokenIDE have pretty good support for axe from what I've heard. Otherwise, I honestly have no idea.
Title: Re: Looking for a better way to edit axe code
Post by: pimathbrainiac on June 02, 2014, 08:14:55 pm
I use IES (http://clrhome.org/ies). It's awesome and is completely online.
Title: Re: Looking for a better way to edit axe code
Post by: DJ Omnimaga on June 02, 2014, 10:44:33 pm
I never trusted WabbitEmu for coding, because there is always the risk of accidentally closing the emu without saving. I prefer TokenIDE for computer coding. SourceCoder can be a good solution too, but it gets rather slow in some browsers (such as Opera 12.1x) if your code is incredibly large.
Title: Re: Looking for a better way to edit axe code
Post by: Hayleia on June 03, 2014, 01:43:44 am
TokenIDE has an Axe based xml, and if this xml don't suit you, you can edit it, so I'd say it's the way to go :)
Title: Re: Looking for a better way to edit axe code
Post by: aeTIos on June 03, 2014, 04:21:02 am
IES is pretty amazing, too. Thanks for reminding me, pimath.
Title: Re: Looking for a better way to edit axe code
Post by: Streetwalrus on June 03, 2014, 04:26:09 am
There is tok8x by Shmibs if you want a more minimalist and unix-ish way.
Title: Re: Looking for a better way to edit axe code
Post by: Sorunome on June 03, 2014, 06:09:00 am
What pimath said, IES is pretty awesome and nails it for me once I have to do any editing and want to use a computer. But I mostly code axe on-calc anyways :P
Title: Re: Looking for a better way to edit axe code
Post by: ben_g on June 03, 2014, 06:10:31 am
Well, SourceCoder 3, IES and TokenIDE all seem to tokenize the insides of function and variable names as well. And I've checked the documentation, and I didn't find any way to make it not tokenize certain parts of the code. This is what I meant that makes usung libraries very annoying, since you basically have to rewrite the entire library to stop this behaviour.
And for editing the xml of TokenIDE: Is there any way to add some kind of symbol (maybe something like §) that will just insert everything between 2 of those symbols as untokenized text? In the readme of TokenIDE, there wasn't much information about the XML.
Title: Re: Looking for a better way to edit axe code
Post by: aeTIos on June 03, 2014, 06:11:56 am
That's probably possible. I don't know for sure, though.
Title: Re: Looking for a better way to edit axe code
Post by: Sorunome on June 03, 2014, 06:12:34 am
You could always program your own >:D
Title: Re: Looking for a better way to edit axe code
Post by: Streetwalrus on June 03, 2014, 06:14:16 am
IES being online it's a pita to use for me.
Title: Re: Looking for a better way to edit axe code
Post by: Hayleia on June 03, 2014, 07:47:19 am
Well, SourceCoder 3, IES and TokenIDE all seem to tokenize the insides of function and variable names as well. And I've checked the documentation, and I didn't find any way to make it not tokenize certain parts of the code. This is what I meant that makes usung libraries very annoying, since you basically have to rewrite the entire library to stop this behaviour.
And for editing the xml of TokenIDE: Is there any way to add some kind of symbol (maybe something like §) that will just insert everything between 2 of those symbols as untokenized text? In the readme of TokenIDE, there wasn't much information about the XML.
That's what I said about editing the xml. If for example you don't want "Y1" to be understood as the token because you have a variable named RY1 for example, you can edit the currently used xml (I use the default xml with a lot of changes, not the Axe one) so that the Y1 token is represented with "|Y1" for example. Just open the xml with any text editor, hit Ctrl+F and look for "Y1" then replace that string with "|Y1" for example.
Title: Re: Looking for a better way to edit axe code
Post by: ben_g on June 03, 2014, 08:27:30 am
Oh. I'll try that then. Thanks!
Title: Re: Looking for a better way to edit axe code
Post by: Runer112 on June 03, 2014, 08:58:19 am
You can insert the \ symbol in the middle of any multi-character token in TokenIDE to prevent its tokenization; for instance, if you wanted a label named End, you could do that by typing E\nd. If you take this approach, I highly recommend saving the file as a .txt file rather than a .8xp directly, as the text form retains the source as it appears in TokenIDE with the \ characters.

Alternatively, as others have suggested, you can simply edit the AxeTokens.xml file (or make a copy and edit that) to your liking.