The text of an Prolog program is divided into contiguous tokens based on the following classifications. At every step, the longest matching rule applies.