added an example copied from peg.js docs