Code Monkey home page Code Monkey logo

apg-js's Introduction

##JavaScript APG

Version: 1.0

Description:

  • JavaScript APG is a version of APG – an ABNF Parser Generator written entirely in JavaScript.
  • generates recursive-descent parsers directly from ABNF (RFC5234) grammar specifications
  • no target-language code imbedded in the grammars
  • AND and NOT syntactic-predicate operators for conditional parsing based on look-ahead phrases
  • user-written callback functions allow recognition of non-Context-Free language phrases
  • user-written callback functions provide complete monitoring and flow control of the parser
  • optional generation of an Abstract Syntax Tree (AST)
  • translation of the AST with user-written callback functions
  • extensive tracing facilities
  • statistics gathering for a full picture of parse tree node coverage
  • extensive attribute generation for an overview of the grammar's characteristics

NOTE: Currently this repository includes only the APG runtime library required for running APG-generated parsers. The generator itself is currently only available at the APG website. Full instructions for building a parser are given in the example files.

Files:

file name description
apgAst.js the AST class, required for generating an AST from the parse
apgLib.js the APG runtime library, required for all JavaScript parsers
apgStats.js the Stats class, required for collecting parsing statistics
apgTrace.js the Trace class, required for tracing the parser´s path through the parse tree
apgUtilities.js a collection of optional, but useful utilities, many to assist output of results
example/example.css a simple stylesheet for the example HTML page
example/example.js a complete example of how to set up and run a JavaScript APG parser
example/example.html a simple web page for implementing the example parser
example/iniFileOpcodes.js the APG-generated opcodes object for the example grammar
example/iniFile.bnf the example ABNF grammar used to generate the parser´s opcodes object
LICENSE Version 2 of the GNU General Public License
README.md this file

Documentation:
To generate the documentation install jsdoc and from the project directory run:
/path/to/jsdoc . README.md -r -d documentation
To view the documentation open the file
documentation/index.html
in any web browser, or view it at the APG website.

Example:
To run the example, open
example/example.html in any web browser.

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

License:
JavaScript APG and this Runtime Library, Version 1.0 are released under Version 2.0 or higher of the GNU General Public License.

apg-js's People

Watchers

Jeffrey Chen 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.