dragon-book-exercise-answers
dragon-book-exercise-answers copied to clipboard
I modify three places in 3.3.5-3, in 3.3md
origin answer: /*([^"]|"."|*+[^/])*/ 1.add \ in [^"], i.e, [^"] -> [^*"] 2.remove * after [^"], i.e, [^"]* -> [^"] 3.add (*) before the last occurrence of / so, my answer is /*([^*"]|"."|*+[^/])(*)*/
following is my reason: 1.modification 1 is for more concise answer 2.modification 2 is the appending * is unnecessary 3.modification 3 is because that the origin answer can't match /***/, which is correct
Can't match /**/