User Tools

Site Tools


en:pfw:multiline-comments

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
en:pfw:multiline-comments [2024-09-04 14:01] – [Test] willemen:pfw:multiline-comments [2024-10-09 16:07] (current) – [Test] willem
Line 161: Line 161:
  
 ''%%(*%%''\\ ''%%(*%%''\\
-a) This simple code was intended for small systems. That's why I avoided > the word ''%%COMPARE%%''. Unfortunately, "REFILL" was unavoidable. +1. This simple code was intended for small systems. That's why I avoided > the word ''%%COMPARE%%''. Unfortunately, "REFILL" was unavoidable. 
-  +2. The delimiter ''%%*)%%'' must be the first word on a line. This is not to keep the code simple or make it faster. I purposely chose this because it is better, it provides a clearly readable layout.\\
-b) The delimiter ''%%*)%%'' must be the first word on a line. This is not to keep the code simple or make it faster. I purposely chose this because it is better, it provides a clearly readable layout.\\+
 ''%%*)%%'' ''%%*)%%''
    
- Compare this with:+Compare this with:
  
 ''%%(*%%''\\ ''%%(*%%''\\
-a) This simple code was intended for small systems. That's why I avoided the word ''%%COMPARE%%''. Unfortunately, "REFILL" was unavoidable. +1. This simple code was intended for small systems. That's why I avoided the word ''%%COMPARE%%''. Unfortunately, "REFILL" was unavoidable.\\ 
-  +2. This is not to keep the code simple or make it faster. I purposely chose this because it is better, it provides a clearly readable layout. 
-b) This is not to keep the code simple or make it faster. I purposely chose this because it is better, it provides a clearly readable layout. ''%%*)%%''+''%%*)%%''
  
 This code has some interesting properties: This code has some interesting properties:
  
-<HTML><ul></HTML> + It uses a character based comparison to detect ''%%*)%%'' instead of a string based ''%%COMPARE%%''
-<HTML><li></HTML><HTML><p></HTML>It uses a character based comparison to detect ''%%*)%%'' instead of a string based ''%%COMPARE%%''.<HTML></p></HTML><HTML></li></HTML> + It uses 3 nested BEGIN UNTIL loops to iterate the input stream.\\ 
-<HTML><li></HTML><HTML><p></HTML>It uses 3 nested BEGIN UNTIL loops to iterate the input stream.\\ +Each UNTIL has a condition 
-Each UNTIL has a condition<HTML></p></HTML> +  the length of the parse word is 2 
-<HTML><ol></HTML> +  the first character is the character '*' 
-<HTML><li></HTML>the length of the parse word is 2<HTML></li></HTML> +  the second character is the character ')'
-<HTML><li></HTML>the first character is the character '*'<HTML></li></HTML> +
-<HTML><li></HTML>the second character is the character ')'<HTML></li></HTML><HTML></ol></HTML>+
  
-<HTML><p></HTML>Only if all of the UNTIL conditions are met (first AND second AND third) the nested loops end, otherwise they branch back to one of the BEGINs and keep parsing the next line of the input stream. Essentially the code inspects the first token on each line (possible with leading white space).<HTML></p></HTML><HTML></li></HTML> + Only if all of the UNTIL conditions are met (first AND second AND third) the nested loops end, otherwise they branch back to one of the BEGINs and keep parsing the next line of the input stream. Essentially the code inspects the first token on each line (possible with leading white space). 
-<HTML><li></HTML><HTML><p></HTML>When testing the UNTIL conditions the address of the next character is left over on the stack and needs to be dropped somewhere.\\+ When testing the UNTIL conditions the address of the next character is left over on the stack and needs to be dropped somewhere.\\
 The code does this at the //beginning// of the loops and to make that work even on the first iteration the code puts a dummy 0 on the stack before the beginning of the loops.\\ The code does this at the //beginning// of the loops and to make that work even on the first iteration the code puts a dummy 0 on the stack before the beginning of the loops.\\
-The address also must be dropped when all UNTIL conditions are satisfied, i.e. when ''%%*)%%'' is found. This is done right after the loop.<HTML></p></HTML><HTML></li></HTML><HTML></ul></HTML>+The address also must be dropped when all UNTIL conditions are satisfied, i.e. when ''%%*)%%'' is found. This is done right after the loop.
  
en/pfw/multiline-comments.1725451307.txt.gz · Last modified: 2024-09-04 14:01 by willem