This is a bit like Boolean algebra (except it isn't, it is tangle composition - but a lot of main rules agree):
- | is legit
- If t is legit, (t) is
- If t and T are legit, tT is (don't worry, concatenation is associative)
(4. If this helps, ((t))=t - think of (t) as negation)
A string analyzer would be much easier to handle if I could write this only with two characters. Of course this is possible (read string as base 3, convert to binary) but then simplifying (like 4.) would become a nightmare. I could define a Sheffer NAND, but it's not associative and I still need brackets.
Any idea for writing this with only two basic symbols AND backconversion to the form above is as context-free as possible? (For example, I can't just drop closing brackets: (11) and (1)1 look the same then)