code of RE
This project is maintained by ckshitij
sudo apt-get install g++
g++ -std=c++11 RE_TO_DFA.cpp -o re
./re
‘|’ indicates alternative or parallel paths.
‘.’ Indicates concatenation
‘*’ indicates closure
( Q, ∑,d, qo, f)
Where
Q à Finite set of table
∑à finite input alphabet
qoà Initial state of FA,qo, qo Q
Fà set of final states, F c Q
dà Transition function called as state function mapping
Q * ∑ à Q
i.e. d= Q*∑à Q
Accept the given regular expression with end of character as #
Covert the regular expressions to its equivalent postfix form manually.
Construct a syntax tree from the postfix expression obtained in step 2.
Assign positions to leaf nodes
Compute following functions.
Nullable, Firstpos, Lastpos, Followpos