From 7bc5e95366c6b74098d05962b73a778e1d9db538 Mon Sep 17 00:00:00 2001 From: Dov Murik Date: Wed, 30 Mar 2016 16:38:45 -0400 Subject: [PATCH] ps: Fix ps* interop * Simplify postscript code parsing by using the `cvx` (convert to executable) function. * Tweak the test cases to match reality (returns list of stack operands, or nil if stack is empty after exec). --- ps/stepA_mal.ps | Bin 9689 -> 9436 bytes ps/tests/stepA_mal.mal | 4 +++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ps/stepA_mal.ps b/ps/stepA_mal.ps index ae394472a2aa21be6c5d2a461778a1a5af60c551..5925ef3cfdc73f34e9e377a6d16fe0ae1f3482bf 100644 GIT binary patch delta 27 icmccVeaCZyp8%Iaa#@8!YDH=?*W@_@(whqeGerQDj0vp( delta 200 zcmccPdDDA?pTOkvOq|jRKv2yEB9TE!es*f!(true) (ps* "/sym") -;=>sym +;=>(sym) (ps* "1 1 eq { (yep) }{ (nope) } ifelse") ;=>("yep") @@ -21,3 +21,5 @@ (ps* "1 0 eq { (yep) }{ (nope) } ifelse") ;=>("nope") +(ps* "1 2 3 pop pop pop") +;=>nil