OSSP CVS Repository

ossp - Check-in [5626]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 5626
Date: 2006-Aug-01 22:13:49 (local)
2006-Aug-01 20:13:49 (UTC)
User:rse
Branch:
Comment: Replace "return 0" with the official "yyterminate()" in cfg_syn_scan.l and fix quotation parsing by replacing two "yytext[1]" with the intended "yytext[0]".
Tickets:
Inspections:
Files:
ossp-pkg/cfg/ChangeLog      1.40 -> 1.41     15 inserted, 8 deleted
ossp-pkg/cfg/cfg_syn_scan.l      1.24 -> 1.25     9 inserted, 9 deleted

ossp-pkg/cfg/ChangeLog 1.40 -> 1.41

--- ChangeLog    2005/10/03 07:51:37     1.40
+++ ChangeLog    2006/08/01 20:13:49     1.41
@@ -8,13 +8,20 @@
 
   CHANGELOG
 
- Changes between 0.9.9 and 0.9.10 (18-Feb-2005 to 03-Oct-2005):
+  Changes between 0.9.10 and 0.9.11 (03-Oct-2005 to 01-Aug-2006):
+
+   *) Replace "return 0" with the official "yyterminate()"
+      in cfg_syn_scan.l and fix quotation parsing by replacing
+      two "yytext[1]" with the intended "yytext[0]".
+      [Ralf S. Engelschall <rse@engelschall.com>]
+
+  Changes between 0.9.9 and 0.9.10 (18-Feb-2005 to 03-Oct-2005):
 
    *) Upgraded build environment to GNU libtool 1.5.20
       and GNU shtool 2.0.3
       [Ralf S. Engelschall <rse@engelschall.com>]
 
- Changes between 0.9.8 and 0.9.9 (24-Jan-2005 to 18-Feb-2005):
+  Changes between 0.9.8 and 0.9.9 (24-Jan-2005 to 18-Feb-2005):
 
    *) Add Autoconf checks for isnan() and isinf() for cfg_fmt.c
       [Thomas Lotterer <thomas@lotterer.net>]
@@ -34,7 +41,7 @@
       in case a formatting error occurs.
       [Ralf S. Engelschall <rse@engelschall.com>]
 
- Changes between 0.9.7 and 0.9.8 (19-Dec-2004 to 24-Jan-2005):
+  Changes between 0.9.7 and 0.9.8 (19-Dec-2004 to 24-Jan-2005):
 
    *) Remove debugging fprintf's from (still broken) cfg_node_select() function.
       [Ralf S. Engelschall <rse@engelschall.com>]
@@ -51,14 +58,14 @@
    *) Adjust copyright messages for new year 2005.
       [Ralf S. Engelschall <rse@engelschall.com>]
 
- Changes between 0.9.6 and 0.9.7 (04-Dec-2004 to 19-Dec-2004):
+  Changes between 0.9.6 and 0.9.7 (04-Dec-2004 to 19-Dec-2004):
 
    *) Fixed cfg_node_get() function after recent introduction
       of LOAN/GIFT/COPY  argument passing semantics. This
       unbreaks the Perl API's unpack() function.
       [Ralf S. Engelschall <rse@engelschall.com>]
 
- Changes between 0.9.5 and 0.9.6 (27-Nov-2004 to 04-Dec-2004):
+  Changes between 0.9.5 and 0.9.6 (27-Nov-2004 to 04-Dec-2004):
 
    *) Plug remaining memory leaks by introducing the usual
       LOAN/GIFT/COPY argument passing semantics to cfg_node_{set,get}
@@ -83,7 +90,7 @@
    *) Cleanup and extend buffer handling sub-library (cfg_buf.[ch])
       [Ralf S. Engelschall <rse@engelschall.com>]
 
- Changes between 0.9.4 and 0.9.5 (31-Oct-2004 to 27-Nov-2004):
+  Changes between 0.9.4 and 0.9.5 (31-Oct-2004 to 27-Nov-2004):
 
    *) Add OSSP:::cfg::simple Perl convenience API which is an
       ultra high-level API allowing especially the bi-directional
@@ -115,7 +122,7 @@
    *) Added initial cut for Perl bindings.
       [Ralf S. Engelschall <rse@engelschall.com>]
 
- Changes between 0.9.3 and 0.9.4 (23-Apr-2003 to 31-Oct-2004):
+  Changes between 0.9.3 and 0.9.4 (23-Apr-2003 to 31-Oct-2004):
 
    *) Upgrade to GNU bison 1.875d and GNU flex 2.5.31
       [Ralf S. Engelschall <rse@engelschall.com>]
@@ -130,7 +137,7 @@
       and GNU shtool 2.0.1
       [Ralf S. Engelschall <rse@engelschall.com>]
 
- Changes between 0.9.2 and 0.9.3 (10-Nov-2003 to 23-Apr-2004):
+  Changes between 0.9.2 and 0.9.3 (10-Nov-2003 to 23-Apr-2004):
 
    *) Import change introduced in OSSP l2 0.9.7:
       Replace modf(3) calls in cfg_fmt.c with a hand-crafted


ossp-pkg/cfg/cfg_syn_scan.l 1.24 -> 1.25

--- cfg_syn_scan.l       2004/12/31 19:16:25     1.24
+++ cfg_syn_scan.l       2006/08/01 20:13:49     1.25
@@ -121,7 +121,7 @@
 }
 <SS_CO_C><<EOF>> {
     cfg_syn_error(CTX, CFG_ERR_SYN, yylloc, "unterminated C-style block comment");
-    return 0;
+    yyterminate();
 }
 
     /* C++-style EOL comment */
@@ -152,17 +152,17 @@
     (void)sscanf(yytext+1, "%o", &result);
     if (result > 0xff) {
         cfg_syn_error(CTX, CFG_ERR_SYN, yylloc, "escape sequence out of bound");
-        return 0;
+        yyterminate();
     }
     cfg_buf_append(CTX->buf, NULL, 0, (char)result);
 }
 <SS_DQ>\\x\{[0-9a-fA-F]+\} {
     if (!hex_sequence(CTX, yytext+3, yyleng-3-1))
-        return 0;
+        yyterminate();
 }
 <SS_DQ>\\x[0-9a-fA-F]{2} {
     if (!hex_sequence(CTX, yytext+2, 2))
-        return 0;
+        yyterminate();
 }
 <SS_DQ>\\n { cfg_buf_append(CTX->buf, NULL, 0, '\n');   }
 <SS_DQ>\\r { cfg_buf_append(CTX->buf, NULL, 0, '\r');   }
@@ -178,11 +178,11 @@
     cfg_buf_append(CTX->buf, yytext, yyleng, 0);
 }
 <SS_DQ>(.|\n) {
-    cfg_buf_append(CTX->buf, NULL, 0, yytext[1]);
+    cfg_buf_append(CTX->buf, NULL, 0, yytext[0]);
 }
 <SS_DQ><<EOF>> {
     cfg_syn_error(CTX, CFG_ERR_SYN, yylloc, "unterminated double-quoted string");
-    return 0;
+    yyterminate();
 }
 
     /* single-quoted word ('...') */
@@ -208,11 +208,11 @@
     cfg_buf_append(CTX->buf, yytext, yyleng, 0);
 }
 <SS_SQ>(.|\n) {
-    cfg_buf_append(CTX->buf, NULL, 0, yytext[1]);
+    cfg_buf_append(CTX->buf, NULL, 0, yytext[0]);
 }
 <SS_SQ><<EOF>> {
     cfg_syn_error(CTX, CFG_ERR_SYN, yylloc, "unterminated single-quoted string");
-    return 0;
+    yyterminate();
 }
 
     /* flexible-quoted word (q(.)[^\1]\1) */
@@ -252,7 +252,7 @@
 }
 <SS_FQ><<EOF>> {
     cfg_syn_error(CTX, CFG_ERR_SYN, yylloc, "unterminated flexible-quoted string");
-    return 0;
+    yyterminate();
 }
 
    /* special tokens */

CVSTrac 2.0.1