comparison libinterp/parse-tree/lex.ll @ 27512:549273db93e4

cache current input line in push lexer * lex.ll (push_lexer::append_input): Set m_current_input_line to input.
author John W. Eaton <jwe@octave.org>
date Fri, 11 Oct 2019 12:29:18 -0400
parents 075602880383
children 28ed77ca1e4a
comparison
equal deleted inserted replaced
27511:257105b5193a 27512:549273db93e4
3754 // recognized. To make that work, we need to do something like 3754 // recognized. To make that work, we need to do something like
3755 // maintain a queue of input strings and pass them to the flex 3755 // maintain a queue of input strings and pass them to the flex
3756 // buffer one line at a time, while also setting 3756 // buffer one line at a time, while also setting
3757 // m_current_input_line. Some care will be needed if a single line 3757 // m_current_input_line. Some care will be needed if a single line
3758 // of input arrives in multiple calls to append_input. 3758 // of input arrives in multiple calls to append_input.
3759 //
3760 // OR, should we require that the input string to append_input
3761 // IS a single line of input? That seems to be what we are doing
3762 // here by setting m_current_input_line to input.
3759 3763
3760 m_input_buf.fill (input, eof); 3764 m_input_buf.fill (input, eof);
3765 m_current_input_line = input;
3761 } 3766 }
3762 3767
3763 int 3768 int
3764 push_lexer::fill_flex_buffer (char *buf, unsigned max_size) 3769 push_lexer::fill_flex_buffer (char *buf, unsigned max_size)
3765 { 3770 {