update js grammar