I couldn't find another solution. Anyway we could wait that the pegjs's creator @dmajda  answer my ticket: https://github.com/dmajda/pegjs/issues/163.