{'fraction_non_alphanumeric': 0.019055509527754765, 'fraction_numerical': 0.0, 'mean_word_length': 5.22680412371134, '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}}
Extensible Command Parsing Method for Network Device

Network functionality is growing increasingly complex, making the commands addition of network device a steadily growing challenge. In order to improve the efficiency of adding new commands to developing or developed network devices, we propose an extensible command parsing method (ECPM). With this method, we design the extensible command parsing system consisting of business-logic module and command-matching module. Business-logic module includes user-defined command rule files and a rule file parsing program. The grammar of user-defined command rule is concise and easy. The rule file parsing program parses rule files into command tree which is disposed in the memory. Command-matching module consists of user commands handling program and command tokens matching program. The former program divides user commands into command tokens. The latter program matches command tokens with command tree to locate the command handling function. We present the design of such a parser using ECPM and apply it to new network devices. The result shows that the ECPM improves the variability, extensibility and flexibility of network devices parsing system.