Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/flex/dist regen



details:   https://anonhg.NetBSD.org/src/rev/b9c6c70d6a26
branches:  trunk
changeset: 748642:b9c6c70d6a26
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Oct 29 14:49:40 2009 +0000

description:
regen

diffstat:

 external/bsd/flex/dist/initscan.c |  555 +++++++++++++++++++------------------
 1 files changed, 284 insertions(+), 271 deletions(-)

diffs (truncated from 1919 to 300 lines):

diff -r 417162a4bab9 -r b9c6c70d6a26 external/bsd/flex/dist/initscan.c
--- a/external/bsd/flex/dist/initscan.c Thu Oct 29 14:49:02 2009 +0000
+++ b/external/bsd/flex/dist/initscan.c Thu Oct 29 14:49:40 2009 +0000
@@ -1,5 +1,5 @@
 
-#line 3 "scan.c"
+#line 3 "<stdout>"
 
 #define  YY_INT_ALIGNED short int
 
@@ -26,6 +26,8 @@
 
 /* end standard C headers. */
 
+/*     $NetBSD: initscan.c,v 1.4 2009/10/29 14:49:40 christos Exp $    */
+
 /* flex integer type definitions */
 
 #ifndef FLEXINT_H
@@ -1874,9 +1876,10 @@
 #define YY_MORE_ADJ (yy_more_len)
 #define YY_RESTORE_YY_MORE_OFFSET
 char *yytext;
-#line 1 "scan.l"
+#line 1 "/usr/src/external/bsd/flex/dist/scan.l"
+/*     $NetBSD: initscan.c,v 1.4 2009/10/29 14:49:40 christos Exp $    */
 /* scan.l - scanner for flex input -*-C-*- */
-#line 4 "scan.l"
+#line 6 "/usr/src/external/bsd/flex/dist/scan.l"
 /*  Copyright (c) 1990 The Regents of the University of California. */
 /*  All rights reserved. */
 
@@ -1944,7 +1947,7 @@
 #define RETURNNAME \
        if(yyleng < MAXLINE) \
          { \
-       strcpy( nmstr, yytext ); \
+       strlcpy( nmstr, yytext, sizeof(nmstr) ); \
         } \
        else \
         { \
@@ -1976,7 +1979,7 @@
 
 
 
-#line 1977 "scan.c"
+#line 1983 "<stdout>"
 
 #define INITIAL 0
 #define SECT2 1
@@ -2058,8 +2061,12 @@
 #endif
 #endif
 
+#ifndef YY_NO_UNPUT
+    
     static void yyunput (int c,char *buf_ptr  );
     
+#endif
+
 #ifndef yytext_ptr
 static void yy_flex_strncpy (char *,yyconst char *,int );
 #endif
@@ -2107,7 +2114,7 @@
        if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
                { \
                int c = '*'; \
-               int n; \
+               size_t n; \
                for ( n = 0; n < max_size && \
                             (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
                        buf[n] = (char) c; \
@@ -2192,7 +2199,7 @@
        register char *yy_cp, *yy_bp;
        register int yy_act;
     
-#line 131 "scan.l"
+#line 133 "/usr/src/external/bsd/flex/dist/scan.l"
 
        static int bracelevel, didadef, indented_code;
        static int doing_rule_action = false;
@@ -2203,7 +2210,7 @@
        Char nmdef[MAXLINE];
 
 
-#line 2204 "scan.c"
+#line 2214 "<stdout>"
 
        if ( !(yy_init) )
                {
@@ -2280,7 +2287,9 @@
 yy_find_action:
                yy_current_state = *--(yy_state_ptr);
                (yy_lp) = yy_accept[yy_current_state];
+#ifdef YY_USES_REJECT
 find_rule: /* we branch to this label when backing up */
+#endif
                for ( ; ; ) /* until we find what rule we matched */
                        {
                        if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
@@ -2305,33 +2314,33 @@
 
 case 1:
 YY_RULE_SETUP
-#line 142 "scan.l"
+#line 144 "/usr/src/external/bsd/flex/dist/scan.l"
 indented_code = true; BEGIN(CODEBLOCK);
        YY_BREAK
 case 2:
 YY_RULE_SETUP
-#line 143 "scan.l"
+#line 145 "/usr/src/external/bsd/flex/dist/scan.l"
 ACTION_ECHO; yy_push_state( COMMENT );
        YY_BREAK
 case 3:
 YY_RULE_SETUP
-#line 144 "scan.l"
+#line 146 "/usr/src/external/bsd/flex/dist/scan.l"
 yy_push_state( LINEDIR );
        YY_BREAK
 case 4:
 YY_RULE_SETUP
-#line 145 "scan.l"
+#line 147 "/usr/src/external/bsd/flex/dist/scan.l"
 return SCDECL;
        YY_BREAK
 case 5:
 YY_RULE_SETUP
-#line 146 "scan.l"
+#line 148 "/usr/src/external/bsd/flex/dist/scan.l"
 return XSCDECL;
        YY_BREAK
 case 6:
 /* rule 6 can match eol */
 YY_RULE_SETUP
-#line 147 "scan.l"
+#line 149 "/usr/src/external/bsd/flex/dist/scan.l"
 {
                        ++linenum;
                        line_directive_out( (FILE *) 0, 1 );
@@ -2342,7 +2351,7 @@
 case 7:
 /* rule 7 can match eol */
 YY_RULE_SETUP
-#line 153 "scan.l"
+#line 155 "/usr/src/external/bsd/flex/dist/scan.l"
 {
                 brace_start_line = linenum;
                 ++linenum;
@@ -2353,17 +2362,17 @@
        YY_BREAK
 case 8:
 YY_RULE_SETUP
-#line 161 "scan.l"
+#line 163 "/usr/src/external/bsd/flex/dist/scan.l"
 synerr( _("malformed '%top' directive") );
        YY_BREAK
 case 9:
 YY_RULE_SETUP
-#line 163 "scan.l"
+#line 165 "/usr/src/external/bsd/flex/dist/scan.l"
 /* discard */
        YY_BREAK
 case 10:
 YY_RULE_SETUP
-#line 165 "scan.l"
+#line 167 "/usr/src/external/bsd/flex/dist/scan.l"
 {
                        sectnum = 2;
                        bracelevel = 0;
@@ -2376,46 +2385,46 @@
 case 11:
 /* rule 11 can match eol */
 YY_RULE_SETUP
-#line 174 "scan.l"
+#line 176 "/usr/src/external/bsd/flex/dist/scan.l"
 yytext_is_array = false; ++linenum;
        YY_BREAK
 case 12:
 /* rule 12 can match eol */
 YY_RULE_SETUP
-#line 175 "scan.l"
+#line 177 "/usr/src/external/bsd/flex/dist/scan.l"
 yytext_is_array = true; ++linenum;
        YY_BREAK
 case 13:
 YY_RULE_SETUP
-#line 177 "scan.l"
+#line 179 "/usr/src/external/bsd/flex/dist/scan.l"
 BEGIN(OPTION); return OPTION_OP;
        YY_BREAK
 case 14:
 /* rule 14 can match eol */
 YY_RULE_SETUP
-#line 179 "scan.l"
+#line 181 "/usr/src/external/bsd/flex/dist/scan.l"
 ++linenum; /* ignore */
        YY_BREAK
 case 15:
 /* rule 15 can match eol */
 YY_RULE_SETUP
-#line 180 "scan.l"
+#line 182 "/usr/src/external/bsd/flex/dist/scan.l"
 ++linenum;     /* ignore */
        YY_BREAK
 /* xgettext: no-c-format */
 case 16:
 /* rule 16 can match eol */
 YY_RULE_SETUP
-#line 183 "scan.l"
+#line 185 "/usr/src/external/bsd/flex/dist/scan.l"
 synerr( _( "unrecognized '%' directive" ) );
        YY_BREAK
 case 17:
 YY_RULE_SETUP
-#line 185 "scan.l"
+#line 187 "/usr/src/external/bsd/flex/dist/scan.l"
 {
                        if(yyleng < MAXLINE)
                         {
-                       strcpy( nmstr, yytext );
+                       strlcpy( nmstr, yytext, sizeof(nmstr) );
                         }
                        else
                         {
@@ -2429,52 +2438,52 @@
        YY_BREAK
 case 18:
 YY_RULE_SETUP
-#line 200 "scan.l"
+#line 202 "/usr/src/external/bsd/flex/dist/scan.l"
 RETURNNAME;
        YY_BREAK
 case 19:
 /* rule 19 can match eol */
 YY_RULE_SETUP
-#line 201 "scan.l"
+#line 203 "/usr/src/external/bsd/flex/dist/scan.l"
 ++linenum; /* allows blank lines in section 1 */
        YY_BREAK
 case 20:
 /* rule 20 can match eol */
 YY_RULE_SETUP
-#line 202 "scan.l"
+#line 204 "/usr/src/external/bsd/flex/dist/scan.l"
 ACTION_ECHO; ++linenum; /* maybe end of comment line */
        YY_BREAK
 
 
 case 21:
 YY_RULE_SETUP
-#line 207 "scan.l"
+#line 209 "/usr/src/external/bsd/flex/dist/scan.l"
 ACTION_ECHO; yy_pop_state();
        YY_BREAK
 case 22:
 YY_RULE_SETUP
-#line 208 "scan.l"
+#line 210 "/usr/src/external/bsd/flex/dist/scan.l"
 ACTION_ECHO;
        YY_BREAK
 case 23:
 YY_RULE_SETUP
-#line 209 "scan.l"
+#line 211 "/usr/src/external/bsd/flex/dist/scan.l"
 ACTION_ECHO_QSTART;
        YY_BREAK
 case 24:
 YY_RULE_SETUP
-#line 210 "scan.l"
+#line 212 "/usr/src/external/bsd/flex/dist/scan.l"
 ACTION_ECHO_QEND;
        YY_BREAK
 case 25:
 YY_RULE_SETUP
-#line 211 "scan.l"
+#line 213 "/usr/src/external/bsd/flex/dist/scan.l"
 ACTION_ECHO;
        YY_BREAK
 case 26:
 /* rule 26 can match eol */
 YY_RULE_SETUP
-#line 212 "scan.l"
+#line 214 "/usr/src/external/bsd/flex/dist/scan.l"
 ++linenum; ACTION_ECHO;
        YY_BREAK
 
@@ -2482,41 +2491,41 @@
 /* This is the same as COMMENT, but is discarded rather than output. */
 case 27:
 YY_RULE_SETUP
-#line 217 "scan.l"
+#line 219 "/usr/src/external/bsd/flex/dist/scan.l"
 yy_pop_state();
        YY_BREAK
 case 28:
 YY_RULE_SETUP
-#line 218 "scan.l"
+#line 220 "/usr/src/external/bsd/flex/dist/scan.l"
 ;



Home | Main Index | Thread Index | Old Index