This is a client-side web app for analyzing and transforming context-free grammars. It was developed with the support and guidance of Robin Cockett at the University of Calgary, and it's based on his Context Free Grammar Checker.
Grammophone uses Yarn to handle its build system and development dependencies. How to install Yarn.
First, install dependencies:
yarn install
To rebuild JavaScript and CSS as files are changed:
yarn run watch
To bundle the JavaScript and CSS and copy files to dist/ for distribution:
yarn run dist
Jison is used to build the app's grammar specification parser, but the parser (src/grammar/parser.js) is checked into the repository. To generate the parser:
yarn run generate-parser
To build it also on Windows, see: mdaines#3
yarn install &&
yarn run dist &&
yarn run generate-parser
Currently only the routines in grammar/ have tests. (There are no controller or view tests yet.) To run these:
yarn test