Javascript Regular Expression Grammar Parser and Engine