index.js 584 B

123456789101112131415161718
  1. exports.Parser = require("./lib/parser").Parser;
  2. exports.rules = require("./lib/rules");
  3. exports.errors = require("./lib/errors");
  4. exports.results = require("./lib/parsing-results");
  5. exports.StringSource = require("./lib/StringSource");
  6. exports.Token = require("./lib/Token");
  7. exports.bottomUp = require("./lib/bottom-up");
  8. exports.RegexTokeniser = require("./lib/regex-tokeniser").RegexTokeniser;
  9. exports.rule = function(ruleBuilder) {
  10. var rule;
  11. return function(input) {
  12. if (!rule) {
  13. rule = ruleBuilder();
  14. }
  15. return rule(input);
  16. };
  17. };