migrate Grammar to JArray