Tcl Library Source Code

Check-in [d5854af429]
Login

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

Overview
Comment:testsuite support - make-parser - Trap PEG syntax errors and abort properly with readable message
Timelines: family | ancestors | descendants | both | pt-work
Files: files | file ages | folders
SHA1: d5854af42942d87ba45dd225515a650f23a347ca
User & Date: aku 2014-06-26 23:25:02
Context
2014-06-26
23:25
Fixed bad assert, range was off-by-one. check-in: 9690c98b93 user: aku tags: pt-work
23:25
testsuite support - make-parser - Trap PEG syntax errors and abort properly with readable message check-in: d5854af429 user: aku tags: pt-work
16:26
Merged crash fixes back. Working now for Win64. check-in: 528899dc3b user: aku tags: pt-work
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to modules/pt/tests/common.

299
300
301
302
303
304
305

306



307
308
309
310
311
312
313
    # snit      : -class -name

    lappend cmd pt::pgen peg $grammar $format -name G
    if {$format ne "container"} {
	lappend cmd -class [set gc GC[incr pcounter]]
    }


    set code [eval $cmd]




    # debugging generator output
    if {$debug} {
	puts "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% $format ($glabel)"
	puts $code
	puts "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% $format ($glabel)"
    }







>
|
>
>
>







299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
    # snit      : -class -name

    lappend cmd pt::pgen peg $grammar $format -name G
    if {$format ne "container"} {
	lappend cmd -class [set gc GC[incr pcounter]]
    }

    try {
	set code [eval $cmd]
    } trap {PT RDE SYNTAX} {e o} {
	error [pt::util error2readable $e $grammar]
    }

    # debugging generator output
    if {$debug} {
	puts "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% $format ($glabel)"
	puts $code
	puts "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% $format ($glabel)"
    }