An ATN parser and generator - Teh, See Weng (1990)