Diff
Not logged in

Differences From:

File src/subscript.c part of check-in [39aa870f8f] - Work toward a new mechanism for configuring the ticket subsystem and rendering ticket entry, editing, and viewing screens. Nothing works, but it is all commented out so the code code compile. by drh on 2007-10-14 00:29:14. [view]

To:

File src/subscript.c part of check-in [8ffd32c2b7] - Add the ability to edit the CSS for all pages in the Setup menu. Other miscellaneous changes toward getting ticketing to work. by drh on 2007-10-28 20:52:52. [view]

@@ -26,10 +26,31 @@
 ** Subscript attempts to be an extremely light-weight scripting
 ** language.  It contains the barest of bare essentials.  It is
 ** stack-based and forth-like.  Everything is in a single global
 ** namespace.  There is only a single datatype of zero-terminated
-** string.  The stack is of fixed, limited depth.  The hash table
+** string.  The stack is of fixed, limited depth.  The symbal table
 ** is of a limited and fixed size.
+**
+** TOKENS:
+**
+**      *  All tokens are separated from each other by whitespace.
+**      *  Leading and trailing whitespace is ignored.
+**      *  Text within nested {...} is a single string token.  The outermost
+**         curly braces are not part of the token.
+**      *  An identifier with a leading "/" is a string token.
+**      *  A token that looks like a number is a string token.
+**      *  An identifier token is called a "verb".
+**
+** PROCESSING:
+**
+**      *  The input is divided into tokens.  Whitespace is discarded.
+**         String and verb tokens are passed into the engine.
+**      *  String tokens are pushed onto the stack.
+**      *  If a verb token corresponds to a procedure, that procedure is
+**         run.  The procedure might use, pop, or pull elements from
+**         the stack.
+**      *  If a verb token corresponds to a variable, the value of that
+**         variable is pushed onto the stack.
 **
 ** This module attempts to be completely self-contained so that it can
 ** be portable to other projects.
 */
@@ -291,9 +312,9 @@
   return SBS_OK;
 }
 
 /*
-** Destroy an underscore interpreter
+** Destroy an subscript interpreter
 */
 void SbS_Destroy(struct Subscript *p){
   int i;
   sbs_hash_reset(&p->symTab);
@@ -515,9 +536,9 @@
 }
 
 
 /*
-** Create a new underscore interpreter
+** Create a new subscript interpreter
 */
 struct Subscript *SbS_Create(void){
   Subscript *p;