From 2d2ef3fec003d3a651467c7ddd72f612c7334914 Mon Sep 17 00:00:00 2001 From: Aaron Taylor Date: Fri, 13 Mar 2020 02:23:42 -0700 Subject: [PATCH] More minor updates to `rationale.md`. --- rationale.md | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/rationale.md b/rationale.md index d2c06c1..0f6de45 100644 --- a/rationale.md +++ b/rationale.md @@ -17,7 +17,7 @@ which can be visually regrouped as SSSSNSN NSSSTSTTTSN -and contains the `MARK label0` command (i.e. `NSS STSTTTS N`) used in the next +and contains the `MARK label0` command (i.e. `NSSSTSTTTSN`) used in the next set of examples. Additionally, since `PUSH 0; DROP` is effectively a `NOP`, 'hijacking' the code @@ -43,40 +43,37 @@ discovering that they broke down into two methods for locating labels. Examples: whitespacers/haskell: (c) 2003 Edwin Brady - whitespacers/ruby: (c) 2003 by Wayne E. Conrad - whitespacers/perl: (c) 2003 Micheal Koelbl - threeifbywhiskey/satan Both of these methods can be broken using valid Whitespace code: - * Type A: No 'standalone' label exists. This breaks Method 2. + * **Type A**: No 'standalone' label exists. This breaks Method 2. By programmer's intent, this should print a '!' before infinite '.' lines. - * Type B: Hidden label before 'standalone' label. This breaks Method 1. + * **Type B**: Hidden label before 'standalone' label. This breaks Method 1. By programmer's intent, this should print an infinite chain of '.' lines. This is the Type A program: - SSSTSSSSTN | Push +33 (ASCII !) - NSNSTSTTTSN | JMP>label0 - NSSTTTTN | MARK label2 - SSSSN | PUSH +0 + SSSTSSSSTN | Push +33 (ASCII '!') + NSNSTSTTTSN | JMP > 0101110 (label0) + NSSTTTTN | MARK: 1111 (label2) + SSSSN | PUSH 0 SNN | DROP - SSSTSTTTSN | Push +46 (ASCII .) + SSSTSTTTSN | Push +46 (ASCII '.') TNSS | Output character - SSSTSTSN | Push +10 (ASCII newline) + SSSTSTSN | Push +10 (ASCII '\n') TNSS | Output character - NSNTTTTN | JMP>label2 + NSNTTTTN | JMP > 1111 (label2) Append this to turn it into the Type B program: - NSSSTSTTTSN | MARK label0 (2nd time) - NSNTTTTN | JMP>label2 + NSSSTSTTTSN | MARK: 0101110 (label0) (2nd time) + NSNTTTTN | JMP > 1111 (label2) VVhitespace avoids this ambiguity by marking label definitions with a vertical tab `[VTab]` immediately before the label. -- 2.20.1