summaryrefslogtreecommitdiffstats
path: root/lex.yy.c.shipped
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-01-21 07:23:27 -0800
committerKaz Kylheku <kaz@kylheku.com>2021-01-21 07:23:27 -0800
commit625a22dbae0b10eb03cbbbef0fb3a1457f916d7a (patch)
tree6ac91c5f7f703edd47230a684dd2b76dd421b7fa /lex.yy.c.shipped
parent6ab8b9c6f03d13b96b599709f44da798552639c9 (diff)
downloadtxr-625a22dbae0b10eb03cbbbef0fb3a1457f916d7a.tar.gz
txr-625a22dbae0b10eb03cbbbef0fb3a1457f916d7a.tar.bz2
txr-625a22dbae0b10eb03cbbbef0fb3a1457f916d7a.zip
matcher: fix broken @(let @a @(some @a)) test case.
This is caused by the way the loop match compiler moves the matching logic into a guard, which causes a re-ordering of the variable assignments which interferes with backreferencing when @(some) is embedded into a @(let), and probably other situations. The issues is that the backreferencing equal tests can be reordered to occur before the assignment which sets the intial value of the backreferenced variable: cart before the horse kind of thing. * share/txr/stdlib/match.tl (compile-loop-match): Do not add the submatch into the guard sequence. Thus guard1's vars and var-exprs, move into into the main compiled-match, and guard1's guard-expr moves into guard0. Thus guard1 disappears, guard0 becomes guard. * tests/011/patmatch.tl: New test case that is also fixed, and which was not fixed by a different approach to the problem that I scrapped.
Diffstat (limited to 'lex.yy.c.shipped')
0 files changed, 0 insertions, 0 deletions