Include the parser_latex.js file. run parser.parse(content); to convert the latex content to chordpro. You can test it online at: http://pegjs.org/online Just copy and paste the grammar