PHPackages                             icecave/dialekt - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Search &amp; Filtering](/categories/search)
4. /
5. icecave/dialekt

Abandoned → [dialekt/dialekt](/?search=dialekt%2Fdialekt)ArchivedLibrary[Search &amp; Filtering](/categories/search)

icecave/dialekt
===============

A simple language for representing boolean expressions.

0.1.0(11y ago)1101.3k↓34.5%MITPHPPHP &gt;=5.3

Since May 30Pushed 6y ago2 watchersCompare

[ Source](https://github.com/icecave/dialekt)[ Packagist](https://packagist.org/packages/icecave/dialekt)[ Docs](https://github.com/IcecaveStudios/dialekt)[ RSS](/packages/icecave-dialekt/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

Dialekt
=======

[](#dialekt)

> **This project has been deprecated by the authors. Use [dialekt/dialekt](https://github.com/dialekt-lang/dialekt-php) instead.**

**Dialekt** is a very simple language for representing boolean expressions of the form often used by search engines.

```
composer require icecave/dialekt

```

Rationale and Concepts
----------------------

[](#rationale-and-concepts)

**Dialekt** was devised for specifing filters for lists of objects based on sets of human-readable "tags" or "labels". This PHP package provides an [expression parser](src/Parser/ExpressionParser.php) which parses **Dialekt** expressions into an [abstract syntax tree](http://en.wikipedia.org/wiki/Abstract_syntax_tree), a [list parser](src/Parser/ListParser.php)which parses lists of tags into arrays, and an [evaluator](src/Evaluator/Evaluator.php) which checks if a given set of tags matches a particular expression.

Additionally, the nodes of the abstract syntax tree implement the [visitor pattern](http://en.wikipedia.org/wiki/Visitor_pattern), allowing the creation of new algorithms that traverse the syntax tree. This could be used, for example, to generate an SQL query that finds entities with tags that match the expression.

Syntax
------

[](#syntax)

Below is an example of a **Dialekt** expression showing the available language features. You can see how this expression is parsed using the [online demo](http://dialekt.icecave.com.au/?expr=foo+bar+AND+%28baz+OR+qux%29+AND+NOT+%22doom+hammer%22).

```
foo bar AND (baz OR qux) AND NOT "doom hammer"
```

In the above example, `foo`, `bar`, `baz`, `qux` and `"doom hammer"` are examples of *tags*. The tag is the most basic syntactic element of an expression. An expression is composed of one or more tags, and the logical operators `AND`, `OR` and `NOT`. The logical operators are case-insensitive.

Tags may be formed by any non-whitespace characters except the parentheses and asterisk characters. Tags may optionally be enclosed in double-quotes, as the `doom hammer` tag has been in the example above. Doing so allows the inclusion of parentheses and whitespace characters. Tags must also be enclosed in double-quotes if they are one of the reserved words `AND`, `OR` or `NOT`. Inside a quoted tag the backslash character provides escaping functionality similar to a double-quoted PHP string.

Implicit AND operator
---------------------

[](#implicit-and-operator)

When one tag is directly adjacent to another (as `foo` and `bar` are above) they are treated equivalent to an `AND`, thus the expression `foo bar baz` is equivalent to `foo AND bar AND baz`.

Grouping and operator precedence
--------------------------------

[](#grouping-and-operator-precedence)

Sub-expressions can be grouped using parenthesis to control evaluation order, as `baz` and `qux` have been in the example above.

When parenthesis are not present, the `AND` operator has higher precedence than `OR` such that `foo OR bar AND baz` is equivalent to `foo OR (bar AND baz)`.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4372d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/93a71bd75fcd51efee464532dbdd54927cd00e938805998c76e0a804d38fa3fb?d=identicon)[jmalloc](/maintainers/jmalloc)

---

Top Contributors

[![jmalloc](https://avatars.githubusercontent.com/u/761536?v=4)](https://github.com/jmalloc "jmalloc (63 commits)")[![startswithaj](https://avatars.githubusercontent.com/u/3658522?v=4)](https://github.com/startswithaj "startswithaj (2 commits)")[![ezzatron](https://avatars.githubusercontent.com/u/100152?v=4)](https://github.com/ezzatron "ezzatron (1 commits)")

---

Tags

searchparserexpressiontaglabellogicbooleanlogical

### Embed Badge

![Health badge](/badges/icecave-dialekt/health.svg)

```
[![Health](https://phpackages.com/badges/icecave-dialekt/health.svg)](https://phpackages.com/packages/icecave-dialekt)
```

###  Alternatives

[dialekt/dialekt

A boolean expression DSL.

173.7k](/packages/dialekt-dialekt)[elasticsearch/elasticsearch

PHP Client for Elasticsearch

5.3k178.3M943](/packages/elasticsearch-elasticsearch)[ruflin/elastica

Elasticsearch Client

2.3k50.4M203](/packages/ruflin-elastica)[solarium/solarium

PHP Solr client

93432.7M98](/packages/solarium-solarium)[netgen/query-translator

Query Translator is a search query translator with AST representation

2042.0M6](/packages/netgen-query-translator)[rawr/t-regx

PHP regular expression brought up to modern standards.

451157.3k3](/packages/rawr-t-regx)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
