An implementation of rfc9402.
Supported notations (See Examples below):
<>
: grouping/
: over*
: multiple+
: next()
: round container{}
: soft container[]
: square container@
: balltac
: reverse catcat
: cat
BNF:
concat : cat | ball | container | brace | paren | adjacent | multiple | over | group
group : "<" concat ">"
over : concat [ "/" concat ]
multiple : concat "*" /[0-9]+/
adjacent : concat [ "+" concat ]
paren : "(" [ concat ] ")"
brace : "{" [ concat ] "}"
container : "[" [ concat ] "]"
ball : "@"
tac : "tac"
cat : "cat"
$ git clone https://github.com/yabeenico/concat.git
$ cd concat/
$ pip3 install -r requirements.txt
$ ./concat.py 'cat'
/\ /
(' ) (
( \ )
|(__)/
$ ./concat.py 'cat'
/\ /
(' ) (
( \ )
|(__)/
$ ./concat.py '[cat]'
--------
| /\ /|
|(' ) ( |
| ( \ )|
| |(__)/ |
--------
$ ./concat.py 'cat + cat'
/\ / /\ /
(' ) ( (' ) (
( \ ) ( \ )
|(__)/ |(__)/
$ ./concat.py 'cat / cat'
/\ /
(' ) (
( \ )
|(__)/
/\ /
(' ) (
( \ )
|(__)/
$ ./concat.py '<(tac * 2) + {@ + cat}> / [cat]'
~~~~~~~~~~~~~~~~~ -----------------
(\ /\ \ /\ ) / /\ /\
( ) ( ') ) ( ') ) / (' ) ( |
( ( / ) ( / ) ) | __ ( \ ) |
( \(__)| \(__)| ) \ _/ \_@ |(__)/ |
~~~~~~~~~~~~~~~~~ \________________/
--------
| /\ /|
|(' ) ( |
| ( \ )|
| |(__)/ |
--------
MIT