[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-janitors] #636: irregex behaves differently with overlappin
From: |
Chicken Trac |
Subject: |
Re: [Chicken-janitors] #636: irregex behaves differently with overlapping character sets on some machines |
Date: |
Sun, 10 Jul 2011 21:49:10 -0000 |
#636: irregex behaves differently with overlapping character sets on some
machines
-----------------------------+----------------------------------------------
Reporter: sjamaan | Owner:
Type: defect | Status: new
Priority: critical | Milestone: 4.8.0
Component: core libraries | Version: 4.7.x
Resolution: | Keywords: irregex
-----------------------------+----------------------------------------------
Comment(by sjamaan):
The bug appears to be in the nfa->dfa conversion, since the NFA resulting
from this SRE is exactly the same before and after the breaking change.
I've managed to reduce it further to an even simpler match, which gets
compiled to this DFA:
{{{
#;2> (pp (nfa->dfa (sre->nfa (quote (seq (+ print) white)) ~none)))
#((#f (#((#\tab . #\newline) (#\space . #\~)) . 1))
(#f (#((#\tab . #\tab) (#\! . #\~)) . 2) (#\space . 2) (#\newline . 2))
(#t (#((#\tab . #\tab) (#\! . #\~)) . 2) (#\space . 2) (#\newline . 2)))
}}}
It should look something like this (the accepting state should be left
when encountering a non-whitespace character):
{{{
#((#f (#((#\tab . #\newline) (#\space . #\~)) . 1))
(#f (#((#\space . #\~)) . 2) (#\tab . 2) (#\newline . 2))
(#t (#((#\! . #\~)) . 1) (#\space . 2) #((#\tab . 2) (#\newline . 2))))
}}}
It's most likely in the hairy {{{nfa-join-transitions!}}} procedure. I
don't understand it anymore so I'll probably just end up rewriting it ;)
--
Ticket URL: <http://bugs.call-cc.org/ticket/636#comment:6>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.
- [Chicken-janitors] #636: irregex behaves different on some machines, Chicken Trac, 2011/07/08
- Re: [Chicken-janitors] #636: irregex behaves different on some machines, Chicken Trac, 2011/07/08
- Re: [Chicken-janitors] #636: irregex behaves different on some machines, Chicken Trac, 2011/07/08
- Re: [Chicken-janitors] #636: irregex behaves differently with overlapping character sets on some machines (was: irregex behaves different on some machines), Chicken Trac, 2011/07/08
- Re: [Chicken-janitors] #636: irregex behaves differently with overlapping character sets on some machines, Chicken Trac, 2011/07/08
- Re: [Chicken-janitors] #636: irregex behaves differently with overlapping character sets on some machines, Chicken Trac, 2011/07/09
- Re: [Chicken-janitors] #636: irregex behaves differently with overlapping character sets on some machines,
Chicken Trac <=
- Re: [Chicken-janitors] #636: irregex behaves differently with overlapping character sets on some machines, Chicken Trac, 2011/07/12
- Re: [Chicken-janitors] #636: irregex behaves differently with overlapping character sets on some machines, Chicken Trac, 2011/07/13