Tcl Library Source Code

Changes On Branch pt-nx-fixes
Login

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

Changes In Branch pt-nx-fixes Excluding Merge-Ins

This is equivalent to a diff from bf5f60bebe to 329f77b79d

2017-06-05
21:00
Merged fixes for tkt [71deadcf96]. check-in: 78d7722e1e user: aku tags: trunk
20:59
Bump version of "pt::rde::nx" properly. Closed-Leaf check-in: 329f77b79d user: aku tags: pt-nx-fixes
2017-06-02
05:34
Bumped verson of "pt::tclparam::configuration::nx" to 1.0.1 check-in: 238eed6eb8 user: aku tags: pt-nx-fixes
2017-06-01
09:07
* pt_tclparam_config_nx.tcl: Uncomment return, to match the other standard templates. * modules/pt/pt_rdengine_nx.tcl: Wrap the transformed TclOO ctor body into apply, to match TclOO's namespace scoping (otherwise, the stacks cannot be instantiated multiple times) check-in: 198a9c1da2 user: ssoberni tags: pt-nx-fixes
2017-05-30
16:26
Merged fixes for ticket e4cfcc0f96: handling of null by hullde json writer. check-in: bf5f60bebe user: andreask tags: trunk
16:26
Ticket e4cfcc0f96: fixed handling of null when generating json. Bumped version to 0.3. Closed-Leaf check-in: 70ea88b63e user: andreask tags: tkt-e4cfcc0f96-ak
16:16
Fix oops in new code for tar seek errors. check-in: 054a65997f user: andreask tags: trunk

Changes to modules/pt/pkgIndex.tcl.

49
50
51
52
53
54
55



56

57
58
59
60
61
62
63
64
65
66
67

68
69
70
49
50
51
52
53
54
55
56
57
58

59
60
61
62
63
64
65
66
67
68
69

70
71
72
73







+
+
+
-
+










-
+



# Import core functionality: Conversion from a specific format to PEG.
package ifneeded pt::peg::from::json      1 [list source [file join $dir pt_peg_from_json.tcl]]
package ifneeded pt::peg::from::peg   1.0.3 [list source [file join $dir pt_peg_from_peg.tcl]]

# PARAM runtime.
package ifneeded pt::rde      1.1 [list source [file join $dir pt_rdengine.tcl]]
package ifneeded pt::rde::oo  1.1 [list source [file join $dir pt_rdengine_oo.tcl]]

# Note: The last two numbers are the rde::nx version itself. The
# preceding version information is the rde::oo version it is based on.
package ifneeded pt::rde::nx  1.1 [list source [file join $dir pt_rdengine_nx.tcl]]
package ifneeded pt::rde::nx  1.1.1.0 [list source [file join $dir pt_rdengine_nx.tcl]]


# PEG grammar specification, as CONTAINER
package ifneeded pt::peg::container::peg 1 [list source [file join $dir pt_peg_container_peg.tcl]]

# */PARAM support (canned configurations).
package ifneeded pt::cparam::configuration::critcl  1.0.2 [list source [file join $dir pt_cparam_config_critcl.tcl]]
package ifneeded pt::cparam::configuration::tea     0.1   [list source [file join $dir pt_cparam_config_tea.tcl]]
package ifneeded pt::tclparam::configuration::snit  1.0.2 [list source [file join $dir pt_tclparam_config_snit.tcl]]
package ifneeded pt::tclparam::configuration::tcloo 1.0.4 [list source [file join $dir pt_tclparam_config_tcloo.tcl]]
package ifneeded pt::tclparam::configuration::nx    1.0.0 [list source [file join $dir pt_tclparam_config_nx.tcl]]
package ifneeded pt::tclparam::configuration::nx    1.0.1 [list source [file join $dir pt_tclparam_config_nx.tcl]]

# Parser generator core.
package ifneeded pt::pgen 1.0.3 [list source [file join $dir pt_pgen.tcl]]

Changes to modules/pt/pt_rdengine_nx.tcl.

1
2
3

4
5
6
7
8
9
10
1
2

3
4
5
6
7
8
9
10


-
+







# -*- tcl -*-
#
# Copyright (c) 2016 by Stefan Sobernig <[email protected]>
# Copyright (c) 2016-2017 by Stefan Sobernig <[email protected]>

# # ## ### ##### ######## ############# #####################
## Package description

## ...


25
26
27
28
29
30
31





32
33









34


35
36
37
38

39
40
41
42

43
44


45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65

25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47

48
49
50
51
52

53




54


55
56





57
58
59
60
61
62
63
64
65
66
67
68
69
70
71

72







+
+
+
+
+


+
+
+
+
+
+
+
+
+
-
+
+



-
+
-
-
-
-
+
-
-
+
+
-
-
-
-
-















-
+
	:property prototype:required
	:method init {args} {
	    :alias instvar ::nsf::methods::object::instvar
	    namespace eval [namespace qualifier [self]] {
		namespace import ::nsf::my
	    }

	    set vars [info class variables ${:prototype}]
	    if {[llength $vars]} {
		set vars [concat :instvar $vars]
	    }
	    
	    ## clone constructor
	    lassign [info class constructor ${:prototype}] ctorParams ctorBody
	    
	    set ctorBody [string map [list @body@ $ctorBody @vars@ $vars] {
		:require namespace; apply [list {} {
		    namespace import ::nsf::my
		    @vars@
		    @body@
		} [self]]
	    }]
	    
	    :method init $ctorParams [:injectVars $ctorBody]
	    :method init $ctorParams $ctorBody		       

	    ## clone all methods
	    foreach m [info class methods ${:prototype} -private] {
		lassign [info class definition ${:prototype} $m] params body
		:method $m $params [:injectVars $body]
		:method $m $params [string map [list @body@ $body @vars@ $vars] {
	    }
	}
	:method injectVars {body} {
	    if {![info exists :vars]} {
		    @vars@
		set :vars [info class variables ${:prototype}]
	    }
		    @body@
		}]
	    if {[llength ${:vars}]} {
		append tmp [list :instvar {*}${:vars}] "\n" $body;
		return $tmp
	    } else {
		return $body;
	    }
	}
    }

    ##
    ## ::pt::rde::nx:
    ##
    ## The NX derivative of ::pt::rde::oo, to be inherited
    ## by the generated grammar class.
    ##
    
    ClassFactory create nx -prototype ::pt::rde::oo
    
}

package provide pt::rde::nx [package req pt::rde::oo]
package provide pt::rde::nx [package req pt::rde::oo].1.0

Changes to modules/pt/pt_tclparam_config_nx.man.

1

2
3
4
5
6
7
8

1
2
3
4
5
6
7
8
-
+







[vset VERSION 1.0.0]
[vset VERSION 1.0.1]
[comment {-*- text -*- doctools manpage}]
[manpage_begin pt::tclparam::configuration::nx n [vset VERSION]]
[include include/module.inc]
[titledesc {Tcl/PARAM, Canned configuration, NX}]
[require pt::tclparam::configuration::nx [opt [vset VERSION]]]
[description]
[include include/ref_intro.inc]

Changes to modules/pt/pt_tclparam_config_nx.tcl.

92
93
94
95
96
97
98
99

100
101
102
103
104
105
106
107
108
109
110
111
112

113
92
93
94
95
96
97
98

99
100
101
102
103
104
105
106
107
108
109
110
111

112
113







-
+












-
+

	    # # ## ### ###### ######## #############
	}

	# # ## ### ##### ######## ############# #####################
	## Ready

	package provide @@PKG@@ @@VERSION@@
	# return
	return
    }]]

    return
}

# # ## ### ##### ######## #############

namespace eval ::pt::tclparam::configuration::nx {}

# # ## ### ##### ######## ############# #####################
## Ready

package provide pt::tclparam::configuration::nx 1.0.0
package provide pt::tclparam::configuration::nx 1.0.1
return

Changes to modules/pt/tests/data/ok/peg_tclparam-nx/0_basic_arithmetic.

340
341
342
343
344
345
346
347

340
341
342
343
344
345
346

347







-
+
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
# return
return

Changes to modules/pt/tests/data/ok/peg_tclparam-nx/10_notahead.

94
95
96
97
98
99
100
101

94
95
96
97
98
99
100

101







-
+
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
# return
return

Changes to modules/pt/tests/data/ok/peg_tclparam-nx/11_epsilon.

67
68
69
70
71
72
73
74

67
68
69
70
71
72
73

74







-
+
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
# return
return

Changes to modules/pt/tests/data/ok/peg_tclparam-nx/1_functions.

112
113
114
115
116
117
118
119

112
113
114
115
116
117
118

119







-
+
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
# return
return

Changes to modules/pt/tests/data/ok/peg_tclparam-nx/27_ticket_4a4e443ce9.

237
238
239
240
241
242
243
244

237
238
239
240
241
242
243

244







-
+
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
# return
return

Changes to modules/pt/tests/data/ok/peg_tclparam-nx/2_fun_arithmetic.

389
390
391
392
393
394
395
396

389
390
391
392
393
394
395

396







-
+
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
# return
return

Changes to modules/pt/tests/data/ok/peg_tclparam-nx/3_peg_itself.

2406
2407
2408
2409
2410
2411
2412
2413

2406
2407
2408
2409
2410
2411
2412

2413







-
+
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
# return
return

Changes to modules/pt/tests/data/ok/peg_tclparam-nx/4_choice.

54
55
56
57
58
59
60
61

54
55
56
57
58
59
60

61







-
+
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
# return
return

Changes to modules/pt/tests/data/ok/peg_tclparam-nx/5_sequence.

54
55
56
57
58
59
60
61

54
55
56
57
58
59
60

61







-
+
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
# return
return

Changes to modules/pt/tests/data/ok/peg_tclparam-nx/6_optional.

64
65
66
67
68
69
70
71

64
65
66
67
68
69
70

71







-
+
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
# return
return

Changes to modules/pt/tests/data/ok/peg_tclparam-nx/7_kleene.

66
67
68
69
70
71
72
73

66
67
68
69
70
71
72

73







-
+
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
# return
return

Changes to modules/pt/tests/data/ok/peg_tclparam-nx/8_pkleene.

69
70
71
72
73
74
75
76

69
70
71
72
73
74
75

76







-
+
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
# return
return

Changes to modules/pt/tests/data/ok/peg_tclparam-nx/9_ahead.

94
95
96
97
98
99
100
101

94
95
96
97
98
99
100

101







-
+
    # # ## ### ###### ######## #############
}

# # ## ### ##### ######## ############# #####################
## Ready

package provide NX_PACKAGE 1
# return
return