Intepreter- continue..

So I put a lot of efforts on build an interpreter, and I could see that even the first part took longer then I thought, and I am now again reconsidering my options.

The goal was to create a small program dynamically and send it via serial to the chip. This software can do a few things : control outputs/inputs set conditions on variables assign and make basic math operations on variables.

Options where Firmata and Bitlash, the first can't do all of that, the second is really buggy.

My way to do this , was the hard way, get a string, understand its structure, decide what kind of things the user wanted to do, and go and do it. Above that save all these strings into EEPROM, and loop over them.

Exactly like done in Bitlash but with more options . (the creator is not that responsive)

Are there other simpler ways to do that ? something like boolean tree ? Imitating the way real programming happens on a processor ?

Thanks.

If this is what you are continuing from, why have you started a new Thread. All the relevant background is in the original Thread.

Please click Report to Moderator and ask to have them merged.

...R

Do you want the nice answer or the ugly answer? 'cos I only have the ugly. :D

But before I tell you, I ask you, how much computer science do you know? Stuff like BNF and general compiler construction...

I ask so I know how to phrase my answer.

If you want to program a microcontroller in a toy language, then use Bitlash, PIC BASIC or one of the many many others and accept their limitations as fixed.

If you want to write your own language, then I suggest you find a college that teaches this as a course. This is a highly academic subject, even for toy languages, and is best appreciated in an academic environment.

One reason why Arduino is so popular and one of the major reasons why it has demolished all those other toy languages like PIC BASIC is the fact that it’s not a toy with arbitrary limitations to make it “easier” to learn.