<div dir="ltr">I just wanted to say thanks for answering my query. In the end I wrote a preprocessor, but went with the brics.automaton Java package instead. Didn't get round to implementing zero-width assertions, etc, though, but I was at least able to determine whether two regexes (regices?) intersected, if not whether they interfere with one another. There doesn't seem to be much in terms of OSS packages working in this domain otuside of some Python ( <a href="http://qntm.org/greenery" target="_blank">http://qntm.org/greenery</a> ) , Perl ( <a href="http://search.cpan.org/~estrabd/FLAT-0.9.1/">http://search.cpan.org/~estrabd/FLAT-0.9.1/</a> )and Haskell (<a href="https://code.google.com/p/xhaskell-library/" target="_blank">https://code.google.com/p/xhaskell-library/</a>) libraries. Perhaps a full blown regex parser could be implemented in Ragel itself, reifying its compile-time DFA-generation abilities? I couldn't see a way of extending Ragel's syntax itself (short of digging deep into the code). Great library, anyway, and perhaps this post will be of use to others following this trail. Or perhaps they will heroically dive in and extend Ragel. In my case, I used the quick and dirty solution of preprocessing and off-the-peg Java DFA library, which was relatively satisfactory, although I think still need to dive into the automaton code to cover extended regex syntax.</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On 25 March 2013 02:35, Adrian Thurston <span dir="ltr"><<a href="mailto:thurston@complang.org" target="_blank">thurston@complang.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Not that I'm aware of.<br>
<br>
You'll need some parse/transform pass for PCRE to ragel. I'm no expert on PCRE syntax, so I can't really comment on how difficult it will be.<br>
<br>
I can say PCRE and ragel use different implementation techniques though, so you may run into some road blocks on those grounds. Ragel is pure DFA, while PCRE uses some mix of DFA and an interpretor that backtracks.<br>
<br>
-Adrian<div><div class="h5"><br>
<br>
On 13-03-19 08:20 AM, Ellis Breen wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Hi all,<br>
<br>
Is there a semantic element, preprocessor or component that will allow<br>
me to express standard PCREs in Ragel?<br>
<br>
I'm not trying to implement a regex engine, but to find the intersection<br>
of two PCRE search patterns. I believe I've managed to do this by<br>
manually rewriting PCREs into Ragel format, but I'd like to automate the<br>
process, as I have a large number of PCREs to compare.<br>
<br>
Any hints on how I can do this with Ragel, or an alternative?<br>
<br>
This appears to be about the closest I've found to what I need.<br>
<br>
Many thanks,<br>
<br>
Ellis<br>
<br>
<br></div></div>
______________________________<u></u>_________________<br>
ragel-users mailing list<br>
<a href="mailto:ragel-users@complang.org" target="_blank">ragel-users@complang.org</a><br>
<a href="http://www.complang.org/mailman/listinfo/ragel-users" target="_blank">http://www.complang.org/<u></u>mailman/listinfo/ragel-users</a><br>
<br>
</blockquote>
<br>
______________________________<u></u>_________________<br>
ragel-users mailing list<br>
<a href="mailto:ragel-users@complang.org" target="_blank">ragel-users@complang.org</a><br>
<a href="http://www.complang.org/mailman/listinfo/ragel-users" target="_blank">http://www.complang.org/<u></u>mailman/listinfo/ragel-users</a><br>
</blockquote></div><br></div>