1page_util_quote(n) Parser generator tools page_util_quote(n)
2
3
4
5______________________________________________________________________________
6
8 page_util_quote - page character quoting utilities
9
11 package require page::util::quote ?0.1?
12
13 package require snit
14
15 ::page::util::quote::unquote char
16
17 ::page::util::quote::quote'tcl char
18
19 ::page::util::quote::quote'tclstr char
20
21 ::page::util::quote::quote'tclcom char
22
23_________________________________________________________________
24
26 This package provides a few utility commands to convert characters into
27 various forms.
28
30 ::page::util::quote::unquote char
31 A character, as stored in an abstract syntax tree by a PEG pro‐
32 cessor (See the packages grammar::peg::interpreter, grammar::me,
33 and their relations), i.e. in some quoted form, is converted
34 into the equivalent Tcl character. The character is returned as
35 the result of the command.
36
37 ::page::util::quote::quote'tcl char
38 This command takes a Tcl character (internal representation) and
39 converts it into a string which is accepted by the Tcl parser,
40 will regenerate the character in question and is 7bit ASCII. The
41 string is returned as the result of this command.
42
43 ::page::util::quote::quote'tclstr char
44 This command takes a Tcl character (internal representation) and
45 converts it into a string which is accepted by the Tcl parser
46 and will generate a human readable representation of the charac‐
47 ter in question. The string is returned as the result of this
48 command.
49
50 The string does not use any unprintable characters. It may use
51 backslash-quoting. High UTF characters are quoted to avoid prob‐
52 lems with the still prevalent ascii terminals. It is assumed
53 that the string will be used in a double-quoted environment.
54
55 ::page::util::quote::quote'tclcom char
56 This command takes a Tcl character (internal representation) and
57 converts it into a string which is accepted by the Tcl parser
58 when used within a Tcl comment. The string is returned as the
59 result of this command.
60
62 This document, will undoubtedly contain bugs and other problems.
63 Please report such in the category page of the Tcllib SF Trackers
64 [http://sourceforge.net/tracker/?group_id=12883]. Please also report
65 any ideas for enhancements you may have.
66
68 page, parser generator, quoting, text processing
69
71 Copyright (c) 2007 Andreas Kupries <andreas_kupries@users.sourceforge.net>
72
73
74
75
76page 1.0 page_util_quote(n)