Speed up the precedence state lookup