MODULE line_counter_woff; DECLARE count : INTEGER; TOKEN eol { S'EOL' }; ! don't count lines with only form feeds TOKEN ff_eol { S'FF' S'EOL' }; MACRO find_eol TRIGGER { eol }; count = count + 1; END MACRO /* find_eol */; PROCEDURE count_the_lines MAIN; START SCAN INPUT FILE 'file.in' OUTPUT FILE 'nl:'; WRITE count, ' lines'; END PROCEDURE /* count_the_lines */; END MODULE /* line_counter_woff */;