replace custom validation logic in the parse module with a simple DFA validator (closes #26526)

Patch from A. Skrobov.
2 files changed