-- TransDoc.tioga -- last edited by: R. Nix, April 12, 1984 6:59:40 pm PST name Trans: <> <> <> <> <> < notation, e.g. the pattern ``, \n'' might match a list of names. The replacement syntax is similar to the EditTool's, in that the replacement expression `` \n'' will interchange the order of names in the text matched by the pattern. Note that apostrophe, ``''', is the quote-character, in case you want to stick a ``<'' in a replacement. There are special purpose hacks for changing field capitalization: ``'' would capitalize the ``'' field, ``'' would make it be all lower case. >> <> <<-pattern (-p) By default, Trans interprets the pattern as a regular expression using the syntax described in RegularExpressionDoc.tioga.>> <<-literal (-l) If this switch is given, then Trans interprets patterns as literal text.>> <<-caseSensitive (-c) Capitalization is significant in matching the pattern agains the text.>> <<-ignoreCase (-i) By default, Trans ignores capitalization differences when matching the pattern against the text.>> <<-wordMatch (-w) Match text only on word boundaries.>> <<-matchAnywhere (-m) By default, Trans will match the pattern anywhere.>> <<-deleteMatched (-d) If the -d switch is given, then no replacement expression should be given, and Trans will delete all text that matches the pattern. This switch is necessary because the CommandTool's command line parser doesn't parse "" as a token.>> <<-selectMatched (-s) If this switch is given, then Trans will delete all text that doesn't match the pattern, and will apply the given replacement to the text that does match the pattern.>> <<-replaceMatched (-t) By default, Trans replaces text that matches the pattern with the text determined by the replacement expression, copying the text that doesn't match the pattern over into the output.>> <<-appendFile (-a) This switch takes an argument, which is the name of a file to which all output will be appended. Normally when a list of file names is given, each file is processed separately, and output is written to a new generation of each file. This switch is useful, in conjunction with the -s switch, for doing something like collecting the names of all procedures defined in a set of files.>> <<-filePatterns (-f) This is how you tell Trans to do more than one pattern => replacement transformation. This switch takes an argument, which is the name of a file. Each line of the file should be a Trans command line, sans file names, but including any switches that you'd like to be in effect (including other -f switches). Trans will apply each of the commands in the file to each of the files specified on the command line. Switch settings are dynamically scoped, e.g. the switch settings given on the command line specify the defaults for each pattern-replacement line in the file, but each pattern-replacement line can override those defaults.>> <<>> <> <> <> <> <> <>>