* update xpparser for pkparser +subclass
* add REV() macro
* grammar cleanup