* 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
* 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.
* 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.
+ source\include\harbourl.slx
+ source\compiler\harbourl.c
This is a propoesed new Generic Lexer (SimpLex) that along with language definition file (Harbour.slx) consititue
the proposed new Harbour Lexer. It is about half the size of the Flex Lexer and Harbour.exe is about 60K smaller.
This might help with 16bit mode and or memory limited situations. It belive it offers few benefits over Flex:
Simplicity, Readability, and Consitency of the rules.
More elegant look ahead/parsing capabilities.
Does not require a 3rd party tool (the Tokens & Rules table, is inserted into the Lexer by means of an #include directive.
it doesn't need to be "compiled" like the Flex.exe produces harbourl.c from harbour.l.
It is much smaller than the Flex generated Lexer.
Please note it is not yet optimized for speed, I would love to get your input/suggestion (Ryszard, Victor, Paul, ...).
In the process of resaerching the Lex phase I found many "problems" and tried to address them all. It now compiles
the full build including keywords.prg (3 compiler (yacc) errors), our previous lexer didn't fully parse keywords.prg
Please forward your opinions...