8000 adding pre-stuff for parsing Pascal files by paule32 · Pull Request #11438 · doxygen/doxygen · GitHub
[go: up one dir, main page]

Skip to content

adding pre-stuff for parsing Pascal files #11438

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 67 commits into
base: master
Choose a base branch
from

Conversation

paule32
Copy link
Contributor
@paule32 paule32 commented Feb 19, 2025

I have add pre-stuff for parsing Pascal files, later.
This branch stuff is only for testing, and for learning how doxygen works.

I have implement the missing Translator functions for geman users (translator_de.h)

stay tuned
next coming soon...

Line: 1787 - change **el** to **RENAMED_el** as workaround for a CHM Link produce Problem.
When RENAMED_ is not available, doxygen tends to produce double qoutes for a Link
pre-adding stuff for parse pascal files
this is only a testing branch !!!
Copy link
Collaborator
@albert-github albert-github left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments might sound a bit harsh or bitchy but are not intended as such, they are just as guide. Changes are always welcome.

Comment on lines +15 to +20
/* This code is based on the work done by the MoxyPyDoxy team
* (Linda Leong, Mike Rivera, Kim Truong, and Gabriel Estrada)
* in Spring 2005 as part of CS 179E: Compiler Design Project
* at the University of California, Riverside; the course was
* taught by Peter H. Froehlich <phf@acm.org>.
*/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remainder of copy paste

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will copy in it

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume you mean remove.

#define YY_NO_INPUT 1
#define YY_NO_UNISTD_H 1

struct dbcodeYY_state
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Work in progress so number of variables wil probably change later on

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should I rename db to dBase
So dBasecodeYY_state
???

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The remark more a general remark that the elements in the state variable will most likely change in the future.
I think though that you are right that it is better to use dBasecodeYY_state instead of dbcodeYY_state.

src/doxygen.cpp Outdated
lang == SrcLangExt::Python ||
lang == SrcLangExt::Java ||
lang == SrcLangExt::PHP ||

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why extra empty line?

Copy link
Contributor Author
@paule32 paule32 Feb 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for better reading.
I can revert the changes if you prefer.
I have a affine style of code that contain readable variables with spaces...

I have note your comment, and will revert the coding style

@@ -401,8 +401,7 @@ void HtmlDocVisitor::operator()(const DocURL &u)
else // web address
{
m_t << "<a href=\"";
filter(u.url());
m_t << "\">";
m_t << u.url() << "\">";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks to me an incorrect change by accident / not merged properly with master. The filter was explicitly added for #11404 to be reverted.

src/htmlgen.cpp Outdated
@@ -3475,7 +3475,7 @@ void HtmlGenerator::writeInheritedSectionTitle(
DBG_HTML(m_t << "<!-- writeInheritedSectionTitle -->\n";)
QCString a = anchor;
if (!a.isEmpty()) a.prepend("#");
QCString classLink = QCString("<a class=\"el\" ");
QCString classLink = QCString("<a class=\"RENAMED4_el\" ");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably based on some old and incorrect changes for some other issues you had, to be reverted

Copy link
Contributor Author
@paule32 paule32 Feb 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, for debug sessions on my side, I am sorry for this
I note it, and will revert the changes.

Comment on lines +15 to +20
/* This code is based on the work done by the MoxyPyDoxy team
* (Linda Leong, Mike Rivera, Kim Truong, and Gabriel Estrada)
* in Spring 2005 as part of CS 179E: Compiler Design Project
* at the University of California, Riverside; the course was
* taught by Peter H. Froehlich <phf@acm.org>.
*/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy paste

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines 41 to 49
class TranslatorAdapter_1_13_0 : public TranslatorAdapterBase
{
public:
QCString updateNeededMessage() override
{ return createUpdateNeededMessage(idLanguage(),"release 1.13.0"); }
QCString trImportant() override
{ return english.trImportant(); }
};

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes for translations are very welcome.
Changes for the translation are not related to the pascal / dbase implementation and have to be handled in a separate PR. (No PR hijacking)

Furthermore there is no need for adding a 1_13_0 translator adapter, when updating to the current version (which is anyway 1.13.2) in the translator file the base class Translator should be used.

@@ -140,13 +140,16 @@
// 2024/05/03 Jens Kallup (kallup-dev@web.de)
// - Updated for 1.10.0
//
// 2025/02/19 Jens Kallup (kallup-dev@web.de)
// - Updated for 1.13.0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be 1.13.2

Furthermore the changes in this file should be in a separate PR as note already in the translator_adapter.h

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I note this and will make the changes you wish.

// Todo:
// - see FIXME

#ifndef TRANSLATOR_DE_H
#define TRANSLATOR_DE_H

class TranslatorGerman : public TranslatorAdapter_1_8_15
class TranslatorGerman : public TranslatorAdapter_1_13_0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be to Translator

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I note this, and I will revert the changes.

@albert-github albert-github marked this pull request as draft February 20, 2025 13:35
@albert-github
Copy link
Collaborator
albert-github commented Feb 20, 2025

As the PR is work in progress I set it to work in progress / draft.

To have a look why the GitHub Actions failed I restarted 1 run and saw the new warnings:

/home/runner/work/doxygen/doxygen/src/docsets.cpp: In member function ‘virtual void DocSets::addIndexItem(const Definition*, const MemberDef*, const QCString&, const QCString&)’:
/home/runner/work/doxygen/doxygen/src/docsets.cpp:304:10: warning: enumeration value ‘Pascal’ not handled in switch [-Wswitch]
  304 |   switch (langExt)
      |          ^
/home/runner/work/doxygen/doxygen/src/docsets.cpp:304:10: warning: enumeration value ‘dBase’ not handled in switch [-Wswitch]

these should be handled. The other warnings (as far as I can see are known and expected and "OK").

The problem regarding the documentation generation is persistent and probably caused by the incorrect usage of TranslatorAdapter as already noted in the review.

paule32 and others added 6 commits February 20, 2025 19:45
I have change the project date at some files.
I have start a parser project, that shall parse pascal source code.
I revert code that was misswriten by me (debug sessions)
I have add the re-mark comment in the scanner.l and code.l files
The pascal parser is in pre-alpha-mode, so no productive, yet.
I have complete implemented the missing references of translation part - see translateor_de.
So, stay tunded...
@paule32 paule32 marked this pull request as ready for review February 21, 2025 06:26
@albert-github
Copy link
Collaborator

Looks like again some changes got in undoing recent fixes in the doxygen master version (e.g. deps/libmscgen/mscgen_config.h)
To update to master you should use the merge functionality of git.

@albert-github albert-github marked this pull request as draft February 21, 2025 12:26
@paule32
Copy link
Contributor Author
paule32 commented Feb 21, 2025

with upload the new file(s) docsets.cpp and passcanner.l, I fixed the issue in docsets.cpp.
I use a exit(1); C-function, to stop doxygen with processing in file passcanner.l
So, you can parse Pascal files (mapper file extensions: *.pas and *.pp).

In real, this is beta ware. Because only the recognition the extensions to set the config on. works.
And a second reason for this is, that I don't parse Pascal files in detail, yet.

But you can parse (* *) comments, whitespaces and a line like this: **unit test ; **.
In the other files, I have update the dates to 1997-2025.

More will come soon...

@paule32 paule32 marked this pull request as ready for review February 21, 2025 15:10
this is the initial commit for the german translation
it is still in progress and valued as test only
github.com had changed the artefacts build version from v3 to v4.
so, workflow run don't start.
I have start the modularization of Doxygen by implement GNU gettext that you can use in combination with .mo files.
mo files are compiled/indexed localization files that can be used to provide different languages for the application with one source code texts.
@albert-github
Copy link
Collaborator

In my previous comments I mentioned some things about how to proceed (a.o.) and it is better to address these issues first

  • concentrate on one parser e.g. pascalscanner and pascalcode or sbasescanner / dbasecode and get this properly up and running
  • don't mix different functionality (trandlator_de) should be in its own proposed pull request.
  • changes to yml should not be necessary, the add new yml files look like functionality for one user and are probably of no interest to the CI system and when of interest they should be in a separate proposed pull request
  • a proper merge with the master branch should be mad so no reverts of code necessary in master will be present (like now for the files from doc_internal).

fixed Windows 10 64-Bit support typo
This workflow provides a compile run for Microsoft Visual Studio 17 (2022). It is more for testing and providing Windows 10 64-Bit based doxygen files with all needed *.dll *.mo and *.exe files.
*.mo files are compiled localization files for your System Language / User preferenced Language and Region Settings.
They are pre-built in the artefacts of this workflow.
You can download the provided zip packed archive.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is doxygen for Windows

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see what this has to do with the pascal implementation or what the usage / intention for the doxygen GitHub Actions could be.

See also my earlier comments in #11438 (comment)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, don't mix different features in one pull request if you ever wish to have it merged.

LICENSE Outdated
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
MIT License
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know what the idea is here, but you cannot change the license.

Copy link
Contributor Author
@paule32 paule32 Feb 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry for this - during creation a copy of doxygen, github.com ask me for a license.
I must be carefully go on the work in the future.
Also, sorry for this.

btw: you mentioned License's:

  • I have start modularize doxygen by splitting data and code
  • I have create GNU gettext libraries for Windows 64-Bit port with nmake from Visual Studio 17 (2022)
  • currently, I have add binary *.mo files (see: msgfmt tool):
    • Dutch,
    • English, and
    • German
  • currently we only need one platform for creating these files (I have preferenced Ubuntu Linus Toolchain)
    • because the files are binary compatible under Windows and Linux
  • for the MacOS platform, I have not found a solution, because I don't own my own Macintosh Computer and I don't know if MacOS amd64/ia64 compatible, and I would not get into illegal keys in no subways.

You can take a look to the new workflow file windows.yml at: here
You can take a look to the localization repro, that I involved in windows_cmake.yml file: here

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't want to have doxygen to depend on gettext. It is not very portable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but it is the simplest and re-commend in my eyes for:

  • fixing spell errors
  • adding new languages
  • change the lang context during the doxygen application run

In other project's, I have use gettext and gzip versions (for shrink the storage usage - not all languages are needed for the same time. And it is a very handy process to de-compress lang files and use in doxygen.

I am a happy developer that does provide and adviced each one othets to use modularization of the developers application.

The times where C++Builder 1.0 hold all resources into one files are out of date.
Today, the executable file is splitted into DATA and CODE.
This makes the application flexible - in view of changed versions of jquery, too.

paule32 and others added 5 commits February 24, 2025 20:30
overlaped License dont aply with doxygen original License, so I have delete the automatic created License.
I am excuse me for this - because I run into trouble with the Desktop Application to handle github repros.
doxygen
@@ -1,6 +1,20 @@
<?php
require_once "search_config.php";

function end_form($value)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed this recently. Seems like your merge strategy is wrong and adds back removed code!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't remember me,. that I had change this php file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0