]> granicus.if.org Git - flex/commitdiff
scanner: remove trailing whitespace in skeleton
authorAlexis La Goutte <alexis.lagoutte@gmail.com>
Mon, 19 Dec 2016 08:31:18 +0000 (09:31 +0100)
committerWill Estes <westes575@gmail.com>
Thu, 29 Dec 2016 20:11:11 +0000 (15:11 -0500)
src/flex.skl

index 9261f3caf0990d5ee3c994f0eb5b6f150f3bd60b..4ae3f4c1e954b45325e6bdc23f83739ba479eccd 100644 (file)
 %#      through m4. Macros beginning with `m4_' will be processed.
 %#      The quoting is "[[" and "]]" so we don't interfere with
 %#      user code.
-%# 
+%#
 %# All generate macros for the m4 stage contain the text "m4" or "M4"
 %# in them. This is to distinguish them from CPP macros.
-%# The exception to this rule is YY_G, which is an m4 macro, 
+%# The exception to this rule is YY_G, which is an m4 macro,
 %# but it needs to be remain short because it is used everywhere.
 %#
 /* A lexical scanner generated by flex */
@@ -29,7 +29,7 @@ m4_changecom
 m4_changequote
 m4_changequote([[, ]])
 
-%# 
+%#
 %# Lines in this skeleton starting with a "%" character are "control lines"
 %# and affect the generation of the scanner. The possible control codes are
 %# listed and processed in misc.c.
@@ -216,7 +216,7 @@ m4preproc_include(`flexint.h')
 
 %if-c++-only
 /* begin standard C++ headers. */
-#include <iostream> 
+#include <iostream>
 #include <errno.h>
 #include <cstdlib>
 #include <cstdio>
@@ -289,7 +289,7 @@ m4_define( [[M4_YY_DOC_PARAM]], [[@param yyscanner The scanner object.]])
 #define yy_flex_debug YY_G(yy_flex_debug_r)
 
 m4_define( [[M4_YY_INCR_LINENO]],
-[[   
+[[
     do{ yylineno++;
         yycolumn=0;
     }while(0)
@@ -302,7 +302,7 @@ m4_define( [[M4_YY_INCR_LINENO]],
 %if-not-reentrant
 
 m4_define( [[M4_YY_INCR_LINENO]],
-[[   
+[[
     yylineno++;
 ]])
 
@@ -398,7 +398,7 @@ m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
     [[
     /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires
      *       access to the local variable yy_act. Since yyless() is a macro, it would break
-     *       existing scanners that call yyless() from OUTSIDE yylex. 
+     *       existing scanners that call yyless() from OUTSIDE yylex.
      *       One obvious solution it to make yy_act a global. I tried that, and saw
      *       a 5% performance hit in a non-yylineno scanner, because yy_act is
      *       normally declared as a register variable-- so it is not worth it.
@@ -447,7 +447,7 @@ struct yy_buffer_state
 %endif
 
 %if-c++-only
-       std::streambuf* yy_input_file; 
+       std::streambuf* yy_input_file;
 %endif
 
 
@@ -485,7 +485,7 @@ struct yy_buffer_state
 
     int yy_bs_lineno; /**< The line count. */
     int yy_bs_column; /**< The column count. */
-    
+
 
        /* Whether to try to fill the input buffer when we reach the
         * end of it.
@@ -1055,7 +1055,7 @@ int yytables_destroy (M4_YY_PROTO_ONLY_ARG);
 
 /** Describes a mapping from a serialized table id to its deserialized state in
  * this scanner.  This is the bridge between our "generic" deserialization code
- * and the specifics of this scanner. 
+ * and the specifics of this scanner.
  */
 struct yytbl_dmap {
        enum yytbl_id dm_id;/**< table identifier */
@@ -2220,10 +2220,10 @@ void yyFlexLexer::yyensure_buffer_stack(void)
                                                                M4_YY_CALL_LAST_ARG);
                if ( ! YY_G(yy_buffer_stack) )
                        YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
-                                                                 
-               
+
+
                memset(YY_G(yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-                               
+
                YY_G(yy_buffer_stack_max) = num_to_alloc;
                YY_G(yy_buffer_stack_top) = 0;
                return;
@@ -2259,7 +2259,7 @@ m4_ifdef( [[M4_YY_NO_SCAN_BUFFER]],,
  * @param base the character buffer
  * @param size the size in bytes of the character buffer
  * M4_YY_DOC_PARAM
- * @return the newly allocated buffer state object. 
+ * @return the newly allocated buffer state object.
  */
 YY_BUFFER_STATE yy_scan_buffer  YYFARGS2( char *,base, yy_size_t ,size)
 {
@@ -2492,7 +2492,7 @@ m4_ifdef( [[M4_YY_NO_GET_LINENO]],,
 int yyget_lineno  (M4_YY_DEF_ONLY_ARG)
 {
     M4_YY_DECL_GUTS_VAR();
-    
+
     m4_ifdef( [[M4_YY_REENTRANT]],
     [[
         if (! YY_CURRENT_BUFFER)
@@ -2512,7 +2512,7 @@ m4_ifdef( [[M4_YY_NO_GET_COLUMN]],,
 int yyget_column  (M4_YY_DEF_ONLY_ARG)
 {
     M4_YY_DECL_GUTS_VAR();
-    
+
     m4_ifdef( [[M4_YY_REENTRANT]],
     [[
         if (! YY_CURRENT_BUFFER)
@@ -2764,20 +2764,20 @@ int yylex_init_extra( YY_EXTRA_TYPE yy_user_defined, yyscan_t* ptr_yy_globals )
         errno = EINVAL;
         return 1;
     }
-       
+
     *ptr_yy_globals = (yyscan_t) yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
-       
+
     if (*ptr_yy_globals == NULL){
         errno = ENOMEM;
         return 1;
     }
-    
+
     /* By setting to 0xAA, we expose bugs in
     yy_init_globals. Leave at 0x00 for releases. */
     memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
-    
+
     yyset_extra (yy_user_defined, *ptr_yy_globals);
-    
+
     return yy_init_globals ( *ptr_yy_globals );
 }
 
@@ -3065,7 +3065,7 @@ static struct yytbl_dmap *yytbl_dmap_lookup YYFARGS2(struct yytbl_dmap *, dmap,
     return NULL;
 }
 
-/** Read a table while mapping its contents to the local array. 
+/** Read a table while mapping its contents to the local array.
  *  @param dmap used to performing mapping
  *  @return 0 on success
  */
@@ -3110,7 +3110,7 @@ static int yytbl_data_load YYFARGS2(struct yytbl_dmap *, dmap, struct yytbl_read
 
     if(M4_YY_TABLES_VERIFY)
         /* We point to the array itself */
-        p = dmap->dm_arr; 
+        p = dmap->dm_arr;
     else
         /* We point to the address of a pointer. */
         *dmap->dm_arr = p = (void *) yyalloc (bytes M4_YY_CALL_LAST_ARG);
@@ -3157,7 +3157,7 @@ static int yytbl_data_load YYFARGS2(struct yytbl_dmap *, dmap, struct yytbl_read
                 rv = yytbl_read8 (&t8, rd);
                 t32 = t8;
                 break;
-            default: 
+            default:
                 YY_FATAL_ERROR( "invalid td_flags" );   /* TODO: not fatal. */
                 return -1;
             }
@@ -3214,7 +3214,7 @@ static int yytbl_data_load YYFARGS2(struct yytbl_dmap *, dmap, struct yytbl_read
                     YY_FATAL_ERROR( "transition table not found" );   /* TODO: not fatal. */
                     return -1;
                 }
-                
+
                 if( M4_YY_TABLES_VERIFY)
                     v = &(((struct yy_trans_info *) (transdmap->dm_arr))[t32]);
                 else
@@ -3225,7 +3225,7 @@ static int yytbl_data_load YYFARGS2(struct yytbl_dmap *, dmap, struct yytbl_read
                         YY_FATAL_ERROR( "tables verification failed at YYTD_PTRANS" );
                 }else
                     ((struct yy_trans_info **) p)[0] = v;
-                
+
                 /* increment p */
                 p = (struct yy_trans_info **) p + 1;
             }
@@ -3341,7 +3341,7 @@ int yytables_fload YYFARGS1(FILE *, fp)
 
 /** Destroy the loaded tables, freeing memory, etc.. */
 int yytables_destroy (M4_YY_DEF_ONLY_ARG)
-{   
+{
     struct yytbl_dmap *dmap=0;
 
     if(!M4_YY_TABLES_VERIFY){