archieml-peg
v0.1.0
Published
Alternative parser for ArchieML using PEG (Parsing Expression Grammar)
Downloads
25
Maintainers
Readme
archieml-peg
Parse ArchieML documents into JavaScript objects. This is an alternative implementation using PEG.js. See the code for parser and compiler. It passes all the tests from the original implementation.
Be sure to also check out the official implementation.
Installation
npm install archieml-peg
Usage
<script src="dist/archieml.js"></script>
<script type="text/javascript">
var parsed = archieml.load("key: value");
>> {"key": "value"}
</script>
var archieml = require('archieml-peg');
var parsed = archieml.load("key: value");
>> {"key": "value"}
Build
Instal dependencies npm install
Build gulp build
Development mode - watch for changes and build gulp watch
Testing
Open file test/indext.html
in a browser or run npm test
.