Commit 96de824e by Jamie Madill Committed by Shannon Woods

Lexer does not need a state stack now that it does not handle comments.

TRAC #23158 Signed-off-by: Nicolas Capens Merged-by: Jamie Madill Authored-by: alokp@chromium.org git-svn-url: https://code.google.com/p/angleproject/source/detail?r=2193 Review URL: https://codereview.appspot.com/8983043
parent 78eb5dfb
...@@ -63,7 +63,6 @@ static int floatsuffix_check(TParseContext* context); ...@@ -63,7 +63,6 @@ static int floatsuffix_check(TParseContext* context);
%option noyywrap nounput never-interactive %option noyywrap nounput never-interactive
%option yylineno reentrant bison-bridge %option yylineno reentrant bison-bridge
%option stack
%option extra-type="TParseContext*" %option extra-type="TParseContext*"
%x FIELDS %x FIELDS
......
...@@ -1120,12 +1120,6 @@ static int input (yyscan_t yyscanner ); ...@@ -1120,12 +1120,6 @@ static int input (yyscan_t yyscanner );
#endif #endif
static void yy_push_state (int new_state ,yyscan_t yyscanner);
static void yy_pop_state (yyscan_t yyscanner );
static int yy_top_state (yyscan_t yyscanner );
/* Amount of stuff to slurp up with each read. */ /* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE #ifndef YY_READ_BUF_SIZE
#define YY_READ_BUF_SIZE 8192 #define YY_READ_BUF_SIZE 8192
...@@ -2750,46 +2744,6 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ...@@ -2750,46 +2744,6 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len
return b; return b;
} }
static void yy_push_state (int new_state , yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if ( yyg->yy_start_stack_ptr >= yyg->yy_start_stack_depth )
{
yy_size_t new_size;
yyg->yy_start_stack_depth += YY_START_STACK_INCR;
new_size = yyg->yy_start_stack_depth * sizeof( int );
if ( ! yyg->yy_start_stack )
yyg->yy_start_stack = (int *) yyalloc(new_size ,yyscanner );
else
yyg->yy_start_stack = (int *) yyrealloc((void *) yyg->yy_start_stack,new_size ,yyscanner );
if ( ! yyg->yy_start_stack )
YY_FATAL_ERROR( "out of memory expanding start-condition stack" );
}
yyg->yy_start_stack[yyg->yy_start_stack_ptr++] = YY_START;
BEGIN(new_state);
}
static void yy_pop_state (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
if ( --yyg->yy_start_stack_ptr < 0 )
YY_FATAL_ERROR( "start-condition stack underflow" );
BEGIN(yyg->yy_start_stack[yyg->yy_start_stack_ptr]);
}
static int yy_top_state (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
return yyg->yy_start_stack[yyg->yy_start_stack_ptr - 1];
}
#ifndef YY_EXIT_FAILURE #ifndef YY_EXIT_FAILURE
#define YY_EXIT_FAILURE 2 #define YY_EXIT_FAILURE 2
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment