cybop-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cybop-developers] CYBOI String Constants


From: Christian Heller
Subject: Re: [cybop-developers] CYBOI String Constants
Date: Fri, 10 Mar 2017 17:16:57 +0100
User-agent: KMail/4.14.1 (Linux/3.16.0-4-amd64; KDE/4.14.2; x86_64; ; )

Hi Enrico,

> I am a really lazy programmer. I don’t like assembly work so much…
> But i wanted to have a look into python since a while. I used the opportunity 
> and wrote a python script which takes care of the code-transformation.

ah, that's perfect. THANKS a lot that this is done now finally!

One day the aim should be to use CYBOL itself to write such short scripts.
It already worked for me when generating a 2 MB file with numbers:
src/constant/model/cyboi/state/integer_state_cyboi_model.c
cybop/tools/integer_state_cyboi_model_generator/
CAUTION! The application is not updated to new paths and tags yet.

I don't know the Python syntax much, but get the sense. One question:
Doesn't line 46 in your script remove all capital letters 'L' at the end?
However, I was scanning with my eyes all files in both:
src/constant/model/
src/constant/name/
and could not find any mistake. Mostly, small letters were used anyway.
And those, where capital 'L' appeared, had been transformed manually.

> I put the python file to tools. Ah, i forgot the changelog entry… i will make 
> catch up the entry, sorry about that
> I did this for all files (except the files in the folders you mentioned) and 
> another file where it should stay the way it is.
> Unfortunately I found some strange things while looking through the files. 
> All the cases are mentioned in my todo list, please have a look and let’s 
> discuss what to do.
> If I converted files which i shouldn’t have, we can just revert it, the 
> project still compiles of course.

* REQUEST_HTTP_CYBOL_MODEL_CONSTANT_SOURCE contains same as 
WEBDAV_REQUEST_METHOD_HTTP_MODEL_CONSTANT_SOURCE -> should be cleaned up

This has to stay as it is. The request method is read from HTTP,
where it appears in capital letters following the specification
(WEBDAV_REQUEST_METHOD_HTTP_MODEL_CONSTANT_SOURCE).

It then gets translated into CYBOL-internal names using small
letters (REQUEST_HTTP_CYBOL_MODEL_CONSTANT_SOURCE) appearing
in the CYBOL application tree, where they can be accessed.

* handling localization? field_description_xdt_model.c uses german expressions!?

Well, xDT is a German medical standard. So its constants are
allowed to be in German language. They are provided in the
CYBOI interpreter's C source code for faster deserialisation
and parsing and transformation into a CYBOL tree with names.

To what concerns localisation for CYBOL applications:
It will have to be done in CYBOL files.

* empty files should be removed:

The following files were removed by me
(for the Win32 commands I assumed the same):

    - CLEAR_SCREEN_UNIX_COMMAND_OPTION_NAME_CONSTANT_SOURCE
    - DELAY_UNIX_COMMAND_OPTION_NAME_CONSTANT_SOURCE
    - WHO_AM_I_COMMAND_OPTION_NAME_CONSTANT_SOURCE
    - CLEAR_SCREEN_WIN32_COMMAND_OPTION_NAME_CONSTANT_SOURCE
    - DELAY_WIN32_COMMAND_OPTION_NAME_CONSTANT_SOURCE
    - who_am_i_commander_logic_cybol_name.c

The following commands have arguments, to be added later-on.
I checked via man page. Therefore, I did not remove these:

    - CREATE_FOLDER_UNIX_COMMAND_OPTION_NAME_CONSTANT_SOURCE
    - ECHO_MESSAGE_UNIX_COMMAND_OPTION_NAME_CONSTANT_SOURCE
    - HELP_UNIX_COMMAND_OPTION_NAME_CONSTANT_SOURCE
    - IFUP_UNIX_COMMAND_OPTION_NAME_CONSTANT_SOURCE
    - KILL_UNIX_COMMAND_OPTION_NAME_CONSTANT_SOURCE
    - ECHO_MESSAGE_WIN32_COMMAND_OPTION_NAME_CONSTANT_SOURCE
    - HELP_WIN32_COMMAND_OPTION_NAME_CONSTANT_SOURCE
    - MEMORY_FREE_WIN32_COMMAND_OPTION_NAME_CONSTANT_SOURCE
    - USERLOG_WIN32_COMMAND_OPTION_NAME_CONSTANT_SOURCE

* WHO_AM_I_COMMAND_OPTION_NAME_CONSTANT_SOURCE define 
WHO_AM_I_UNIX_COMMAND_OPTION_NAME_CONSTANT_SOURCE
* WHO_COMMAND_OPTION_NAME_CONSTANT_SOURCE define 
WHO_UNIX_COMMAND_OPTION_NAME_CONSTANT_SOURCE

The first was removed above. I corrected the second.

* really strange javadoc
    - touch_commander_logic_cybol_name.c
    - TOP_COMMANDER_LOGIC_CYBOL_NAME_CONSTANT_SOURCE

I've beautified these a bit.
But I didn't want to change the comments logically now,
since I'm not in the matter.

BTW: All of the above was programmed by student groups.

* only one commented out entry should be removed
    - attribute_wui_state_cybol_name.c
    - command_run_logic_cybol_name.c

Done.

* did not touch:
    - character_reference_name.c

O.k.

By the way: I have already started converting the preprocessor
macros, but dozens of files are affected. So it will take
some time. Hopefully, there won't be too many SVN conflicts.

Reading you later
Christian





reply via email to

[Prev in Thread] Current Thread [Next in Thread]