{"library":"simple-parser","title":"simple-parser","description":"A lightweight, minimalistic parser for simple grammars, currently at version 0.0.0. It aims to provide a straightforward API for tokenizing and parsing input strings with user-defined rules. Unlike more complex parser generators (e.g., ANTLR, PEG.js), simple-parser focuses on simplicity and zero dependencies, making it suitable for small projects or educational use. The release cadence is not yet established as it is in early development. Key differentiators include a tiny footprint and an intuitive rule definition syntax.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install simple-parser"],"cli":null},"imports":["import Parser from 'simple-parser'","import { Token } from 'simple-parser'","import { Rule } from 'simple-parser'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import Parser from 'simple-parser';\n\nconst parser = new Parser();\nparser.define('DIGIT', /[0-9]/);\nparser.define('PLUS', /\\+/);\nparser.define('expr', ['DIGIT', 'PLUS', 'DIGIT']);\n\nconst result = parser.parse('3+5');\nconsole.log(result); // ['3', '+', '5']","lang":"typescript","description":"Creates a parser for simple arithmetic expressions using digit and plus rules, then parses a string.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}