summaryrefslogtreecommitdiff
path: root/flex.skl
diff options
context:
space:
mode:
Diffstat (limited to 'flex.skl')
-rw-r--r--flex.skl55
1 files changed, 36 insertions, 19 deletions
diff --git a/flex.skl b/flex.skl
index ae96514..4ed8ff2 100644
--- a/flex.skl
+++ b/flex.skl
@@ -1,6 +1,23 @@
/* -*-C-*- */
/* A lexical scanner generated by flex */
+%# Lines in this skeleton starting with a '%' character are "control lines"
+%# and affect the generation of the scanner. The possible control codes are:
+%#
+%# %# - A comment. The current line is ommited from the generated scanner.
+%# %+ - The following lines are printed for C++ scanners ONLY.
+%# %- - The following lines are NOT printed for C++ scanners.
+%# %* - The following lines are printed in BOTH C and C++ scanners.
+%# %% - A stop-point, where code is inserted by flex.
+%# Each stop-point is numbered here and also in the code generator.
+%# (See gen.c, etc. for details.)
+%# %c - Begin linkage code that should NOT appear in a ".h" file.
+%# %e - End linkage code. %c and %e are used
+%#
+%# All control-lines EXCEPT comment lines ("%#") will be inserted into
+%# the generated scanner as a C-style comment. This is to aid those who
+%# edit the skeleton.
+%#
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
@@ -336,7 +353,7 @@ static void yy_flex_free YY_PROTO(( void * YY_LAST_ARG ));
#define YY_AT_BOL() (YY_G(yy_current_buffer)->yy_at_bol)
-%% yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here
+%% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here
%- Standard (non-C++) definition
%c
@@ -352,16 +369,16 @@ static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
*/
#define YY_DO_BEFORE_ACTION \
yytext_ptr = yy_bp; \
-%% code to fiddle yytext and yyleng for yymore() goes here \
+%% [2.0] code to fiddle yytext and yyleng for yymore() goes here \
YY_G(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
-%% code to copy yytext_ptr to yytext[] goes here, if %array \
+%% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \
YY_G(yy_c_buf_p) = yy_cp;
%*
%c
-%% data tables for the DFA and the user's section 1 definitions go here
+%% [4.0] data tables for the DFA and the user's section 1 definitions go here
%e
#ifndef YY_EXTRA_TYPE
@@ -589,7 +606,7 @@ YY_MALLOC_DECL
*/
#ifndef YY_INPUT
#define YY_INPUT(buf,result,max_size) \
-%% fread()/read() definition of YY_INPUT goes here unless we're doing C++ \
+%% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \
%+ C++ definition \
if ( (result = LexerInput( (char *) buf, max_size )) < 0 ) \
YY_FATAL_ERROR( "input in flex scanner failed" );
@@ -672,7 +689,7 @@ extern int yylex YY_PROTO( YY_LEX_ARGS );
#define YY_BREAK break;
#endif
-%% YY_RULE_SETUP definition goes here
+%% [6.0] YY_RULE_SETUP definition goes here
%c
YY_DECL
@@ -681,7 +698,7 @@ YY_DECL
register char *yy_cp, *yy_bp;
register int yy_act;
-%% user's declarations go here
+%% [7.0] user's declarations go here
#ifdef YY_REENTRANT_BISON_PURE
YY_G(yylval) = yylvalp;
@@ -724,7 +741,7 @@ YY_DECL
while ( 1 ) /* loops until end-of-file is reached */
{
-%% yymore()-related code goes here
+%% [8.0] yymore()-related code goes here
yy_cp = YY_G(yy_c_buf_p);
/* Support of yytext. */
@@ -735,22 +752,22 @@ YY_DECL
*/
yy_bp = yy_cp;
-%% code to set up and find next match goes here
+%% [9.0] code to set up and find next match goes here
yy_find_action:
-%% code to find the action number goes here
+%% [10.0] code to find the action number goes here
YY_DO_BEFORE_ACTION;
-%% code for yylineno update goes here
+%% [11.0] code for yylineno update goes here
do_action: /* This label is used only to access EOF actions. */
-%% debug code goes here
+%% [12.0] debug code goes here
switch ( yy_act )
{ /* beginning of action switch */
-%% actions go here
+%% [13.0] actions go here
case YY_END_OF_BUFFER:
{
@@ -815,7 +832,7 @@ do_action: /* This label is used only to access EOF actions. */
else
{
-%% code to do back-up for compressed tables and set up yy_cp goes here
+%% [14.0] code to do back-up for compressed tables and set up yy_cp goes here
goto yy_find_action;
}
}
@@ -1133,11 +1150,11 @@ yy_state_type yyFlexLexer::yy_get_previous_state()
register yy_state_type yy_current_state;
register char *yy_cp;
-%% code to get the start state into yy_current_state goes here
+%% [15.0] code to get the start state into yy_current_state goes here
for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < YY_G(yy_c_buf_p); ++yy_cp )
{
-%% code to find the next state goes here
+%% [16.0] code to find the next state goes here
}
return yy_current_state;
@@ -1163,7 +1180,7 @@ yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )
%*
{
register int yy_is_jam;
-%% code to find the next state, and perhaps do backing up, goes here
+%% [17.0] code to find the next state, and perhaps do backing up, goes here
return yy_is_jam ? 0 : yy_current_state;
}
@@ -1211,7 +1228,7 @@ void yyFlexLexer::yyunput( int c, register char* yy_bp YY_LAST_ARG)
*--yy_cp = (char) c;
-%% update yylineno here
+%% [18.0] update yylineno here
yytext_ptr = yy_bp;
YY_G(yy_hold_char) = *yy_cp;
@@ -1300,7 +1317,7 @@ int yyFlexLexer::yyinput()
*YY_G(yy_c_buf_p) = '\0'; /* preserve yytext */
YY_G(yy_hold_char) = *++YY_G(yy_c_buf_p);
-%% update BOL and yylineno
+%% [19.0] update BOL and yylineno
return c;
}