fsajs
Library for creating fsa and testing if they accept specified strings.
Last updated 6 years ago by fmont006 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install fsajs 
SYNC missed versions from official npm registry.

fsajs

Library for creating finite state automata and testing if they accept a given string.

fsajs = require('fsajs').fsajs # import the module

fsa = fsajs.createFSA() # configure fsa
	.addState 
	  name: 'pepe' 
	  transitions:[{stateName:'other', symbol:'c'},{stateName:'otherState', symbol:'b'}]
	  initialState: true
	.addState 
	  name: 'otherState', 
	  transitions:[{stateName:'other', symbol:'c'},{stateName:'otherState', symbol:'b'}], 
	  finalState: true
	.addState 
	  name: 'other', 
	  transitions:[{stateName:'pepe', symbol:'c'},{stateName:'otherState', symbol:'b'}] 

fsa.acceptsString 'bcccb' # returns true 

fsa.acceptsString 'bccbb' # returns false 

Current Tags

  • 0.0.21                                ...           latest (6 years ago)

12 Versions

  • 0.0.21                                ...           6 years ago
  • 0.0.2                                ...           6 years ago
  • 0.0.15                                ...           6 years ago
  • 0.0.14                                ...           6 years ago
  • 0.0.131                                ...           6 years ago
  • 0.0.13                                ...           6 years ago
  • 0.0.122                                ...           6 years ago
  • 0.0.121                                ...           6 years ago
  • 0.0.12                                ...           6 years ago
  • 0.0.11                                ...           6 years ago
  • 0.0.1                                ...           6 years ago
  • 0.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 1
Last Day 0
Last Week 1
Last Month 7
Dependencies (1)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |