GithubHelp home page GithubHelp logo

hhy5277 / apg-js2-examples Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ldthomas/apg-js2-examples

0.0 1.0 0.0 688 KB

Examples of usage of the JavaScript APG Version 2.0 parser generator and the parsers it generates.

License: BSD 3-Clause "New" or "Revised" License

JavaScript 98.65% Shell 0.10% HTML 0.58% CSS 0.67%

apg-js2-examples's Introduction

JavaScript APG Examples

Description:

This repository contains a number of detailed examples demonstrating how to use:

  • apg, the parser generator command-line application, built from the new apg-api.
  • apg-api, an API for the parser generator
  • apg.html the new, web page, GUI version of the parser generator
  • apg-lib, the supporting library of core parsing functions
  • apg-exp, the RegExp-like pattern-matching engine.
  • apg-conv, the data encoding conversion application, built from the new apg-conv-api.
  • apg-conv-api, an API for data encoding and conversion

Installation:

git clone https://github.com/ldthomas/apg-js2-examples.git examples
cd examples 
npm install --save

APG Examples:
In the package.json are the scripts:

"apg-help": "apg -h",
"apg-version": "apg -v",
"apg-strict": "apg --in=./apg/lf-only.bnf --strict",
"apg-errors": "apg -i ./apg/bad-elements.bnf",
"apg-rules": "apg --in=./apg/multiple-rules.bnf",
"apg-attributes": "apg --in=./apg/attr-errors.bnf",
"apg-multi": "apg -i ./apg/first.bnf,./apg/second.bnf -o multi.js",
"apg-multiple": "apg -i ./apg/first.bnf --in=./apg/second.bnf --out=multiple.js"
"apg-conv-api": "node ./apg-conv-api/test-suite $1"

You can run any of these APG tests with npm. For example,

  • npm run apg-version should return something like
    JavaScript APG 3.0.0, Copyright (C) 2017 Lowell D. Thomas, all rights reserved
  • etc.

Documentation:

Where applicable, web page usage examples along with command line node.js examples are given. For more details about how to run them, see the documentation for the individual examples. The documentation is in the code in docco format. To generate the documentation, from the package directory:

npm install -g docco
./docco-gen

View docs/index.html in any web browser to get started. Or view it on the APG website

Copyright:
Copyright © 2017 Lowell D. Thomas, all rights reserved

License:
Released under the BSD-3-Clause license.

apg-js2-examples's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.