Vcsn  2.4
Be Rational
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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 ()
 
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 103 of file flex-lexer.hh.

Constructor & Destructor Documentation

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

Definition at line 1291 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

void yyFlexLexer::ctor_common ( )
private
void yyFlexLexer::LexerError ( const char msg)
protectedvirtual

Definition at line 2061 of file scan.cc.

References YY_EXIT_FAILURE.

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

Definition at line 1314 of file scan.cc.

References vcsn::detail::void.

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

Definition at line 1343 of file scan.cc.

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

void yyFlexLexer::putback ( char  c)
inline

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

void yyFlexLexer::scan_close_ ( )

Definition at line 2190 of file scan.cc.

References yypop_buffer_state().

Here is the call graph for this function:

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

Definition at line 2183 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:

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

Implements FlexLexer.

Definition at line 1301 of file scan.cc.

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

Here is the call graph for this function:

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

Allocate and initialize an input buffer state.

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 1766 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:

yyFlexLexer::YY_DECL_ ( )
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 1798 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:

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 1856 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:

int yyFlexLexer::yy_get_next_buffer ( )
protected

Definition at line 1361 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_state_type yyFlexLexer::yy_get_previous_state ( )
protected
void yyFlexLexer::yy_init_buffer ( yy_buffer_state b,
std::istream *  s 
)
protected

Definition at line 1821 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:

void yyFlexLexer::yy_load_buffer_state ( )
protected
void yyFlexLexer::yy_pop_state ( )
protected

Definition at line 2036 of file scan.cc.

References BEGIN, YY_FATAL_ERROR, yy_start_stack, and yy_start_stack_ptr.

void yyFlexLexer::yy_push_state ( int  new_state)
protected

Definition at line 2008 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:

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 1713 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:

int yyFlexLexer::yy_top_state ( )
protected

Definition at line 2048 of file scan.cc.

References yy_start_stack, and yy_start_stack_ptr.

yy_state_type yyFlexLexer::yy_try_NUL_trans ( yy_state_type  current_state)
protected
void yyFlexLexer::yyensure_buffer_stack ( void  )
protected

Definition at line 1951 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:

int yyFlexLexer::yyinput ( )
protected

Definition at line 1612 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:

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 1926 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:

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 1890 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:

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

Immediately switch to a different input stream.

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

Implements FlexLexer.

Definition at line 1692 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:

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

Definition at line 1567 of file scan.cc.

References vcsn::if(), yy_c_buf_p, YY_CURRENT_BUFFER_LVALUE, YY_FATAL_ERROR, yy_hold_char, yy_n_chars, and yytext_ptr.

Here is the call graph for this function:

int yyFlexLexer::yywrap ( )
virtual

Definition at line 2165 of file scan.cc.

Referenced by yyinput().

Member Data Documentation

location yyFlexLexer::loc

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

yy_buffer_state** yyFlexLexer::yy_buffer_stack
protected

Stack as an array.

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

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

size_t yyFlexLexer::yy_buffer_stack_max
protected

capacity of stack.

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

Referenced by yyensure_buffer_stack(), and yyFlexLexer().

size_t yyFlexLexer::yy_buffer_stack_top
protected

index of top of stack.

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

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

int yyFlexLexer::yy_did_buffer_switch_on_eof
protected
int yyFlexLexer::yy_full_lp
protected

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

char* yyFlexLexer::yy_full_match
protected

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

int* yyFlexLexer::yy_full_state
protected

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

char yyFlexLexer::yy_hold_char
protected
int yyFlexLexer::yy_init
protected

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

Referenced by yyFlexLexer().

char* yyFlexLexer::yy_last_accepting_cpos
protected

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

Referenced by yy_get_previous_state(), and yy_try_NUL_trans().

yy_state_type yyFlexLexer::yy_last_accepting_state
protected

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

Referenced by yy_get_previous_state(), and yy_try_NUL_trans().

int yyFlexLexer::yy_looking_for_trail_begin
protected

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

Referenced by yyFlexLexer().

int yyFlexLexer::yy_lp
protected

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

int yyFlexLexer::yy_more_flag
protected

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

Referenced by yyFlexLexer().

int yyFlexLexer::yy_more_len
protected

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

Referenced by yyFlexLexer().

int yyFlexLexer::yy_more_offset
protected

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

Referenced by yyFlexLexer().

int yyFlexLexer::yy_n_chars
protected
int yyFlexLexer::yy_prev_more_offset
protected

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

Referenced by yyFlexLexer().

int yyFlexLexer::yy_start
protected

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

Referenced by yy_get_previous_state(), and yyFlexLexer().

int* yyFlexLexer::yy_start_stack
protected

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

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

int yyFlexLexer::yy_start_stack_depth
protected

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

Referenced by yy_push_state(), and yyFlexLexer().

int yyFlexLexer::yy_start_stack_ptr
protected

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

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

yy_state_type* yyFlexLexer::yy_state_buf
protected

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

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

yy_state_type* yyFlexLexer::yy_state_ptr
protected

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

std::istream* yyFlexLexer::yyin
std::ostream* yyFlexLexer::yyout
protected

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

Referenced by LexerOutput(), switch_streams(), and yyFlexLexer().


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