Post Reply 
RPL stackrobatics decoder
07-09-2018, 06:12 PM
Post: #3
RE: RPL stackrobatics decoder
(07-09-2018 05:29 PM)Thomas Klemm Wrote:  
(07-09-2018 04:14 PM)Claudio L. Wrote:  As an example, I took a piece of code from that same thread
I think you should have linked to post # 52.

Thanks, I updated the post with your suggestion.

(07-09-2018 05:29 PM)Thomas Klemm Wrote:  
Code:
MOD --> 'l4=l4 MOD l5', DROP l4,l5, PUSH 'l4'
+ --> l1=l1+l6, PUSH 'l1' DROP 'l1',l6
The inconsistent use of single quotes and the different order of PUSH and DROP makes it a bit hard to follow your reasoning.

Yes, sorry for I had very limited time, perhaps I'll fix that later. The idea is that there's a stack (only used for parsing/decoding) that carries only local variable names, functions DROP all their arguments from that stack, and PUSH all their results naming them the same name as the arguments they took when possible. Ignore the quotes, ignore the order of the PUSH/DROP which I wrote backwards in many places.
In that code snippet, MOD takes l4,l5 from the stack (always names), generates the output 'l4=l4 MOD l5', and leaves l4 (the name) on the stack. The + operator of course is supposed to also DROP first, then PUSH.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RPL stackrobatics decoder - Claudio L. - 07-09-2018, 04:14 PM
RE: RPL stackrobatics decoder - Claudio L. - 07-09-2018 06:12 PM
RE: RPL stackrobatics decoder - Claudio L. - 07-10-2018, 04:42 PM
RE: RPL stackrobatics decoder - pier4r - 07-11-2018, 11:24 AM



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