A lightweight lexical analyzer using regular expressions