• Axe Parser 5 1
Currently:  

Author Topic: Axe Parser  (Read 488428 times)

0 Members and 2 Guests are viewing this topic.

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6265
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Axe Parser
« Reply #150 on: March 01, 2010, 07:16:41 pm »
that is a good idea! I'm still with Builderboy :P
^^
/e

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Axe Parser
« Reply #151 on: March 01, 2010, 09:05:53 pm »
Actually, I was thinking of changing the single quote to be an ascii character constant like 'A'.  Not sure what will replace it yet, maybe the decimal point since I haven't used it yet and its a single key press instead of [2nd][angle][down][enter]

How about .NAMEHERE which is tells the compiler what to name the compiled program by default.  The output name can be changed, but that will be what is already typed into the box when you first try to compile.  It seems like a nuisance to have to add 4 characters .AXE that aren't going to be used at all, at least they should do something.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Axe Parser
« Reply #152 on: March 01, 2010, 09:26:43 pm »
Actually, I was thinking of changing the single quote to be an ascii character constant like 'A'.  Not sure what will replace it yet, maybe the decimal point since I haven't used it yet and its a single key press instead of [2nd][angle][down][enter]
I like that idea, but does it rule out floating point numbers?

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6265
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Axe Parser
« Reply #153 on: March 01, 2010, 09:36:51 pm »
That sounds good
although if you want compiler commands then you could use the . So something like adding support to 84+ specific code stuff so like

.IF 83+=!VER
-code here-
.ELSE
-code-
.END

so you could add some compiler commands and such.
/e

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Axe Parser
« Reply #154 on: March 01, 2010, 10:58:53 pm »
Actually, I was thinking of changing the single quote to be an ascii character constant like 'A'.  Not sure what will replace it yet, maybe the decimal point since I haven't used it yet and its a single key press instead of [2nd][angle][down][enter]
I like that idea, but does it rule out floating point numbers?
Floats would be prefixed with "Float" so it wouldn't matter, but I don't plan on adding floats until near the end.  Its really an advanced feature.

And Eeems, anything like that I would implement would probably be with the regular if statement.  I Don't think there is any reason to have preprocessor statements since that stuff is taken care of by options in the compiler.  You don't need a preprocessor to handle different headers for instance since they are added automatically by the parser.
« Last Edit: March 01, 2010, 11:03:25 pm by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

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 Parser
« Reply #155 on: March 02, 2010, 12:09:25 am »
maybe something like MirageOs but put an additional token in front of it, like ANOVA("PRGMNAME for example

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6265
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Axe Parser
« Reply #156 on: March 02, 2010, 12:36:00 am »
Well what about if you had specific code for 84+'s and some for 83+'s and you wanted the compiler to smartly compile it, like a clock function that calls the clock on one, and for the 83+ it just uses cycles or something.
It would help for the more advanced users.
/e

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Axe Parser
« Reply #157 on: March 02, 2010, 04:33:36 pm »
Well what about if you had specific code for 84+'s and some for 83+'s and you wanted the compiler to smartly compile it, like a clock function that calls the clock on one, and for the 83+ it just uses cycles or something.
It would help for the more advanced users.
I like this idea and I think it would be a nice feature. :)

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Axe Parser
« Reply #158 on: March 02, 2010, 10:08:52 pm »
Well what about if you had specific code for 84+'s and some for 83+'s and you wanted the compiler to smartly compile it, like a clock function that calls the clock on one, and for the 83+ it just uses cycles or something.
It would help for the more advanced users.

Well do we want it to compile smartly or run smartly?  Most likely Axe programs will be released as just regular asm programs, and the user wont even ever need to touch the Axe compiler, so having a smart compiler wouldn't make much sense.  What would be better is if the clock function worked different ways on different calculators.

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6265
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Axe Parser
« Reply #159 on: March 02, 2010, 10:31:56 pm »
Well I would be ok with compiling smartly. We could just give out the source and people could compile it themselves. Unless we send it to ticalc then we would just make different versions. Running smartly would make it run slower.
/e

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Axe Parser
« Reply #160 on: March 02, 2010, 11:02:59 pm »
Well I would be ok with compiling smartly. We could just give out the source and people could compile it themselves. Unless we send it to ticalc then we would just make different versions. Running smartly would make it run slower.
How often are you going to have to check calc type though? It's not that slow anyway.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6265
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Axe Parser
« Reply #161 on: March 02, 2010, 11:43:16 pm »
True, although it adds size to the program that can be cut out. And sometimes people will need to do lots of checking.
/e

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 Parser
« Reply #162 on: March 02, 2010, 11:58:22 pm »
I am confused about what is compiling "smartly"

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6265
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Axe Parser
« Reply #163 on: March 03, 2010, 12:27:39 am »
So if it is on a 15MHZ calc it will compile certain code and on 6MHZ it will compile something else. That makes it easier to compile for timing and such.
/e

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Axe Parser
« Reply #164 on: March 03, 2010, 09:56:18 am »
So if it is on a 15MHZ calc it will compile certain code and on 6MHZ it will compile something else. That makes it easier to compile for timing and such.
Once there is timing support, it will probably be independent of clock speed anyway (using interrupts)
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman