 The character set is equivalent to the alphabet used by any written language.The lexical grammar lays down the rules governing how a character sequence is divided up into subsequences of characters, each part of which represents an individual token.This is frequently defined in terms of regular expressions.