A library for running Dyck algorithms over languages of generic string slice types.
This module provides functionalities to create and manipulate languages based on user-defined tokens, allowing for the evaluation and transformation of sequences of tokens (words) according to the rules of Dyck languages.
Usage
Add dyck to your Cargo.toml:
[]
= "0.1"
Example: Creating a Dyck language and checking if a word is valid.
use ;
// define pairs of tokens for the language
let pairs = vec!;
let language = new_from_vec.expect;
// define a word to check
let word: = vec!;
// check if the word is a valid Dyck word
if language.is_valid else
See /examples in the repository root for more examples.