vm370 icon indicating copy to clipboard operation
vm370 copied to clipboard

Parsing error in BREXX

Open BobBolch opened this issue 4 years ago • 1 comments

Dave Mitchell via groups.io 8:33 AM (24 minutes ago) to h390-vm

I seem to have stumbled on a bug in the way the parse instruction works in BREXX specifically when a pattern is used. Here's a sample exec; /* test parse */ trest = '() trial 1' say 'test of () trial 1' s = dotell(trest) trest = '(1) trial 2' say 'test of (1) trial 2' s = dotell(trest) trest = '(1 3) trial3' say 'test of (1 3) trial 3' s = dotell(trest) exit

dotell: parse arg with '(' in1 in2 ')' outer say 'in1 = /'in1'/' say 'in2 = /'in2'/' say 'outer=/'outer'/' return 0 only the third test works as it should, setting 'in1' to '1', 'in2' to '3' and 'outer' to 'trial 3'. The other two cases set 'in1' to ')' and '1) respectively, 'in2' to 'trial 1' and 'trial 2' and 'outer' to a null string.

BobBolch avatar Dec 12 '21 13:12 BobBolch

This is a duplicate of #61.

RossPatterson avatar Sep 04 '24 19:09 RossPatterson