Parser for the mercury live coding language
npm install mercury-langThis Package does not generate any sound or visuals. This package only parses Mercury code and returns a JSON formatted parse tree. This is used in the Mercury environment to translate the code to sound and visual objects. This is also used in the Mercury-Playground, a browser based lite version of the environment.
Mercury is a minimal and human-readable language for the live coding of algorithmic electronic music.
🚀 Go to the full Mercury Project
👾 Or start sketching in the browser:
🙏 Support Mercury by becoming a Patron
1. git clone and run npm install
2. Open the mercury.ne file to view the grammar in the Nearley language including the moo tokenizer.
3. Run npm run build
- Generates the the grammar.js parser file
- Generates a minified es5 browser version in /build
- Generates the railroad graph
4. Run a test with npm test and view result in /test/tree
```
$ npm install mercury-lang
`js`
const Mercury = require('mercury-lang');
`js`
const Mercury = require('mercury-lang/build/mercury.es5.min.js');
Include latest or specific version of bundled minified es5 through url in index.html
`html`
Use in a html