Commit Graph

29 Commits

Author SHA1 Message Date
Ron Pinkas
c286823cb4 Added few comments. 2000-09-27 16:39:49 +00:00
Ron Pinkas
d7a1cd7c31 Changed const to static for language definition variable declarations. 2000-09-19 15:14:54 +00:00
Ron Pinkas
a5e4deaa88 2000-09-18 09:30 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/compiler/harbour.slx
   * source/compiler/harbour.sly
   * source/compiler/harbour.y
   * source/compiler/simplex.c
   * source/macro/macro.slx
     ! Corrected compiler warnings.
2000-09-18 16:36:54 +00:00
Ron Pinkas
ba6f7b3667 2000-09-17 23:45 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/compiler/harbour.l
     ! Corrected definition of _PROCREQ_()

   * tests/testdecl.prg
     - Removed 1 line of unspported syntax.

   * source/macro/macro.slx
   * source/compiler/harbour.slx
     % Greatly optimized, much simplified, smaller, and faster.
     ! Converted all "non conventional" macros to functions.

   * source/compiler/simplex.c
     % Greatly optimized, now as fast as Flex based lexer.
     ! Converted all "non conventional" macros to functions.
     + Added support for predefind match pattern, {WS} (White Space), in KEYWORDS and WORDS.

   + source/compiler/harbour.sly
     * Same as harbour.y, excluding un-needed support for reserved words used as identifiers.
     /* Harbour.slx works with either harbour.y or harbour.sly, but harbour.sly creates smaller harbour.exe. */

   * hb_slex.bc
     * Modified to use harbour.sly
2000-09-18 07:04:53 +00:00
Ron Pinkas
4a4e7b593b 2000-09-08 03:50 UTC+0800 Ron Pinkas <ron@profit-master.com>
* config/dos/djgpp.cf
     + Added support for $(C_USER) and $(L_USER) /* Could someone please verify, that this is the correct way. */

   * source/compiler/simplex.c
     + Added: #define SUSPEND_WORDS 8192, and minor support logic.

   * source/compiler/harbour.slx
     ! Removed 14 #defines, and 14 cases from hb_lex_CustomAction(), by taking advantage of SUSPEND_WORDS.

   * source/macro/macro.slx
     - Removed 1 unused variable.
2000-09-08 11:00:40 +00:00
Ron Pinkas
c201844c39 2000-09-06 12:40 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/compiler/harbour.l
     + Added AS CHAR[ACTER] for compatibility with FW (FW can't use #translate AS CHAR => AS STRING, because FW also uses AS CHAR
       in DLL calls where AS CHAR referes to *native* char type).
     ! Correted AS ... to allow multiple space/tab, and support abbreviations.

   * source/compiler/simplex.c
     + Added KEYWORD_ACTION() and WORD_ACTION() macros.

   * source/macro/macro.slx
     ! Optimized numerous HB_*_ID to a single HB_IDENTIFIER.

   * source/compiler/harbour.slx
     + Added AS CHAR[ACTER] for compatibility with FW (FW can't use #translate AS CHAR => AS STRING, because FW also uses AS CHAR
       in DLL calls where AS CHAR referes to *native* char type.
     ! Optimized numerous HB_*_ID to a single HB_IDENTIFIER.

   * include/hbclass.ch
     * Changed _<AssignName> to <AssignName> in HB_MEMBER directives.
     + Added AS CLASS <ClassName> to LOCAL Self := QSelf()

   * tests/testdecl.prg
     + Added code to demonstrate missing support for class memeber RT type protection (AS ...)
2000-09-06 19:53:10 +00:00
Ron Pinkas
da1d815d4d 2000-08-28 10:35 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/compiler/harbour.c
   * source/compiler/harbour.y
     + Added support for DECLARE FunName(...) AS CLASS ClassName
     + Added support for DECLARE FunName( ... @SomeFun() ... ) - Function Pointer declared parameter.

   * source/compiler/simplex.c
     * Corrected some compiler warnings.

   * source/compiler/harbour.slx
     * Reenabled support for ID_ON_HOLD.

   * include/hberror.h
     + Added: #define HB_COMP_WARN_RETURN_SUSPECT             28

   * source/compiler/hbgenerr.c
     + Added: "4Suspecious return type: \'%s\' expected: \'%s\'"

   * source/compiler/hbpcode.c
     + Completed support for Strong Typed variables as declared classes, as well as Adaptive Typed usage with declared classes.
     * Few other corrections and enhancements.

   * include/hbclass.ch
     + Added TClass declaration:
	DECLARE TClass ;
		New( cName AS STRING, OPTIONAL SuperParams ) AS CLASS TClass ;
		Create() AS OBJECT;
		Instance() AS OBJECT ;
		AddClsMthds( cName AS STRING, @Method(), nScope AS NUMERIC, n2 AS NUMERIC, n3 AS NUMERIC );
		AddMultiClsData( cType AS STRING, uVal, nScope AS NUMERIC, aDatas AS ARRAY OF STRING );
		AddMultiData( cType AS STRING, uVal, nScope AS NUMERIC, aDatas AS ARRAY OF STRING );
		AddMethod( cName AS STRING, @Method(), nScope AS NUMERIC );
		AddInLine( cName AS STRING, bBlock AS CODEBLOCK, nScope AS NUMERIC );
		AddVirtual( cName AS STRING )
     + Added declaration to s_oClass  AS CLASS TClass

   * tests/testdecl.prg
     * Minor refinement.
2000-08-28 17:55:49 +00:00
Ron Pinkas
4e7bfbb146 Corrected Reset at <EOF> 2000-08-23 04:05:38 +00:00
Ron Pinkas
ce87f32df5 2000-08-22 10:40 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/compiler/simplex.c
   * source/compiler/harbour.slx
   * source/macro/macro.slx
     ! Removed un-needed calls to strlen().
2000-08-22 17:39:34 +00:00
Ron Pinkas
93f92c364e 2000-08-21 15:45 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/compiler/simplex.c
     ! Optimized Keywords and Words search, Lexer is 10-15% faster.

   * source/compiler/harbour.slx
   * source/macro/macro.slx
     ! Sorted Keywords and Words, to support optimized search, by simplex.
2000-08-21 22:47:22 +00:00
Ron Pinkas
926872a96b 2000-08-15 18:25 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/compiler/simplex.c
    + Added support for multi-charcters Stream Start and Stream End delimiters.
    + Added overidable MACROs STREAM_OPEN(x), STREAM_APPEND(x)
    ! Removed Hardcoded limits, changed to overidable #defines: MAX_STREAM, MAX_STREAM_STARTER, MAX_STREAM_TERMINATOR,
      MAX_STREAM_EXCLUSIONS

  * source/macro/macroslx.c
    + Added:
	#define MAX_STREAM                               2048 /* Max length of in-line LITERAL */
	#define MAX_STREAM_STARTER                          2
	#define MAX_STREAM_TERMINATOR                       2
	#define MAX_STREAM_EXCLUSIONS                       2

  * source/compiler/hbslex.c
    + Added:
      	#define MAX_STREAM                               2048 /* Max length of in-line LITERAL */
      	#define MAX_STREAM_STARTER                          7 /* "QOUT([" */
      	#define MAX_STREAM_TERMINATOR                       4 /* "])\n"   */
      	#define MAX_STREAM_EXCLUSIONS                       2

  * source/macro/macro.slx
    * Replaced AND_IGNORE_DELIMITERS() with TEST_LEFT()

  * source/compiler/harbour.slx
    + Added: #define NUMERALS_PER_LINE 512
    * Replaced AND_IGNORE_DELIMITERS() with TEST_LEFT()
    + Added support for TEXT ENDTEXT (pending some more work in PP), nested [[]] strings and double delimiters stringified strings.
2000-08-16 03:09:07 +00:00
Ron Pinkas
d93298fc67 2000-08-09 17:15 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/compiler/simplex.c
     * Minor improvements.

   * source/compiler/harbour.slx
     - Removed un-needed cases in hb_lex_CustomAction() added by Ryszard.
     - Removed 1 rule each for WHILE CASE BREAK and RETURN to default trailing '[' to string delimiter.

   * tests/keywords.prg
     * Corrected few lines that had '[' as Array Index to String Delimiter after CASE, BREAK etc.

     /* Note keywords.prg should now be valid other than 3 (old) correct errors to do with FIELD*/
     SimpLex based harbour does compile it correctly Flex reports 26 incorrect errors.
2000-08-10 00:36:21 +00:00
Ron Pinkas
c06672fe89 2000-08-08 02:00 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/compiler/harbour.c
    * Corrected display of errors statistics to use \r so that error count doen't appear connected to the last reported
      compiler line number progress.

  * source/macro/macro.slx
    - Removed unused asHold

  * source/compiler/harbour.slx
    - Removed unused asHold
    - Optimized some rules.

  * source/compiler/simplex.c
    - Removed unused asHold

  * tests/keywords.prg
    * Uncommented all code that was commented other than few lines which I added TODO: PP ... for (problem resulting from PP)
2000-08-08 09:11:01 +00:00
Ron Pinkas
a9f0be4e28 2000-08-06 01:40 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/compiler/harbour.slx
     ! Optimized rules, removed ~100 rules. Rules are simpler, smaller, and faster.

   * source/compiler/simplex.c
     + Added: bIgnoreWords (allows for reserve words check to be suspened).
     + Added: iLastToken to save last read Token
     + Added immediate call to CUSTOM_ACTION for Keys, Words, and Selfs, without having to reduce first (when requested).
     * Optimized Keys search to not check bNewLine on every iteration.
2000-08-06 08:47:06 +00:00
Ron Pinkas
9af55ea917 2000-08-03 01:55 UTC+0800 Ron Pinkas <ron@profit-master.com>
* include/hberrors.h
     * Removed #define HB_PP_ERR_INCLUDE_CYCLIC

   * source/pp/ppcore.c
     * Removed Cyclic #include detection logic.

  * source/compiler/simplex.c
    * Removed some unneeded comments.
2000-08-03 09:03:44 +00:00
Maurilio Longo
9d50b20089 20000802-12:58 GMT+2 Maurilio Longo <maurilio.longo@libero.it> 2000-08-02 11:04:22 +00:00
Ron Pinkas
e09d364512 2000-07-31 09:00 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/compiler/simplex.c
   * source/macro/macro.slx
     ! Corrected compiler warnings

   * tests/testwarn.prg
   * utils/hbdoc/ft_funcs.prg
     * Commented AS USUAL until votes results tabulated
2000-07-31 15:58:41 +00:00
Ron Pinkas
1207146d98 2000-07-30 21:15 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/macro/macro.slx
    ! Corrected 1 unreleased memory block.

  * source/compiler/harbour.slx
    - Removed unneeded comment.

  * source/compiler/simplex.c
    * Changed void yy_bytes_buffer() to void *.
2000-07-31 04:17:09 +00:00
Ron Pinkas
3d37397709 2000-07-30 17:30 UTC+0800 Ron Pinkas <ron@profit-master.com>
+ source/macro/macro.slx
  + source/macro/macroslx.c
    + Added SimpLex based macro lexer

  * hb_slex.bc
    * Modified to use SimpLex based macro support.
    /* Could some one please add same to GNU make system? */

  * source/compiler/simplex.c
    * Added void yy_bytes_buffer()
2000-07-31 00:33:45 +00:00
Ron Pinkas
735d0f072a 2000-07-30 12:45 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/compiler/harbour.slx
    - Removed AS CHARACTER, AS BOOLEAN, AS OBJ, AS NUM
      /* Left AS VARIANT and AS USUAL until vote results tabulated. */

  * utils/hbdoc/ft_funcs.prg
    * Changed AS CHAR -> AS STRING and AS NUM to AS NUMERIC

  * source/compiler/simplex.c
    * Changed to use YY_DECL macro in declaration of yylex()
2000-07-30 19:53:23 +00:00
Ron Pinkas
a0b295de08 2000-07-28 06:30 UTC+0800 Ron Pinkas <ron@profit-master.com>
+ doc/simplex.txt
     + Added 1st draft of SimpLex documentation.

   * source/compiler/simplex.c
     + Added overidable macro STREAM_EXCEPTION()

   * source/compiler/harbour.l
     * Modified to return every \n to correct line numbers reporting.
       /* Note: removed note about . after \n, I beleive it was needed to avoid conflict with $ which is no longer used,
          and should be avoided, due to few other side effects. */

   source/compiler/harbour.slx
     * Standadized un-terminated strings messages.
2000-07-28 13:37:51 +00:00
Ron Pinkas
6aa2f45f5b 2000-07-22 23:30 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/compiler/harbour.slx
     ! Optimized handling of Hex Numbers.
     + Added hash support for literal strings.
     * Increased aTexts[] to 1024

   * source/compiler/simplex.c
     ! Removed todo of pair action.
2000-07-23 06:32:31 +00:00
Ron Pinkas
7fdc515e94 2000-07-14 09:40 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/compiler/simplex.c
     ! Minor correction, to accept a match, if all rule's tokens used.
2000-07-14 16:42:37 +00:00
Ron Pinkas
531c38c9f8 2000-07-12 20:45 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/compiler/harbour.slx
     * Corrected support for PARAMETERS
     + Added type casts to allow c++ mode compilation

   * source/compiler/simplex.c
     - Removed unused vars.
     + Added type casts to allow c++ mode compilation
2000-07-13 03:45:45 +00:00
Ron Pinkas
de70fac98b 2000-07-10 20:25 UTC+0800 Ron Pinkas <ron@profit-master.com>
* include/hbcomp.h
   * source/compiler/harbour.y
   * source/compiler/hbgenerr.c
     - Removed hb_comp_szFile

   * source/compiler/harbour.slx
     * Reduced aStrings and YY_BUF_SIZE to 2048

   * source/compiler/simplex.c
     + Added RTL license exception.
2000-07-11 03:29:43 +00:00
Ron Pinkas
1d9fdf35aa 2000-07-09 01:02 UTC+0800 Ron Pinkas <ron@profit-master.com>
* include/hbcomp.h
     + Added: external BOOL hb_comp_bSimpLex

   * source/compiler/harbour.c
     + Added: BOOL hb_comp_bSimpLex
     + Added: if( hb_comp_bSimpLex ) tests before releasing name strings of vars, and symbols.
     + Added: call to hb_compReleaseStrings(), if hb_comp_SimpLes is TRUE, after code generation.

   * source/compiler/harbour.slx
     + Added: logic to resuse same allocated strings when string for identifier was perviously allocated.
     + Added: INIT_ACTION macro to set hb_comp_bSimpLex to TRUE.
     + Added: Function hb_compReleaseStrings()

   * source/compiler/harbour.l
     + Added: empty Function hb_compReleaseStrings() to avoid link error.

   * source/compiler/hbslex.c
   * source/compiler/simplex.c
     * Moved standard #includes from simplex to hbslex.
2000-07-09 08:34:21 +00:00
Ron Pinkas
8d1cb942ee 2000-07-08 19:50 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source\compiler\simplex.c
  * source\compiler\harbour.slx
    * Short term copies dynamic memory copies of yytext are being released at <EOL>.
2000-07-09 02:50:37 +00:00
Ron Pinkas
0f31168af5 2000-07-08 15:10 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source\compiler\simplex.c
    * Improved handling of WhiteSpace, NewLine, and Eof.

  * source\compiler\harbour.slx
    + Added rule to return only last CR in sequence of empty lines.
2000-07-08 22:15:46 +00:00
Ron Pinkas
0f6294e523 - include\harbour.slx
- source\compiler\harbourl.c

  + b32_slex.bat
  + hb_slex.bc

  + source\compiler\hbslex.c
  + source\compiler\simplex.c
  + source\compiler\harbour.slx
2000-07-08 00:27:47 +00:00