Commit Graph

2864 Commits

Author SHA1 Message Date
Ron Pinkas
eb2d8afdb4 20000522-06:15 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/compiler/harbour.l
     + Added "as structure", "as stru", "as array of structure", "as array of stru"

   * source/compiler/hbpcode.c
     * Improved some logic in hb_StrongType()

   * source/vm/hvm.c
     ! Corrected startup symbol when having to use Main() as per Ryszard.

   * source/pp/pptable.c
     + Added the equivalent of:
        #COMMANDS STRUCTURE <StruName> <Var1> AS <Type1> [, <VarN> AS <TypeN> ] => ;
                  STATIC __<StruName> := {|| IF( __<StruName> == NIL, , ) , HB_Structure( <"StruName">, { <"Var1"> [, <"VarN">] } )} ;;
                  DECLARE <StruName> <Var1> AS <Type1> [ <VarN> AS <TypeN> ] ;;
                  #TRANSLATE AS NEW <ClassName> => AS CLASS <StruName> := ( Eval( __<StruName> ), HB_Structure( <StruName> ) )

	#TRANSLATE AS NEW <ClassName> => AS CLASS <ClassName> := <ClassName>():New()

   * source/rtl/tclass.prg
     + Added Function HB_Structure() ( Fully Declared! ) This function is used internally, but may be freely called from Clipper level.
       It Aceepts Parameter 1 Structure Name, and optional parameter 2, as array of structure variable names.
       If called with 2nd parameter, returns NIL (just creates the new Structure), if called with just parameter 1, it returns
       new instance of defined structure.

   + tests\teststru.prg
     + Added demo for new structure syntax
2000-05-22 13:53:14 +00:00
Paul Tucker
82c9bb8579 Update ComClass declaration 2000-05-22 05:51:04 +00:00
Ron Pinkas
34b7814957 20000521-21:50 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/compiler/harbour.y
     - Removed few unneeded hb_strdup() from calls to hb_compClassFind()
     + Added auto addition of Method Declaration for the SET Function of a declared Var of a declared class.

   * source/compiler/harbour.c
     - Removed few unneeded hb_strdup() from calls to hb_compClassFind()
2000-05-22 04:53:45 +00:00
Ron Pinkas
a2b2b0ab65 20000521-14:42 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* tests/testwarn.prg
     ! Consolidate #translate rules, and verified that it can compile under Clipper
2000-05-21 21:43:25 +00:00
Ron Pinkas
c7e237273e 20000521-14:15 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/compiler/harbour.l
     + Added "as class"

   * source/compiler/harbour.y
     ! Fixed shift conflicts and reduce conflicts.
     * Modified rules for syntax "AS Object ClassName" to "As Class ClassName"

   * tests/testwarn.prg
     ! Corrected the #translate to reflect latest syntax
     ! Corrected syntax to use AS CLASS ClassName instead of AS OBJECT ClassName.
2000-05-21 21:19:51 +00:00
Ron Pinkas
8e184f78a4 20000520-21:30 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* include/hbvmpub.h
     + Added: #define HB_FS_FIRST    ( ( HB_SYMBOLSCOPE ) 0x40 )

   * source/compiler/genc.c
     + Added logic to add | HB_FS_FIRST to first defined symbol in a prg.

   * source/vm/hvm.c
     * Modified hb_vmProcessSymbols() to llok for HB_FS_FIRST for startup procedure instead of any first symbol.

   * source/compiler/harbour.y
     * Minor consilidation in AsType
       *** I am aware of 6 reduce conflicts resulting from previous removal of FROM_CLASS, and am looking into it. ***

   * tests/testwarn.prg
     ! Corrected the #translate to reflect latest syntax
2000-05-21 04:55:06 +00:00
Paul Tucker
2a97599b58 include "hbapigt.h" for proper c++ support 2000-05-21 04:38:05 +00:00
Ron Pinkas
f778702d2d 20000520-10:07 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/compiler/harbour.l
     - Removed rule for "FROM CLASS"
     + Added "AS Obj" as an abrreviation for "AS Object"

   * source/compiler/harbour.y
     * Changed "AS Object FROM CLASS ClassName" to "As Object ClassName"

   * tests/testwarn.prg
     * Modified code to demonstrate new syntax for "As Object..."
2000-05-20 17:12:20 +00:00
Ryszard Glab
c4309a12ca ChangeLog 20000520-15:25 GMT+1 2000-05-20 13:20:42 +00:00
Ryszard Glab
8e16af8da6 ChangeLog 20000520-14:45 GMT+1 2000-05-20 12:42:32 +00:00
Luiz Rafael Culik
7a71ef51aa See changelog 20000519-23:50 GMT -3 2000-05-20 02:48:50 +00:00
Ron Pinkas
9339186a1b 20000519-15:40 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/compiler/hbpcode.c
     + Minor correction in hb_compStrongType()
2000-05-19 22:41:06 +00:00
Ron Pinkas
9f3912cbd9 20000519-15:28 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* include/hbcomp.h
     + Added member pParamClasses to COMDECLARED
     * Changed hb_comp_szClass to hb_comp_szFromClass

   * source/compiler/harbour.y
     * Changed hb_comp_szClass to hb_comp_szFromClass

   * source/compiler/harbour.c
     + Added support for declared parameters of Functions/Methods AS Object FROM CLASS ...

   * source/compiler/hbpcode.c
     + Added Strong Type checking for declared parameters of Functions/Methods AS Object FROM CLASS ...

   * tests/testwarn.prg
     + Added code to demonstrate warnings for declared parameters of Functions/Methods AS Object FROM CLASS ...
2000-05-19 22:31:19 +00:00
Ron Pinkas
7c2cac0386 20000519-10:17 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/compiler/harbour.y
   * source/compiler/harbour.c
   * source/compiler/hbpcode.c
     + Added support for AS Array Of Objects FROM CLASS ClassName syntax and type checking.

   * tests/testwarn.prg
     + Added code to demonstrate syntax and warnings for AS Array Of Objects FROM CLASS ClassName syntax and type checking.
2000-05-19 17:19:58 +00:00
Ron Pinkas
59501e617d 20000519-02:05 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* include/hbcomp.h
     ! Consoldated COMDECLARED and COMMETHOD into COMDECLARED
     + Added member pClass to COMDECLARED
     + Added member pLast to COMCLASS

   * source/compiler/harbour.y
     + Added support for Methods/Datas of type Object of a declared Class.

   * source/compiler/harbour.c
     ! Fixed bug in hb_compMethodAdd()

   * source/compiler/hbpcode.c
     + Added Strong Type Checking to Objects syntax.

   * include/hberrors.h
     + Added : "HB_COMP_WARN_MESSAGE_NOT_FOUND"

   * source/compiler/hbgenerr.c
     + Added : "3Message \'%s\' not known in Class \'%s\'"

   * tests/testwarn.prg
     + Added code to demonstrate syntax and warnings for OO Strong Type Checking.
2000-05-19 09:25:06 +00:00
Maurilio Longo
ce6f538e36 20000516-22:48 GMT+2 Maurilio Longo <maurilio.longo@libero.it> 2000-05-16 20:54:14 +00:00
April White
2ad1cdfeef 20000516-03:55 GMT+4 April White <awhite@user.rose.com> 2000-05-16 04:01:13 +00:00
Ron Pinkas
b8f0090858 20000515-19:45 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/compiler/harbour.l
    ! Corrected (again) rules for OPTIONAL to not conflict with DO OPTIONAL WITH ... and FOR Counter := OPTIONAL TO ...
2000-05-16 02:48:54 +00:00
April White
f40b4c1306 20000515-20:22 GMT+4 April White <awhite@user.rose.com> 2000-05-16 02:14:00 +00:00
Viktor Szakats
de583b1979 20000516-03:59 GMT+1 Victor Szakats <info@szelvesz.hu> 2000-05-16 02:04:00 +00:00
Ron Pinkas
4d80141da2 20000515-18:00 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/compiler/harbour.c
    - Removed: warning of unitialized static variable.

  * source/compiler/hbpcode.c
    - Removed: warning of unitialized static variable.
    ! Minor correction to hb_compStrongType()
2000-05-16 01:02:26 +00:00
Maurilio Longo
af7d803043 20000515-23:11 GMT+2 Maurilio Longo <maurilio.longo@libero.it> 2000-05-15 21:11:56 +00:00
Viktor Szakats
5509b905e7 20000515-23:05 GMT+1 Victor Szakats <info@szelvesz.hu> 2000-05-15 21:06:32 +00:00
Viktor Szakats
e9f896575b 20000515-23:05 GMT+1 Victor Szakats <info@szelvesz.hu> 2000-05-15 21:02:05 +00:00
Viktor Szakats
f5bea47692 20000515-22:47 GMT+1 Victor Szakats <info@szelvesz.hu> 2000-05-15 20:43:42 +00:00
Ron Pinkas
de42b22c12 20000515-10:15 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/compiler/harbour.l
    + Added states DECLARE & OPTIONAL_
    * Modified rules for "declare" and "optiona" to use states, and support abbreviations.
    * Modified rules for "declare" to support backdated syntax DECLARE aVar[...]
2000-05-15 17:16:10 +00:00
Ryszard Glab
680a20f4e9 ChangeLog 20000515-17:15 GMT+1 2000-05-15 15:07:28 +00:00
Ron Pinkas
4eb57576a2 20000514-22:25 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/compiler/harbour.l
    - Removed: not needed states
    - Removed "class method" "class data"
    + Added rules for "declare""

  * source/compiler/harbour.y
    * Changed rules for DECLARE FUNCTION as per Ryszard suhhestion, New Sysntax is simply:
        DECLARE FunName([...]) [As ...]
    * Changed rules for DECLARE CLASS as per Ryszard suhhestion, New Sysntax is simply:
        DECLARE ClassName MethodName([...]) [As ...] DataVar [As ...]

  * source/compiler/harbour.c
    ! Minor correction to allow final declaration to override previous declaration of same function.

  * tests/testwarn.prg
    * Modified code to demonstrate syntax functions, classes and objects of a declared class declarations.
2000-05-15 05:35:04 +00:00
Ron Pinkas
7733005732 20000514-19:17 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/compiler/harbour.y
    ! Additional Correction so '@' handled correctly on any var in a Function Declaration.
2000-05-15 02:17:10 +00:00
Ron Pinkas
0527bfff2f 20000514-18:57 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/compiler/harbour.c
    * Remmed some debug printf()
2000-05-15 02:03:27 +00:00
Ron Pinkas
998c3e4c84 20000514-12:20 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/compiler/harbour.y
    + Seperated the DECLARE... from Function, moved into a Declare, and Added Declare as type of Source.
    ! Added reset of hb_comp_iVarScope to DECLARE... to fix wrong "Statement not allowed outside of procedure or function"
2000-05-15 01:59:21 +00:00
Ron Pinkas
cd9e54dc06 20000514-12:20 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/compiler/harbour.y
    + Seperated the DECLARE... from Function, moved into a Declare, and Added Declare as type of Source.
    ! Added reset of hb_comp_iVarScope to DECLARE... to fix wrong "Statement not allowed outside of procedure or function"


   * source/compiler/hbgenerr.c
     * Modified : "3Duplicate Declaration of %s \'%s\'" to accept 1st parameter type of redeclaration ( Function, Class, Method ).

   * source/compiler/harbour.c
     * Modified calls to hb_compGenWarning() to use additional parameter of redclaration type.
2000-05-14 19:22:22 +00:00
Ron Pinkas
7943176b91 20000514-10:07 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/compiler/harbour.l
    ! Fixed parse error when DO OPTIONAL WITH 1 or " or other non alpha charcaters
    ! Fixed parse error when FOR Var := OPTIONAL TO ...
2000-05-14 17:07:30 +00:00
Ron Pinkas
f336ac266e 20000514-09:45 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/compiler/harbour.y
    ! Fixed GPF when using DECLARE CLASS and -w < 3

  * source/compiler/harbour.c
    ! Fixed GPF when using DECLARE CLASS and -w < 3
2000-05-14 16:47:48 +00:00
Ron Pinkas
d1d3198841 20000514-09:10 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/compiler/harbour.l
    ! Fixed parse error when DO OPTIONAL WITH ...
    * Changed FROM to FROM CLASS in AS Obect FROM CLASS ... (fixed conflict of FROM with DO FROM ...)
    * Changed AS ... ARRAY to AS ARRAY OF ...
2000-05-14 16:12:23 +00:00
Ryszard Glab
aaf0d2c062 ChangeLog 20000514-14:55 GMT+1 2000-05-14 12:47:34 +00:00
Ryszard Glab
e692ba8959 ChangeLog 20000513-14:50 GMT+1 2000-05-13 12:44:55 +00:00
Maurilio Longo
9b2f72dc5a 20000513-13:51 GMT+2 Maurilio Longo <maurilio.longo@libero.it> 2000-05-13 12:00:12 +00:00
Maurilio Longo
f8c0aa412d 20000513-00:51 GMT+2 Maurilio Longo <maurilio.longo@libero.it> 2000-05-12 22:55:13 +00:00
Maurilio Longo
c1671404ae 20000513-00:19 GMT+2 Maurilio Longo <maurilio.longo@libero.it> 2000-05-12 22:26:40 +00:00
Ron Pinkas
7ef7990cc1 Corrected ChangeLog entry. 2000-05-12 15:46:32 +00:00
Ron Pinkas
95dd157b13 20000512-08:00 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/compiler/harbour.y
    + Added support for END to be used with FOR loops.
2000-05-12 15:07:48 +00:00
Maurilio Longo
e2dec8ecae 20000512-13:31 GMT+2 Maurilio Longo <maurilio.longo@libero.it> 2000-05-12 11:35:33 +00:00
Maurilio Longo
3d1d1d3875 20000510-22:01 GMT+2 Maurilio Longo <maurilio.longo@libero.it> 2000-05-10 20:07:30 +00:00
Ron Pinkas
30cc98a20d 20000510-03:00 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* include/hbcomp.h
    + Added new structures COMCLASS and COMMETHOD
    + Added new element pClass to structure VAR
    + Added:
	extern PCOMCLASS hb_compClassAdd( char * );
	extern PCOMCLASS hb_compClassFind( char * );
	extern PCOMMETHOD hb_compMethodAdd( PCOMCLASS pClass, char * );
	extern PCOMMETHOD hb_compMethodFind( PCOMCLASS pClass, char * );

  * source/compiler/harbour.c
    + Added:
	PCOMCLASS hb_compClassAdd( char * );
	PCOMCLASS hb_compClassFind( char * );
	PCOMMETHOD hb_compMethodAdd( PCOMCLASS pClass, char * );
	PCOMMETHOD hb_compMethodFind( PCOMCLASS pClass, char * );
    * Modified hb_compVariableAdd() to process params of declared class methods.

  * source/compiler/harbour.l
    + Added tokens CLASSMETHOD CLASSDATA and FROMCLASS

  * source/compiler/harbour.y
    + Added support for class declaration syntax:
      DECLARE CLASS ClassName HAS Method MethodName( ... ) As ... HAS Data PropertyName ...
    + Added support for declaration of Object of a sdeclared class sysntax:
      DECLARE oObjectVar AS Object FROM ClassName

  * source/compiler/hbpcode.c
    + Started support for object methods and properties type checking.

  * tests/testwarn.prg
    + Added code to demonstrate declarion of classes and objects of a declared class.
2000-05-10 10:13:16 +00:00
Paul Tucker
d0fd162828 Added casts 2000-05-10 06:47:38 +00:00
David G. Holm
9138e033a3 See ChangeLog entry 2000-05-09 19:20 GMT-4 David G. Holm <dholm@jsd-llc.com> 2000-05-09 23:24:42 +00:00
Maurilio Longo
e820d6adeb 20000509-22:27 GMT+2 Maurilio Longo <maurilio.longo@libero.it> 2000-05-09 20:32:51 +00:00
Ron Pinkas
cca893bb9d 20000509-00:15 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/compiler/hbpcode.c
     ! Corrcted HB_P_NOT and minor fixes.
2000-05-09 07:16:21 +00:00
Ron Pinkas
d3cba77156 20000508-22:50 GMT-8 Ron Pinkas <Ron@Profit-Master.com>
* source/compiler/harbour.l
     - Removed un used token DECLARE_

   * source/compiler/harbour.y
     ! Fixed warning about conflict
     ! Verified all calls to hb_compVariableAdd() to use hb_comp_cVarType (and VT_OFFSET_* constants) as 2nd parameter
     + Added rules to support syntax of declartion of variable by reference parameter.

   * include/hbcomp.h
     + Added :
	#define VT_OFFSET_BYREF             60
	#define VT_OFFSET_VARIANT           90
	#define VT_OFFSET_OPTIONAL          90

   * source/compiler/harbour.c
     * Minor cleanup in hb_compVariableAdd()

   * source/compiler/hbpcode.c
     * Modified hb_compStrongType() to use VT_OFFSET_* constants.

   * source/compiler/hbgenerr.c
     * Changed "number" to "#" in HB_COMP_WARN_PARAM_TYPE message.

   * tests/testwarn.prg
     + Added code to demonstrate new "Declared Refernced Paramater" syntax:
         DECLARE FRead( nHandle As Num, @cBufferVar As Char, nBytes As Num ) AS Num
2000-05-09 06:08:45 +00:00