open-index/open-npm huggingface dataset:
npm package: @shimaore/dfa.js
Description: Javascript class library that models DFA(Deterministic Finite Automaton)
Author: fxfan
Latest version: 1.7.2

# @shimaore/dfa.js [![status](https://gitlab.com/shimaore/dfa.js/badges/master/pipeline.svg)](https://gitlab.com/shimaore/dfa.js/commits/master) [![coverage](https://gitlab.com/shimaore/dfa.js/badges/cov/coverage.svg)](https://gitlab.com/shimaore/dfa.js/commits/cov)

A javascript class library that models NFA and DFA (Deterministic Finite Automaton).

Based on fxfan's [dfa.js](https://github.com/fxfan/dfa.js).

## How to use
See examples(-ω-): 
  https://github.com/fxfan/dfa.js/blob/master/examples/expr.js

## License
MIT
npm package: @shimaore/jison-lex
Description: lexical analyzer generator used by jison
Author: Zach Carter
Latest version: 0.3.4

# jison-lex
A lexical analyzer generator used by [jison](http://jison.org). It takes a lexical grammar definition (either in JSON or Bison's lexical grammar format) and outputs a JavaScript lexer.

## install
npm install jison-lex -g

## usage
```
Usage: jison-lex [file] [options]

file     file containing a lexical grammar

Options:
   -o FILE, --outfile FILE       Filename and base module name of the generated parser
   -t TYPE, --module-type TYPE   The type of module to generate (commonjs, js)
   --version                     print version and exit
```

## programatic usage

```
var JisonLex = require('jison-lex');

var grammar = {
  rules: [
    ["x", "return 'X';" ],
    ["y", "return 'Y';" ],
    ["$", "return 'EOF';" ]
  ]
};

// or load from a file
// var grammar = fs.readFileSync('mylexer.l', 'utf8');

// generate source
var lexerSource = JisonLex.generate(grammar);

// or create a parser in memory
var lexer = new JisonLex(grammar);
lexer.setInput('xyxxy');
lexer.lex();
// => 'X'
lexer.lex();
// => 'Y'

## license
MIT