Skip to content

Alternative parser for ArchieML in JavaScript using PEG (Parsing Expression Grammar)

License

Notifications You must be signed in to change notification settings

dundalek/archieml-peg

Repository files navigation

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.

About

Alternative parser for ArchieML in JavaScript using PEG (Parsing Expression Grammar)

Resources

License

Stars

Watchers

Forks

Packages

No packages published