reengineered FSPC parsing to linear time