procedure jamal empty output while there are characters on input do search for the first macro, append the text before the first macro to the output, (and chop off it from input) search for the end of the macro found, (and chop off it from input) evaluate embedded macros calling procedure jamal unless the first character of the macro is @, /pre-evaluation/ evaluate the macro and usually [ call the procedure jamal to evaluate macros in the resulting text ], /post-evaluation/ append the final result of the macro to the output end of loop end of procedure