user1007632
user1007632

Reputation: 159

Methodical way of converting regular expressions to nfa's?

I am in compilers class and the professor just threw at us how to convert regex to nfa's without any method or rules. Is there a methodical way to approach the problem? I find it hard to deal with why all the epsilons exist and how do i construct an nfa given regex. Thank you for any help.

Upvotes: 1

Views: 677

Answers (1)

Ludovic Kuty
Ludovic Kuty

Reputation: 4954

You could use a Thompson NFA. See the article by Russ Cox. It is made in the C language.

Upvotes: 1

Related Questions