basic state parsing