Tk Library Source Code

View Ticket
Login
Ticket UUID: 3183064
Title: package provide statement not correct.
Type: Bug Version: None
Submitter: john-roll Created on: 2011-02-16 01:37:21
Subsystem: pt (parsetools) Assigned To: andreas_kupries
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2011-02-17 04:55:55
Resolution: Fixed Closed By: andreas_kupries
    Closed on: 2011-02-16 21:55:55
Description:
When generating a parser for snit or TclOO the final substitution of the parser package name is not correctly substituted into the package provide statement on the second to last line of the output.
User Comments: andreas_kupries added on 2011-02-17 04:55:55:

allow_comments - 1

Fixed in CVS. -package documented. Cross-initialization of -package from -class implemented, and vice versa. Documented the vice versa as well.

andreas_kupries added on 2011-02-17 04:22:34:
It partially a documentation problem, and partially a bug in pt::pgen.

The bug: documentation promises that -class serves double-duty as package name, and the code doesn't implement that.

The doc problem: There is an option -package to explicitly set the package name, should it be different from the class name, and this option is not documented.

Continuing...

andreas_kupries added on 2011-02-17 04:11:36:

File Added - 401891: xlsx.peg

andreas_kupries added on 2011-02-17 04:03:07:
Example from a Makefile

PT=pt

 parser : xls-parser.peg
        $(PT) generate snit -class xls-parser  -name xls-parser xls-parser.tcl peg xls-parser.peg
        sed -e s/PACKAGE/xls-parser/ < xls-parser.tcl > tmp
        mv tmp xls-parser.tcl

Attachments: