|
|
|
|
|
by 082349872349872
587 days ago
|
|
Aha, I'm an idiot, sorry. (but now I'm reminded —physics envy, mind you— of a "renormalisation" in regex engines. Recall the definition of A*: A* == ϵ | A | A*A*
Mathematically, it doesn't make any difference if A also matches epsilon. However, when generating code, if it does, it's very useful to treat the above
as asking for: A* == ϵ ⨁ A† ⨁ (A*A*)†
where A† recognises only the nondegenerate, "squarefree", portion of A.Otherwise one risks getting stuck recognising ϵ an infinite number of times (leaving squares in is harmless); anyway the presence of the ϵ means that during* recognition of A*, there is one incoming edge but two outgoing.) * speaking in terms of left to right traversal, but we can also go right to left, which (by a folk theorem) means we can also calculate bottom up. I'll have to reflect upon what A* might produce, edgewise, in that last case. |
|
Here: how far is this regex from non-associativity.
[& this connection is exactly what i was hoping for! I’d hoped the regular in regularity structs would trigger smth, & save us both weeks (of procrastination, in my case)]
Was i born decades earlier, i might have wandered into a VC “human capital destruction” job, since i have a roughly equivalent mix of traits..