Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.compilers    |    Compiler construction, theory, etc. (Mod    |    2,753 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 2,440 of 2,753    |
|    Ben Hanson to All    |
|    Re: Regular expression string searching     |
|    07 Mar 18 12:18:23    |
      From: jamin.hanson@googlemail.com              I missed your question about non-greedy repeats.              Yes, it is possible. See build_dfa() in generator.hpp from lexertl.              Basically non-greedy transitions are snipped when building the dfa. I build a       regex syntax tree as suggested in the Dragon Book and I keep track of greedy       flags in the tree and that is passed down to partition/equivset.hpp and from       there to the generator. The thing you have to careful about is respecting that       the left side takes priority (i.e. the regex or sub-regex that came first).              Regards,              Ben              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca