4 ms·
The Kleene star is a fixed-point/recursion operator. Here's an example that causes an infinite loop: (|a)*
by psykotic 15y ago
The Kleene star is a fixed-point/recursion operator. Here's an example that causes an infinite loop:
(|a)*
- qntm 15y agoThat's not left-recursion.
- psykotic 15y agoI probably shouldn't have used the 'left' adjective. But that expression results in an unproductive recursion (unproductive meaning that no characters are consumed through each cycle) analogous to what happens when you recursive-descent parse a context-free grammar containing left-recursive productions.