![]() |
Vcsn
2.8
Be Rational
|
#include <flex-lexer.hh>
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_state * | yy_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) |
![]() | |
virtual | ~FlexLexer () |
const char * | YYText () 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 |
char * | yy_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 |
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 |
![]() | |
char * | yytext |
int | yyleng |
int | yylineno |
int | yy_flex_debug |
Private Member Functions | |
void | ctor_common () |
Definition at line 101 of file flex-lexer.hh.
yyFlexLexer::yyFlexLexer | ( | std::istream & | arg_yyin, |
std::ostream & | arg_yyout | ||
) |
Definition at line 1245 of file scan.cc.
References ctor_common().
yyFlexLexer::yyFlexLexer | ( | std::istream * | arg_yyin = nullptr , |
std::ostream * | arg_yyout = nullptr |
||
) |
Definition at line 1236 of file scan.cc.
References ctor_common().
|
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().
|
private |
Definition at line 1254 of file scan.cc.
References yy_buffer_stack, yy_buffer_stack_max, yy_buffer_stack_top, yy_c_buf_p, yy_did_buffer_switch_on_eof, FlexLexer::yy_flex_debug, yy_init, yy_looking_for_trail_begin, yy_more_flag, yy_more_len, yy_more_offset, yy_prev_more_offset, yy_start, yy_start_stack, yy_start_stack_depth, yy_start_stack_ptr, yy_state_buf, and FlexLexer::yylineno.
Referenced by yyFlexLexer().
|
protectedvirtual |
Definition at line 2107 of file scan.cc.
References YY_EXIT_FAILURE.
|
protectedvirtual |
Definition at line 1318 of file scan.cc.
References vcsn::detail::void, and yyin.
|
protectedvirtual |
Definition at line 1347 of file scan.cc.
References vcsn::detail::void, and yyout.
|
inline |
Definition at line 149 of file flex-lexer.hh.
void yyFlexLexer::scan_close_ | ( | ) |
Definition at line 2237 of file scan.cc.
References YY_FLEX_NAMESPACE_END, and yypop_buffer_state().
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().
|
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.
|
virtual |
Allocate and initialize an input buffer state.
Delegate creation of buffers to the new version that takes an istream reference.
file | A readable stream. |
size | The character buffer size in bytes. When in doubt, use YY_BUF_SIZE . |
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().
yyFlexLexer::YY_DECL_ | ( | ) |
|
virtual |
Destroy the buffer.
b | a 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().
|
protected |
Discard all buffered characters.
On the next scan, YY_INPUT will be called.
b | the 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().
|
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().
|
protected |
Definition at line 1508 of file scan.cc.
References yy_accept, yy_base, yy_c_buf_p, yy_chk, yy_def, yy_ec, yy_last_accepting_cpos, yy_last_accepting_state, yy_meta, YY_MORE_ADJ, yy_nxt, YY_SC_TO_UI, yy_start, and yytext_ptr.
|
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().
|
protected |
Definition at line 1772 of file scan.cc.
References yy_c_buf_p, YY_CURRENT_BUFFER_LVALUE, yy_hold_char, yy_n_chars, yyin, and yytext_ptr.
Referenced by yy_flush_buffer(), yy_switch_to_buffer(), yypop_buffer_state(), yypush_buffer_state(), and yyrestart().
|
protected |
Definition at line 2082 of file scan.cc.
References BEGIN, YY_FATAL_ERROR, yy_start_stack, and yy_start_stack_ptr.
|
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().
|
virtual |
Switch to a different input buffer.
new_buffer | The 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().
|
protected |
Definition at line 2094 of file scan.cc.
References yy_start_stack, and yy_start_stack_ptr.
|
protected |
Definition at line 1546 of file scan.cc.
References yy_accept, yy_base, yy_c_buf_p, yy_chk, yy_def, yy_last_accepting_cpos, yy_last_accepting_state, yy_meta, and yy_nxt.
|
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().
|
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().
|
inline |
Definition at line 147 of file flex-lexer.hh.
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_().
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.
new_buffer | The 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_().
|
virtual |
Immediately switch to a different input stream.
Delegate to the new version that takes an istream reference.
input_file | A readable stream. |
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().
|
protected |
Definition at line 1575 of file scan.cc.
References yy_c_buf_p, YY_CURRENT_BUFFER_LVALUE, YY_FATAL_ERROR, yy_hold_char, yy_n_chars, and yytext_ptr.
|
virtual |
location yyFlexLexer::loc |
Definition at line 131 of file flex-lexer.hh.
|
protected |
Stack as an array.
Definition at line 200 of file flex-lexer.hh.
Referenced by ctor_common(), yyensure_buffer_stack(), and ~yyFlexLexer().
|
protected |
capacity of stack.
Definition at line 199 of file flex-lexer.hh.
Referenced by ctor_common(), and yyensure_buffer_stack().
|
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().
|
protected |
Definition at line 188 of file flex-lexer.hh.
Referenced by ctor_common(), yy_get_next_buffer(), yy_get_previous_state(), yy_load_buffer_state(), yy_switch_to_buffer(), yy_try_NUL_trans(), yyinput(), yypush_buffer_state(), and yyunput().
|
protected |
Definition at line 195 of file flex-lexer.hh.
Referenced by ctor_common(), yy_switch_to_buffer(), yyinput(), yypop_buffer_state(), and yypush_buffer_state().
|
protected |
Definition at line 214 of file flex-lexer.hh.
|
protected |
Definition at line 212 of file flex-lexer.hh.
|
protected |
Definition at line 213 of file flex-lexer.hh.
|
protected |
Definition at line 182 of file flex-lexer.hh.
Referenced by yy_load_buffer_state(), yy_switch_to_buffer(), yyinput(), yypush_buffer_state(), and yyunput().
|
protected |
Definition at line 190 of file flex-lexer.hh.
Referenced by ctor_common().
|
protected |
Definition at line 207 of file flex-lexer.hh.
Referenced by yy_get_previous_state(), and yy_try_NUL_trans().
|
protected |
Definition at line 206 of file flex-lexer.hh.
Referenced by yy_get_previous_state(), and yy_try_NUL_trans().
|
protected |
Definition at line 217 of file flex-lexer.hh.
Referenced by ctor_common().
|
protected |
Definition at line 216 of file flex-lexer.hh.
|
protected |
Definition at line 219 of file flex-lexer.hh.
Referenced by ctor_common().
|
protected |
Definition at line 220 of file flex-lexer.hh.
Referenced by ctor_common().
|
protected |
Definition at line 221 of file flex-lexer.hh.
Referenced by ctor_common().
|
protected |
Definition at line 185 of file flex-lexer.hh.
Referenced by yy_get_next_buffer(), yy_load_buffer_state(), yy_switch_to_buffer(), yyinput(), yypush_buffer_state(), and yyunput().
|
protected |
Definition at line 222 of file flex-lexer.hh.
Referenced by ctor_common().
|
protected |
Definition at line 191 of file flex-lexer.hh.
Referenced by ctor_common(), and yy_get_previous_state().
|
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().
|
protected |
Definition at line 164 of file flex-lexer.hh.
Referenced by ctor_common(), and yy_push_state().
|
protected |
Definition at line 163 of file flex-lexer.hh.
Referenced by ctor_common(), yy_pop_state(), yy_push_state(), and yy_top_state().
|
protected |
Definition at line 209 of file flex-lexer.hh.
Referenced by ctor_common(), and ~yyFlexLexer().
|
protected |
Definition at line 210 of file flex-lexer.hh.
std::istream* yyFlexLexer::yyin |
Definition at line 146 of file flex-lexer.hh.
Referenced by LexerInput(), switch_streams(), yy_get_next_buffer(), yy_load_buffer_state(), yyinput(), and yyrestart().
|
protected |
Definition at line 178 of file flex-lexer.hh.
Referenced by LexerOutput(), and switch_streams().