This is a built-in plugin of dawn.js Please checkout https://github.com/qdwang/dawn.js/blob/master/src/LR1-parser.coffee