Tcl Library Source Code

Check-in [b08e3a4fd7]
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:Fix typo in variable use
Timelines: family | ancestors | descendants | both | pt-container-ssoberni
Files: files | file ages | folders
SHA3-256:b08e3a4fd7c9dac87cc3a0e5c7a61bf36c77a6225c45df06f72a4404bf77be42
User & Date: ssoberni 2018-06-14 09:48:12
Context
2018-06-14
14:02
Kleene star and optionals are better deemed realizable by definition. check-in: 8cd8a7435f user: ssoberni tags: pt-container-ssoberni
09:48
Fix typo in variable use check-in: b08e3a4fd7 user: ssoberni tags: pt-container-ssoberni
09:40
Fix typo in variable use check-in: e3fcb27310 user: ssoberni tags: pt-container-ssoberni
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to modules/pt/pt_pexpr_op.tcl.

65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
..
80
81
82
83
84
85
86

87



88
89
90
91
92
93
94
95
    if {$op eq "n"} {
	lassign $arguments symbol
	if {[struct::set contains $dropset $symbol]} {
	    return @@
	} else {
	    return $pe
	}
    }

    switch -exact -- $op {
	/ - x - * - + - ? - & - ! {
	    set newarg {}
	    foreach a $arguments {
		if {$a eq "@@"} continue
		lappend newarg $a
................................................................................
	    }

	    if {![llength $newarg]} {
		# Nothing remained, drop the whole expression
		return [pt::pe epsilon]
	    } elseif {[llength $newarg] < [llength $arguments]} {
		# Some removed, construct a new expression

		set pe [list $op {*}$newarg]



	    } ; # None removed, no change.
	}
    }

    return $pe
}

proc ::pt::pe::op::Rename {nt ntnew pe op arguments} {







|







 







>
|
>
>
>
|







65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
..
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
    if {$op eq "n"} {
	lassign $arguments symbol
	if {[struct::set contains $dropset $symbol]} {
	    return @@
	} else {
	    return $pe
	}
    } 

    switch -exact -- $op {
	/ - x - * - + - ? - & - ! {
	    set newarg {}
	    foreach a $arguments {
		if {$a eq "@@"} continue
		lappend newarg $a
................................................................................
	    }

	    if {![llength $newarg]} {
		# Nothing remained, drop the whole expression
		return [pt::pe epsilon]
	    } elseif {[llength $newarg] < [llength $arguments]} {
		# Some removed, construct a new expression
		 if {$op eq "/"} {
		     set pe [list $op {*}$newarg]
		 } else {
		     set pe [pt::pe epsilon]
		 }
	     } ; # None removed, no change.
	}
    }

    return $pe
}

proc ::pt::pe::op::Rename {nt ntnew pe op arguments} {