* 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.
*/
* 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.
* 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)
* 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
* 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.
* 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.