diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-07-06 08:17:27 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-07-06 08:17:27 -0700 |
commit | 3ff3329ca7120173e996204d39d7b869a036691b (patch) | |
tree | 86416b79b1e62b400410c29da839c5a649a2e033 /txr.1 | |
parent | c85a79cd56fc8422445bee080e9fcc3cee2a0510 (diff) | |
download | txr-3ff3329ca7120173e996204d39d7b869a036691b.tar.gz txr-3ff3329ca7120173e996204d39d7b869a036691b.tar.bz2 txr-3ff3329ca7120173e996204d39d7b869a036691b.zip |
* txr.1: Corrections from Roman Mishin
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 101 |
1 files changed, 52 insertions, 49 deletions
@@ -123,10 +123,10 @@ This option implies -B. Print the variable bindings in Lisp syntax instead of shell syntax. .IP "-a num" -This option implies -B. The decimal integer argument specifies the maximum number of array dimensions -to use for list-valued variable bindings. The default is 1. Additional -dimensions are expressed using numeric suffixes in the generated variable -names. +This option implies -B. The decimal integer argument specifies the maximum +number of array dimensions to use for list-valued variable bindings. +The default is 1. Additional dimensions are expressed using numeric suffixes +in the generated variable names. For instance, consider the three-dimensional list arising out of a triply nested collect: ((("a" "b") ("c" "d")) (("e" "f") ("g" "h"))). Suppose this is bound to a variable V. With -a 1, this will be @@ -204,7 +204,8 @@ their implementation of the "hash bang" mechanism. See Hash Bang Support below. .IP -- -Signifies the end of the option list. This option does not combine with others, so for instance -b- does not mean -b --, but is an error. +Signifies the end of the option list. This option does not combine with others, +so for instance -b- does not mean -b --, but is an error. .IP - This argument is not interpreted as an option, but treated as a filename @@ -239,7 +240,8 @@ but has run out of files to process, the match fails. .SH STATUS AND ERROR REPORTING .B TXR -sends errors and verbose logs to the standard error device. The following paragraphs apply when +sends errors and verbose logs to the standard error device. The following +paragraphs apply when .B TXR is run without enabling verbose mode. If verbose mode is enabled, then .B TXR @@ -632,7 +634,8 @@ so that for instance 123 is not a valid name, but 12A is valid. Case is sensitive, so that @FOO is different from @foo, which is different from @Foo. The braces around a name can be used when material which follows would -otherwise be interpreted as being part of the name. When a name is enclosed in braces, the following additional characters may be used as part of the name: +otherwise be interpreted as being part of the name. When a name is enclosed in +braces, the following additional characters may be used as part of the name: ! $ % & * + - < = > ? \e ^ _ ~ @@ -1377,7 +1380,7 @@ Explicitly match the end of file. Fails if unmatched data remains in the input stream. .IP @(eol) -Explicitly match the end of line. Fails if the the current position is not the +Explicitly match the end of line. Fails if the current position is not the end of a line. Also fails if no data remains (there is no current line). .IP @(next) @@ -1414,8 +1417,9 @@ successful clauses are visible to the later clauses. .IP @(all) Multiple clauses are applied to the same input. Succeeds if and only if each -one of the clauses matches. The clauses are applied in sequence, and evaluation stops on the first failure. The bindings established by earlier -successful clauses are visible to the later clauses. +one of the clauses matches. The clauses are applied in sequence, and evaluation +stops on the first failure. The bindings established by earlier successful +clauses are visible to the later clauses. .IP @(none) Multiple clauses are applied to the same input. Succeeds if and only if none of @@ -1476,8 +1480,8 @@ Separator of clauses for @(some), @(all), @(none), @(maybe) and @(cases). Equivalent to @(and). Choice is stylistic. .IP @(end) -Required terminator for @(some), @(all), @(none), @(maybe), @(cases), -@(collect), @(coll), @(output), @(repeat), @(rep), @(block) and @(define). +Required terminator for @(some), @(all), @(none), @(maybe), @(cases), @(if), +@(collect), @(coll), @(output), @(repeat), @(rep), @(try), @(block) and @(define). .IP @(fail) Terminate the processing of a block, as if it were a failed match. @@ -2091,10 +2095,9 @@ The syntax supports arbitrary nesting. For example: nesting can be indicated using whitespace between @ and the directive expression. Thus, the above is an @(all) query containing a @(skip) -clause which applies to a @(some) that is followed by the the text -line "a dark". The @(some) clause combines the text line "it", -and a @(none) clause which contains just one clause consisting of -the line "was". +clause which applies to a @(some) that is followed by the text line "a dark". +The @(some) clause combines the text line "it", and a @(none) clause which +contains just one clause consisting of the line "was". The semantics of the parallel directives is: @@ -2263,7 +2266,7 @@ corresponds to the somewhat shorter and clearer: A @(elsif <lisp-expr-2>) B - @(else + @(else) C @(end) @@ -2346,9 +2349,9 @@ end up thrown away. .SS Gather Keyword Parameters -The gather diretive accepts the keyword parameter :vars. The argument to vars is a list -of required and optional variables. Optional variables are denoted by the -specification of a default value. Example: +The gather diretive accepts the keyword parameter :vars. The argument to vars is +a list of required and optional variables. Optional variables are denoted by +the specification of a default value. Example: @(gather :vars (a b c (d "foo"))) ... @@ -2369,7 +2372,7 @@ Secondly, if some of the clauses of the gather did not match, but all of the required variables have bindings, then the directive succeeds. Without the presence of :vars, it would fail in this situation. -Thirdly, if the the gather succeeds (all required variables have bindings), +Thirdly, if the gather succeeds (all required variables have bindings), then all of the optional variables which do not have bindings are given bindings to their default values. @@ -3188,9 +3191,10 @@ The precise meaning of these directives is: .IP "@(fail NAME)" -Immediately terminate the enclosing query block called NAME, as if that block failed to match anything. If more than one block by that name encloses -the directive, the inner-most block is terminated. No bindings -emerge from a failed block. +Immediately terminate the enclosing query block called NAME, as if that block +failed to match anything. If more than one block by that name encloses +the directive, the inner-most block is terminated. No bindings emerge from +a failed block. .IP @(fail) @@ -6480,8 +6484,8 @@ the return operator to be used to terminate the loop. 3. Evaluate <test-form>. If <test-form> yields nil, then the loop terminates. Each <result-form> is evaluated, and the value of the last of these forms is is the result value of the for loop. If there are no <result-form>-s -then the result value is nil. If the <test-form> is omitted, then the -the test is taken to be true, and the loop does not terminate. +then the result value is nil. If the <test-form> is omitted, then the test +is taken to be true, and the loop does not terminate. 4. Otherwise, if <test-form> yields non-nil, then each <body-form> is evaluated in turn. Then, each <inc-form> is evaluated in turn @@ -7611,7 +7615,7 @@ Syntax: Description The remq, remql and remqual functions produce a new list based on <list>, -removing the the items which are eq, eql or equal to <object>. +removing the items which are eq, eql or equal to <object>. The input <list> is unmodified, but the returned list may share substructure with it. If no items are removed, it is possible that the return value @@ -8005,7 +8009,7 @@ Syntax: .TP Description: -When given three arguments, the mapcar function processes applies <function> to +When given three arguments, the mapcar function applies <function> to the elements of <list> and returns a list of the resulting values. Essentially, the list is filtered through the function. @@ -9891,7 +9895,7 @@ Syntax: .TP Description: -The lazy-str-get-trailing-list function is a sort of inverse operation to the +The lazy-str-get-trailing-list function is a sort of inverse operation to the lazy string from its associated list. Firstly, the string is forced up through the position <index>. @@ -9901,7 +9905,7 @@ through to the end, is split into pieces on occurrences of the terminator character, which had been given as the <terminator> argument in the lazy-str constructor, and defaults to the newline character. -Finally, a list is returned consisting of the the pieces produced by the split, +Finally, a list is returned consisting of the pieces produced by the split, to which is appended the remaining list of the string which has not yet been forced to materialize. @@ -10309,12 +10313,11 @@ the DWIM-bracket syntax: ;; from is not a list (sub seq from to) <--> [seq from..to] -The the description of the dwim operator - in particular, the -section on Range Indexing - explains the semantics of the range -specification. +The description of the dwim operator - in particular, the section +on Range Indexing - explains the semantics of the range specification. -If the sequence is a list, the output sequence may share -substructure with the input sequence. +If the sequence is a list, the output sequence may share substructure +with the input sequence. .SS Function replace @@ -10346,9 +10349,8 @@ DWIM bracket syntax and first form of the replace function: (set seq (replace seq new from to)) <--> (set [seq from..to] new) -The the description of the dwim operator - in particular, the -section on Range Indexing - explains the semantics of the range -specification. +The description of the dwim operator - in particular, the section +on Range Indexing - explains the semantics of the range specification. This operation is destructive: it may work "in place" by modifying the original sequence. The caller should retain the return value @@ -13045,15 +13047,15 @@ Syntax: .TP Description: -The open-files and open-files* functions create a list of streams by invoking the open-file -function on each element of <path-list>. These streamas are turned into a catenated -stream as if applied as arguments to make-catenated-stream. +The open-files and open-files* functions create a list of streams by invoking +the open-file function on each element of <path-list>. These streamas are turned +into a catenated stream as if applied as arguments to make-catenated-stream. The effect is that multiple files appear to be catenated together into a single input stream. -If the optional <alternative-stream> argument is supplied, then if <path-list> is empty, -that argument is returned instead of an empty catenated stream. +If the optional <alternative-stream> argument is supplied, then if <path-list> +is empty, that argument is returned instead of an empty catenated stream. The difference between open-files and open-files* is that open-files creates all of the streams up-front. So if any of the paths cannot be opened, the operation throws. @@ -13321,7 +13323,7 @@ system command, which is in a system-dependent syntax. On a POSIX system, this would be in the POSIX Shell Command Language. The open-process function specifies a program to invoke via the <command> -argument. This is subject the the operating system's search strategy. +argument. This is subject to the operating system's search strategy. On POSIX systems, if it is an absolute or relative path, it is treated as such, but if it is a simple base name, then it is subject to searching via the components of the PATH environment variable. If open-process @@ -14094,8 +14096,8 @@ call to set-sig-handler changes the handling for that signal. If <handling-spec> is the symbol nil, then the function previously associated with the signal, if any, is removed, and the signal is disabled. For a signal -to be disabled means that the signal is set to the SIG_IGN disposition (refer to the -C API). +to be disabled means that the signal is set to the SIG_IGN disposition (refer to +the C API). If <handling-spec> is the symbol t, then the function previously associated with the signal, if any, is removed, and the signal is set to its default @@ -14895,7 +14897,7 @@ are in a local environment, and do not capture any regular lexical scope. The macro definitions are followed by optional forms. -The macros thus defined are visible to the the <body-form>-s. +The macros thus defined are visible to the <body-form>-s. Forms inside the macro definitions such as the <macro-body-form>-s, and initializer forms appearing in <macro-style-params> are subject @@ -15251,7 +15253,7 @@ This variable holds the invocation path name of the TXR program. .B TXR has a simple, crude, built-in debugger. The debugger is invoked by adding -the the -d command line option to an invocation of txr. +the -d command line option to an invocation of txr. In this debugger it is possible to step through code, set breakpoints, and examine the variable binding environment. @@ -15519,7 +15521,8 @@ which does not contain the terminating digraph makes use of the complement, and can be expressed using the complemented regular expression like this: (~.*[*][/].*). That is to say, strings which contain */ are matched by the expression .*[*][/].*: zero or more arbitrary characters, followed by -*/, followed by zero or more arbitrary characters. Therefore, the complement of this expression matches all other strings: those which do not contain */. +*/, followed by zero or more arbitrary characters. Therefore, the complement of +this expression matches all other strings: those which do not contain */. These strings up the inside of a C comment between the /* and */. The equivalent simple regex is quite a bit more complicated. |