I’ve just finished up a rewrite of the parsing code in teletype. It still needs testing and (very probably) some bug fixes, but once it lands I’d like to start taking advantage of it as soon as possible.
To wit, I plan on adding some aliases to existing ops…
eg. add + as an alias of ADD, thus:
ADD 1 1
can also be written as
+ 1 1
(note that the + must still go at the beginning, you can’t type 1 + 1.)
So far I have the following in mind:
-
+ for ADD
-
- for SUB
-
* for MUL
-
/ for DIV
-
% for MOD
-
<< for LSH
-
>> for RSH
-
== for EQ
-
!= for NE
-
< for LT
-
> for GT
-
<= for LTE (and new op!)
-
>= for GTE (and new op!)
-
! for NZ
-
&& for AND (or & which is traditionally bitwise and)
-
|| for OR (likewise for |)
-
PRM for PARAM
-
TR.P for TR.PULSE
We don’t have to do all of them, and it’s important to remember that it’s easy to add new ops / aliases, but it’s much harder to remove them or rename them.
There will also be a PN.* op for every P.* op
I’m a programmer by profession (or I used to be anyway), so all of this makes perfect sense to me. But I want to make sure everyone else is okay with it. (The original ops will continue to work along with their aliases.)