Closed cormacmchale closed 5 years ago
After talking to Ian (Lecturer) who hangs out behind a curtain and speaks into a megaphone... it turns out I was wrong about what I thought about precedence! Basically anyway where you get + or + it should work and not get a recursion error
After deliberations with my lecturer (Ian) there is a small issue in the logic of building up the regular expression. You may build up a circular reference in certain situations that will make you follow the empty string forever. My solution to the problem is to control the order the NFA will get built using the Precedence. It's not optimal or elegant but it will do in so far as I will need to put my energies into other projects
So it turns out precedence should not matter to the implementation of the algorithm! However it does in my program due to how the regular expression is built!
Precedence does seems to have a bearing on the algorithm for every operator and I intend to fully learn and document this.