comparison libinterp/parse-tree/lex.h @ 16207:0467d68ca891

move current_input_line to lexical_feedback class * input.h, input.cc, lex.h, lex.ll (current_input_line): Declare as member of lexical_feedback class. (octave_base_reader::octave_gets, octave_terminal_reader::get_input, octave_file_reader::get_input, octave_eval_string_reader::get_input): Don't set current_input_line. (octave_lexer::read): Set current_input_line. * oct-parse.in.yy (octave_parser::bison_error): Use curr_lexer->current_input_line.
author John W. Eaton <jwe@octave.org>
date Wed, 06 Mar 2013 19:39:48 -0500
parents 127cccb037bf
children e7ff32e7cf82
comparison
equal deleted inserted replaced
16206:9ba5c5ed3aeb 16207:0467d68ca891
175 reading_classdef_file (false), 175 reading_classdef_file (false),
176 input_line_number (1), current_input_column (1), 176 input_line_number (1), current_input_column (1),
177 bracketflag (0), braceflag (0), 177 bracketflag (0), braceflag (0),
178 looping (0), defining_func (0), looking_at_function_handle (0), 178 looping (0), defining_func (0), looking_at_function_handle (0),
179 block_comment_nesting_level (0), token_count (0), 179 block_comment_nesting_level (0), token_count (0),
180 help_text (), fcn_file_name (), fcn_file_full_name (), 180 current_input_line (), help_text (), fcn_file_name (),
181 looking_at_object_index (), parsed_function_name (), 181 fcn_file_full_name (), looking_at_object_index (),
182 pending_local_variables (), nesting_level (), token_stack () 182 parsed_function_name (), pending_local_variables (),
183 nesting_level (), token_stack ()
183 { 184 {
184 init (); 185 init ();
185 } 186 }
186 187
187 ~lexical_feedback (void); 188 ~lexical_feedback (void);
284 int block_comment_nesting_level; 285 int block_comment_nesting_level;
285 286
286 // Count of tokens recognized by this lexer since initialized or 287 // Count of tokens recognized by this lexer since initialized or
287 // since the last reset. 288 // since the last reset.
288 size_t token_count; 289 size_t token_count;
290
291 // The current line of input.
292 std::string current_input_line;
289 293
290 // The current help text. 294 // The current help text.
291 std::string help_text; 295 std::string help_text;
292 296
293 // Simple name of function file we are reading. 297 // Simple name of function file we are reading.