Latex parser to javascript with PEGJS