Ever wanted to read a POP-11 expression and NOT compile it? The following
little hackeroo does it:
define lvars diff_list(L1,L2);
[% until L1 == L2 do dest(L1) -> L1 enduntil %]
enddefine;
define pop11_read_expr()->Code;
dlocal pop_syntax_only = true; ;;; Use pop11_comp_expr to read
lvars L1 = proglist; ;;; the expression, generating no code
pop11_comp_expr();
diff_list(L1,proglist)->Code; ;;; collect the items skipped.
true -> pop_syntax_only;
enddefine;
/*
pop11_read_expr(); 4+x;
=>
** [4 + x]
*/
|