{'fraction_non_alphanumeric': 0.023157894736842106, 'fraction_numerical': 0.0, 'mean_word_length': 4.95, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Lexical analysis tool

This paper provides an algorithm for constructing a lexical analysis tool, by different means than the UNIX Lex tool. The input is a keywords table, describing the target language's keywords, keysymbols, and their semantics, instead of using regular expressions to do so.The output is a lexical analyzer for the specific programming language. The tool can also be used as a translator engine by inputing a dictionary table, and as a pattern recognizer.