Skip to content

Commit 99197fe

Browse files
authored
Update spec.md
1 parent ddf1915 commit 99197fe

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

spec.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
# Universal Expression Tree
22

3-
## Overview
3+
Expressions parse to minimal lispy tree. Opposed to [ESTree](https://github.com/estree/estree):
4+
5+
- language-agnostic, can be compiled to different targets
6+
- reflects execution sequence, rather than code layout
7+
- has minimal overhead, directly maps to operators
8+
- simplifies manual evaluation and debugging
9+
- has conventional form and one-liner docs
10+
- JSON-compatible, sparse arrays
411

5-
Expressions parse to trees. Minimal, JSON-compatible, and portable across languages.
612

713
```
814
[operator, ...operands] operation
@@ -375,20 +381,14 @@ Implementations SHOULD accept both forms on input.
375381

376382

377383

378-
## Acknowledgments
379-
380-
Inspiration:
384+
## Inspiration
381385

382-
- **Pratt parsing** — Pratt, 1973. [Top Down Operator Precedence](https://tdop.github.io/). Elegant precedence-driven parsing.
383-
- **S-expressions** — McCarthy, 1960. Code as nested lists.
384386
- **[frisk](https://www.npmjs.com/package/frisk)** — Porsager. Evaluable arrays as function calls.
385387
- **[nisp](https://github.com/ysmood/nisp)** — Ysmood. JSON-compatible lisp.
388+
- **Pratt parsing** — Pratt, 1973. [Top Down Operator Precedence](https://tdop.github.io/). Elegant precedence-driven parsing.
389+
- **S-expressions** — McCarthy, 1960. Code as nested lists.
386390
- **JSON** — Crockford, 2001. Minimal format, universal adoption.
387-
388-
Counter-examples:
389-
390-
- **[ESTree](https://github.com/estree/estree)** — Verbose, JS-specific, layout-oriented rather than semantic. What not to do.
391-
391+
- **[ESTree](https://github.com/estree/estree)** – opposite example
392392

393393

394394
## License

0 commit comments

Comments
 (0)