JavaScript APG Version 2.0

Version 2.0 is a complete re-write of version 1.0 (apg-js)with the following objectives in mind:

  1. Updating its features to the full apg-6.3 and apg-java complement.
  2. Creating a local version of the parser generator as well as the parsing library (version 1.0 was library only).
  3. Developing it as node.js modules.

Several new features have been added to support the new apg-exp application.

These include:

  • Sub-string parsing - the option to parse only a sub-string of the entire input string.
  • Positive and negative look around - the ability to look ahead or behind in the string to make parsing decisions based on what is or isn't found.
  • Back referencing - phrase matching based on phrases previously matched to other rules or UDTs.
  • Beginning and ending of string anchors - parsing decisions based on whether or not the sub-string includes the beginning and/or the ending of the full input string.
  • Statistics and limits on the node tree depth and hit count. Recursive-descent parsers can have exponential parsing times for some grammars. Limits can be set to prevent run-away parsing.

See the README file for the full set of features.