MODULE trailing_blanks_nola; ! build a token for the end of line only if some blanks precede it TOKEN trailing_blanks { ' ' ... S'EOL' }; MACRO find_tb TRIGGER { trailing_blanks }; ! put the end of line back into the stream but not the blanks ANSWER S'EOL'; END MACRO /* FIND_TB */; PROCEDURE tb MAIN; START SCAN INPUT FILE 'file.in' OUTPUT FILE 'file.out'; END PROCEDURE /* tb */; END MODULE /* trailing_blanks_nola */;