abnf

Augmented Backus-Naur Form (ABNF) parsing. See RFC 5234.

Parse ABNF grammars

Example:

var abnf = require('abnf');
abnf.Parse("myfile.abnf", function(er, rules) {
    if (er) {
        console.error(er);
    } else {
        // Do something with rules
    }
});

Parse the given input (string, filename, or readable stream), then call the callback with an error (will be null on success) and a Rules object

A hash of Rule objects indexed by uppercase rulename.

An array of RuleRef objects.

The name of the rule

The line in the input file where the rule name was defined

The definition of the rule. More information forthcoming.

The name of the rule that was referenced

The line in the input file where the rule name was referenced.