regular-grammar

1.0.0 • Public • Published

Regular language parser generator

Gram is a macro substitution utility for regular expressions. Create huge regexes with ease:

const BABY_ENGLISH = {
 
    WORD: /\w+/,
    ADJECTIVE: /good|bad/,
    SENTENCE: /($ADJECTIVE)\s+($WORD)/
 
};
 
const sent = resolve("SENTENCE", BABY_ENGLISH); 
// produces: /(good|bad)\s+(\w+)/
 

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    3
    • latest

Version History

Package Sidebar

Install

npm i regular-grammar

Weekly Downloads

5

Version

1.0.0

License

MIT

Last publish

Collaborators

  • gritzko