-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Greetings!
I am using ucpp as c preprocessor and part of lexer in my hobby c compiler
project. I just find that in lexer mod ucpp emits string literals
seperately instead of concatenate them automatically as what has described
by standard. For example,
char string[] = "hello" "world";
invoking lex() once will only yield first string token with value "hello",
next invoke of lex will emit "world". I thought as a preprocessor it should
concatnate string values and yield a single string literal token "hello
world", right?
Other examples include carriage return or line feed in between string
literals.. for example,
char string[] = "hello" \r \n "world" (you get the idea right:) while I
tried VC preprocessor it produce a single literal while ucpp lex produce
several tokens.
My question is, is there any approach that I can configure ucpp such that
at runtime it automatically concatenate string literals for me in lex mod?
Of course I can work around this in my lexer but I would like to know if my
question has a yes anwser - that will make my life easier..
Thanks a lot for reading my post so far :)
Original issue reported on code.google.com by [email protected] on 10 Dec 2009 at 2:47