>Ever wanted to read a POP-11 expression and NOT compile it? The following
>little hackeroo does it:
There is already an autoloadable library (LIB * EXPRREAD) in Poplog
that does this. -exprread- is defined as:
define global exprread = proglist_read_by(%pop11_comp_expr%) enddefine;
and -proglist_read_by- is a built-in system procedure documented in REF PROGLIST
as:
proglist_read_by(read_p) -> list [procedure]
Given any procedure read_p which reads items from proglist,
executes read_p and returns a separate list of the items it read
(which are removed from proglist).
pop_syntax_only is locally set true while read_p is executing.
Thus if read_p is a procedure that compiles (e.g.) Pop-11 code,
the only effect will be to return the list of items it read,
without actually planting any Poplog VM code.
John.
|