From 0e99ecb8d838fbd22d3d493ccb9403d62ef06892 Mon Sep 17 00:00:00 2001 From: anon Date: Tue, 26 Sep 2023 14:42:47 +0200 Subject: [PATCH] yet more work on the docs --- documentation/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/documentation/README.md b/documentation/README.md index 2bfb2fc..4e61c47 100644 --- a/documentation/README.md +++ b/documentation/README.md @@ -43,7 +43,7 @@ EOS ? --> look up fallback table | Line | SOS | EOS | | Word | SOW | EOW | ---- + ##### HALT\_AND\_CATCH\_FIRE H&C is a special state signalling that we have hit a dead end. The reason why need it and we cant just instanly quick is backtracking. @@ -54,8 +54,8 @@ This is a negative range. ``` let myNegativeRange = {'e', 'x', 'a', 'm', 'p', 'l'} ``` -None of the characters in $myNegativeRange must be accepted. -The way this is a compiled is that we first hook all chars in $myNegativeRange to H&C, +None of the characters in `$myNegativeRange` must be accepted. +The way this is a compiled is that we first hook all chars in `$myNegativeRange` to H&C, then define an OFFSHOOT of width 1. Put differently: if we read something illegal we abort this branch, @@ -79,7 +79,7 @@ It simply ignores the state transition table and rather unconditionally hooks it #### ^ This is the carrot operator. -It matches the SOS (start of the string). +It matches the SOS. For explanation purposes multilining (match '\n') is irrelevant. That behaves just like a literal. @@ -111,7 +111,7 @@ SOW must match: [^\h]myword ``` Not only that, this combination is key, -either it has to be the start of the string +either it has to be the SOS or there has to be at least something which is not a symbol char. With out the last condition "eexample" would match "\\\" as the iteration of `regex_match()` reaches "example".