From 80ae316cf9b5fd472b65de90608c9e3e1d3bdbf7 Mon Sep 17 00:00:00 2001 From: Chen Kedem Date: Wed, 2 Aug 2000 12:54:27 +0000 Subject: [PATCH] 2000-08-02 15:54 UTC+0300 Chen Kedem --- harbour/ChangeLog | 10 +++++++ harbour/doc/en/garbage.txt | 6 ++-- harbour/doc/en/idle.txt | 7 +++-- harbour/doc/simplex.txt | 58 ++++++++++++++++++++++++++++++-------- 4 files changed, 63 insertions(+), 18 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index b458eb44fc..e0473172ba 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,13 @@ +2000-08-02 15:54 UTC+0300 Chen Kedem + + * doc/simplex.txt + + add missing id tag + * re-format for 76 characters per line + + * doc/en/garbage.txt + * doc/en/idle.txt + * change // in header to /* */ + 20000802-12:58 GMT+2 Maurilio Longo * source/compiler/simplex.c + added missing id tag diff --git a/harbour/doc/en/garbage.txt b/harbour/doc/en/garbage.txt index c14b0c17e8..c7f293b45c 100644 --- a/harbour/doc/en/garbage.txt +++ b/harbour/doc/en/garbage.txt @@ -1,6 +1,6 @@ -// -// $Id$ -// +/* + * $Id$ + */ /* $DOC$ * $FUNCNAME$ diff --git a/harbour/doc/en/idle.txt b/harbour/doc/en/idle.txt index a3f4c255b1..01605f48ad 100644 --- a/harbour/doc/en/idle.txt +++ b/harbour/doc/en/idle.txt @@ -1,6 +1,7 @@ -// -// $Id$ -// +/* + * $Id$ + */ + /* $DOC$ * $FUNCNAME$ * The idle states diff --git a/harbour/doc/simplex.txt b/harbour/doc/simplex.txt index 8366ec54f2..8e2b749c40 100644 --- a/harbour/doc/simplex.txt +++ b/harbour/doc/simplex.txt @@ -1,21 +1,55 @@ +/* + * $Id$ + */ + Overview: -SimpLex uses high-level definitions, which for many programmers might be more readable, than equivalent Flex definitions. SimpLex Language Definitions are divided into 6 main sections: -1. Delimiters. There are 3 kinds of Lexical Delimiters" -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 terminator character. +SimpLex uses high-level definitions, which for many programmers might be +more readable, than equivalent Flex definitions. SimpLex Language +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". +1. Delimiters. There are 3 kinds of Lexical Delimiters: -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 Meta Delimiters. These words will be extracted from the input stream, regardless of any preceding, or succeeding characters. Typical example of such tokens are the dBase' .AND. .OR. .NOT. logical operators, the C language inline assignment operators += *= etc., as well as pre and post increment/decrement operators -- and ++. The unique attribute of such elements is the fact that these elements do NOT require preceding or succeeding delimiters. - -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. + 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 + terminator character. -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. +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". + +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 + Meta Delimiters. These words will be extracted from the input stream, + regardless of any preceding, or succeeding characters. Typical example of + such tokens are the dBase' .AND. .OR. .NOT. logical operators, the C + language inline assignment operators += *= etc., as well as pre and post + increment/decrement operators -- and ++. The unique attribute of such + elements is the fact that these elements do NOT require preceding or + succeeding delimiters. + +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. + +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. 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. 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].