remove duplicate code from spider.pegjs
add source map generation support