SlideShare a Scribd company logo
1 of 18
FlexLexer.h
// -*-C++-*-
// FlexLexer.h -- define interfaces for lexical analyzer classes
generated
// by flex
// Copyright (c) 1993 The Regents of the University of
California.
// All rights reserved.
//
// This code is derived from software contributed to Berkeley by
// Kent Williams and Tom Epperly.
//
// Redistribution and use in source and binary forms, with or
without
// modification, are permitted provided that the following
conditions
// are met:
// 1. Redistributions of source code must retain the above
copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above
copyright
// notice, this list of conditions and the following disclaimer in
the
// documentation and/or other materials provided with the
distribution.
// Neither the name of the University nor the names of its
contributors
// may be used to endorse or promote products derived from
this software
// without specific prior written permission.
// THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT
ANY EXPRESS OR
// IMPLIED WARRANTIES, INCLUDING, WITHOUT
LIMITATION, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR
// PURPOSE.
// This file defines FlexLexer, an abstract class which specifies
the
// external interface provided to flex C++ lexer objects, and
yyFlexLexer,
// which defines a particular lexer class.
//
// If you want to create multiple lexer classes, you use the -P
flag
// to rename each yyFlexLexer to some other xxFlexLexer. You
then
// include <FlexLexer.h> in your other sources once per lexer
class:
//
// #undef yyFlexLexer
// #define yyFlexLexer xxFlexLexer
// #include <FlexLexer.h>
//
// #undef yyFlexLexer
// #define yyFlexLexer zzFlexLexer
// #include <FlexLexer.h>
// ...
#ifndef __FLEX_LEXER_H
// Never included before - need to define base class.
#define __FLEX_LEXER_H
#include <iostream>
extern "C++" {
struct yy_buffer_state;
typedef int yy_state_type;
class FlexLexer
{
public:
virtual ~FlexLexer() { }
const char* YYText() const { return yytext; }
int YYLeng() const { return yyleng; }
virtual void
yy_switch_to_buffer( yy_buffer_state* new_buffer ) = 0;
virtual yy_buffer_state* yy_create_buffer( std::istream* s, int
size ) = 0;
virtual yy_buffer_state* yy_create_buffer( std::istream& s, int
size ) = 0;
virtual void yy_delete_buffer( yy_buffer_state* b ) = 0;
virtual void yyrestart( std::istream* s ) = 0;
virtual void yyrestart( std::istream& s ) = 0;
virtual int yylex() = 0;
// Call yylex with new input/output sources.
int yylex( std::istream& new_in, std::ostream& new_out )
{
switch_streams( new_in, new_out );
return yylex();
}
int yylex( std::istream* new_in, std::ostream* new_out = 0)
{
switch_streams( new_in, new_out );
return yylex();
}
// Switch to new input/output streams. A nil stream pointer
// indicates "keep the current one".
virtual void switch_streams( std::istream* new_in,
std::ostream* new_out ) = 0;
virtual void switch_streams( std::istream& new_in,
std::ostream& new_out ) = 0;
int lineno() const { return yylineno; }
int debug() const { return yy_flex_debug; }
void set_debug( int flag ) { yy_flex_debug = flag; }
protected:
char* yytext;
int yyleng;
int yylineno; // only maintained if you use %option
yylineno
int yy_flex_debug; // only has effect with -d or "%option
debug"
};
}
#endif // FLEXLEXER_H
#if defined(yyFlexLexer) || ! defined(yyFlexLexerOnce)
// Either this is the first time through (yyFlexLexerOnce not
defined),
// or this is a repeated include to define a different flavor of
// yyFlexLexer, as discussed in the flex manual.
# define yyFlexLexerOnce
extern "C++" {
class yyFlexLexer : public FlexLexer {
public:
// arg_yyin and arg_yyout default to the cin and cout, but we
// only make that assignment when initializing in yylex().
yyFlexLexer( std::istream& arg_yyin, std::ostream& arg_yyout
);
yyFlexLexer( std::istream* arg_yyin = 0, std::ostream*
arg_yyout = 0 );
private:
void ctor_common();
public:
virtual ~yyFlexLexer();
void yy_switch_to_buffer( yy_buffer_state* new_buffer );
yy_buffer_state* yy_create_buffer( std::istream* s, int size );
yy_buffer_state* yy_create_buffer( std::istream& s, int size );
void yy_delete_buffer( yy_buffer_state* b );
void yyrestart( std::istream* s );
void yyrestart( std::istream& s );
void yypush_buffer_state( yy_buffer_state* new_buffer );
void yypop_buffer_state();
virtual int yylex();
virtual void switch_streams( std::istream& new_in,
std::ostream& new_out );
virtual void switch_streams( std::istream* new_in = 0,
std::ostream* new_out = 0 );
virtual int yywrap();
protected:
virtual int LexerInput( char* buf, int max_size );
virtual void LexerOutput( const char* buf, int size );
virtual void LexerError( const char* msg );
void yyunput( int c, char* buf_ptr );
int yyinput();
void yy_load_buffer_state();
void yy_init_buffer( yy_buffer_state* b, std::istream& s );
void yy_flush_buffer( yy_buffer_state* b );
int yy_start_stack_ptr;
int yy_start_stack_depth;
int* yy_start_stack;
void yy_push_state( int new_state );
void yy_pop_state();
int yy_top_state();
yy_state_type yy_get_previous_state();
yy_state_type yy_try_NUL_trans( yy_state_type current_state
);
int yy_get_next_buffer();
std::istream yyin; // input source for default LexerInput
std::ostream yyout; // output sink for default LexerOutput
// yy_hold_char holds the character lost when yytext is
formed.
char yy_hold_char;
// Number of characters read into yy_ch_buf.
int yy_n_chars;
// Points to current character in buffer.
char* yy_c_buf_p;
int yy_init; // whether we need to initialize
int yy_start; // start state number
// Flag which is used to allow yywrap()'s to do buffer switches
// instead of setting up a fresh yyin. A bit of a hack ...
int yy_did_buffer_switch_on_eof;
size_t yy_buffer_stack_top; /**< index of top of stack. */
size_t yy_buffer_stack_max; /**< capacity of stack. */
yy_buffer_state ** yy_buffer_stack; /**< Stack as an array. */
void yyensure_buffer_stack(void);
// The following are not always needed, but may be depending
// on use of certain flex features (like REJECT or yymore()).
yy_state_type yy_last_accepting_state;
char* yy_last_accepting_cpos;
yy_state_type* yy_state_buf;
yy_state_type* yy_state_ptr;
char* yy_full_match;
int* yy_full_state;
int yy_full_lp;
int yy_lp;
int yy_looking_for_trail_begin;
int yy_more_flag;
int yy_more_len;
int yy_more_offset;
int yy_prev_more_offset;
};
}
#endif // yyFlexLexer || ! yyFlexLexer Once
bin/Linux/xmlcheck
bin/Windows/xmlcheck.exe
lex.yy.cpplex.yy.cpp
#line3"lex.yy.cc"
#define YY_INT_ALIGNED shortint
/* A lexical scanner generated by flex */
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 6
#define YY_FLEX_SUBMINOR_VERSION 4
#if YY_FLEX_SUBMINOR_VERSION >0
#define FLEX_BETA
#endif
/* The c++ scanner is a mess. The FlexLexer.h header file relies
on the
* following macro. This is required in order to pass the c++-
multiple-scanners
* test in the regression suite. We get reports that it breaks in
heritance.
* We will address this in a future release of flex, or omit the
C++ scanner
* altogether.
*/
#define yyFlexLexer yyFlexLexer
/* First, we deal with platform-specific or compiler-
specific issues. */
/* begin standard C headers. */
/* end standard C headers. */
/* flex integer type definitions */
#ifndef FLEXINT_H
#define FLEXINT_H
/* C99 systems have <inttypes.h>. Non-
C99 systems may or may not. */
#if defined (__STDC_VERSION__)&& __STDC_VERSION__ >
=199901L
/* C99 says to define __STDC_LIMIT_MACROS before includi
ng stdint.h,
* if you want the limit (max/min) macros for int types.
*/
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
#endif
#include<inttypes.h>
typedef int8_t flex_int8_t;
typedef uint8_t flex_uint8_t;
typedef int16_t flex_int16_t;
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
#else
typedefsignedchar flex_int8_t;
typedefshortint flex_int16_t;
typedefint flex_int32_t;
typedefunsignedchar flex_uint8_t;
typedefunsignedshortint flex_uint16_t;
typedefunsignedint flex_uint32_t;
/* Limits of integral types. */
#ifndef INT8_MIN
#define INT8_MIN (-128)
#endif
#ifndef INT16_MIN
#define INT16_MIN (-32767-1)
#endif
#ifndef INT32_MIN
#define INT32_MIN (-2147483647-1)
#endif
#ifndef INT8_MAX
#define INT8_MAX (127)
#endif
#ifndef INT16_MAX
#define INT16_MAX (32767)
#endif
#ifndef INT32_MAX
#define INT32_MAX (2147483647)
#endif
#ifndef UINT8_MAX
#define UINT8_MAX (255U)
#endif
#ifndef UINT16_MAX
#define UINT16_MAX (65535U)
#endif
#ifndef UINT32_MAX
#define UINT32_MAX (4294967295U)
#endif
#ifndef SIZE_MAX
#define SIZE_MAX (~(size_t)0)
#endif
#endif/* ! C99 */
#endif/* ! FLEXINT_H */
/* begin standard C++ headers. */
#include<iostream>
#include<errno.h>
#include<cstdlib>
#include<cstdio>
#include<cstring>
/* end standard C++ headers. */
/* TODO: this is always defined, so inline it */
#define yyconst const
#if defined(__GNUC__)&& __GNUC__ >=3
#define yynoreturn __attribute__((__noreturn__))
#else
#define yynoreturn
#endif
/* Returned upon end-of-file. */
#define YY_NULL 0
/* Promotes a possibly negative, possibly signed char to an
* integer in range [0..255] for use as an array index.
*/
#define YY_SC_TO_UI(c)((YY_CHAR)(c))
/* Enter a start condition. This macro really ought to take a par
ameter,
* but we do it the disgusting crufty way forced on us by the ()-
less
* definition of BEGIN.
*/
#define BEGIN (yy_start)=1+2*
/* Translate the current start state into a value that can be later
handed
* to BEGIN to return to the state. The YYSTATE alias is for l
ex
* compatibility.
*/
#define YY_START (((yy_start)-1)/2)
#define YYSTATE YY_START
/* Action number for EOF rule of a given start state. */
#define YY_STATE_EOF(state)(YY_END_OF_BUFFER + state
+1)
/* Special action meaning "start processing a new file". */
#define YY_NEW_FILE yyrestart( yyin )
#define YY_END_OF_BUFFER_CHAR 0
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k.
* Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the
general case.
* Ditto for the __ia64__ case accordingly.
*/
#define YY_BUF_SIZE 32768
#else
#define YY_BUF_SIZE 16384
#endif/* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per char
acter in the main buffer.
*/
#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE +2)*sizeof(
yy_state_type))
#ifndef YY_TYPEDEF_YY_BUFFER_STATE
#define YY_TYPEDEF_YY_BUFFER_STATE
typedefstruct yy_buffer_state *YY_BUFFER_STATE;
#endif
#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
typedef size_t yy_size_t;
#endif
externint yyleng;
#define EOB_ACT_CONTINUE_SCAN 0
#define EOB_ACT_END_OF_FILE 1
#define EOB_ACT_LAST_MATCH 2
#define YY_LESS_LINENO(n)
#define YY_LINENO_REWIND_TO(ptr)
/* Return all but the first "n" matched characters back to the inp
ut stream. */
#define yyless(n) 
do 
{ 
/* Undo effects of setting up yytext. */ 
int yyless_macro_arg =(n); 
YY_LESS_LINENO(yyless_macro_arg);
*yy_cp =(yy_hold_char); 
YY_RESTORE_YY_MORE_OFFSET 
(yy_c_buf_p)= yy_cp = yy_bp + yyless_macro_arg -
YY_MORE_ADJ; 
YY_DO_BEFORE_ACTION;/* set up yytext again */ 
} 
while(0)
#define unput(c) yyunput( c,(yytext_ptr))
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
{
std::streambuf* yy_input_file;
char*yy_ch_buf;/* input buffer */
char*yy_buf_pos;/* current position in input buffer */
/* Size of input buffer in bytes, not including room for EOB
* characters.
*/
int yy_buf_size;
/* Number of characters read into yy_ch_buf, not including EO
B
* characters.
*/
int yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
* delete it.
*/
int yy_is_our_buffer;
/* Whether this is an "interactive" input source; if so, and
* if we're using stdio for input, then we want to use getc()
* instead of fread(), to make sure we stop fetching input afte
r
* each newline.
*/
int yy_is_interactive;
/* Whether we're considered to be at the beginning of a line.
* If so, '^' rules will be active on the next match, otherwise
* not.
*/
int yy_at_bol;
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.
*/
int yy_fill_buffer;
int yy_buffer_status;
#define YY_BUFFER_NEW 0
#define YY_BUFFER_NORMAL 1
/* When an EOF's been seen but there's still some text to proces
s
* then we mark the buffer as YY_EOF_PENDING, to indicat
e that we
* shouldn't try reading from the input source any more. We
might
* still have a bunch of tokens to match, though, because of
* possible backing-up.
*
* When we actually see the EOF, we change the status to "ne
w"
* (via yyrestart()), so that the user can continue scanning by
* just pointing yyin at a new input file.
*/
#define YY_BUFFER_EOF_PENDING 2
};
#endif/* !YY_STRUCT_YY_BUFFER_STATE */
/* We provide macros for accessing buffer states in case in the
* future we want to put the buffer states in a more general
* "scanner state".
*
* Returns the top of the stack, or NULL.
*/
#define YY_CURRENT_BUFFER ((yy_buffer_stack) 
?(yy_buffer_stack)[(yy_buffer_stack_top)] 
: NULL)
/* Same as previous macro, but useful when we know that the b
uffer stack is not
* NULL or when we need an lvalue. For internal use only.
*/
#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[
(yy_buffer_stack_top)]
void*yyalloc ( yy_size_t );
void*yyrealloc (void*, yy_size_t );
void yyfree (void*);
#define yy_new_buffer yy_create_buffer
#define yy_set_interactive(is_interactive) 
{ 
if(! YY_CURRENT_BUFFER ){ 
yyensure_buffer_stack (); 
YY_CURRENT_BUFFER_LVALUE = 
yy_create_buffer( yyin, YY_BUF_SIZE ); 
} 
YY_CURRENT_BUFFER_LVALUE-
>yy_is_interactive = is_interactive; 
}
#define yy_set_bol(at_bol) 
{ 
if(! YY_CURRENT_BUFFER ){
yyensure_buffer_stack (); 
YY_CURRENT_BUFFER_LVALUE = 
yy_create_buffer( yyin, YY_BUF_SIZE );
} 
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; 
}
#define YY_AT_BOL()(YY_CURRENT_BUFFER_LVALUE-
>yy_at_bol)
/* Begin user sect3 */
#define YY_SKIP_YYWRAP
typedef flex_uint8_t YY_CHAR;
#define yytext_ptr yytext
#define YY_INTERACTIVE
#include"FlexLexer.h"
int yyFlexLexer::yywrap(){return1;}
/* Done after the current pattern has been matched and before th
e
* corresponding action - sets up yytext.
*/
#define YY_DO_BEFORE_ACTION 
(yytext_ptr)= yy_bp; 
yyleng =(int)(yy_cp - yy_bp); 
(yy_hold_char)=*yy_cp; 
*yy_cp ='0'; 
(yy_c_buf_p)= yy_cp;
#define YY_NUM_RULES 15
#define YY_END_OF_BUFFER 16
/* This struct is not used in this scanner,
but its presence is necessary. */
struct yy_trans_info
{
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
staticconst flex_int16_t yy_accept[56]=
{0,
0,0,0,0,0,0,0,0,16,14,
1,1,14,7,15,15,15,15,13,15,
15,1,0,0,0,0,7,0,0,11,
0,12,0,0,0,0,3,3,0,0,
0,4,8,0,0,2,0,0,6,0,
0,5,10,9,0
};
staticconst YY_CHAR yy_ec[256]=
{0,
1,1,1,1,1,1,1,1,2,3,
1,1,2,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,
1,2,4,5,1,1,1,1,6,1,
1,1,1,1,7,1,8,9,9,9,
9,9,9,9,9,9,9,1

More Related Content

What's hot

How PHP Works ?
How PHP Works ?How PHP Works ?
How PHP Works ?Ravi Raj
 
System programmin practical file
System programmin practical fileSystem programmin practical file
System programmin practical fileAnkit Dixit
 
OpenGurukul : Language : Python
OpenGurukul : Language : PythonOpenGurukul : Language : Python
OpenGurukul : Language : PythonOpen Gurukul
 
Final requirement in programming
Final requirement in programmingFinal requirement in programming
Final requirement in programmingtrish_maxine
 
Fluent Development with FLOW3 1.0
Fluent Development with FLOW3 1.0Fluent Development with FLOW3 1.0
Fluent Development with FLOW3 1.0Robert Lemke
 
TDD in C - Recently Used List Kata
TDD in C - Recently Used List KataTDD in C - Recently Used List Kata
TDD in C - Recently Used List KataOlve Maudal
 
C program to insert a node in doubly linked list
C program to insert a node in doubly linked listC program to insert a node in doubly linked list
C program to insert a node in doubly linked listSourav Gayen
 
PHP 7.x - past, present, future
PHP 7.x - past, present, futurePHP 7.x - past, present, future
PHP 7.x - past, present, futureBoyan Yordanov
 
Web Application Development using PHP Chapter 2
Web Application Development using PHP Chapter 2Web Application Development using PHP Chapter 2
Web Application Development using PHP Chapter 2Mohd Harris Ahmad Jaal
 

What's hot (20)

How PHP Works ?
How PHP Works ?How PHP Works ?
How PHP Works ?
 
System programmin practical file
System programmin practical fileSystem programmin practical file
System programmin practical file
 
OpenGurukul : Language : Python
OpenGurukul : Language : PythonOpenGurukul : Language : Python
OpenGurukul : Language : Python
 
Php operators
Php operatorsPhp operators
Php operators
 
Final requirement in programming
Final requirement in programmingFinal requirement in programming
Final requirement in programming
 
Oop lecture9 12
Oop lecture9 12Oop lecture9 12
Oop lecture9 12
 
Fluent Development with FLOW3 1.0
Fluent Development with FLOW3 1.0Fluent Development with FLOW3 1.0
Fluent Development with FLOW3 1.0
 
TDD in C - Recently Used List Kata
TDD in C - Recently Used List KataTDD in C - Recently Used List Kata
TDD in C - Recently Used List Kata
 
Looping in C
Looping in CLooping in C
Looping in C
 
Control structures
Control structuresControl structures
Control structures
 
C program to insert a node in doubly linked list
C program to insert a node in doubly linked listC program to insert a node in doubly linked list
C program to insert a node in doubly linked list
 
C Programming Project
C Programming ProjectC Programming Project
C Programming Project
 
Unix t2
Unix t2Unix t2
Unix t2
 
Unix
UnixUnix
Unix
 
PHP 7.x - past, present, future
PHP 7.x - past, present, futurePHP 7.x - past, present, future
PHP 7.x - past, present, future
 
Functuon
FunctuonFunctuon
Functuon
 
Posfix
PosfixPosfix
Posfix
 
Sender
SenderSender
Sender
 
Vim and Python
Vim and PythonVim and Python
Vim and Python
 
Web Application Development using PHP Chapter 2
Web Application Development using PHP Chapter 2Web Application Development using PHP Chapter 2
Web Application Development using PHP Chapter 2
 

Similar to Flex lexer.h -c++-- flexlexer.h -- define interfaces f

Compiler Design and Construction COSC 5353Project Instructions -
Compiler Design and Construction COSC 5353Project Instructions -Compiler Design and Construction COSC 5353Project Instructions -
Compiler Design and Construction COSC 5353Project Instructions -LynellBull52
 
Google Edge TPUで TensorFlow Liteを使った時に 何をやっているのかを妄想してみる 2 「エッジAIモダン計測制御の世界」オ...
Google Edge TPUで TensorFlow Liteを使った時に 何をやっているのかを妄想してみる 2  「エッジAIモダン計測制御の世界」オ...Google Edge TPUで TensorFlow Liteを使った時に 何をやっているのかを妄想してみる 2  「エッジAIモダン計測制御の世界」オ...
Google Edge TPUで TensorFlow Liteを使った時に 何をやっているのかを妄想してみる 2 「エッジAIモダン計測制御の世界」オ...Mr. Vengineer
 
#include avrinterrupt.h The global interrupt flag is maintained.pdf
#include avrinterrupt.h The global interrupt flag is maintained.pdf#include avrinterrupt.h The global interrupt flag is maintained.pdf
#include avrinterrupt.h The global interrupt flag is maintained.pdfarasanlethers
 
Unit 4
Unit 4Unit 4
Unit 4siddr
 
finalprojtemplatev5finalprojtemplate.gitignore# Ignore the b
finalprojtemplatev5finalprojtemplate.gitignore# Ignore the bfinalprojtemplatev5finalprojtemplate.gitignore# Ignore the b
finalprojtemplatev5finalprojtemplate.gitignore# Ignore the bChereCheek752
 
Create your own PHP extension, step by step - phpDay 2012 Verona
Create your own PHP extension, step by step - phpDay 2012 VeronaCreate your own PHP extension, step by step - phpDay 2012 Verona
Create your own PHP extension, step by step - phpDay 2012 VeronaPatrick Allaert
 
Write a program that converts an infix expression into an equivalent.pdf
Write a program that converts an infix expression into an equivalent.pdfWrite a program that converts an infix expression into an equivalent.pdf
Write a program that converts an infix expression into an equivalent.pdfmohdjakirfb
 
Cvim half precision floating point
Cvim half precision floating pointCvim half precision floating point
Cvim half precision floating pointtomoaki0705
 
What is storage class
What is storage classWhat is storage class
What is storage classIsha Aggarwal
 
Gift-VT Tools Development Overview
Gift-VT Tools Development OverviewGift-VT Tools Development Overview
Gift-VT Tools Development Overviewstn_tkiller
 
TYPO3 Extension development using new Extbase framework
TYPO3 Extension development using new Extbase frameworkTYPO3 Extension development using new Extbase framework
TYPO3 Extension development using new Extbase frameworkChristian Trabold
 
Fitc whats new in es6 for web devs
Fitc   whats new in es6 for web devsFitc   whats new in es6 for web devs
Fitc whats new in es6 for web devsFITC
 
Commenting in Agile Development
Commenting in Agile DevelopmentCommenting in Agile Development
Commenting in Agile DevelopmentJan Rybák Benetka
 
What's New in ES6 for Web Devs
What's New in ES6 for Web DevsWhat's New in ES6 for Web Devs
What's New in ES6 for Web DevsRami Sayar
 
李建忠、侯捷设计模式讲义
李建忠、侯捷设计模式讲义李建忠、侯捷设计模式讲义
李建忠、侯捷设计模式讲义yiditushe
 
Welcome to Modern C++
Welcome to Modern C++Welcome to Modern C++
Welcome to Modern C++Seok-joon Yun
 

Similar to Flex lexer.h -c++-- flexlexer.h -- define interfaces f (20)

Compiler Design and Construction COSC 5353Project Instructions -
Compiler Design and Construction COSC 5353Project Instructions -Compiler Design and Construction COSC 5353Project Instructions -
Compiler Design and Construction COSC 5353Project Instructions -
 
Google Edge TPUで TensorFlow Liteを使った時に 何をやっているのかを妄想してみる 2 「エッジAIモダン計測制御の世界」オ...
Google Edge TPUで TensorFlow Liteを使った時に 何をやっているのかを妄想してみる 2  「エッジAIモダン計測制御の世界」オ...Google Edge TPUで TensorFlow Liteを使った時に 何をやっているのかを妄想してみる 2  「エッジAIモダン計測制御の世界」オ...
Google Edge TPUで TensorFlow Liteを使った時に 何をやっているのかを妄想してみる 2 「エッジAIモダン計測制御の世界」オ...
 
#include avrinterrupt.h The global interrupt flag is maintained.pdf
#include avrinterrupt.h The global interrupt flag is maintained.pdf#include avrinterrupt.h The global interrupt flag is maintained.pdf
#include avrinterrupt.h The global interrupt flag is maintained.pdf
 
Unit 4
Unit 4Unit 4
Unit 4
 
finalprojtemplatev5finalprojtemplate.gitignore# Ignore the b
finalprojtemplatev5finalprojtemplate.gitignore# Ignore the bfinalprojtemplatev5finalprojtemplate.gitignore# Ignore the b
finalprojtemplatev5finalprojtemplate.gitignore# Ignore the b
 
C programming session10
C programming  session10C programming  session10
C programming session10
 
Create your own PHP extension, step by step - phpDay 2012 Verona
Create your own PHP extension, step by step - phpDay 2012 VeronaCreate your own PHP extension, step by step - phpDay 2012 Verona
Create your own PHP extension, step by step - phpDay 2012 Verona
 
Embedded C programming session10
Embedded C programming  session10Embedded C programming  session10
Embedded C programming session10
 
Write a program that converts an infix expression into an equivalent.pdf
Write a program that converts an infix expression into an equivalent.pdfWrite a program that converts an infix expression into an equivalent.pdf
Write a program that converts an infix expression into an equivalent.pdf
 
Flow of control ppt
Flow of control pptFlow of control ppt
Flow of control ppt
 
Cvim half precision floating point
Cvim half precision floating pointCvim half precision floating point
Cvim half precision floating point
 
What is storage class
What is storage classWhat is storage class
What is storage class
 
Gift-VT Tools Development Overview
Gift-VT Tools Development OverviewGift-VT Tools Development Overview
Gift-VT Tools Development Overview
 
TYPO3 Extension development using new Extbase framework
TYPO3 Extension development using new Extbase frameworkTYPO3 Extension development using new Extbase framework
TYPO3 Extension development using new Extbase framework
 
Fitc whats new in es6 for web devs
Fitc   whats new in es6 for web devsFitc   whats new in es6 for web devs
Fitc whats new in es6 for web devs
 
Commenting in Agile Development
Commenting in Agile DevelopmentCommenting in Agile Development
Commenting in Agile Development
 
What's New in ES6 for Web Devs
What's New in ES6 for Web DevsWhat's New in ES6 for Web Devs
What's New in ES6 for Web Devs
 
李建忠、侯捷设计模式讲义
李建忠、侯捷设计模式讲义李建忠、侯捷设计模式讲义
李建忠、侯捷设计模式讲义
 
Sysprog17
Sysprog17Sysprog17
Sysprog17
 
Welcome to Modern C++
Welcome to Modern C++Welcome to Modern C++
Welcome to Modern C++
 

More from aman39650

For this discussion, pick one concept we have discussed this week. 
For this discussion, pick one concept we have discussed this week.  For this discussion, pick one concept we have discussed this week. 
For this discussion, pick one concept we have discussed this week.  aman39650
 
For this discussion question, complete the following.1.  read
For this discussion question, complete the following.1.  read For this discussion question, complete the following.1.  read
For this discussion question, complete the following.1.  read aman39650
 
For this assignment, you have a commercial loan case study to analyz
For this assignment, you have a commercial loan case study to analyzFor this assignment, you have a commercial loan case study to analyz
For this assignment, you have a commercial loan case study to analyzaman39650
 
Fiu department of architecture arc 6280 professional off
Fiu department of architecture     arc 6280 professional offFiu department of architecture     arc 6280 professional off
Fiu department of architecture arc 6280 professional offaman39650
 
Fitness iip. l. rhea p. l. rheap. l. rheacardiovascul
Fitness iip. l. rhea p. l. rheap. l. rheacardiovasculFitness iip. l. rhea p. l. rheap. l. rheacardiovascul
Fitness iip. l. rhea p. l. rheap. l. rheacardiovasculaman39650
 
Final risk assessment and compliance report (seven to 12-page rep
Final risk assessment and compliance report (seven  to 12-page repFinal risk assessment and compliance report (seven  to 12-page rep
Final risk assessment and compliance report (seven to 12-page repaman39650
 
Final project new due date march 18, 1159pm cst
Final project new due date march 18, 1159pm cstFinal project new due date march 18, 1159pm cst
Final project new due date march 18, 1159pm cstaman39650
 
Family assessment guideline each student will perform a family as
Family assessment guideline each student will perform a family asFamily assessment guideline each student will perform a family as
Family assessment guideline each student will perform a family asaman39650
 
Exposure therapy is an essential component of evidence based cogni
Exposure therapy is an essential component of evidence based cogniExposure therapy is an essential component of evidence based cogni
Exposure therapy is an essential component of evidence based cogniaman39650
 
Exploring lifespan development f o u r t h e d i t i
Exploring lifespan development f o u r t h  e d i t iExploring lifespan development f o u r t h  e d i t i
Exploring lifespan development f o u r t h e d i t iaman39650
 
Explain what you learn about the disclosures of your sec 10 k co
Explain what you learn about the disclosures of your sec 10 k coExplain what you learn about the disclosures of your sec 10 k co
Explain what you learn about the disclosures of your sec 10 k coaman39650
 
Expedia group, inc.apa style please leave website links along w
Expedia group, inc.apa style please leave website links along wExpedia group, inc.apa style please leave website links along w
Expedia group, inc.apa style please leave website links along waman39650
 
Exercises in supply chain optimization and simulation using any l
Exercises in supply chain optimization and simulation using any lExercises in supply chain optimization and simulation using any l
Exercises in supply chain optimization and simulation using any laman39650
 
Elson debarros v for you flowers,llc exhibit b
Elson debarros v for you flowers,llc          exhibit b       Elson debarros v for you flowers,llc          exhibit b
Elson debarros v for you flowers,llc exhibit b aman39650
 
Ethical leadership project.this project is another program outco
Ethical leadership project.this project is another program outcoEthical leadership project.this project is another program outco
Ethical leadership project.this project is another program outcoaman39650
 
Ethical leadership and reputation combined indirect effects
Ethical leadership and reputation combined indirect effectsEthical leadership and reputation combined indirect effects
Ethical leadership and reputation combined indirect effectsaman39650
 
Essay brief 20172018 module titlethe criminal justice process
Essay brief 20172018 module titlethe criminal justice processEssay brief 20172018 module titlethe criminal justice process
Essay brief 20172018 module titlethe criminal justice processaman39650
 
Esol capstone project lesson plan templateoverview lesson tit
Esol capstone project lesson plan templateoverview lesson titEsol capstone project lesson plan templateoverview lesson tit
Esol capstone project lesson plan templateoverview lesson titaman39650
 
Eng 101 reading response due 1010 after carefully reading th
Eng 101 reading response due 1010 after carefully reading thEng 101 reading response due 1010 after carefully reading th
Eng 101 reading response due 1010 after carefully reading thaman39650
 
Enc 1102 prompt and format for the argument essay s 2021.docx
Enc 1102 prompt and format for the argument essay s 2021.docxEnc 1102 prompt and format for the argument essay s 2021.docx
Enc 1102 prompt and format for the argument essay s 2021.docxaman39650
 

More from aman39650 (20)

For this discussion, pick one concept we have discussed this week. 
For this discussion, pick one concept we have discussed this week.  For this discussion, pick one concept we have discussed this week. 
For this discussion, pick one concept we have discussed this week. 
 
For this discussion question, complete the following.1.  read
For this discussion question, complete the following.1.  read For this discussion question, complete the following.1.  read
For this discussion question, complete the following.1.  read
 
For this assignment, you have a commercial loan case study to analyz
For this assignment, you have a commercial loan case study to analyzFor this assignment, you have a commercial loan case study to analyz
For this assignment, you have a commercial loan case study to analyz
 
Fiu department of architecture arc 6280 professional off
Fiu department of architecture     arc 6280 professional offFiu department of architecture     arc 6280 professional off
Fiu department of architecture arc 6280 professional off
 
Fitness iip. l. rhea p. l. rheap. l. rheacardiovascul
Fitness iip. l. rhea p. l. rheap. l. rheacardiovasculFitness iip. l. rhea p. l. rheap. l. rheacardiovascul
Fitness iip. l. rhea p. l. rheap. l. rheacardiovascul
 
Final risk assessment and compliance report (seven to 12-page rep
Final risk assessment and compliance report (seven  to 12-page repFinal risk assessment and compliance report (seven  to 12-page rep
Final risk assessment and compliance report (seven to 12-page rep
 
Final project new due date march 18, 1159pm cst
Final project new due date march 18, 1159pm cstFinal project new due date march 18, 1159pm cst
Final project new due date march 18, 1159pm cst
 
Family assessment guideline each student will perform a family as
Family assessment guideline each student will perform a family asFamily assessment guideline each student will perform a family as
Family assessment guideline each student will perform a family as
 
Exposure therapy is an essential component of evidence based cogni
Exposure therapy is an essential component of evidence based cogniExposure therapy is an essential component of evidence based cogni
Exposure therapy is an essential component of evidence based cogni
 
Exploring lifespan development f o u r t h e d i t i
Exploring lifespan development f o u r t h  e d i t iExploring lifespan development f o u r t h  e d i t i
Exploring lifespan development f o u r t h e d i t i
 
Explain what you learn about the disclosures of your sec 10 k co
Explain what you learn about the disclosures of your sec 10 k coExplain what you learn about the disclosures of your sec 10 k co
Explain what you learn about the disclosures of your sec 10 k co
 
Expedia group, inc.apa style please leave website links along w
Expedia group, inc.apa style please leave website links along wExpedia group, inc.apa style please leave website links along w
Expedia group, inc.apa style please leave website links along w
 
Exercises in supply chain optimization and simulation using any l
Exercises in supply chain optimization and simulation using any lExercises in supply chain optimization and simulation using any l
Exercises in supply chain optimization and simulation using any l
 
Elson debarros v for you flowers,llc exhibit b
Elson debarros v for you flowers,llc          exhibit b       Elson debarros v for you flowers,llc          exhibit b
Elson debarros v for you flowers,llc exhibit b
 
Ethical leadership project.this project is another program outco
Ethical leadership project.this project is another program outcoEthical leadership project.this project is another program outco
Ethical leadership project.this project is another program outco
 
Ethical leadership and reputation combined indirect effects
Ethical leadership and reputation combined indirect effectsEthical leadership and reputation combined indirect effects
Ethical leadership and reputation combined indirect effects
 
Essay brief 20172018 module titlethe criminal justice process
Essay brief 20172018 module titlethe criminal justice processEssay brief 20172018 module titlethe criminal justice process
Essay brief 20172018 module titlethe criminal justice process
 
Esol capstone project lesson plan templateoverview lesson tit
Esol capstone project lesson plan templateoverview lesson titEsol capstone project lesson plan templateoverview lesson tit
Esol capstone project lesson plan templateoverview lesson tit
 
Eng 101 reading response due 1010 after carefully reading th
Eng 101 reading response due 1010 after carefully reading thEng 101 reading response due 1010 after carefully reading th
Eng 101 reading response due 1010 after carefully reading th
 
Enc 1102 prompt and format for the argument essay s 2021.docx
Enc 1102 prompt and format for the argument essay s 2021.docxEnc 1102 prompt and format for the argument essay s 2021.docx
Enc 1102 prompt and format for the argument essay s 2021.docx
 

Recently uploaded

Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17Celine George
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsSandeep D Chaudhary
 
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdfUGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdfNirmal Dwivedi
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfPondicherry University
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...Amil baba
 
Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111GangaMaiya1
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...EADTU
 
How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17Celine George
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Play hard learn harder: The Serious Business of Play
Play hard learn harder:  The Serious Business of PlayPlay hard learn harder:  The Serious Business of Play
Play hard learn harder: The Serious Business of PlayPooky Knightsmith
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 

Recently uploaded (20)

Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
 
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdfUGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
UGC NET Paper 1 Unit 7 DATA INTERPRETATION.pdf
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Play hard learn harder: The Serious Business of Play
Play hard learn harder:  The Serious Business of PlayPlay hard learn harder:  The Serious Business of Play
Play hard learn harder: The Serious Business of Play
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 

Flex lexer.h -c++-- flexlexer.h -- define interfaces f

  • 1. FlexLexer.h // -*-C++-*- // FlexLexer.h -- define interfaces for lexical analyzer classes generated // by flex // Copyright (c) 1993 The Regents of the University of California. // All rights reserved. // // This code is derived from software contributed to Berkeley by // Kent Williams and Tom Epperly. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // 1. Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // 2. Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // Neither the name of the University nor the names of its contributors // may be used to endorse or promote products derived from this software
  • 2. // without specific prior written permission. // THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR // IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR // PURPOSE. // This file defines FlexLexer, an abstract class which specifies the // external interface provided to flex C++ lexer objects, and yyFlexLexer, // which defines a particular lexer class. // // If you want to create multiple lexer classes, you use the -P flag // to rename each yyFlexLexer to some other xxFlexLexer. You then // include <FlexLexer.h> in your other sources once per lexer class: // // #undef yyFlexLexer // #define yyFlexLexer xxFlexLexer // #include <FlexLexer.h> // // #undef yyFlexLexer // #define yyFlexLexer zzFlexLexer // #include <FlexLexer.h> // ... #ifndef __FLEX_LEXER_H // Never included before - need to define base class. #define __FLEX_LEXER_H
  • 3. #include <iostream> extern "C++" { struct yy_buffer_state; typedef int yy_state_type; class FlexLexer { public: virtual ~FlexLexer() { } const char* YYText() const { return yytext; } int YYLeng() const { return yyleng; } virtual void yy_switch_to_buffer( yy_buffer_state* new_buffer ) = 0; virtual yy_buffer_state* yy_create_buffer( std::istream* s, int size ) = 0; virtual yy_buffer_state* yy_create_buffer( std::istream& s, int size ) = 0; virtual void yy_delete_buffer( yy_buffer_state* b ) = 0; virtual void yyrestart( std::istream* s ) = 0; virtual void yyrestart( std::istream& s ) = 0; virtual int yylex() = 0; // Call yylex with new input/output sources. int yylex( std::istream& new_in, std::ostream& new_out ) { switch_streams( new_in, new_out ); return yylex(); } int yylex( std::istream* new_in, std::ostream* new_out = 0) {
  • 4. switch_streams( new_in, new_out ); return yylex(); } // Switch to new input/output streams. A nil stream pointer // indicates "keep the current one". virtual void switch_streams( std::istream* new_in, std::ostream* new_out ) = 0; virtual void switch_streams( std::istream& new_in, std::ostream& new_out ) = 0; int lineno() const { return yylineno; } int debug() const { return yy_flex_debug; } void set_debug( int flag ) { yy_flex_debug = flag; } protected: char* yytext; int yyleng; int yylineno; // only maintained if you use %option yylineno int yy_flex_debug; // only has effect with -d or "%option debug" }; } #endif // FLEXLEXER_H #if defined(yyFlexLexer) || ! defined(yyFlexLexerOnce) // Either this is the first time through (yyFlexLexerOnce not defined), // or this is a repeated include to define a different flavor of // yyFlexLexer, as discussed in the flex manual. # define yyFlexLexerOnce extern "C++" {
  • 5. class yyFlexLexer : public FlexLexer { public: // arg_yyin and arg_yyout default to the cin and cout, but we // only make that assignment when initializing in yylex(). yyFlexLexer( std::istream& arg_yyin, std::ostream& arg_yyout ); yyFlexLexer( std::istream* arg_yyin = 0, std::ostream* arg_yyout = 0 ); private: void ctor_common(); public: virtual ~yyFlexLexer(); void yy_switch_to_buffer( yy_buffer_state* new_buffer ); yy_buffer_state* yy_create_buffer( std::istream* s, int size ); yy_buffer_state* yy_create_buffer( std::istream& s, int size ); void yy_delete_buffer( yy_buffer_state* b ); void yyrestart( std::istream* s ); void yyrestart( std::istream& s ); void yypush_buffer_state( yy_buffer_state* new_buffer ); void yypop_buffer_state(); virtual int yylex(); virtual void switch_streams( std::istream& new_in, std::ostream& new_out ); virtual void switch_streams( std::istream* new_in = 0, std::ostream* new_out = 0 ); virtual int yywrap(); protected: virtual int LexerInput( char* buf, int max_size ); virtual void LexerOutput( const char* buf, int size );
  • 6. virtual void LexerError( const char* msg ); void yyunput( int c, char* buf_ptr ); int yyinput(); void yy_load_buffer_state(); void yy_init_buffer( yy_buffer_state* b, std::istream& s ); void yy_flush_buffer( yy_buffer_state* b ); int yy_start_stack_ptr; int yy_start_stack_depth; int* yy_start_stack; void yy_push_state( int new_state ); void yy_pop_state(); int yy_top_state(); yy_state_type yy_get_previous_state(); yy_state_type yy_try_NUL_trans( yy_state_type current_state ); int yy_get_next_buffer(); std::istream yyin; // input source for default LexerInput std::ostream yyout; // output sink for default LexerOutput // yy_hold_char holds the character lost when yytext is formed. char yy_hold_char; // Number of characters read into yy_ch_buf. int yy_n_chars; // Points to current character in buffer. char* yy_c_buf_p; int yy_init; // whether we need to initialize
  • 7. int yy_start; // start state number // Flag which is used to allow yywrap()'s to do buffer switches // instead of setting up a fresh yyin. A bit of a hack ... int yy_did_buffer_switch_on_eof; size_t yy_buffer_stack_top; /**< index of top of stack. */ size_t yy_buffer_stack_max; /**< capacity of stack. */ yy_buffer_state ** yy_buffer_stack; /**< Stack as an array. */ void yyensure_buffer_stack(void); // The following are not always needed, but may be depending // on use of certain flex features (like REJECT or yymore()). yy_state_type yy_last_accepting_state; char* yy_last_accepting_cpos; yy_state_type* yy_state_buf; yy_state_type* yy_state_ptr; char* yy_full_match; int* yy_full_state; int yy_full_lp; int yy_lp; int yy_looking_for_trail_begin; int yy_more_flag; int yy_more_len; int yy_more_offset; int yy_prev_more_offset; }; }
  • 8. #endif // yyFlexLexer || ! yyFlexLexer Once bin/Linux/xmlcheck bin/Windows/xmlcheck.exe lex.yy.cpplex.yy.cpp #line3"lex.yy.cc" #define YY_INT_ALIGNED shortint /* A lexical scanner generated by flex */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 6 #define YY_FLEX_SUBMINOR_VERSION 4 #if YY_FLEX_SUBMINOR_VERSION >0 #define FLEX_BETA #endif /* The c++ scanner is a mess. The FlexLexer.h header file relies on the * following macro. This is required in order to pass the c++- multiple-scanners * test in the regression suite. We get reports that it breaks in heritance. * We will address this in a future release of flex, or omit the C++ scanner * altogether. */ #define yyFlexLexer yyFlexLexer /* First, we deal with platform-specific or compiler- specific issues. */
  • 9. /* begin standard C headers. */ /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have <inttypes.h>. Non- C99 systems may or may not. */ #if defined (__STDC_VERSION__)&& __STDC_VERSION__ > =199901L /* C99 says to define __STDC_LIMIT_MACROS before includi ng stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include<inttypes.h> typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedefsignedchar flex_int8_t; typedefshortint flex_int16_t; typedefint flex_int32_t; typedefunsignedchar flex_uint8_t;
  • 10. typedefunsignedshortint flex_uint16_t; typedefunsignedint flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX #define SIZE_MAX (~(size_t)0) #endif
  • 11. #endif/* ! C99 */ #endif/* ! FLEXINT_H */ /* begin standard C++ headers. */ #include<iostream> #include<errno.h> #include<cstdlib> #include<cstdio> #include<cstring> /* end standard C++ headers. */ /* TODO: this is always defined, so inline it */ #define yyconst const #if defined(__GNUC__)&& __GNUC__ >=3 #define yynoreturn __attribute__((__noreturn__)) #else #define yynoreturn #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an * integer in range [0..255] for use as an array index. */ #define YY_SC_TO_UI(c)((YY_CHAR)(c)) /* Enter a start condition. This macro really ought to take a par ameter, * but we do it the disgusting crufty way forced on us by the ()- less * definition of BEGIN. */ #define BEGIN (yy_start)=1+2*
  • 12. /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for l ex * compatibility. */ #define YY_START (((yy_start)-1)/2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state)(YY_END_OF_BUFFER + state +1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE yyrestart( yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k. * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. * Ditto for the __ia64__ case accordingly. */ #define YY_BUF_SIZE 32768 #else #define YY_BUF_SIZE 16384 #endif/* __ia64__ */ #endif /* The state buf must be large enough to hold one state per char acter in the main buffer. */ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE +2)*sizeof( yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE
  • 13. #define YY_TYPEDEF_YY_BUFFER_STATE typedefstruct yy_buffer_state *YY_BUFFER_STATE; #endif #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif externint yyleng; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) #define YY_LINENO_REWIND_TO(ptr) /* Return all but the first "n" matched characters back to the inp ut stream. */ #define yyless(n) do { /* Undo effects of setting up yytext. */ int yyless_macro_arg =(n); YY_LESS_LINENO(yyless_macro_arg); *yy_cp =(yy_hold_char); YY_RESTORE_YY_MORE_OFFSET (yy_c_buf_p)= yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; YY_DO_BEFORE_ACTION;/* set up yytext again */ } while(0) #define unput(c) yyunput( c,(yytext_ptr)) #ifndef YY_STRUCT_YY_BUFFER_STATE
  • 14. #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { std::streambuf* yy_input_file; char*yy_ch_buf;/* input buffer */ char*yy_buf_pos;/* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ int yy_buf_size; /* Number of characters read into yy_ch_buf, not including EO B * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input afte r * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise
  • 15. * not. */ int yy_at_bol; 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. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to proces s * then we mark the buffer as YY_EOF_PENDING, to indicat e that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "ne w" * (via yyrestart()), so that the user can continue scanning by * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; #endif/* !YY_STRUCT_YY_BUFFER_STATE */ /* We provide macros for accessing buffer states in case in the
  • 16. * future we want to put the buffer states in a more general * "scanner state". * * Returns the top of the stack, or NULL. */ #define YY_CURRENT_BUFFER ((yy_buffer_stack) ?(yy_buffer_stack)[(yy_buffer_stack_top)] : NULL) /* Same as previous macro, but useful when we know that the b uffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[ (yy_buffer_stack_top)] void*yyalloc ( yy_size_t ); void*yyrealloc (void*, yy_size_t ); void yyfree (void*); #define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) { if(! YY_CURRENT_BUFFER ){ yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = yy_create_buffer( yyin, YY_BUF_SIZE ); } YY_CURRENT_BUFFER_LVALUE- >yy_is_interactive = is_interactive; } #define yy_set_bol(at_bol) { if(! YY_CURRENT_BUFFER ){ yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = yy_create_buffer( yyin, YY_BUF_SIZE );
  • 17. } YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; } #define YY_AT_BOL()(YY_CURRENT_BUFFER_LVALUE- >yy_at_bol) /* Begin user sect3 */ #define YY_SKIP_YYWRAP typedef flex_uint8_t YY_CHAR; #define yytext_ptr yytext #define YY_INTERACTIVE #include"FlexLexer.h" int yyFlexLexer::yywrap(){return1;} /* Done after the current pattern has been matched and before th e * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION (yytext_ptr)= yy_bp; yyleng =(int)(yy_cp - yy_bp); (yy_hold_char)=*yy_cp; *yy_cp ='0'; (yy_c_buf_p)= yy_cp; #define YY_NUM_RULES 15 #define YY_END_OF_BUFFER 16 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info { flex_int32_t yy_verify; flex_int32_t yy_nxt; };
  • 18. staticconst flex_int16_t yy_accept[56]= {0, 0,0,0,0,0,0,0,0,16,14, 1,1,14,7,15,15,15,15,13,15, 15,1,0,0,0,0,7,0,0,11, 0,12,0,0,0,0,3,3,0,0, 0,4,8,0,0,2,0,0,6,0, 0,5,10,9,0 }; staticconst YY_CHAR yy_ec[256]= {0, 1,1,1,1,1,1,1,1,2,3, 1,1,2,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1, 1,2,4,5,1,1,1,1,6,1, 1,1,1,1,7,1,8,9,9,9, 9,9,9,9,9,9,9,1