Author Topic: Axe variable scanner  (Read 1868 times)

0 Members and 1 Guest are viewing this topic.

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
Axe variable scanner
« on: December 30, 2011, 05:18:06 pm »
I tried using happybobjr's variable scanner program but quickly realized that with an average of around 20 subprograms for each of my Axe projects, scanning each program individually would take a while, so I decided to make my own scanner that searches for and loops through all subprograms as well.

It correctly ignores variables in comments, labels, strings, pointer names, and other data, and whenever it finds a prgm token, it adds it to the list of programs to scan. When it's done scanning all the programs in the list, it outputs a little diagram with all the variables in it, highlighting the ones you've used.

Only single-letter variables (or theta) are supported because I'm still on Axe 0.5.3.

EDIT: Download is down here.
« Last Edit: December 31, 2011, 11:49:13 pm by Deep Thought »




Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Axe variable scanner
« Reply #1 on: December 31, 2011, 03:15:30 pm »
This would be great. I like utilities that do things in batches like that. It can be pretty useful sometimes. Do you think you will do it for TI-BASIC too?
« Last Edit: December 31, 2011, 03:15:42 pm by DJ_O »
Dream of Omnimaga

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: Axe variable scanner
« Reply #2 on: December 31, 2011, 11:46:04 pm »
Apparently I didn't actually upload the things I meant to upload... Here they are: screenshot, source, and program.

The screenshot shows how it parses 19 programs at once. If you were to parse just a single program without any subprograms, it would be almost instantaneous.
« Last Edit: December 31, 2011, 11:47:02 pm by Deep Thought »