A homemade regex engine based on e-bnf syntax