Commit Graph

864 Commits

Author SHA1 Message Date
Ryszard Glab
19679cd238 ChangeLog 2000-10-15 14;25 UTC+0100 2000-10-15 12:15:48 +00:00
David G. Holm
82ea52b808 See ChangeLog entry 2000-10-10 16:30 UTC-0400 David G. Holm <dholm@jsd-llc.com> 2000-10-10 20:48:46 +00:00
David G. Holm
e3c4d1c3d1 See ChangeLog entry 2000-10-05 16:00 UTC-0400 David G. Holm <dholm@jsd-llc.com> 2000-10-05 20:14:26 +00:00
David G. Holm
31d5180c0a See ChangeLog entry 2000-10-05 15:00 UTC-0400 David G. Holm <dholm@jsd-llc.com> 2000-10-05 19:10:56 +00:00
Ron Pinkas
90dd4a548c 2000-10-02 13:00 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/compiler/hbpcode.c
     * Corrected 1 compiler warning.

   * source/pp/ppcomp.c
     * Cleaned-up and corrected bug when rules files had an #include directive.
     + Added CloseInclude() and moved relevant logic into it.

   * source/pp/ppcore.c
     - Removed unused s_iIncludes, and hb_pp_nEmptyStrings

   * utils/hbpp/hbpp.c
     + Added local hb_pp_nEmptyStrings to hb_pp_Parse()
2000-10-02 20:02:42 +00:00
Ron Pinkas
c286823cb4 Added few comments. 2000-09-27 16:39:49 +00:00
Ron Pinkas
807f1e918a 2000-09-23 10:10 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/compiler/harbour.l
     * Removed TODO 4 Char abbreviation (done few weeks back).
2000-09-23 17:08:41 +00:00
Ron Pinkas
a3c43d0a26 Modified to use harbour.sly rather than harbour.y when using SimpLex. 2000-09-19 17:27:51 +00:00
Ron Pinkas
df03398e17 Minor esthetics changes. 2000-09-19 15:40:07 +00:00
Ron Pinkas
d7a1cd7c31 Changed const to static for language definition variable declarations. 2000-09-19 15:14:54 +00:00
Ron Pinkas
eca55336b8 Corrected djgpp warning. 2000-09-19 05:36: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
b1658bda6d 2000-09-07 00:10 UTC+0800 Ron Pinkas <ron@profit-master.com>
* include/hbcomp.h
   * source/compiler/harbour.c
     + Added: char hb_comp_cCastType

   * source/compiler/harbour.y
     ! Optimized AsType
     + Added: support for type casting like: Var := FunCal() AS ... and, return Var AS ...
     /* Todo: add support for Array[n] := ... AS ..., and oVar:Data := ... AS ... */

   * source/compiler/hbpcode.c
     + Added type casting support to:
       HB_P_POPLOCAL
       HB_P_POPLOCALNEAR
       HB_P_POPMEMVAR
       HB_P_POPSTATIC
       HB_P_RETVALUE

   * include/hbclass.ch
     + Added type casting to resolve Strong Type warnings:
       return s_oClass:Instance() AS CLASS _CLASS_NAME_
       local Self AS CLASS <ClassName> := QSelf() AS CLASS <ClassName>

   /* Note: Strong Type code, and Class code, should compile with upto -w4, without [invalid] Strong Type warnings. */
2000-09-07 07:31:31 +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
488bdded7a 2000-09-02 12:45 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/pp/ppcore.c
     + Added new kind of Result Marker - OMMIT, singinfied as <-Identifier->
       /* This allows for custom code based on existance of optional clause, when the value of the clause itself is not needed */

   * include/hbclass.ch
     * Took advantage of new Ommit Result Marker, changed [<.ctor.> AS CLASS _CLASS_NAME_] to [<-ctor-> AS CLASS _CLASS_NAME_]

   * source/compiler/harbour.y
     - Removed rules for DummyTrue, used in _HB_MEMBER (no longer needed)
2000-09-02 19:54:48 +00:00
Ron Pinkas
2d1a852803 2000-09-02 09:00 UTC+0800 Ron Pinkas <ron@profit-master.com>
* hb_slex.bc
     * Synchronized with makefile.bc

   * include/hbclass.ch
     + Added: [AS <type>] optional clause to all Methods/Messages syntax.
     + Added directives to generate class declaration from same class creation code.

   * include/hbcomp.h
   * source/compiler/harbour.c
     + Added: char hb_comp_cDataListType;

   * source/compiler/harbour.l
     + Added support for new _HB_CLASS and _HB_MEMBER alternate class declaration syntax.

   * source/macro/macro.slx
     ! Moved .T., .Y., .F., and, .N. from self contained words to words.

   * source/compiler/harbour.slx
     ! Moved .T., .Y., .F., and, .N. from self contained words to words.
     + Added support for new _HB_CLASS and _HB_MEMBER alternate class declaration syntax.

   * source/compiler/harbour.y
     ! Improved definition of formal and optional paramter lists.
     + Added support for alternate class declaration syntax:
       _HB_CLASS ClassName
       _HB_MEMBER { [AS ...] Var1, VarN }
       _HB_MEMBER MethodName( [ [OPTIONAL] [@]FormalParam [AS ...] | @FunPointer() ] ) [ AS ... ]
       /* This syntax allows the class declaration to be on multiple seperated lines (needed to allow utilization of class creation code.)
          Tokens _HB_CLASS & _HB_MEMBER are not final, until some discussion with Ryszard. */

   * source/compiler/hbpcode.c
     * Completed classes strong type support for adaptive type variable.

   * source/rtl/tlabel.prg
   * source/rtl/treport.prg
     ! Corrected typos: AS {} -> INIT {} AS ARRAY, AS .T. -> INIT .T. AS LOGICAL etc..

   * tests/testdecl.prg
     * Changed to demonstrate class creation used as declaration.

   * utils/hbtest/hbtest.prg
     * Changed DBFNTX -> DBFCDX (was not working because DBFNTX is disabled.
2000-09-02 16:30:36 +00:00
Viktor Szakats
c585f9e8dc 2000-08-28 22:50 UTC+0100 Victor Szakats <info@szelvesz.hu> 2000-08-30 22:06:29 +00:00
Ron Pinkas
26c63dfa4e 2000-08-28 17:00 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/compiler/harbour.y
     - Removed 1 un-needed hb_comp_szDeclaredFun = NULL

   * source/compiler/hbpcode.c
     ! Completed declared parameter checking, for method applied to Adapted Type Variable.
2000-08-29 00:09:35 +00:00
Ron Pinkas
dfde3317a5 2000-08-28 15:00 UTC+0800 Ron Pinkas <ron@profit-master.com>
* include/hbcomp.h
     + Added: extern void hb_compDeclaredParameterAdd( char * szVarName, BYTE cValueType );

   * source/compiler/harbour.y
     ! Changed hb_compVariableAdd() to hb_compDeclaredParameterAdd() for Declaration Rules.

   * source/compiler/harbour.c
     ! Moved logic from hb_compVariableAdd() to new hb_compDeclaredParameterAdd() for "dummy" variables (Declaration Parameters).

   * source/compiler/hbpcode.c
     ! Minor corrections.
2000-08-28 22:10:20 +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
Viktor Szakats
a38b766d6d 2000-08-17 12:18 UTC+0100 Victor Szakats <info@szelvesz.hu> 2000-08-17 10:20:09 +00:00
Ron Pinkas
58f7a9f75c 2000-08-15 23:40 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/compiler/harbour.slx
    ! Corrected support for stringified strings to include nested string delimiters in the LITERAL.

    /* Please note, both lexers are subject to extreme rare incomatibility, with direct code as follow:

       ? [" 1st. char is a Quote, last charcter is not.] ; MoreCode := [other SB delimited str ending with quote."]

       I can't see that being a real problem on one hand, and I don't know that we can flag a specific LITERAL
       within any given line as a PP stringified, as opposed to direct code, unless PP generates a specific [inline]
       marker for lexer. Since Clipper PPO of stringified string does NOT compile, I tend to think that's what Clipper
       does. Finally, since Clipper can't compile such PPO of valid code, I would suggest that if we ever decide to
       correct this, we include the "marker" in PPO output too, making it valid.
    */
2000-08-16 06:44:09 +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
Ryszard Glab
28ee6341b3 ChangeLog 2000-08-15 20:40 2000-08-15 18:46:56 +00:00
Ryszard Glab
a8de6652d6 ChangeLog 2000-08-12 15:20 UTC+0100 2000-08-12 13:12:55 +00:00
Ryszard Glab
f5a45f932b ChangeLog 2000-08-11 08-55 UTC+0100 2000-08-11 06:56:36 +00:00
Ryszard Glab
7b71ae0103 ChangeLog 2000-08-10 17:33 UTC+0100 2000-08-10 15:29:07 +00:00
Ryszard Glab
12cb3fb990 ChangeLog 2000-09-10 11:50 UTC+0100 2000-08-10 09:49:35 +00:00
Ron Pinkas
bd7d70af1d 2000-08-09 20:00 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/compiler/simplex.c
     * Corrected support for BREAK ( ).
2000-08-10 02:59: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
Ryszard Glab
283b555df8 ChangeLog 2000-08-09 14:15 UTC+0100 2000-08-09 12:17:01 +00:00
Ryszard Glab
1969cff6cd ChangeLog 2000-08-09 09:25 UTC+0100 2000-08-09 07:20:48 +00:00
Ryszard Glab
cc4d80de27 ChangeLog 2000-08-08 18:05 UTC+0100 2000-08-08 16:46:16 +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
07cad51b18 2000-08-07 12:20 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/compiler/harbour.y
     + Added support for OPTIONAL Var... as first parameter[s] of declared function.

   * tests/testdecl.prg
     + Added: DECLARE SomeFunc( OPTIONAL SomeVar AS STRING ) and DECLARE SomeFunc( OPTIONAL SomeVar AS STRING, OPTIONAL OtherVar )
       to test syntax of OPTIONAL as first parameter[s] of declared function.

   * source/compiler/harbour.slx
     - Removed few redundant rules.
     * Improved handling of INC/DEC
2000-08-07 19:25:21 +00:00
Ron Pinkas
c3b455e04f 2000-08-07 09:05 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/compiler/harbour.l
     + Added rule to allow DECLARE Var AS ... (like PRIVATE Var AS ...)

   * source/compiler/harbour.slx
     + Added rule to allow DECLARE Var AS ... (like PRIVATE Var AS ...)
     ! Corrected typo with DECLARE IDENTIFIER := rule.
     ! Corrcted compiler warnings reported by Maurilio

   * tests/testdecl.prg
     + Added DECLARE Var9 AS STRING to test this syntax too.
2000-08-07 16:09:45 +00:00
Ron Pinkas
62eb7c794f 2000-08-06 18:50 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/compiler/harbour.slx
     ! Few more memory optimizations.
2000-08-07 01:56:09 +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
78339ed12d 2000-08-04 13:00 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/compiler/harbour.slx
     * Optimized rules for WITH
2000-08-05 01:58:04 +00:00
Ron Pinkas
c0d549bb9d 2000-08-03 18:50 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/macro/macro.slx
   * source/compiler/harbour.slx
     + Added (int) casting to isalpha() parameter calls.

   * source/compiler/hbslex.c
     * Removed extra empty line.

   * include/hberrors.h
     + Added #define HB_PP_ERR_TOO_MANY_INCLUDES 17

   * source/pp/ppcore.c
     + Addded: #define HB_PP_MAX_INCLUDES FOPEN_MAX - 5 - 1 (Victor ?)
     + Added : "Too many nested #includes, can\'t open: \'%s\'"
     + Added logic to protect against too many nested includes.
2000-08-04 19:54:25 +00:00
Ron Pinkas
209fbcb4ac 2000-08-03 18:50 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/compiler/harbour.c
    * Added call to hb_pp_init() between multiple prg compilations.
2000-08-04 01:49:00 +00:00
Maurilio Longo
ceb3b502aa 20000803-13:13 GMT+2 Maurilio Longo <maurilio.longo@libero.it> 2000-08-03 11:16:47 +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
Ron Pinkas
1a7632b428 2000-08-02 14:10 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/compiler/harbour.l
     * Changed USUAL to ANYTYPE
2000-08-02 21:10:13 +00:00
Ron Pinkas
52ad519676 2000-08-02 14:05 UTC+0800 Ron Pinkas <ron@profit-master.com>
* source/compiler/harbour.slx
     * Changed VARIANT to ANYTYPE as it appear to be the prefered choice.

   * source/compiler/hbpcode.c
     * Changed \[ to [ to correct compiler warnings.
     * Changed Usual. to AnyType.
2000-08-02 21:07:29 +00:00