Post Reply 
prefix notation and () on newRPL project
01-21-2019, 05:51 PM
Post: #2
RE: prefix notation and () on newRPL project
(01-21-2019 05:06 PM)compsystems Wrote:  Hi Claudio,

2 Crazy ideas =)

◉ Observing the u_LISP project that has a notation similar to the prefix notation, and that the R-PN is a inverse prefix.
So I "think" it's easy to add a second type of operation engine PN/prefix ("eliminate" the Reverse) or consult it in this community if they are involved in this type of notation in your project.

◉ A second idea, RPN with parentheses, this gives a faster interpretation of the source code

3 4 + 5 6 - * postfix operation
((3,4)+, (5,6)-)* postfix operation with ()

The importance of the use of parentheses is that each operator can operate on n arguments
(a,b,c)+ (a,b,c,d,e)-

While crazy, adding alternate syntax rules to RPL is possible and I'm considering an alternate language to the same code.
The idea is to compile code in other languages to an RPL stream. Decompiling is much more complex so it would probably have to keep the source code separate (like most compiled languages).
Lisp would be very straighforward: An opening parenthesis simply compiles as the start of a list '{', everything gets pushed to the stream until a closing parenthesis is found, which is compiled as an end of list '}'. Then parenthesis simply pushes the number of arguments, then does LIST-> ROLL EVAL to execute the first argument.

But rather than adding a language of similar difficulty as RPL, the idea is to add a much higher level language, like Lua or python.
Compiling these languages is very difficult, so I'm still studying this as a possibility, not saying I might do it.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: prefix notation and () on newRPL project - Claudio L. - 01-21-2019 05:51 PM



User(s) browsing this thread: 2 Guest(s)