Now in serialization methods `readRSMFromTXT` and `writeRSMToTXT` nonterminals are defined by their name. It is necessary to compare Nonterminals as objects, for example, store them with id and compare by it.