Commit graph

39 commits

Author SHA1 Message Date
Dimitri van Heesch
338f2e146f
Refactoring: simplified the way search data from source code is gathered 2023-01-25 20:34:52 +01:00
albert-github
ed6b713b7e Merge branch 'master' into feature/bug_windows_warn_4100
# Conflicts:
#	src/doxygen.cpp
#	src/tooltip.cpp
2023-01-19 13:45:56 +01:00
Dimitri van Heesch
4ed9f1a0a9
Merge branch 'feature/bug_windows_warn_4800' of https://github.com/albert-github/doxygen into albert-github-feature/bug_windows_warn_4800 2023-01-18 20:10:53 +01:00
Dimitri van Heesch
bf0f96b794
Enable the entering/finished lexical scanner messages per scanner 2023-01-15 16:53:45 +01:00
Dimitri van Heesch
88c1899ae2
Improve debugging for lexical scanners
- Debug builds now have lex debugging compiled in by default
- For a release build option `enable_lex_debug` can enabled to compile
  in debug support.
- Option `-d lex` will now turn on debugging output for all lexers.
- Option `-d lex:name` will turn on debugging for lexer `name` only.
2023-01-15 14:48:15 +01:00
Dimitri van Heesch
f5b17a0323
Also max_size is of type int, which allows removing some more casts. 2022-09-29 20:54:42 +02:00
albert-github
e908babe75 Warning during compilation on Windows systems
This is based on the warning type: 4267 'variable': conversion from 'size_t' to 'type', possible loss of data
2022-09-13 12:36:45 +02:00
albert-github
3462fa98b9 Warning during compilation on Windows systems
This is based on the warning type: 4100 'identifier': unreferenced formal parameter
2022-09-11 18:14:00 +02:00
albert-github
2a9ffbf42f Warning during compilation on Windows systems
This is based on the warning type: C4800: Implicit conversion from 'type' to bool. Possible information loss
A real bug was found in the writing out of the boolean replacement values in configgen.py. The boolean values got double quotes and the string would always result in true instead of the intended value
2022-09-03 14:21:54 +02:00
Dimitri van Heesch
5ff3742e9d
Implemented a different solution
The various code parsers now have `insideCodeLine` boolean state variable that replaces
the `needsTermination` and keeps track if the parser in inside a line or not.
This information is now passe between lexcode.l and code.l to make sure the start
and end codelines stay balanced.
2021-12-25 13:45:26 +01:00
albert-github
ec9d903aaf Merge branch 'master' into feature/bug_msg_lexer
# Resolved conflicts:
#	src/doctokenizer.l
#	src/pre.l
#	src/scanner.l
2021-12-20 16:45:21 +01:00
Dimitri van Heesch
024426c9f1
Changed naming and moved global variable into local scope
In writeLineNumber replaced includeCodeFragment by writeLineAnchor
and reversed the logic. This makes it clearer what the parameter does
in the context of writing a line of code.
2021-10-17 13:03:10 +02:00
albert-github
5ca6f9ac61 Correcting labels
In case we have included sources (e.g. due to `INLINE_SOURCES`) and also the `SOURCE_BROWSER` enabled it is possible that we get double labels.
Also the calculation of labels in RTF was not done consistently, sometimes the path was striper and on other moments it wasn;t (especially seen in case CREATE_SUBDIRS
The problem was found using RTF / Docbook on the doxygen internal documentation (not standard) but will happen too in other projects
2021-10-10 18:20:25 +02:00
Dimitri van Heesch
04d51aece7
Improve type safety of scanner code by not using void* for yyscan_t 2021-08-22 20:23:49 +02:00
Dimitri van Heesch
58264d82ea
Refactoring: replaced MemberDef::isDetailedSectionLinkable() by hasDetailedSection()
- make filtering if detailed section is present more inline with
  contents
- split of MemberVector as simpler version of MemberList
- introduce MemberListContainer type as a replacement for inFile and
  inGroup booleans.
- improved const use a bit
2021-08-05 21:40:15 +02:00
albert-github
a019b33403 Better error message in case of a fatal error in a lexer
In case we have a serious problem in a lexer it is sometimes hard to find what the initial file and lexer is as we only get a general message like:
```
input buffer overflow, can't enlarge buffer because scanner uses REJECT
```
by overruling the macro `YY_FATAAL_ERROR` we can provide a better message.
2021-05-29 18:08:02 +02:00
Dimitri van Heesch
592aaa4f17
Refactoring: remove implicit conversion from QCString to const char *
This commit changes the following in relation to string use
- The implicit convert from 'QCString' to 'const char *' is removed
- Strings parameters use 'const QCString &' as much as possible in favor
  over 'const char *'
- 'if (s)' where s is a QCString has been replaced by 'if(!s.isEmpty())'
- data() now always returns a valid C-string and not a 0-pointer.
- when passing a string 's' to printf and related functions 'qPrint(s)' is
  used instead of 's.data()'
- for empty string arguments 'QCString()' is used instead of '0'
- The copy() operation has been removed
- Where possible 'qstrcmp(a,b)==0' has been replaces by 'a==b' and
  'qstrcmp(a,b)<0' has been replaced by 'a<b'
- Parameters of string type that were default initialized with '= 0' are
  no initialized with '= QCString()'
2021-04-22 19:34:13 +02:00
albert-github
789625caed Adding support for lex files
- Correct handling of C comment  start and end tokens  as well as Cpp comment start in rules. These tokes can give "Reached end of file while still inside a (nested) comment..."
- Correct other warnings in respect to lex files
2021-02-18 15:52:08 +01:00
albert-github
4ae09f2617 sqlcode.l does not compile in LEX debug mode
Correction for debug mode in sqlcode.l
2021-01-12 10:59:51 +01:00
albert-github
c261c5eae9 Remove warnings from lexers
Remove warnings (Windows 64 bit compilation) like:
```
warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data
```
from the different lexers by making use of more consistent data types.
2020-10-20 18:04:28 +02:00
Dimitri van Heesch
0fc06d657d
Refactoring: making xmlcode.l reentrant 2020-09-14 21:13:58 +02:00
Dimitri van Heesch
5162dab5a4
Refactoring: making sqlcode.l reentrant 2020-09-13 21:12:32 +02:00
albert-github
7c429806b0 issue #7995 Doxygen doesn't handle very simple example in the .md file
Besides "keep utf8 characters together..." as done for the C-type parser  in code.l (commit d3d9dd8540) this also has to be done for the Fortran, SQL and VHDL code lexers. The code lexers for python and xml already didn't give errors as they already handled these cases for the example.
2020-09-02 11:32:42 +02:00
Dimitri van Heesch
4658413ff3
Enabled stricter compiler warnings and fixed all new warnings 2020-03-08 14:31:54 +01:00
Dimitri van Heesch
f6cd1a9f2d
Fix compiler warnings on Windows (Visual Studio) 2020-02-12 21:06:53 +01:00
Dimitri van Heesch
4a4fcdf793
Added missing debug flags for scanner that were made reentrant 2019-12-05 21:55:22 +01:00
Dimitri van Heesch
3bda58a7b7
Split language parser into "outline parser" and "code parser" 2019-12-03 20:54:36 +01:00
Dimitri van Heesch
26f6f1aec1
Remove bogus flex code 2019-11-18 20:37:37 +01:00
albert-github
aca16ea3b4 Consistent way to show scanner state
Create a consistent way to display the state mnemonics of the different scanners (analogous to the fortranscanner.l)
Use an automatic procedure to generate the routine with the translation of the states to a string.
2019-09-05 14:04:14 +02:00
Dimitri van Heesch
2b0cffb6a7
Fix for printlex after destroying the scanner context 2019-05-28 22:01:06 +02:00
Adrian Negreanu
2c8eec16b0 enable debug for re-entrant lexers 2019-05-22 14:55:26 +03:00
albert-github
03994c79c8 Missing debug statements sqlcode and xmlcode lexers
The messages for `doxygen -d lex` were missing in case of the sqlcode.l and xmlcode.l
2019-05-20 13:27:31 +02:00
Dimitri van Heesch
723b842ca1
Fixed memory leak in reentrant lexers 2019-05-12 14:23:55 +02:00
Adrian Negreanu
52e32ead5d
sqlcode.l: generate a reentrant scanner
* put the global variables in struct sqlcodeYY_state.

 * globally define yyscanner and sqlcode_extra. these two should be per-thread.

 * add a new yyscan_t function parameter when these functions are referenced:
    - yyin, yyout, yyextra, yyleng, yytext, yylineno, yycolumn, and yy_flex_debug.
    - the macros BEGIN, YY_START, YYSTATE, yymore, unput, and yyless
    - the functions that deal with input buffers: yyrestart
    - others: yy_switch_to_buffer, yy_create_buffer, yy_delete_buffer,
                yy_flush_buffer, yypush_buffer_state, yypop_buffer_state,
                yy_scan_buffer, yy_scan_string, and yy_scan_bytes

 * add a new yyscan_t function parameter when globals are referenced,
   to get the yyextra out of the yyscanner.
2019-05-04 17:03:34 +02:00
Dimitri van Heesch
6216208b0a
Improved const correctness and added support for inline namespaces 2019-04-21 16:01:25 +02:00
Dimitri van Heesch
960bae7191
Refactored Definition and derived classes such that they are abstract interfaces 2019-02-28 20:55:47 +01:00
albert-github
e596bf3f21 Double id for tooltips in XHTML Possible.
The tooltips (XHTML) should not be displayed per code fragment but for the entire (output) file as otherwise tooltips might be added multiple times resulting in double IDs.
2019-01-18 10:59:56 +01:00
Artur Kink
6a85240e65 Add NVARCHAR as a SQL type 2016-11-22 11:55:25 -05:00
Artur Kink
adf4a90340 Add sql syntax highlighting to code blocks 2016-11-21 21:08:01 -05:00