[tracker] rasqal: Include all valid string escape sequences



commit 6a471adfbddaec2377568038fb2372a5fe5a7ebd
Author: Benjamin Otte <otte gnome org>
Date:   Tue Jul 14 20:24:11 2009 +0200

    rasqal: Include all valid string escape sequences
    
    Updated according to spec, paragraph "A.7 Escape sequences in strings"

 src/rasqal/sparql_lexer.l |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/rasqal/sparql_lexer.l b/src/rasqal/sparql_lexer.l
index ebea6db..904e2db 100644
--- a/src/rasqal/sparql_lexer.l
+++ b/src/rasqal/sparql_lexer.l
@@ -726,9 +726,13 @@ sparql_copy_string_token(rasqal_query* rq, YYSTYPE* lval,
         *d++= '\n';
       else if(c == 'r')
         *d++= '\r';
+      else if(c == 'f')
+        *d++= '\f';
+      else if(c == 'b')
+        *d++= '\b';
       else if(c == 't')
         *d++= '\t';
-      else if(c == '\\' || c == delim)
+      else if(c == '\\' || c == '\'' || c == '"')
         *d++=c;
       else if (c == 'u' || c == 'U') {
         int ulen=(c == 'u') ? 4 : 8;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]