Page 16 sur 24

Re: ICE Compiler

Message non luPosté: 20 Mar 2017, 19:18
de sautax
Cool update !
It will be more fun ! :troll:

Re: ICE Compiler

Message non luPosté: 12 Avr 2017, 22:09
de PT_
In Case of Emergency (ICE..), you can join #icedev for (almost) instant help :)
Join this channel as well for discussion about ICE, features, updates etc

Re: ICE Compiler

Message non luPosté: 21 Avr 2017, 09:12
de PT_
We are more than happy to announce that the online TI-BASIC editor and IDE SourceCoder 3 gets an upgrade again. You have now the possibility to compile ICE programs online, rather than doing it on-calc! The syntax is basically the same as TI-BASIC, but you don't need a "Then" for indentation. While the highlighting is exactly the same, except the commands of course, we are still working on a nice styling system for ICE, to make it even easier to write programs! But, you say, why can't we use the TI-BASIC section of SourceCoder 3? That is very simple: ICE has a lot of graphic commands, imported from the C libraries, and replaced them with det(XX..). From now on, you don't need to remember this anymore, you can just directly type "FillScreen(255)" for example!

In the sidebar you can see some groups, which are the same groups as listed in commands file of ICE Compiler, to make it even easier! Also, you can easily add comments as well, in order to explain variables or routines to yourself. You can do this by placing "//" in front of the line, the same as in with BASIC.

As far as we know, there is only 1 thing to mention:
  • There is a graphic command "End", but BASIC itself also has an "End". Therefore, I removed the graphic command "End", so typing in "End", gives you the token End, not det(1).
Anyway, we hope that this makes development of ICE programs much easier, and we are happy to receive feedback and or questions/comments about this!

Launch Tool:
Image SourceCoder 3 Online TI-BASIC, ASM, and C Editor and IDE

Image

Many thanks to KermMartian for helping me in this process, correcting me when needed, and moving it to the real website!

Source: https://www.cemetech.net/forum/viewtopic.php?t=13679

Re: ICE Compiler

Message non luPosté: 01 Mai 2017, 22:28
de PT_
So well, yeah, time for some updates, or whatever you call it. As you might already know, I'm recreating ICE in C to make development faster, and easy add new features. This is coming along very well, I need to say. Currently numbers, variables, operators and parenthesis are supported (still need code for every operator), and more are coming soon. However, I'm running into a huge problem, and that are C functions. They are not like 'normal functions', such as not( and remainder( and so on. For the last type of tokens, I just add code for every possible argument type(s), rather than using the stack, like C functions need. However, this method simply doesn't apply to C functions, as they are supposed to take the input (arguments) from the stack, not registers etc. Thus, with the Shunting Yard Algorithm I'm doing, it is VERY hard to add C functions, and I'm not sure yet how to solve this. Let's take a look at some example:
Code: Tout sélectionner
det(2,det(15,X+2->X                 2 15 X 2 + det( det( X ->

det(2,det(15,X)+2->X                2 15 X det( 2 + det( X ->

det(2,det(15),X+2->X                2 15 det( X 2 + det( X ->

det(2,X+det(15),2->X                2 X 15 det( + 2 det( X ->

det(2,X,2*det(15))+3->X             2 X 2 15 det( * det( 3 + X ->

2*det(15,X)+3->X                    2 15 X det( * 3 + X ->

det(2,X+2,1,2,3                     2 X 2 + 1 2 3 det(

Left is the input, right is the input in infix notation.

Now let's take my last example. If I just parse them as normal, first the "+" is parsed, so X+2, but since the output isn't used in the next 2 elements (as an operator or function), the output is pushed to the stack, and that is where problems arise, it should not even parse the +. First 3, then 2, then 1 should be pushed, afterwards X+2 parsed and pushed, then the det( function will be called.

Again, I've no idea how to solve this, and I'm open for any ideas! :)


Progress: I've added icon and description support:
Image

Re: ICE Compiler

Message non luPosté: 02 Mai 2017, 21:46
de Bisam
PT_ a écrit:Left is the input, right is the input in infix notation.

You meant "postfix" notation, I think.

I do not know anything about ICE, but I assume that you use "det(num, args" to call a special function whose number is "num" and "args" are the arguments.
If so, the problem you are exposing will appear each time you call such a function.

You can easily rewrite the beginning of theses functions to reverse the list of the arguments, no ?
You can even write a private reversing list function to do that.

But maybe I didn't understand well the problem...
In fact, it is not clear if your problem is getting from the input to the RPN or from the RPN to the final output ?

Re: ICE Compiler

Message non luPosté: 08 Mai 2017, 17:03
de PT_
I've added SetBASICVar( which... sets a BASIC variable! :D

Download: archives_voir.php?id=587211

Re: ICE Compiler

Message non luPosté: 09 Mai 2017, 00:24
de PT_
I'm SUUUUUPPEERRRRR excited to announce this very great news:

http://ice.cemetech.net

It redirects you to a page at Cemetech Learn, where I will put all the needed information, and Tips and Tricks! :D

Re: ICE Compiler

Message non luPosté: 13 Mai 2017, 16:35
de PT_
GetBASICVar( is added as well!

Time for some quick updates about my C version: I've implemented all the operators, and added code for functions, which work fine, I only need to add them :P Chaining things also work, so the only thing I need to do is doing weird stuff with C functions and get that working :)

Re: ICE Compiler

Message non luPosté: 22 Mai 2017, 18:40
de Wistaro
Cool, well done!

Re: ICE Compiler

Message non luPosté: 15 Juil 2017, 19:11
de PT_
I had finally a free day off, which means I had a lot of time for programming :D

Today, I added Asm(, ReturnIf, remainder(, Lbl, Goto, Output( and Disp. The days before, in my spare free time, I added strings + string concatenation (like "ABC"+Str1) and length(. I have the framework done for sub( and toString(, both will be implemented soon :)

As far as I know, this is my to-do-list until the first C version release:
  • Integer types and pointers
  • sub(, toString(
  • For( loops
  • prgmX
  • DefineSprite(, ExecHex(, Call , CompilePrgm(, SetBASICVar(, GetBASICVar(
  • Eventually some sort of lists/data ish
  • More C functions
  • More random functions

If you have suggestions on what to add more, feel free to nag me, I'm now in the mood for adding things :)