summaryrefslogtreecommitdiffstats
path: root/src/pyscanner.l
Commit message (Collapse)AuthorAgeFilesLines
* issue #8564 input buffer overflow, can't enlarge buffer because scanner uses ↵albert-github2021-05-231-1/+1
| | | | | | REJECT When we have a very large "LONGSTRINBLOCK" (e.g. a very large documentation part or an encode executable in e.g. base64 encoding) , there are a lot of lines that have to be read at once, this is not really necessary they can be read sequentially (probably at the cost of some speed)
* issue #8560: Regression: In Python/xml output, refid and qualified name of ↵Dimitri van Heesch2021-05-221-12/+20
| | | | base compound not resolved under certain conditions (part 2)
* Merge pull request #8337 from yosshy/masterDimitri van Heesch2021-04-291-0/+10
|\ | | | | issue #8336 Python class only with async methods support
| * issue #8336 Python class only with async methods supportMob2021-01-181-0/+10
| |
* | issue #8518 tag </programlisting> was inserted before </highlight> parsing ↵albert-github2021-04-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | python file to xml Doxygen expects that decorators don't have a return in them, but the complicated decorator: ``` @basetest.unittest.skipIf( api_implementation.Type() != 'cpp' or api_implementation.Version() != 2, 'Errors are only available from the most recent C++ implementation.') ``` has some in them. This leads to the mentioned problem as well as that the line counting is incorrect (we see that the last mentioned lie number in the xml file is 2964 though the file has 2966 lines). By fixing this (and also the line counting in the python scanner) the problem looks to be handled.
* | Refactoring: remove implicit conversion from QCString to const char *Dimitri van Heesch2021-04-221-31/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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()'
* | Refactoring: Add TextStream buffer to improve output writing performanceDimitri van Heesch2021-03-281-4/+3
| | | | | | | | | | - direct use of std::stringstream and std::ostream gave a 30% drop in performance.
* | Regression: fix array out of bound issue.Dimitri van Heesch2021-03-251-4/+8
| |
* | Problem with empty buffer in pyscanner.lalbert-github2021-03-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After commit: ``` Commit: 9533e6d6e8e69954593da006ab00ea362980bc76 Date: Wednesday, March 24, 2021 11:44:20 PM Regression: fix potential lockup while parsing python code ``` the package fwupd-1.5.8 crashes with: ``` Reading /cygdrive/e/Fossies/fwupd-1.5.8/contrib/firmware_packager/__init__.py... Parsing file /cygdrive/e/Fossies/fwupd-1.5.8/contrib/firmware_packager/__init__.py... Thread 1 "doxygen" received signal SIGSEGV, Segmentation fault. 0x000000010065ea24 in yyread (yyscanner=0x8005d6930, buf=0x6ffffff60010 "", max_size=262143) at .../doxygen/src/pyscanner.l:1443 1443 yyextra->inputPosition+=c; ```
* | Regression: fix potential lockup while parsing python codeDimitri van Heesch2021-03-241-1/+1
| |
* | Refactoring: replace QGString by std::ostringstreamDimitri van Heesch2021-03-231-94/+95
| |
* | Refactoring: Replaced QFileInfo with FileInfoDimitri van Heesch2021-03-181-7/+6
| | | | | | | | | | - FileInfo is based on ghc::filesystem, a std::filesystem compatible implementation that does not require C++17.
* | Refactoring: modernize Statistics & time keepingDimitri van Heesch2021-01-221-3/+0
| |
* | Refactoring: modernize packageNameCacheDimitri van Heesch2021-01-221-15/+7
|/
* issue #8098: Python Decorator written below @brief tag and above the ↵Dimitri van Heesch2020-10-161-0/+4
| | | | function leads to documentation error
* Line count mismatch for Python (#8041)albert-github2020-09-181-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When having an example like: ``` ## General \PYgen0 docu # # # # # General detail \PYgen1 text # and more STYLE_TEMPLATE = r''' \makeatletter ''' ## General \PYgen2 docu # # # # # # General detail \PYgen3 text # and more STYLE_TEMPLATE1 = r''' \makeatletter ''' ``` with ``` EXTRACT_ALL = YES QUIET = YES ``` we get the warnings (removed doubles and sorted): ``` bb.py:1: warning: Found unknown command '\PYgen0' bb.py:10: warning: Found unknown command '\PYgen1' bb.py:12: warning: Found unknown command '\PYgen2' bb.py:23: warning: Found unknown command '\PYgen3' ``` we see here (especially with `PYgen3` a wrong line number. After fixing the line count in `pyscanner.l` there was for the second block an offset of 1. This was caused by `commentscan.l` introduced with #7960 after correcting this this offset was also gone. Revisiting the original example of #7960 showed that here here was also an offset of 1 (probably due to a misinterpretation of where the `<tr>` warning should be mentioned), here it is now also correct.. (The original mismatch was shown of Fossies for the Pygments package)
* Refactoring: making pycode.l reentrantDimitri van Heesch2020-09-061-3/+4
|
* Merge pull request #7575 from albert-github/feature/bug_py_docstrDimitri van Heesch2020-08-101-2/+2
|\ | | | | Using Python docstrings
| * Using Python docstringsalbert-github2020-02-071-2/+2
| | | | | | | | | | - making documentation a bit clearer - add configuration setting to have docstrings not as preformatted text but as normal documentation (default remains preformatted).
* | Moved stripIndentation() to util, make it safe for empty inputDimitri van Heesch2020-08-051-50/+0
| |
* | Empty python comment gives problemsalbert-github2020-08-041-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case we have an empty python comment like: `"""""""` (i.e. 6 double quotes) doxygen will crash in the pyscanner.l version of `stripIndentation`. ``` class Translator(nodes.NodeVisitor): """""" ## the var words_and_spaces = re.compile(r'\S+| +|\n') ``` In case of an empty comment we should not call `stripIndentation` and not place `\verbatim` / `\endverbatim` around the empty comment (the later would give an non-understandable empty comment block). An empty comment should be handled as no comment. Found by Fossies whilst generating documentation for Mercural 5.5).
* | Renamed stripSpaces to stripIndentation and make it work directly on the ↵Dimitri van Heesch2020-07-291-26/+29
| | | | | | | | string passed.
* | Merge branch 'feature/issue_7884' of ↵Dimitri van Heesch2020-07-291-14/+56
|\ \ | | | | | | | | | https://github.com/albert-github/doxygen into albert-github-feature/issue_7884
| * | issue #7884 Python to xml: Whitespace in method doc not preserved ↵albert-github2020-07-031-14/+56
| | | | | | | | | | | | | | | | | | (MARKDOWN_SUPPORT=NO) Corrected handling of the comment blocks. Due to the possible nesting of classes and the handling of the first line special handling is required by means of the stripping of spaces after a return in a doc block (otherwise it might be stripped away multiple times / left multiple times).
* | | More minor tweaksDimitri van Heesch2020-07-281-3/+1
| | |
* | | issue #7923 source line numbers in warnings output by parser are off by 1albert-github2020-07-271-1/+3
| | | | | | | | | | | | Explicit counting of the removed newlines at the beginning of a documenation block (markdown.cpp) so this number can be added to get a better line number in case of warnings.
* | | Refactor: Modernize clang parser and make it run with multiple threadsDimitri van Heesch2020-07-161-3/+2
|/ /
* | Refactor: modernize markdown and make it thread-safeDimitri van Heesch2020-06-161-2/+4
| |
* | Warning in case of multiple python documentation sections.albert-github2020-05-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In special cases when having multiple documentation section for 1 item in python it is possible that they are concatenated in a wrong way and result in a warning. Each documentation section should be seen as a separate section and be separated from other sections. the example: ``` ##################################################################### # # Modify Install Stage ############################################ ##################################################################### class install(_install): """Specialised python package installer. It does some required chown calls in addition to the usual stuff. """ ``` gives a warning like: ``` warning: unexpected command endverbatim ```
* | Refactor: improve encapsulation for ArgumentListDimitri van Heesch2020-04-251-1/+1
| |
* | Enabled stricter compiler warnings and fixed all new warningsDimitri van Heesch2020-03-081-6/+13
| |
* | Fix compiler warnings on Windows (Visual Studio)Dimitri van Heesch2020-02-121-0/+3
|/
* Move DocGroup inside CommentScanner instead of using a globalDimitri van Heesch2020-01-261-5/+5
|
* Cleanup unused/unwanted parser dependencies on code generatorDimitri van Heesch2020-01-261-1/+0
|
* Make commentscan.l reentrantDimitri van Heesch2019-12-301-2/+4
|
* Make pyscanner.l reentrantDimitri van Heesch2019-12-291-875/+908
|
* Changed std::unique_ptr<Entry> to std::shared_ptr<Entry> at avoid use after ↵Dimitri van Heesch2019-12-081-17/+17
| | | | free issues
* Split language parser into "outline parser" and "code parser"Dimitri van Heesch2019-12-031-30/+4
|
* Remove bogus flex codeDimitri van Heesch2019-11-181-7/+0
|
* Fixed use of uninitialized pointer in preprocessorDimitri van Heesch2019-11-091-1/+1
|
* Replaced QList<BaseInfo> with std::vector<BaseInfo>Dimitri van Heesch2019-10-291-2/+2
|
* Changed ArgumentList to be an STL containerDimitri van Heesch2019-10-271-10/+14
|
* Merge pull request #7283 from luzpaz/typosDimitri van Heesch2019-10-091-3/+3
|\ | | | | Fix typos
| * Fix typosluz.paz2019-09-281-3/+3
| | | | | | | | | | | | Found via ``` codespell -q 3 -S *.js,*.po,./src/translator*,*.eps,./doc/changelog.doc -L ang,ans,attribs,ba,behaviour,classe,colour,german,iff,initialise,nam,nd,que,russian,statics,te,tim,uint ```
* | Use smartpointers to manage the lifetime of Entry objectsDimitri van Heesch2019-10-071-80/+28
|/
* Consistent way to show scanner statealbert-github2019-09-051-0/+2
| | | | | 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.
* issue #7009 Python class diagram not created for the base class while works ↵Dimitri van Heesch2019-08-061-3/+1
| | | | for the derived class (fix)
* issue #7009 Python class diagram not created for the base class while works ↵Dimitri van Heesch2019-08-041-27/+40
| | | | for the derived class
* take doc group out of commentscan.lAdrian Negreanu2019-07-261-5/+5
| | | | Signed-off-by: Adrian Negreanu <groleo@gmail.com>
* Merge pull request #6916 from albert-github/feature/bug_py_classDimitri van Heesch2019-05-191-0/+26
|\ | | | | Class definition with collections