Alternative parser for ArchieML in JavaScript using PEG (Parsing Expression Grammar)
JavaScript HTML
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
dist
test
.gitignore
LICENSE
README.md
aml.compiler.js
aml.parser.pegjs
archieml.js
gulpfile.js
package.json

README.md

archieml-peg

Parse ArchieML documents into JavaScript objects. This is an alternative implementation using PEG.js. Look at the graphical visualization of the grammar. 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.