New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mixfix

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mixfix

mixfix expression parser

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

mixfix

mixfix expression parser

Build Status NPM version Dependency Status devDependency Status Code Climate

Based on: Parsing Mixfix Operators

parser

Parser a = List token → Error ∨ NonEmptyList (a × List token)

Parsers are functions taking list of tokens and returning either error or possible parse results. In actual implementation List token is represented by an array of tokens and an index into it.

  • parser.parse(@: Parser a, tokens: List token): a

    Parse tokens. Returns first parse result.

  • parser.map(@: Parser a, f: a -> b): Parser b

  • parser.uniq(@: Parser a): Parser a

  • parser.satisfy(@: Parser a, predicate: a -> Boolean): Parser a

  • parser.end(@: Parser a): Parser a

  • parser.many(@: Parser a): Parser (Array a)

  • parser.some(@: Parser a): Parser (Array a)

  • parser.left(@: Parser a, other: Parser b): Parser a

  • parser.right(@: Parser a, other: Parser b): Parser b

  • pure(x: a): Parser a

  • fail(error: Err): Parser a

  • any: Parser a

  • combine(p: Parser a..., f: a... -> b): Parser b

  • choice(p: Parser a | List (Parser a)...): Parser a

  • lazy(f: => Parser a): Parser a

lexer

A very simple lexer.

  • lexer.create(specification: List (String | RegExp)): String -> List String

    Creates a tokenizer function.

Release History

  • 0.0.22015-01-07 — Simple lexer
  • 0.0.12014-11-23 — Parser combinators

Contributing

  • README.md is generated from the source with ljs
  • Before creating a pull request run make test, yet travis will do it for you.

Keywords

FAQs

Package last updated on 07 Jan 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc