From e5c5c69c04d00e9ac90a7e977e08325f0e910d66 Mon Sep 17 00:00:00 2001 From: Ron Pinkas Date: Tue, 26 Sep 2000 00:01:51 +0000 Subject: [PATCH] Minor corrections --- harbour/doc/simplex.txt | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/harbour/doc/simplex.txt b/harbour/doc/simplex.txt index 8e2b749c40..3bff1380db 100644 --- a/harbour/doc/simplex.txt +++ b/harbour/doc/simplex.txt @@ -12,8 +12,10 @@ Definitions are divided into 6 main sections: a. Ignorable. Typical example of such delimiters is "white space", i.e. space and tab. + b. Returnable. Typical examples of such delimiters are commas, parenthesis, and math operators. + c. Appendables. While I don't have any examples in mind, I suspect there might be a need for such delimiters. This kind of delimiters should be appended to the preceding token, in effect making such delimiter a @@ -21,8 +23,9 @@ Definitions are divided into 6 main sections: 2. Streams. These are also referred to as "pairs". Stream or Pair, as the name may suggest, is any sequence (or stream) of characters, enclosed - within a STARTing character and an ENDing character (the pair). Typical - example of such lexical element is a LITERAL string, i.e. "Hello World". + within a STARTing character[s] and an ENDing character[s] (the pair). + Typical example of such lexical element is a LITERAL string, i.e. "Hello + World". 3. Self Contained Words. These are a specific set of reserved words, which do NOT require ANY delimiters. These words might be viewed as a form of @@ -36,20 +39,25 @@ Definitions are divided into 6 main sections: 4. Keywords. These are specific set of reserved words, which have lexical significance in the defined language, when appearing as the FIRST token - in a given source line. + in a given source line. Keywords may be contrcuted of multiple words with + sperarting white space (ignorable delimiters), when using the predefined + match pattern {WS}. 5. Words. These are specific set of reserved words, which have lexical significance in the defined language, when appearing ANYWHERE in a given - source line. + source line. Words may be contrcuted of multiple words with sperarting white + space (ignorable delimiters), when using the predefined match pattern {WS}. 6. Rules. There are 2 kinds of rules: - a. Reduction Rules. This kind of rules defines the translation of a 1 or - more tokens into 1 or more other tokens (or custom actions). - b. Pass Through (Left Associate). This kind of rules directs the Lexer to - accept such token[s] as a valid form, and may also be used to - eliminate a possible association with the next input. Typical example - is a rule that associates the dBase '[' character with a preceding - identifier name, to "defuse" its usage as a string delimiter, i.e. - MyArray[1] as opposed to [Hello World]. + a. Reduction Rules. These kind of rules defines the translation of a 1 or + more tokens into 1 or more other tokens (or custom actions). Reductions + are infinitley recursive, which means that the Reduction Results, are + pushed back, incase they me in turn be part of yet another rule. To + eliminate such recursive cycle, Reduction Result may be in the form of + n + DONT_REDUCE, thus passing through the resulted token, without + further checks. + + b. Pass Through (Left Associate). This kind of rules directs the Lexer to + accept such token[s] as a valid form.