# tdop

> https://github.com/douglascrockford/TDOP adapted for NodeJS

Latest version **0.0.4** (published 2014-11-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install tdop
pnpm add tdop
yarn add tdop
bun add tdop
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2014-11-01 |
| First published | 2014-11-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | loveencounterflow |
| Keywords | pratt, parser, parsing, tdop, top-down, operator, precedence, crockford |

## Links

- npm: https://www.npmjs.com/package/tdop
- Repository: https://github.com/loveencounterflow/tdop
- Issues: https://github.com/loveencounterflow/tdop/issues
- npm.io page: https://npm.io/package/tdop

## Dependencies (2)

- [coffee-script](https://npm.io/package/coffee-script.md) ^1.8.0
- [coffeenode-trm](https://npm.io/package/coffeenode-trm.md) ^0.1.20

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 0.0.4 (latest) — 2014-11-01
- 0.0.3 — 2014-11-01
- 0.0.2 — 2014-11-01
- 0.0.1 — 2014-11-01

## README

- [TDOP](#tdop)
	- [Usage](#usage)

> **Table of Contents**  *generated with [DocToc](http://doctoc.herokuapp.com/)*


# TDOP

> https://github.com/douglascrockford/TDOP adapted for NodeJS

**Note** This is work in progress and probably not very usable for a lot of people.

## Usage


> **Note** you may want to check out an older commit like [cd4b646](https://github.com/loveencounterflow/tdop/commit/cd4b6466ebc847e5859ec47944f9df7bd34f8bbd)
> to make sure the below description works as advertised.

Currently the code only parses D. Crockford's Simplified JavaScript Syntax:

```coffee
# module exports a function that returns a parser:
new_parse = require 'tdop'
parse 		= new_parse()

console.log parse 'var a = 1 + 1;'
console.log parse """
  var f = function(){};
  var x = f(8);"""
```

Interestingly, just trying to compile a program like `f();` or `1 + 1;` results in compile-time errors
since in the first case, `f` is not defined, and in the second, the expression has no effect whatsover
(except taking some time to compute). Likewise, unreachable statements (e.g. code in a function body that
comes after a `return` statement on the same level) produce errors.

---
_Source: https://npm.io/package/tdop · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
