This code is in 'master', current active development branch is 'simplified_codegen' (this particular code has been removed a while ago).
However, thank you for taking interest in re2c! Let me clarify current state of affairs (in order not to waste any of your time and effort).
I'm looking forward to accept contributions (including helping, answering questions, working out common solutions, etc.). I'm glad to anyone who's willing to help.
However, if you do want to help, you should put a lot of effort into understanding re2c problems and directions of work. Small and simple fixes (like the one with useless null pointer check) are ok, but general considerations (like C++ exceptions) are not useful at all --- they only distract me from work.
Also please note that re2c is a small project and I constantly change the whole codebase, so you should keep in sync with the latest version.
Hope that helps. :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hmm, what exactly do you expect re2c to do in all the above cases? Print a message and exit? (Note that in case of 'printf' failure printing a message may be a bad idea.) Maybe it should, however, it seems a minor issue to me (a very rare case).
Please do understand me correctly. I'm working on important stuff right now: fixing all sorts of bugs, adding major features. I have a (rather) deep understanding of re2c structure. If don't rush at checking every unchecked return value, it's not because I don't know about it. It's because important stuff must be done first. By the time it is done half of the "issues" you are pointing to will not exist anymore.
However, I don't mind accepting fixes even if I don't find them very helpful. Feel free to provide a patch!
As for 'aspect-oriented programming', I don't find all these 'programming paradigms' of any help. I believe in writing code that solves exactly the problem you need to solve and does it in the simplest possible way.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
How do you think about to indicate any more software failures in the program exit code?
Do you mean exit codes other than 0 (EXIT_SUCCESS) and 1 (EXIT_FAILURE) ?
Would you like to delegate any more error checking to another dedicated development tool?
Not sure, depends on the tool. :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry for the delay in response, it took me some time to read the papers and manuals. (This article was really helpful; it clarified what AspectC++ is all about.)
So, to the matter. AspectC++ is an interesting tool: the problem it tries to solve is non-trivial and the method looks promising. I'll keep an eye on it.
However, I won't integrate it in re2c (not in the nearest future). re2c is not ideal in many ways, but error handling (as it seems to be the primary motivation of switching to AspectC++) is not a major issue. Also, re2c should stay small and portable (it should conform to C++-98).
Thank you for your effort!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Markus, there really isn't much that can go wrong with running re2c. It's quite a simple program. And the things that probably can go wrong, such as incorrect command line arguments are already handled.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This code is in 'master', current active development branch is 'simplified_codegen' (this particular code has been removed a while ago).
However, thank you for taking interest in re2c! Let me clarify current state of affairs (in order not to waste any of your time and effort).
I'm looking forward to accept contributions (including helping, answering questions, working out common solutions, etc.). I'm glad to anyone who's willing to help.
However, if you do want to help, you should put a lot of effort into understanding re2c problems and directions of work. Small and simple fixes (like the one with useless null pointer check) are ok, but general considerations (like C++ exceptions) are not useful at all --- they only distract me from work.
Also please note that re2c is a small project and I constantly change the whole codebase, so you should keep in sync with the latest version.
Hope that helps. :)
Thanks for your acceptance.
I find this view strange.
I hope that this situation can be improved somehow.
I suggest to avoid ignorance of return values a bit more.
Would you like to detect every error situation as early as possible?
Yes, of course I prefere to fix errors rather than ignore them. Do you have any suggestions where in particular I should check return value?
Update candidates:
Are you interested to apply aspect-oriented software development?
How do you think about to encapsulate error detection and corresponding exception handling as a reusable aspect in your software?
Hmm, what exactly do you expect re2c to do in all the above cases? Print a message and exit? (Note that in case of 'printf' failure printing a message may be a bad idea.) Maybe it should, however, it seems a minor issue to me (a very rare case).
Please do understand me correctly. I'm working on important stuff right now: fixing all sorts of bugs, adding major features. I have a (rather) deep understanding of re2c structure. If don't rush at checking every unchecked return value, it's not because I don't know about it. It's because important stuff must be done first. By the time it is done half of the "issues" you are pointing to will not exist anymore.
However, I don't mind accepting fixes even if I don't find them very helpful. Feel free to provide a patch!
As for 'aspect-oriented programming', I don't find all these 'programming paradigms' of any help. I believe in writing code that solves exactly the problem you need to solve and does it in the simplest possible way.
How do you think about to indicate any more software failures in the program exit code?
Would you like to delegate any more error checking to another dedicated development tool?
Yes.
How do you think about to integrate AspectC++ into your software development process?
Sorry for the delay in response, it took me some time to read the papers and manuals. (This article was really helpful; it clarified what AspectC++ is all about.)
So, to the matter. AspectC++ is an interesting tool: the problem it tries to solve is non-trivial and the method looks promising. I'll keep an eye on it.
However, I won't integrate it in re2c (not in the nearest future). re2c is not ideal in many ways, but error handling (as it seems to be the primary motivation of switching to AspectC++) is not a major issue. Also, re2c should stay small and portable (it should conform to C++-98).
Thank you for your effort!
Would you like to improve error handling by more traditional C++ techniques?
Markus, there really isn't much that can go wrong with running re2c. It's quite a simple program. And the things that probably can go wrong, such as incorrect command line arguments are already handled.