Better code to detect parser using Aho Corasick and pre-generated signatures