Comments (15)
@elfring, @MaxBarraclough,
I'm going to close this issue because of the following reasons:
- PackCC generates a C source code in a
.c
file (not in a file with the C++ extension such as.cpp
). - PackCC generates a C header file that can be included from C++ source files with no problem.
- I strongly disagree too vast the identifier pattern that POSIX claims to reserve.
If you have any objection against closing this issue, let me know by the end of this month (Aug. 2022).
from packcc.
Thank you for your advice.
I replaced every double underscore __ with a single underscore if it is in an identifier that consists of uppercase letters and underscores.
Please check out the branch 'develop'.
from packcc.
Thanks for your renaming of affected identifiers.
from packcc.
How do you think about to rename also functions?
from packcc.
How do you think about to rename also functions?
I don't want to rename them anymore.
I determined the function naming convention like 'class name'__'method name' to distinguish it plainly from other word delimiters '_'.
Can a name selection trigger any corresponding software development concerns?
Sorry, I couldn't understand what you mean.
Could you express it more simply?
from packcc.
I don't want to rename them anymore.
This implementation detail can be fine according to the naming convention for the programming language “C”.
Can anybody get concerned about remaining risks for undefined behaviour if contents from C files will be treated as C++ source code anyhow?
Could you express it more simply?
Is there a possibility that an identifier will be constructed (together with the prefix “PCC_INCLUDED_”) that does not result in an acceptable include guard?
from packcc.
Identifiers ending with "_t" are also reserved in C++. I see many instances of this in packcc, even in the develop branch. https://stackoverflow.com/a/228797/
I also see "__pcc_in", "__pcc_out", and "__pcc_ctx" in the develop branch, all of which C++ considers to be reserved identifiers due to the leading double underscores.
As @elfring says, C++ has stricter rules than C regarding which identifiers are considered reserved.
from packcc.
Is this a parser generator for C or C++?
from packcc.
Just for C.
You can use it with a C++ compiler, but I don't support such usage.
from packcc.
Why @elfring asked you to comply with C++ language standard then?
from packcc.
Just because @elfring wanted to use PackCC with C++, I think.
I accepted a part of @elfring's suggestion since I thought it had better comply with C++ standard as much as possible.
Anyway, I can close this issue if I strictly stand on the specification: just for C.
from packcc.
from packcc.
thought_balloon I became curious if interests could grow further for involved standard compliance aspects.
Why not putting some ads on Youtube instead of violating the scope of this project?
from packcc.
Some development concerns can be tackled together for the programming languages “C” and “C++”, can't they?
from packcc.
I became curious if interests could grow further for involved standard compliance aspects.
It might be just your impression, and isn't persuasive.
Some development concerns can be tackled together for the programming languages “C” and “C++”, can't they?
I never deny using C and C++ together.
I already wrote "PackCC generates a C header file that can be included from C++ source files with no problem".
The generated C code is callable from C++ codes.
from packcc.
Related Issues (20)
- [Bug] Conflict caused by FALSE, TRUE macros and bool_tag enum using same name HOT 7
- Actions that runs before the end of parsing. HOT 8
- Simple grammar goes into an infinite loop instead of erroring HOT 1
- `$n` should be independent across alternatives HOT 4
- C predicates HOT 2
- Peg only mode? HOT 9
- Parser very slow with repeated parse calls HOT 3
- Lexical state support HOT 5
- Import support HOT 10
- Questions not answered in the README HOT 12
- Passing auxil to PCC_DEBUG HOT 3
- AST Mode HOT 11
- Uninitialized variables HOT 8
- value passthrough HOT 4
- parser reads more data than necessary HOT 3
- Strange bad generated parser HOT 5
- Memory usage compared to gcc compiler HOT 13
- raising error from action? HOT 2
- %value and memory management HOT 2
- Consider add support for UCD(Unicode Character Database) rule pattern HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from packcc.