boostorg / wave

Boost.org wave module
http://boost.org/libs/wave
21 stars 49 forks source link

bug #132

Closed ChrisCatCP closed 3 years ago

ChrisCatCP commented 3 years ago

local codinglist = [[0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!="$&'()*+,-./<>?@[\]^_`{|}~]] This lua code will look like this if it is included local codinglist = [[01234567 89 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!="$&'()*+,-./<>?@[\]^_`{|}~]] I don't know why there are two more spaces

cmd: --extended --c99 --preserve=2 --line=0

jefftrull commented 3 years ago

Hi! I'm not sure what this means. What command are you running and what does it have to do with Wave?

ChrisCatCP commented 3 years ago

image image wave.zip

ChrisCatCP commented 3 years ago

There will be two more spaces

jefftrull commented 3 years ago

That's Wave, yes - but the input is not C++... I don't understand. Why are you trying to put Lua code through a C++ preprocessor?

ChrisCatCP commented 3 years ago

I just want to include this file in another file And I think it should be a bug

jefftrull commented 3 years ago

I see - you want to run Wave as a Lua preprocessor, and it's doing something you think is wrong? Can you explain what is wrong?

I don't know what "There will be two more spaces" means.

jefftrull commented 3 years ago

For one thing, the input has an unterminated string - the double quote before $&... has no match

ChrisCatCP commented 3 years ago

image image

jefftrull commented 3 years ago

Ah. In C++ numbers beginning with 0 are octal. So when it encounters 8 it decides that is a separate decimal number.

jefftrull commented 3 years ago

Then the following A begins a symbol, because A cannot be part of a decimal number.

ChrisCatCP commented 3 years ago

So is this normal?

jefftrull commented 3 years ago

Nothing about your input is normal :) This is a C++ preprocessor, not a Lua preprocessor. So yes?

ChrisCatCP commented 3 years ago

thanks