Tcl Library Source Code

Check-in [8436048fee]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2018 Conference, Houston/TX, US, Oct 15-19
Send your abstracts to tclconference@googlegroups.com
or submit via the online form by Aug 20.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Some fixes to the new pe transform testing.
Timelines: family | ancestors | descendants | both | pt-container-ssoberni
Files: files | file ages | folders
SHA3-256:8436048feee6ef20262408f541dad1f019dd10b2ba864cf066abed7e65dd52b6
User & Date: andreask 2018-07-09 19:49:17
References
2018-07-09
19:50 Ticket [351b8b2f55] Bug fixes on PT/PEG transformation operations status still Open with 3 other changes artifact: 5764f0b57a user: aku
Context
2018-07-09
21:08
More tests: syntax, drop unreachable. More comments. Noted untested ops. pt::peg::op <B> - Version bump to 1.0.2 Closed-Leaf check-in: d907079d5b user: andreask tags: pt-container-ssoberni
19:49
Some fixes to the new pe transform testing. check-in: 8436048fee user: andreask tags: pt-container-ssoberni
2018-07-04
12:50
Factored out commonalities into a test-case generator: TestTransformation; added tests for discussing suggested fixes (minimize, drop unrealizable) check-in: 9ab6b8023e user: ssoberni tags: pt-container-ssoberni
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to modules/pt/pt_peg_op.tcl.

135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
    set mode() value

    # calls  = array (x -> called-by-x)
    # caller = array (x -> users-of-x)

    set changed [$container nonterminals]
    while {[llength $changed]} {
puts <$changed>
	set scan $changed
	set changed {}

	foreach sym $scan {
	    # Rule 1
	    if {![llength $calls($sym)] &&
		($mode($sym) eq "value")} {
puts (1)$sym
		set mode($sym) leaf
	    }

	    # Rule 2
	    set callmode [CallMode $caller($sym) mode]
	    if {($callmode eq "void") &&
		($mode($sym) ne "void")} {







|







|







135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
    set mode() value

    # calls  = array (x -> called-by-x)
    # caller = array (x -> users-of-x)

    set changed [$container nonterminals]
    while {[llength $changed]} {
	#puts <$changed>
	set scan $changed
	set changed {}

	foreach sym $scan {
	    # Rule 1
	    if {![llength $calls($sym)] &&
		($mode($sym) eq "value")} {
		#puts (1)$sym
		set mode($sym) leaf
	    }

	    # Rule 2
	    set callmode [CallMode $caller($sym) mode]
	    if {($callmode eq "void") &&
		($mode($sym) ne "void")} {

Changes to modules/pt/pt_peg_op.test.

17
18
19
20
21
22
23
24
25

26
27
28
29
30
31
32
support {
    useAccel [useTcllibC] struct/sets.tcl struct::set
    TestAccelInit                         struct::set

    use fileutil/fileutil.tcl  fileutil ; # For tests/common
    use snit/snit.tcl          snit

    use pt/pt_pegrammar.tcl pt::peg
    use pt/pt_peg_container.tcl pt::peg::container


    source [localPath tests/common]
}
testing {
    useLocal pt_peg_op.tcl pt::peg::op
}








|

>







17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
support {
    useAccel [useTcllibC] struct/sets.tcl struct::set
    TestAccelInit                         struct::set

    use fileutil/fileutil.tcl  fileutil ; # For tests/common
    use snit/snit.tcl          snit

    use pt/pt_pegrammar.tcl     pt::peg
    use pt/pt_peg_container.tcl pt::peg::container
    use pt/pt_pexpr_op.tcl      pt::pe::op

    source [localPath tests/common]
}
testing {
    useLocal pt_peg_op.tcl pt::peg::op
}