编译器-正则表达式转NFA

RE to NFA : Thompson Construction

Regular operation (正则操作符)
1.Union        或的意思
2.Concatenation        串联、链接的意思
3.Star        重复的意思

1.Union在NFA中的体现:

2.Concatenation在NFA中的体现

  3.Star在NFA中的体现

具体例子:
a (b U c)* 

a的NFA
 

b U c 的NFA

(b U c)* 的NFA

 

a (b U c)*  的 NFA

猜你喜欢

转载自blog.csdn.net/weixin_43754049/article/details/126211015