主权项 |
1. A method for dynamic parsing of a configuration file of a telecommunication system, comprising:
receiving, on a dynamic parser stored in a non-transitory memory of a server of the telecommunication system and executed by a processor of the server, from a communicatively coupled switch, data of the configuration file that is generated on the switch of a telecommunications network, wherein the data of the configuration file comprises a plurality of configuration file elements that form a sequence of configuration file elements, each of the configuration file elements having a type and a position in the sequence, and wherein the data of the configuration file comprises errors generated on the switch associated with configuration file elements that include at least one of a character, a delimiter, a selector, and a vector; analyzing, by the dynamic parser, the type of configuration file element at a corresponding position in the sequence of configuration file elements; determining, by the dynamic parser, whether the configuration file element in the sequence of configuration file elements is an expected type of configuration file element at the corresponding position in the sequence of configuration file elements; responsive to a determination that the configuration file element is not the expected type, selecting, by the dynamic parser, a rule of a set of rules based on the analyzed type of configuration file element, the expected type of configuration file element, and consulting the set of rules that at least handle configuration file elements that are not the expected type; and applying, by the dynamic parser, the selected rule of the set of rules to the configuration file element that is not the expected type, wherein applying the selected rule of the set of rules causes dynamic parsing to continue for at least one subsequent configuration file element in the sequence that is in a position subsequent to the configuration file element which is not the expected type; dynamically parsing, by the dynamic parser, the configuration file element that is not the expected type by at least one of replacing the configuration file element that is not the expected type, creating at least one column associated with a vector in a database element file, and validating the configuration file element that is not the expected type at the position in the sequence; and writing, by the dynamic parser, the data of the configuration file that is dynamically parsed into a communicatively coupled database. |