A simple example shift-reduce parser based on a perl version from Kenji Sagae