Agree it isn’t POLS, but debugging is sometimes tuff.
Please enlighten me. How do you debug ?
···
On Wed, 25 Feb 2004 14:26:36 +0100, Robert Klemme wrote:
–
Simon Strandgaard
Loaded suite TestScanner
Started
test_verbose_alt_rep1(TestScanner): before #test_verbose_alt_rep1
regexp=“(foob|fo|o)*bar”
±Sequence
±Repeat greedy{0,-1}
±Group register=1
±Alternation
±Sequence
> ±Literal “f”
> ±Literal “o”
> ±Literal “o”
> ±Literal “b”
±Sequence
> ±Literal “f”
> ±Literal “o”
±Literal “o”
±Literal “b”
±Literal “a”
±Literal “r”
input=“xfoobarx”
execute at position 0
repeat 0
visitor#set_state from active into inactive
match “b” at position 0
path end = expected “b” but got “x”
check_integrity history.size=1
index-stack=[0]
integrity “bar” (line 0)
next_path zero. found=false lazy=false state=active index=0 has_match=false
clear history
replace zero with one
visitor#set_state from inactive into active
visitor#set_memento
group_open register=1
alternation 0
match “f” at position 0
path end = expected “f” but got “x”
check_integrity history.size=2
index-stack=[1, 0]
integrity “foob bar” (line 1)
next_path alternation. index=0->1
visitor#set_memento
match “f” at position 0
path end = expected “f” but got “x”
check_integrity history.size=2
index-stack=[1, 1]
integrity “fo bar” (line 2)
next_path alternation. index=1->2
visitor#set_memento
match “o” at position 0
path end = expected “o” but got “x”
check_integrity history.size=2
index-stack=[1, 2]
integrity “o bar” (line 3)
next_path alternation. index=2->3, exhausted
skip, path end = exhausted
next_path one. found=false lazy=false state=active index=0 has_match=false
clear history
skip, path end = is done
execute at position 1
repeat 0
visitor#set_state from active into inactive
match “b” at position 1
path end = expected “b” but got “f”
check_integrity history.size=1
index-stack=[0]
integrity “bar” (line 4)
next_path zero. found=false lazy=false state=active index=0 has_match=false
clear history
replace zero with one
visitor#set_state from inactive into active
visitor#set_memento
group_open register=1
alternation 0
match “f” at position 1
match “o” at position 2
match “o” at position 3
match “b” at position 4
group_close register=1
visitor#set_state from active into inactive
one-end
match “b” at position 5
path end = expected “b” but got “a”
check_integrity history.size=3
index-stack=[1, 0]
integrity “foob bar” (line 5)
next_path zero. found=false lazy=false state=active index=1 has_match=false
clear history
replace zero with one
visitor#set_state from inactive into active
visitor#set_memento
group_open register=1
alternation 0
match “f” at position 5
path end = expected “f” but got “a”
check_integrity history.size=4
index-stack=[2, 0, 0]
integrity “foob foob bar” (line 6)
next_path alternation. index=0->1
visitor#set_memento
match “f” at position 5
path end = expected “f” but got “a”
check_integrity history.size=4
index-stack=[2, 0, 1]
integrity “foob fo bar” (line 7)
next_path alternation. index=1->2
visitor#set_memento
match “o” at position 5
path end = expected “o” but got “a”
check_integrity history.size=4
index-stack=[2, 0, 2]
integrity “foob o bar” (line 8)
next_path alternation. index=2->3, exhausted
skip, path end = exhausted
next_path one. found=false lazy=false state=active index=1 has_match=false
clear history
skip, path end = is done
next_path alternation. index=0->1
visitor#set_memento
match “f” at position 1
match “o” at position 2
group_close register=1
visitor#set_state from active into inactive
one-end
match “b” at position 3
path end = expected “b” but got “o”
check_integrity history.size=3
index-stack=[1, 1]
integrity “fo bar” (line 9)
next_path zero. found=false lazy=false state=active index=1 has_match=false
clear history
replace zero with one
visitor#set_state from inactive into active
visitor#set_memento
group_open register=1
alternation 0
match “f” at position 3
path end = expected “f” but got “o”
check_integrity history.size=4
index-stack=[2, 1, 0]
integrity “fo foob bar” (line 10)
next_path alternation. index=0->1
visitor#set_memento
match “f” at position 3
path end = expected “f” but got “o”
check_integrity history.size=4
index-stack=[2, 1, 1]
integrity “fo fo bar” (line 11)
next_path alternation. index=1->2
visitor#set_memento
match “o” at position 3
group_close register=1
visitor#set_state from active into inactive
one-end
match “b” at position 4
match “a” at position 5
match “r” at position 6
last
path end = reached last node
check_integrity history.size=5
index-stack=[2, 1, 2]
integrity “fo o bar” (line 12)
next_path zero. found=true lazy=false state=active index=2 has_match=false
remember zero and clear
replace zero with one
visitor#set_state from inactive into active
visitor#set_memento
group_open register=1
alternation 0
match “f” at position 4
path end = expected “f” but got “b”
check_integrity history.size=6
index-stack=[3, 1, 2, 0]
integrity “fo o foob bar” (line 13)
next_path alternation. index=0->1
visitor#set_memento
match “f” at position 4
path end = expected “f” but got “b”
check_integrity history.size=6
index-stack=[3, 1, 2, 1]
integrity “fo o fo bar” (line 14)
next_path alternation. index=1->2
visitor#set_memento
match “o” at position 4
path end = expected “o” but got “b”
check_integrity history.size=6
index-stack=[3, 1, 2, 2]
integrity “fo o o bar” (line 15)
next_path alternation. index=2->3, exhausted
skip, path end = exhausted
next_path one. found=false lazy=false state=active index=2 has_match=true
clear history
install match
visitor#set_memento
skip, path end = is done
next_path alternation. index=2->3, found
skip, path end = found
next_path one. found=true lazy=false state=active index=1 has_match=true
remember one and clear
install match
visitor#set_memento
skip, path end = is done
next_path alternation. index=1->2, found
skip, path end = found
next_path one. found=true lazy=false state=active index=0 has_match=true
remember one and clear
install match
visitor#set_memento
----- BEGIN before activate -----
content of history stack
0: ONE_0 quantifier_id=0
1: ALT_1
2: ONE_1 quantifier_id=0
3: ALT_2
4: ZERO_2 quantifier_id=0
quantifier information
0: active found=no
----- END before activate -----
activate_next
found zero/one
activate_inactive
----- BEGIN after activate -----
content of history stack
0: ONE_0 quantifier_id=0
1: ALT_1
2: ONE_1 quantifier_id=0
3: ALT_2
4: ZERO_2 quantifier_id=0
quantifier information
0: done found=no
----- END after activate -----
skip, path end = is done
next_path zero. found=true lazy=false state=done index=2 has_match=false
skip, path end = done
next_path alternation. index=2->3, found
skip, path end = found
next_path one. found=true lazy=false state=done index=1 has_match=false
skip, path end = done
next_path alternation. index=1->2, found
skip, path end = found
next_path one. found=true lazy=false state=done index=0 has_match=false
skip, path end = done
result=[“foobar”, “o”]
after #test_verbose_alt_rep1
…
Finished in 0.026799 seconds.
1 tests, 1 assertions, 0 failures, 0 errors