5 ms·
Implementing Regular Expressions (2007)
- ori_b 11y agoA fantastic guide. I stole a lot of the ideas from it when I implemented regexes for my language. http://git.eigenstate.org/ori/mc.git/tree/libregex/ http://git.eigenstate.org/ori/mc.git/tree/libregex/
- aaronbrethorst 11y agoI highly recommend Sipser's "Introduction to the Theory of Computation" if you want to learn more. Here's a link to the edition I had in college (around 2002): http://www.amazon.com/Introduction-Theory-Computation-Michael-Sipser/dp/0534950973 http://www.amazon.com/Introduction-Theory-Computation-Michae... It's used at MIT (http://math.mit.edu/~sipser/18404/ http://math.mit.edu/~sipser/18404/), the U of MN (where I used it), and—I'm sure—most other schools. You can buy the newest edition, but you'll spend an extra $150 for not much gain.
- roel_v 11y agoOff topic for this thread, but still of interest I think: when buying text books not for college (i.e., when exercise order and page numbering don't matter), I've saved hundreds over the last years buying international editions through e.g. Abebooks. Like, the book mentioned in the parent is 6$ (!) with free shipping (!!!) from India: http://www.abebooks.com/servlet/SearchResults?an=sipser&sts=t http://www.abebooks.com/servlet/SearchResults?an=sipser&sts=... . These are usually either used or new international/Indian editions. The quality is not as good as the 'real' versions (very thin paper, binding not very solid) but the savings are substantial. I bought a book a few weeks ago that I couldn't find for less than 120 euros here in Europe, and it cost me ~20 euros including shipping from India.
- jhallenworld 11y agoCan you implement submatch tracking with a DFA? There is this: http://stackoverflow.com/questions/3287860/what-is-a-tagged-dfa http://stackoverflow.com/questions/3287860/what-is-a-tagged-... But when I looked, the code did not use it.