Remove dependency on external flex