Shunting yard algorithm for parsing basic regular expressions with the Kleene star

84 views Asked by At

You probably seen the Shunting yard algorithm converting infix notation to postfix. Now, I can follow the code in the Wikipedia article, yet I have no clue how to make the so called Kleene star work in regular expressions.

Constraints:

  1. Kleene star is an unary operator,
  2. It operates on the subregex on its left. (Unlike unary minus operator modifies the semantics of the number/variable on its right.)

How can I make the algorithm in question to work with Kleene star?

0

There are 0 answers