syllable: restructure the syllable reader code

This makes the main syllable reader logic follow a state machine
implementation by explicitly using nested switch statements.