Changeset View
Changeset View
Standalone View
Standalone View
usr.bin/lex/initscan.c
/* $FreeBSD$ */ | |||||
#line 2 "<stdout>" | #line 2 "<stdout>" | ||||
#define YY_INT_ALIGNED short int | #define YY_INT_ALIGNED short int | ||||
/* A lexical scanner generated by flex */ | /* A lexical scanner generated by flex */ | ||||
#define FLEX_SCANNER | #define FLEX_SCANNER | ||||
#define YY_FLEX_MAJOR_VERSION 2 | #define YY_FLEX_MAJOR_VERSION 2 | ||||
#define YY_FLEX_MINOR_VERSION 6 | #define YY_FLEX_MINOR_VERSION 6 | ||||
#define YY_FLEX_SUBMINOR_VERSION 4 | #define YY_FLEX_SUBMINOR_VERSION 4 | ||||
#if YY_FLEX_SUBMINOR_VERSION > 0 | #if YY_FLEX_SUBMINOR_VERSION > 0 | ||||
#define FLEX_BETA | #define FLEX_BETA | ||||
#endif | #endif | ||||
/* First, we deal with platform-specific or compiler-specific issues. */ | /* First, we deal with platform-specific or compiler-specific issues. */ | ||||
#if defined(__FreeBSD__) | |||||
#include <sys/cdefs.h> | |||||
#else | |||||
#define __dead2 | |||||
#endif | |||||
/* begin standard C headers. */ | /* begin standard C headers. */ | ||||
#include <stdio.h> | #include <stdio.h> | ||||
#include <string.h> | #include <string.h> | ||||
#include <errno.h> | #include <errno.h> | ||||
#include <stdlib.h> | #include <stdlib.h> | ||||
/* end standard C headers. */ | /* end standard C headers. */ | ||||
▲ Show 20 Lines • Show All 311 Lines • ▼ Show 20 Lines | |||||
#ifdef yytext_ptr | #ifdef yytext_ptr | ||||
#undef yytext_ptr | #undef yytext_ptr | ||||
#endif | #endif | ||||
#define yytext_ptr yytext | #define yytext_ptr yytext | ||||
static yy_state_type yy_get_previous_state ( void ); | static yy_state_type yy_get_previous_state ( void ); | ||||
static yy_state_type yy_try_NUL_trans ( yy_state_type current_state ); | static yy_state_type yy_try_NUL_trans ( yy_state_type current_state ); | ||||
static int yy_get_next_buffer ( void ); | static int yy_get_next_buffer ( void ); | ||||
static void yynoreturn yy_fatal_error ( const char* msg ) __dead2; | static void yynoreturn yy_fatal_error ( const char* msg ); | ||||
/* Done after the current pattern has been matched and before the | /* Done after the current pattern has been matched and before the | ||||
* corresponding action - sets up yytext. | * corresponding action - sets up yytext. | ||||
*/ | */ | ||||
#define YY_DO_BEFORE_ACTION \ | #define YY_DO_BEFORE_ACTION \ | ||||
(yytext_ptr) = yy_bp; \ | (yytext_ptr) = yy_bp; \ | ||||
yyleng = (int) (yy_cp - yy_bp); \ | yyleng = (int) (yy_cp - yy_bp); \ | ||||
(yy_hold_char) = *yy_cp; \ | (yy_hold_char) = *yy_cp; \ | ||||
▲ Show 20 Lines • Show All 1,606 Lines • ▼ Show 20 Lines | |||||
} while(0) | } while(0) | ||||
#define END_CODEBLOCK do { \ | #define END_CODEBLOCK do { \ | ||||
yy_pop_state();\ | yy_pop_state();\ | ||||
add_action(M4QEND); \ | add_action(M4QEND); \ | ||||
if (!indented_code) line_directive_out(NULL, 0);\ | if (!indented_code) line_directive_out(NULL, 0);\ | ||||
} while (0) | } while (0) | ||||
#line 1974 "<stdout>" | #line 1968 "<stdout>" | ||||
#line 1976 "<stdout>" | #line 1970 "<stdout>" | ||||
#define INITIAL 0 | #define INITIAL 0 | ||||
#define SECT2 1 | #define SECT2 1 | ||||
#define SECT2PROLOG 2 | #define SECT2PROLOG 2 | ||||
#define SECT3 3 | #define SECT3 3 | ||||
#define CODEBLOCK 4 | #define CODEBLOCK 4 | ||||
#define PICKUPDEF 5 | #define PICKUPDEF 5 | ||||
#define SC 6 | #define SC 6 | ||||
▲ Show 20 Lines • Show All 249 Lines • ▼ Show 20 Lines | #line 161 "scan.l" | ||||
static int doing_rule_action = false; | static int doing_rule_action = false; | ||||
static int option_sense; | static int option_sense; | ||||
int doing_codeblock = false; | int doing_codeblock = false; | ||||
int brace_depth=0, brace_start_line=0; | int brace_depth=0, brace_start_line=0; | ||||
char nmdef[MAXLINE]; | char nmdef[MAXLINE]; | ||||
#line 2242 "<stdout>" | #line 2236 "<stdout>" | ||||
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ | while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ | ||||
{ | { | ||||
yy_cp = (yy_c_buf_p); | yy_cp = (yy_c_buf_p); | ||||
/* Support of yytext. */ | /* Support of yytext. */ | ||||
*yy_cp = (yy_hold_char); | *yy_cp = (yy_hold_char); | ||||
▲ Show 20 Lines • Show All 1,884 Lines • ▼ Show 20 Lines | |||||
#line 1012 "scan.l" | #line 1012 "scan.l" | ||||
format_synerr( _( "bad character: %s" ), yytext ); | format_synerr( _( "bad character: %s" ), yytext ); | ||||
YY_BREAK | YY_BREAK | ||||
case 253: | case 253: | ||||
YY_RULE_SETUP | YY_RULE_SETUP | ||||
#line 1014 "scan.l" | #line 1014 "scan.l" | ||||
YY_FATAL_ERROR( "flex scanner jammed" ); | YY_FATAL_ERROR( "flex scanner jammed" ); | ||||
YY_BREAK | YY_BREAK | ||||
#line 4143 "<stdout>" | #line 4137 "<stdout>" | ||||
case YY_STATE_EOF(INITIAL): | case YY_STATE_EOF(INITIAL): | ||||
case YY_STATE_EOF(SECT2): | case YY_STATE_EOF(SECT2): | ||||
case YY_STATE_EOF(CODEBLOCK): | case YY_STATE_EOF(CODEBLOCK): | ||||
case YY_STATE_EOF(PICKUPDEF): | case YY_STATE_EOF(PICKUPDEF): | ||||
case YY_STATE_EOF(SC): | case YY_STATE_EOF(SC): | ||||
case YY_STATE_EOF(CARETISBOL): | case YY_STATE_EOF(CARETISBOL): | ||||
case YY_STATE_EOF(NUM): | case YY_STATE_EOF(NUM): | ||||
case YY_STATE_EOF(QUOTE): | case YY_STATE_EOF(QUOTE): | ||||
▲ Show 20 Lines • Show All 1,092 Lines • Show Last 20 Lines |