diff options
author | Bernard Normier <bernard@zeroc.com> | 2007-12-21 15:25:37 -0500 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2007-12-21 15:25:37 -0500 |
commit | e099cd4fd77c718f9c241ad609f5aa7a80627ba8 (patch) | |
tree | 998305e426f74429b00122dcdc4f839e2f97ade5 /cpp/src/Slice/Scanner.l | |
parent | IceUtil cleanup (first commit) (diff) | |
parent | Fix bug 2520: Test suite unsets ICE_CONFIG to avoid configuration conflicts (diff) | |
download | ice-e099cd4fd77c718f9c241ad609f5aa7a80627ba8.tar.bz2 ice-e099cd4fd77c718f9c241ad609f5aa7a80627ba8.tar.xz ice-e099cd4fd77c718f9c241ad609f5aa7a80627ba8.zip |
Merge branch 'master' of ssh://cvs.zeroc.com/home/git/ice
Conflicts:
cpp/src/Slice/VbUtil.cpp
Diffstat (limited to 'cpp/src/Slice/Scanner.l')
-rw-r--r-- | cpp/src/Slice/Scanner.l | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cpp/src/Slice/Scanner.l b/cpp/src/Slice/Scanner.l index b132a4e070d..863c54caffb 100644 --- a/cpp/src/Slice/Scanner.l +++ b/cpp/src/Slice/Scanner.l @@ -177,9 +177,11 @@ floating_literal (({fractional_constant}{exponent_part}?)|((\+|-)?[[:digit:]]+{e \" { StringTokPtr str = new StringTok; + str->literal = "\""; while(true) { char c = static_cast<char>(yyinput()); + str->literal += c; if(c == '"') { break; @@ -196,6 +198,7 @@ floating_literal (({fractional_constant}{exponent_part}?)|((\+|-)?[[:digit:]]+{e else if(c == '\\') { char next = static_cast<char>(yyinput()); + str->literal += next; switch(next) { case '\\': @@ -263,6 +266,7 @@ floating_literal (({fractional_constant}{exponent_part}?)|((\+|-)?[[:digit:]]+{e unsigned short us = next - '0'; if(octalDigits.find_first_of(next = static_cast<char>(yyinput())) != string::npos) { + str->literal += next; us = us * 8 + next - '0'; if(octalDigits.find_first_of(next = static_cast<char>(yyinput())) != string::npos) { @@ -289,6 +293,7 @@ floating_literal (({fractional_constant}{exponent_part}?)|((\+|-)?[[:digit:]]+{e IceUtil::Int64 ull = 0; while(isxdigit(next = static_cast<char>(yyinput()))) { + str->literal += next; ull *= 16; if(isdigit(next)) { @@ -332,6 +337,7 @@ floating_literal (({fractional_constant}{exponent_part}?)|((\+|-)?[[:digit:]]+{e {integer_constant} { IntegerTokPtr itp = new IntegerTok; + itp->literal = string(yytext); *yylvalp = itp; if(!IceUtilInternal::stringToInt64(string(yytext), itp->v)) { @@ -349,6 +355,7 @@ floating_literal (({fractional_constant}{exponent_part}?)|((\+|-)?[[:digit:]]+{e FloatingTokPtr ftp = new FloatingTok; *yylvalp = ftp; string literal(yytext); + ftp->literal = literal; char lastChar = literal[literal.size() - 1]; if(lastChar == 'f' || lastChar == 'F') { |