entrelacs

Arrow Textual Representation

Canonical string representation

One may use a Polish notation to flatten down the nested pairs of an arrow definition so to remove parenthesis. For example, the arrow ((a → ( b → c )) → d) is flattened as → → a → b c d.

By using slash (/) as → and dot (.) as the atom separator, one may serialize the arrow definition into a string. Atoms may also contain %-encoded byte such as the reserved “/” and “.” characters.

A few examples

Extended syntax with ambiguity tolerance

Ambiguous expressions are parsed by following the rules bellow.

Combined Examples

File pathes as a subset of textual arrows

The textual representation of arrows is roughly compatible with file or URI pathes.

Please note file.txt and /file.txt are the same arrow. Additional conventions may be needed to distinguish absolute paths and relative pathes