Vcsn  2.8
Be Rational
yyFlexLexer Class Reference

#include <flex-lexer.hh>

Inheritance diagram for yyFlexLexer:
Collaboration diagram for yyFlexLexer:

Public Member Functions

 yyFlexLexer (std::istream &arg_yyin, std::ostream &arg_yyout)
 
 yyFlexLexer (std::istream *arg_yyin=nullptr, std::ostream *arg_yyout=nullptr)
 
virtual ~yyFlexLexer ()
 
void yy_switch_to_buffer (yy_buffer_state *new_buffer)
 Switch to a different input buffer. More...
 
yy_buffer_stateyy_create_buffer (std::istream *s, int size)
 Allocate and initialize an input buffer state. More...
 
void yy_delete_buffer (yy_buffer_state *b)
 Destroy the buffer. More...
 
void yyrestart (std::istream *s)
 Immediately switch to a different input stream. More...
 
void yypush_buffer_state (yy_buffer_state *new_buffer)
 Pushes the new state onto the stack. More...
 
void yypop_buffer_state ()
 Removes and deletes the top of the stack, if present. More...
 
 YY_DECL_ ()
 
void scan_open_ (std::istream &f)
 
void scan_close_ ()
 
virtual void switch_streams (std::istream *new_in, std::ostream *new_out=nullptr)
 
virtual int yywrap ()
 
std::istream & yyinput_stream ()
 
void putback (char c)
 
- Public Member Functions inherited from FlexLexer
virtual ~FlexLexer ()
 
const charYYText () const
 
int YYLeng () const
 
int lineno () const
 
int debug () const
 
void set_debug (int flag)
 

Public Attributes

location loc
 
std::istream * yyin
 

Protected Member Functions

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)
 Discard all buffered characters. More...
 
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 ()
 
void yyensure_buffer_stack (void)
 

Protected Attributes

int yy_start_stack_ptr
 
int yy_start_stack_depth
 
int * yy_start_stack
 
std::ostream * yyout
 
char yy_hold_char
 
int yy_n_chars
 
charyy_c_buf_p
 
int yy_init
 
int yy_start
 
int yy_did_buffer_switch_on_eof
 
size_t yy_buffer_stack_top
 index of top of stack. More...
 
size_t yy_buffer_stack_max
 capacity of stack. More...
 
yy_buffer_state ** yy_buffer_stack
 Stack as an array. More...
 
yy_state_type yy_last_accepting_state
 
charyy_last_accepting_cpos
 
yy_state_typeyy_state_buf
 
yy_state_typeyy_state_ptr
 
charyy_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
 
- Protected Attributes inherited from FlexLexer
charyytext
 
int yyleng
 
int yylineno
 
int yy_flex_debug
 

Private Member Functions

void ctor_common ()
 

Detailed Description

Definition at line 101 of file flex-lexer.hh.

Constructor & Destructor Documentation

◆ yyFlexLexer() [1/2]

yyFlexLexer::yyFlexLexer ( std::istream &  arg_yyin,
std::ostream &  arg_yyout 
)

Definition at line 1245 of file scan.cc.

References ctor_common().

Here is the call graph for this function:

◆ yyFlexLexer() [2/2]

yyFlexLexer::yyFlexLexer ( std::istream *  arg_yyin = nullptr,
std::ostream *  arg_yyout = nullptr 
)

Definition at line 1236 of file scan.cc.

References ctor_common().

Here is the call graph for this function:

◆ ~yyFlexLexer()

yyFlexLexer::~yyFlexLexer ( )
virtual

Definition at line 1282 of file scan.cc.

References yy_buffer_stack, YY_CURRENT_BUFFER, yy_delete_buffer(), yy_start_stack, yy_state_buf, and yyfree().

Here is the call graph for this function:

Member Function Documentation

◆ ctor_common()

◆ LexerError()

void yyFlexLexer::LexerError ( const char msg)
protectedvirtual

Definition at line 2107 of file scan.cc.

References YY_EXIT_FAILURE.

◆ LexerInput()

int yyFlexLexer::LexerInput ( char buf,
int  max_size 
)
protectedvirtual

Definition at line 1318 of file scan.cc.

References vcsn::detail::void, and yyin.

◆ LexerOutput()

void yyFlexLexer::LexerOutput ( const char buf,
int  size 
)
protectedvirtual

Definition at line 1347 of file scan.cc.

References vcsn::detail::void, and yyout.

◆ putback()

void yyFlexLexer::putback ( char  c)
inline

Definition at line 149 of file flex-lexer.hh.

◆ scan_close_()

void yyFlexLexer::scan_close_ ( )

Definition at line 2237 of file scan.cc.

References YY_FLEX_NAMESPACE_END, and yypop_buffer_state().

Here is the call graph for this function:

◆ scan_open_()

void yyFlexLexer::scan_open_ ( std::istream &  f)

Definition at line 2230 of file scan.cc.

References FlexLexer::set_debug(), YY_BUF_SIZE, yy_create_buffer(), YY_CURRENT_BUFFER, yy_switch_to_buffer(), and yypush_buffer_state().

Here is the call graph for this function:

◆ switch_streams()

void yyFlexLexer::switch_streams ( std::istream *  new_in,
std::ostream *  new_out = nullptr 
)
virtual

Implements FlexLexer.

Definition at line 1292 of file scan.cc.

References YY_BUF_SIZE, yy_create_buffer(), YY_CURRENT_BUFFER, yy_delete_buffer(), yy_switch_to_buffer(), yyin, and yyout.

Here is the call graph for this function:

◆ yy_create_buffer()

YY_BUFFER_STATE yyFlexLexer::yy_create_buffer ( std::istream *  file,
int  size 
)
virtual

Allocate and initialize an input buffer state.

Delegate creation of buffers to the new version that takes an istream reference.

Parameters
fileA readable stream.
sizeThe character buffer size in bytes. When in doubt, use YY_BUF_SIZE.
Returns
the allocated buffer state.

Implements FlexLexer.

Definition at line 1794 of file scan.cc.

References vcsn::rat::size(), yy_buffer_state::yy_buf_size, yy_buffer_state::yy_ch_buf, YY_FATAL_ERROR, yy_init_buffer(), yy_buffer_state::yy_is_our_buffer, and yyalloc().

Referenced by scan_open_(), switch_streams(), and yyrestart().

Here is the call graph for this function:

◆ YY_DECL_()

yyFlexLexer::YY_DECL_ ( )

◆ yy_delete_buffer()

void yyFlexLexer::yy_delete_buffer ( yy_buffer_state b)
virtual

Destroy the buffer.

Parameters
ba buffer created with yy_create_buffer()

Implements FlexLexer.

Definition at line 1839 of file scan.cc.

References yy_buffer_state::yy_ch_buf, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_buffer_state::yy_is_our_buffer, and yyfree().

Referenced by switch_streams(), yypop_buffer_state(), and ~yyFlexLexer().

Here is the call graph for this function:

◆ yy_flush_buffer()

void yyFlexLexer::yy_flush_buffer ( yy_buffer_state b)
protected

Discard all buffered characters.

On the next scan, YY_INPUT will be called.

Parameters
bthe buffer state to be flushed, usually YY_CURRENT_BUFFER.

Definition at line 1901 of file scan.cc.

References yy_buffer_state::yy_at_bol, yy_buffer_state::yy_buf_pos, YY_BUFFER_NEW, yy_buffer_state::yy_buffer_status, yy_buffer_state::yy_ch_buf, YY_CURRENT_BUFFER, YY_END_OF_BUFFER_CHAR, yy_load_buffer_state(), and yy_buffer_state::yy_n_chars.

Referenced by yy_init_buffer().

Here is the call graph for this function:

◆ yy_get_next_buffer()

int yyFlexLexer::yy_get_next_buffer ( )
protected

Definition at line 1365 of file scan.cc.

References EOB_ACT_CONTINUE_SCAN, EOB_ACT_END_OF_FILE, EOB_ACT_LAST_MATCH, yy_buffer_state::yy_buf_size, YY_BUFFER_EOF_PENDING, yy_c_buf_p, yy_buffer_state::yy_ch_buf, YY_CURRENT_BUFFER_LVALUE, YY_END_OF_BUFFER_CHAR, YY_FATAL_ERROR, YY_INPUT, yy_buffer_state::yy_is_our_buffer, YY_MORE_ADJ, yy_n_chars, YY_READ_BUF_SIZE, yyin, yyrealloc(), yyrestart(), and yytext_ptr.

Referenced by yyinput().

Here is the call graph for this function:

◆ yy_get_previous_state()

yy_state_type yyFlexLexer::yy_get_previous_state ( )
protected

◆ yy_init_buffer()

void yyFlexLexer::yy_init_buffer ( yy_buffer_state b,
std::istream *  s 
)
protected

Definition at line 1862 of file scan.cc.

References yy_buffer_state::yy_bs_column, yy_buffer_state::yy_bs_lineno, YY_CURRENT_BUFFER, yy_buffer_state::yy_fill_buffer, yy_flush_buffer(), yy_buffer_state::yy_input_file, and yy_buffer_state::yy_is_interactive.

Referenced by yy_create_buffer(), and yyrestart().

Here is the call graph for this function:

◆ yy_load_buffer_state()

void yyFlexLexer::yy_load_buffer_state ( )
protected

◆ yy_pop_state()

void yyFlexLexer::yy_pop_state ( )
protected

Definition at line 2082 of file scan.cc.

References BEGIN, YY_FATAL_ERROR, yy_start_stack, and yy_start_stack_ptr.

◆ yy_push_state()

void yyFlexLexer::yy_push_state ( int  new_state)
protected

Definition at line 2053 of file scan.cc.

References BEGIN, YY_FATAL_ERROR, YY_START, yy_start_stack, yy_start_stack_depth, YY_START_STACK_INCR, yy_start_stack_ptr, yyalloc(), and yyrealloc().

Here is the call graph for this function:

◆ yy_switch_to_buffer()

void yyFlexLexer::yy_switch_to_buffer ( yy_buffer_state new_buffer)
virtual

Switch to a different input buffer.

Parameters
new_bufferThe new input buffer.

Implements FlexLexer.

Definition at line 1737 of file scan.cc.

References yy_c_buf_p, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_did_buffer_switch_on_eof, yy_hold_char, yy_load_buffer_state(), yy_n_chars, and yyensure_buffer_stack().

Referenced by scan_open_(), and switch_streams().

Here is the call graph for this function:

◆ yy_top_state()

int yyFlexLexer::yy_top_state ( )
protected

Definition at line 2094 of file scan.cc.

References yy_start_stack, and yy_start_stack_ptr.

◆ yy_try_NUL_trans()

yy_state_type yyFlexLexer::yy_try_NUL_trans ( yy_state_type  current_state)
protected

◆ yyensure_buffer_stack()

void yyFlexLexer::yyensure_buffer_stack ( void  )
protected

Definition at line 1996 of file scan.cc.

References yy_buffer_stack, yy_buffer_stack_max, yy_buffer_stack_top, YY_FATAL_ERROR, yyalloc(), and yyrealloc().

Referenced by yy_switch_to_buffer(), yypush_buffer_state(), and yyrestart().

Here is the call graph for this function:

◆ yyinput()

int yyFlexLexer::yyinput ( )
protected

Definition at line 1621 of file scan.cc.

References EOB_ACT_CONTINUE_SCAN, EOB_ACT_END_OF_FILE, EOB_ACT_LAST_MATCH, yy_c_buf_p, YY_CURRENT_BUFFER_LVALUE, yy_did_buffer_switch_on_eof, YY_END_OF_BUFFER_CHAR, yy_get_next_buffer(), yy_hold_char, yy_n_chars, YY_NEW_FILE, yyin, yyrestart(), yytext_ptr, and yywrap().

Here is the call graph for this function:

◆ yyinput_stream()

std::istream& yyFlexLexer::yyinput_stream ( )
inline

Definition at line 147 of file flex-lexer.hh.

◆ yypop_buffer_state()

void yyFlexLexer::yypop_buffer_state ( void  )

Removes and deletes the top of the stack, if present.

The next element becomes the new top.

Definition at line 1971 of file scan.cc.

References yy_buffer_stack_top, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_delete_buffer(), yy_did_buffer_switch_on_eof, and yy_load_buffer_state().

Referenced by scan_close_().

Here is the call graph for this function:

◆ yypush_buffer_state()

void yyFlexLexer::yypush_buffer_state ( yy_buffer_state new_buffer)

Pushes the new state onto the stack.

The new state becomes the current state. This function will allocate the stack if necessary.

Parameters
new_bufferThe new state.

Definition at line 1935 of file scan.cc.

References yy_buffer_stack_top, yy_c_buf_p, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_did_buffer_switch_on_eof, yy_hold_char, yy_load_buffer_state(), yy_n_chars, and yyensure_buffer_stack().

Referenced by scan_open_().

Here is the call graph for this function:

◆ yyrestart()

void yyFlexLexer::yyrestart ( std::istream *  input_file)
virtual

Immediately switch to a different input stream.

Delegate to the new version that takes an istream reference.

Parameters
input_fileA readable stream.
Note
This function does not reset the start condition to INITIAL .

Implements FlexLexer.

Definition at line 1701 of file scan.cc.

References YY_BUF_SIZE, yy_create_buffer(), YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_init_buffer(), yy_load_buffer_state(), yyensure_buffer_stack(), and yyin.

Referenced by yy_get_next_buffer(), and yyinput().

Here is the call graph for this function:

◆ yyunput()

void yyFlexLexer::yyunput ( int  c,
char buf_ptr 
)
protected

◆ yywrap()

int yyFlexLexer::yywrap ( )
virtual

Definition at line 2212 of file scan.cc.

Referenced by yyinput().

Member Data Documentation

◆ loc

location yyFlexLexer::loc

Definition at line 131 of file flex-lexer.hh.

◆ yy_buffer_stack

yy_buffer_state** yyFlexLexer::yy_buffer_stack
protected

Stack as an array.

Definition at line 200 of file flex-lexer.hh.

Referenced by ctor_common(), yyensure_buffer_stack(), and ~yyFlexLexer().

◆ yy_buffer_stack_max

size_t yyFlexLexer::yy_buffer_stack_max
protected

capacity of stack.

Definition at line 199 of file flex-lexer.hh.

Referenced by ctor_common(), and yyensure_buffer_stack().

◆ yy_buffer_stack_top

size_t yyFlexLexer::yy_buffer_stack_top
protected

index of top of stack.

Definition at line 198 of file flex-lexer.hh.

Referenced by ctor_common(), yyensure_buffer_stack(), yypop_buffer_state(), and yypush_buffer_state().

◆ yy_c_buf_p

◆ yy_did_buffer_switch_on_eof

int yyFlexLexer::yy_did_buffer_switch_on_eof
protected

◆ yy_full_lp

int yyFlexLexer::yy_full_lp
protected

Definition at line 214 of file flex-lexer.hh.

◆ yy_full_match

char* yyFlexLexer::yy_full_match
protected

Definition at line 212 of file flex-lexer.hh.

◆ yy_full_state

int* yyFlexLexer::yy_full_state
protected

Definition at line 213 of file flex-lexer.hh.

◆ yy_hold_char

char yyFlexLexer::yy_hold_char
protected

◆ yy_init

int yyFlexLexer::yy_init
protected

Definition at line 190 of file flex-lexer.hh.

Referenced by ctor_common().

◆ yy_last_accepting_cpos

char* yyFlexLexer::yy_last_accepting_cpos
protected

Definition at line 207 of file flex-lexer.hh.

Referenced by yy_get_previous_state(), and yy_try_NUL_trans().

◆ yy_last_accepting_state

yy_state_type yyFlexLexer::yy_last_accepting_state
protected

Definition at line 206 of file flex-lexer.hh.

Referenced by yy_get_previous_state(), and yy_try_NUL_trans().

◆ yy_looking_for_trail_begin

int yyFlexLexer::yy_looking_for_trail_begin
protected

Definition at line 217 of file flex-lexer.hh.

Referenced by ctor_common().

◆ yy_lp

int yyFlexLexer::yy_lp
protected

Definition at line 216 of file flex-lexer.hh.

◆ yy_more_flag

int yyFlexLexer::yy_more_flag
protected

Definition at line 219 of file flex-lexer.hh.

Referenced by ctor_common().

◆ yy_more_len

int yyFlexLexer::yy_more_len
protected

Definition at line 220 of file flex-lexer.hh.

Referenced by ctor_common().

◆ yy_more_offset

int yyFlexLexer::yy_more_offset
protected

Definition at line 221 of file flex-lexer.hh.

Referenced by ctor_common().

◆ yy_n_chars

int yyFlexLexer::yy_n_chars
protected

◆ yy_prev_more_offset

int yyFlexLexer::yy_prev_more_offset
protected

Definition at line 222 of file flex-lexer.hh.

Referenced by ctor_common().

◆ yy_start

int yyFlexLexer::yy_start
protected

Definition at line 191 of file flex-lexer.hh.

Referenced by ctor_common(), and yy_get_previous_state().

◆ yy_start_stack

int* yyFlexLexer::yy_start_stack
protected

Definition at line 165 of file flex-lexer.hh.

Referenced by ctor_common(), yy_pop_state(), yy_push_state(), yy_top_state(), and ~yyFlexLexer().

◆ yy_start_stack_depth

int yyFlexLexer::yy_start_stack_depth
protected

Definition at line 164 of file flex-lexer.hh.

Referenced by ctor_common(), and yy_push_state().

◆ yy_start_stack_ptr

int yyFlexLexer::yy_start_stack_ptr
protected

Definition at line 163 of file flex-lexer.hh.

Referenced by ctor_common(), yy_pop_state(), yy_push_state(), and yy_top_state().

◆ yy_state_buf

yy_state_type* yyFlexLexer::yy_state_buf
protected

Definition at line 209 of file flex-lexer.hh.

Referenced by ctor_common(), and ~yyFlexLexer().

◆ yy_state_ptr

yy_state_type* yyFlexLexer::yy_state_ptr
protected

Definition at line 210 of file flex-lexer.hh.

◆ yyin

std::istream* yyFlexLexer::yyin

◆ yyout

std::ostream* yyFlexLexer::yyout
protected

Definition at line 178 of file flex-lexer.hh.

Referenced by LexerOutput(), and switch_streams().


The documentation for this class was generated from the following files: