RobertElderSoftware / recc

A collection of compiler, emulator and microkernel tools.
Apache License 2.0
244 stars 14 forks source link

reserved identifier violation #3

Closed elfring closed 8 years ago

elfring commented 9 years ago

I would like to point out that identifiers like "__GENERATE_CODE__" and "__LEXER_H__" do eventually not fit to the expected naming convention of the C language standard. Would you like to adjust your selection for unique names?

RobertElder commented 9 years ago

Thanks for pointing that out, I had no idea they were reserved.

RobertElder commented 8 years ago

Fixed.

elfring commented 8 years ago

Would you also like to reconsider consequences from C++ naming conventions?

RobertElder commented 8 years ago

Yeah, if there are any identifiers that violate well-regarded standards than I would probably work toward eventually fixing them. I looked at the SO post you linked, although I'm not sure which rule is being violated?

elfring commented 8 years ago

How do you think about to reduce the use of double underscores in identifiers any more?

RobertElder commented 8 years ago

Interesting, there sure are a lot of rules about reserved identifiers that I wasn't aware of. I'll get around to fixing them eventually.

elfring commented 8 years ago

Would you like to reopen this issue before all affected identifiers from your source files will become reusable for more software areas?

RobertElder commented 8 years ago

I just pushed a change to remove the double identifier violations. FYI I used a variation of these commands:

for i in $(find . -name *.h); do sed -i 's/*/_/g' $i; done for i in $(find . -name .c); do sed -i 's/**/_/g' $i; done ... for more file extensions...

elfring commented 8 years ago

Thanks for another source code improvement.