some work on pre-2 next-2 pattern checker