GNU Octave  4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
lex.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 1993-2015 John W. Eaton
4 
5 This file is part of Octave.
6 
7 Octave is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by the
9 Free Software Foundation; either version 3 of the License, or (at your
10 option) any later version.
11 
12 Octave is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with Octave; see the file COPYING. If not, see
19 <http://www.gnu.org/licenses/>.
20 
21 */
22 
23 #if !defined (octave_lex_h)
24 #define octave_lex_h 1
25 
26 #include <deque>
27 #include <limits>
28 #include <list>
29 #include <set>
30 #include <stack>
31 
32 #include "comment-list.h"
33 #include "input.h"
34 #include "token.h"
35 
36 // Is the given string a keyword?
37 extern bool is_keyword (const std::string& s);
38 
39 // For communication between the lexer and parser.
40 
41 class
43 {
44 public:
45 
46  // Track symbol table information when parsing functions.
47 
49  {
50  public:
51 
52  symbol_table_context (void) : frame_stack () { }
53 
54  void clear (void)
55  {
56  while (! frame_stack.empty ())
57  frame_stack.pop ();
58  }
59 
60  bool empty (void) const { return frame_stack.empty (); }
61 
62  void pop (void)
63  {
64  if (empty ())
66 
67  frame_stack.pop ();
68  }
69 
71  {
72  frame_stack.push (scope);
73  }
74 
76  {
77  return empty () ? symbol_table::current_scope () : frame_stack.top ();
78  }
79 
80  private:
81 
82  std::stack<symbol_table::scope_id> frame_stack;
83  };
84 
85  // Track nesting of square brackets, curly braces, and parentheses.
86 
88  {
89  private:
90 
92  {
93  BRACKET = 1,
94  BRACE = 2,
95  PAREN = 3,
96  ANON_FCN_BODY = 4
97  };
98 
99  public:
100 
101  bbp_nesting_level (void) : context () { }
102 
104 
105  bbp_nesting_level& operator = (const bbp_nesting_level& nl)
106  {
107  if (&nl != this)
108  context = nl.context;
109 
110  return *this;
111  }
112 
114 
115  void reset (void)
116  {
117  while (! context.empty ())
118  context.pop ();
119  }
120 
121  void bracket (void) { context.push (BRACKET); }
122 
123  bool is_bracket (void)
124  {
125  return ! context.empty () && context.top () == BRACKET;
126  }
127 
128  void brace (void) { context.push (BRACE); }
129 
130  bool is_brace (void)
131  {
132  return ! context.empty () && context.top () == BRACE;
133  }
134 
135  void paren (void) { context.push (PAREN); }
136 
137  bool is_paren (void)
138  {
139  return ! context.empty () && context.top () == PAREN;
140  }
141 
142  void anon_fcn_body (void) { context.push (ANON_FCN_BODY); }
143 
144  bool is_anon_fcn_body (void)
145  {
146  return ! context.empty () && context.top () == ANON_FCN_BODY;
147  }
148 
150  {
151  return (! context.empty ()
152  && (context.top () == BRACKET || context.top () == BRACE));
153  }
154 
155  bool none (void) { return context.empty (); }
156 
157  void remove (void)
158  {
159  if (! context.empty ())
160  context.pop ();
161  }
162 
163  void clear (void)
164  {
165  while (! context.empty ())
166  context.pop ();
167  }
168 
169  private:
170 
171  std::stack<int> context;
172  };
173 
175  {
176  public:
177 
178  // Store an "unlimited" number of tokens.
180  : buffer (), sz (sz_arg)
181  { }
182 
183  void push (token *tok)
184  {
185  if (buffer.size () == sz)
186  pop ();
187 
188  buffer.push_front (tok);
189  }
190 
191  void pop (void)
192  {
193  if (! empty ())
194  {
195  delete buffer.back ();
196  buffer.pop_back ();
197  }
198  }
199 
200  // Direct access.
201  token *at (size_t n)
202  {
203  return empty () ? 0 : buffer.at (n);
204  }
205 
206  const token *at (size_t n) const
207  {
208  return empty () ? 0 : buffer.at (n);
209  }
210 
211  // Most recently pushed.
212  token *front (void)
213  {
214  return empty () ? 0 : buffer.front ();
215  }
216 
217  const token *front (void) const
218  {
219  return empty () ? 0 : buffer.front ();
220  }
221 
222  token *back (void)
223  {
224  return empty () ? 0 : buffer.back ();
225  }
226 
227  const token *back (void) const
228  {
229  return empty () ? 0 : buffer.back ();
230  }
231 
232  // Number of elements currently in the buffer, max of sz.
233  size_t size (void) const { return buffer.size (); }
234 
235  bool empty (void) const { return buffer.empty (); }
236 
237  void clear (void)
238  {
239  while (! empty ())
240  pop ();
241  }
242 
243  private:
244 
245  std::deque<token *> buffer;
246 
247  size_t sz;
248 
249  // No copying!
250 
251  token_cache (const token_cache&);
252 
253  token_cache& operator = (const token_cache&);
254  };
255 
257  : end_of_input (false), at_beginning_of_statement (true),
258  looking_at_anon_fcn_args (false), looking_at_return_list (false),
259  looking_at_parameter_list (false), looking_at_decl_list (false),
260  looking_at_initializer_expression (false),
261  looking_at_matrix_or_assign_lhs (false),
262  looking_for_object_index (false),
263  looking_at_indirect_ref (false), parsing_class_method (false),
264  parsing_classdef (false), maybe_classdef_get_set_method (false),
265  parsing_classdef_get_method (false),
266  parsing_classdef_set_method (false),
267  quote_is_transpose (false), force_script (false),
268  reading_fcn_file (false), reading_script_file (false),
269  reading_classdef_file (false),
270  input_line_number (1), current_input_column (1),
271  bracketflag (0), braceflag (0),
272  looping (0), defining_func (0), looking_at_function_handle (0),
273  block_comment_nesting_level (0), command_arg_paren_count (0),
274  token_count (0), current_input_line (), comment_text (),
275  help_text (), string_text (), string_line (0), string_column (0),
276  fcn_file_name (), fcn_file_full_name (), looking_at_object_index (),
277  parsed_function_name (), pending_local_variables (),
278  symtab_context (), nesting_level (), tokens ()
279  {
280  init ();
281  }
282 
283  ~lexical_feedback (void);
284 
285  void init (void);
286 
287  void reset (void);
288 
289  int previous_token_value (void) const;
290 
291  bool previous_token_value_is (int tok_val) const;
292 
293  void mark_previous_token_trailing_space (void);
294 
295  bool space_follows_previous_token (void) const;
296 
297  bool previous_token_is_binop (void) const;
298 
299  bool previous_token_is_keyword (void) const;
300 
301  bool previous_token_may_be_command (void) const;
302 
303  void maybe_mark_previous_token_as_variable (void);
304 
305  void mark_as_variable (const std::string& nm);
306  void mark_as_variables (const std::list<std::string>& lst);
307 
308  // true means that we have encountered eof on the input stream.
310 
311  // true means we are at the beginning of a statement, where a
312  // command name is possible.
314 
315  // true means we are parsing an anonymous function argument list.
317 
318  // true means we're parsing the return list for a function.
320 
321  // true means we're parsing the parameter list for a function.
323 
324  // true means we're parsing a declaration list (global or
325  // persistent).
327 
328  // true means we are looking at the initializer expression for a
329  // parameter list element.
331 
332  // true means we're parsing a matrix or the left hand side of
333  // multi-value assignment statement.
335 
336  // object index not possible until we've seen something.
338 
339  // true means we're looking at an indirect reference to a
340  // structure element.
342 
343  // true means we are parsing a class method in function or classdef file.
345 
346  // true means we are parsing a classdef file
348 
349  // true means we are parsing a class method declaration line in a
350  // classdef file and can accept a property get or set method name.
351  // for example, "get.propertyname" is recognized as a function name.
353 
354  // TRUE means we are parsing a classdef get.method.
356 
357  // TRUE means we are parsing a classdef set.method.
359 
360  // return transpose or start a string?
362 
363  // TRUE means treat the current file as a script even if the first
364  // token is "function" or "classdef".
366 
367  // TRUE means we're parsing a function file.
369 
370  // TRUE means we're parsing a script file.
372 
373  // TRUE means we're parsing a classdef file.
375 
376  // the current input line number.
378 
379  // the column of the current token.
381 
382  // square bracket level count.
384 
385  // curly brace level count.
387 
388  // true means we're in the middle of defining a loop.
389  int looping;
390 
391  // nonzero means we're in the middle of defining a function.
393 
394  // nonzero means we are parsing a function handle.
396 
397  // nestng level for blcok comments.
399 
400  // Parenthesis count for command argument parsing.
402 
403  // Count of tokens recognized by this lexer since initialized or
404  // since the last reset.
405  size_t token_count;
406 
407  // The current line of input.
408  std::string current_input_line;
409 
410  // The current comment text.
411  std::string comment_text;
412 
413  // The current help text.
414  std::string help_text;
415 
416  // The current character string text.
417  std::string string_text;
418 
419  // The position of the beginning of the current character string.
422 
423  // Simple name of function file we are reading.
424  std::string fcn_file_name;
425 
426  // Full name of file we are reading.
427  std::string fcn_file_full_name;
428 
429  // if the front of the list is true, the closest paren, brace, or
430  // bracket nesting is an index for an object.
431  std::list<bool> looking_at_object_index;
432 
433  // if the top of the stack is true, then we've already seen the name
434  // of the current function. should only matter if
435  // current_function_level > 0
436  std::stack<bool> parsed_function_name;
437 
438  // set of identifiers that might be local variable names.
439  std::set<std::string> pending_local_variables;
440 
441  // Track current symbol table scope and context.
443 
444  // is the closest nesting level a square bracket, squiggly brace,
445  // a paren, or an anonymous function body?
447 
448  // Tokens generated by the lexer.
450 
451 private:
452 
453  // No copying!
454 
456 
457  lexical_feedback& operator = (const lexical_feedback&);
458 };
459 
460 // octave_base_lexer inherits from lexical_feedback because we will
461 // eventually have several different constructors and it is easier to
462 // intialize if everything is grouped in a parent class rather than
463 // listing all the members in the octave_base_lexer class.
464 
465 class
467 {
468 public:
469 
470  // Handle buffering of input for lexer.
471 
473  {
474  public:
475 
477  : buffer (), pos (0), chars_left (0), eof (false)
478  { }
479 
480  void fill (const std::string& input, bool eof_arg);
481 
482  // Copy at most max_size characters to buf.
483  int copy_chunk (char *buf, size_t max_size);
484 
485  bool empty (void) const { return chars_left == 0; }
486 
487  bool at_eof (void) const { return eof; }
488 
489  private:
490 
491  std::string buffer;
492  const char *pos;
493  size_t chars_left;
494  bool eof;
495  };
496 
497  // Collect comment text.
498 
499  class
501  {
502  public:
503 
504  comment_buffer (void) : comment_list (0) { }
505 
506  ~comment_buffer (void) { delete comment_list; }
507 
508  void append (const std::string& s, octave_comment_elt::comment_type t)
509  {
510  if (! comment_list)
511  comment_list = new octave_comment_list ();
512 
513  comment_list->append (s, t);
514  }
515 
516  // Caller is expected to delete the returned value.
517 
519  {
520  octave_comment_list *retval = comment_list;
521 
522  comment_list = 0;
523 
524  return retval;
525  }
526 
527  void reset (void)
528  {
529  delete comment_list;
530 
531  comment_list = 0;
532  }
533 
534  private:
535 
537  };
538 
540  : lexical_feedback (), scanner (0), input_buf (), comment_buf ()
541  {
542  init ();
543  }
544 
545  virtual ~octave_base_lexer (void);
546 
547  void init (void);
548 
549  virtual bool is_push_lexer (void) const { return false; }
550 
551  virtual void reset (void);
552 
553  void prep_for_file (void);
554 
555  void begin_string (int state);
556 
557  virtual int fill_flex_buffer (char *buf, unsigned int max_size) = 0;
558 
559  bool at_end_of_buffer (void) const { return input_buf.empty (); }
560 
561  bool at_end_of_file (void) const { return input_buf.at_eof (); }
562 
563  int handle_end_of_input (void);
564 
565  char *flex_yytext (void);
566 
567  int flex_yyleng (void);
568 
569  int text_yyinput (void);
570 
571  void xunput (char c, char *buf);
572 
573  void xunput (char c);
574 
575  bool looking_at_space (void);
576 
577  bool inside_any_object_index (void);
578 
579  bool is_variable (const std::string& name);
580 
581  int is_keyword_token (const std::string& s);
582 
583  bool fq_identifier_contains_keyword (const std::string& s);
584 
585  bool whitespace_is_significant (void);
586 
587  void handle_number (void);
588 
589  void handle_continuation (void);
590 
591  void finish_comment (octave_comment_elt::comment_type typ);
592 
593  octave_comment_list *get_comment (void) { return comment_buf.get_comment (); }
594 
595  int handle_close_bracket (int bracket_type);
596 
597  bool looks_like_command_arg (void);
598 
599  int handle_superclass_identifier (void);
600 
601  int handle_meta_identifier (void);
602 
603  int handle_fq_identifier (void);
604 
605  int handle_identifier (void);
606 
607  void maybe_warn_separator_insert (char sep);
608 
609  void gripe_single_quote_string (void);
610 
611  void gripe_language_extension (const std::string& msg);
612 
613  void maybe_gripe_language_extension_comment (char c);
614 
615  void gripe_language_extension_continuation (void);
616 
617  void gripe_language_extension_operator (const std::string& op);
618 
619  void push_token (token *);
620 
621  token *current_token (void);
622 
623  void display_token (int tok);
624 
625  void fatal_error (const char *msg);
626 
627  void lexer_debug (const char *pattern);
628 
629  // Internal state of the flex-generated lexer.
630  void *scanner;
631 
632  // Object that reads and buffers input.
634 
635  // Object that collects comment text.
637 
638  virtual void increment_promptflag (void) = 0;
639 
640  virtual void decrement_promptflag (void) = 0;
641 
642  virtual int promptflag (void) const = 0;
643 
644  virtual int promptflag (int) = 0;
645 
646  virtual std::string input_source (void) const { return "unknown"; }
647 
648  virtual bool input_from_terminal (void) const { return false; }
649 
650  virtual bool input_from_file (void) const { return false; }
651 
652  virtual bool input_from_eval_string (void) const { return false; }
653 
654  void push_start_state (int state);
655 
656  void pop_start_state (void);
657 
658  void clear_start_state (void);
659 
660  int start_state (void) const { return start_state_stack.top (); }
661 
662  void display_start_state (void) const;
663 
664  int handle_op (const char *pattern, int tok, bool bos = false);
665 
666  int handle_language_extension_op (const char *pattern, int tok,
667  bool bos = false);
668 
669  bool maybe_unput_comma_before_unary_op (int tok);
670 
671  int handle_unary_op (int tok, bool bos = false);
672 
673  int handle_language_extension_unary_op (int tok, bool bos = false);
674 
675  int handle_assign_op (const char *pattern, int tok);
676 
677  int handle_language_extension_assign_op (const char *pattern, int tok);
678 
679  int handle_op_internal (int tok, bool bos, bool compat);
680 
681  int handle_token (const std::string& name, int tok);
682 
683  int handle_token (int tok, token *tok_val = 0);
684 
685  int count_token (int tok);
686 
687  int count_token_internal (int tok);
688 
689  int show_token (int tok);
690 
691  void enable_fq_identifier (void);
692 
693 protected:
694 
695  std::stack<int> start_state_stack;
696 
697  // No copying!
698 
700 
701  octave_base_lexer& operator = (const octave_base_lexer&);
702 };
703 
704 class
706 {
707 public:
708 
710  : octave_base_lexer (), input_reader (this)
711  { }
712 
713  octave_lexer (FILE *file)
714  : octave_base_lexer (), input_reader (file, this)
715  { }
716 
717  octave_lexer (const std::string& eval_string)
718  : octave_base_lexer (), input_reader (eval_string, this)
719  { }
720 
721  void reset (void)
722  {
723  input_reader.reset ();
724 
726  }
727 
728  void increment_promptflag (void) { input_reader.increment_promptflag (); }
729 
730  void decrement_promptflag (void) { input_reader.decrement_promptflag (); }
731 
732  int promptflag (void) const { return input_reader.promptflag (); }
733 
734  int promptflag (int n) { return input_reader.promptflag (n); }
735 
736  std::string input_source (void) const
737  {
738  return input_reader.input_source ();
739  }
740 
741  bool input_from_terminal (void) const
742  {
743  return input_reader.input_from_terminal ();
744  }
745 
746  bool input_from_file (void) const
747  {
748  return input_reader.input_from_file ();
749  }
750 
751  bool input_from_eval_string (void) const
752  {
753  return input_reader.input_from_eval_string ();
754  }
755 
756  int fill_flex_buffer (char *buf, unsigned int max_size);
757 
759 
760 protected:
761 
762  // No copying!
763 
764  octave_lexer (const octave_lexer&);
765 
766  octave_lexer& operator = (const octave_lexer&);
767 };
768 
769 class
771 {
772 public:
773 
774  octave_push_lexer (const std::string& input = std::string (),
775  bool eof = false)
776  : octave_base_lexer (), pflag (1)
777  {
778  append_input (input, eof);
779  }
780 
781  bool is_push_lexer (void) const { return true; }
782 
783  void reset (void)
784  {
785  promptflag (1);
786 
788  }
789 
790  void append_input (const std::string& input, bool eof)
791  {
792  input_buf.fill (input, eof);
793  }
794 
795  void increment_promptflag (void) { pflag++; }
796 
797  void decrement_promptflag (void) { pflag--; }
798 
799  int promptflag (void) const { return pflag; }
800 
801  int promptflag (int n)
802  {
803  int retval = pflag;
804  pflag = n;
805  return retval;
806  }
807 
808  std::string input_source (void) const { return "push buffer"; }
809 
810  int fill_flex_buffer (char *buf, unsigned int max_size);
811 
812 protected:
813 
814  int pflag;
815 
816  // No copying!
817 
819 
820  octave_push_lexer& operator = (const octave_push_lexer&);
821 };
822 
823 #endif
token * at(size_t n)
Definition: lex.h:201
int input_line_number
Definition: lex.h:377
virtual bool input_from_terminal(void) const
Definition: lex.h:648
bool input_from_terminal(void) const
Definition: lex.h:741
void push(symbol_table::scope_id scope=symbol_table::current_scope())
Definition: lex.h:70
token_cache tokens
Definition: lex.h:449
std::string input_source(void) const
Definition: lex.h:736
int string_line
Definition: lex.h:420
const token * back(void) const
Definition: lex.h:227
void * scanner
Definition: lex.h:630
int current_input_column
Definition: lex.h:380
symbol_table::scope_id curr_scope(void) const
Definition: lex.h:75
int promptflag(int n)
Definition: lex.h:734
bool looking_at_parameter_list
Definition: lex.h:322
static uint32_t state[624]
Definition: randmtzig.c:188
octave_comment_list * comment_list
Definition: lex.h:536
bool empty(void) const
Definition: lex.h:235
void reset(void)
Definition: lex.h:721
int block_comment_nesting_level
Definition: lex.h:398
virtual std::string input_source(void) const
Definition: lex.h:646
octave_comment_list * get_comment(void)
Definition: lex.h:593
virtual bool input_from_eval_string(void) const
Definition: lex.h:652
bool end_of_input
Definition: lex.h:309
void append_input(const std::string &input, bool eof)
Definition: lex.h:790
bool at_end_of_file(void) const
Definition: lex.h:561
std::stack< int > start_state_stack
Definition: lex.h:695
token * front(void)
Definition: lex.h:212
void append(const std::string &s, octave_comment_elt::comment_type t)
Definition: lex.h:508
std::stack< bool > parsed_function_name
Definition: lex.h:436
void reset(void)
Definition: lex.h:783
bool looking_at_initializer_expression
Definition: lex.h:330
bool empty(void) const
Definition: lex.h:485
bool reading_script_file
Definition: lex.h:371
octave_value_list eval_string(const std::string &eval_str, bool silent, int &parse_status, int nargout)
Definition: oct-parse.cc:8810
static bool is_variable(const std::string &name)
Definition: variables.cc:226
size_t token_count
Definition: lex.h:405
bool is_push_lexer(void) const
Definition: lex.h:781
lexical_feedback(void)
Definition: lex.h:256
bool looking_at_anon_fcn_args
Definition: lex.h:316
virtual bool is_push_lexer(void) const
Definition: lex.h:549
void increment_promptflag(void)
Definition: lex.h:795
int promptflag(void) const
Definition: lex.h:732
token_cache(size_t sz_arg=std::numeric_limits< size_t >::max())
Definition: lex.h:179
symbol_table_context symtab_context
Definition: lex.h:442
std::list< bool > looking_at_object_index
Definition: lex.h:431
octave_lexer(void)
Definition: lex.h:709
bool at_end_of_buffer(void) const
Definition: lex.h:559
std::string current_input_line
Definition: lex.h:408
int command_arg_paren_count
Definition: lex.h:401
octave_comment_list * get_comment(void)
Definition: lex.h:518
virtual bool input_from_file(void) const
Definition: lex.h:650
virtual void reset(void)
Definition: lex.cc:4863
void push(token *tok)
Definition: lex.h:183
int braceflag
Definition: lex.h:386
static std::string fcn_file_name(const octave_value &fcn)
Definition: symtab.cc:1163
bbp_nesting_level(const bbp_nesting_level &nl)
Definition: lex.h:103
token * back(void)
Definition: lex.h:222
std::string string_text
Definition: lex.h:417
static llvm::LLVMContext & context
Definition: jit-typeinfo.cc:76
bbp_nesting_level nesting_level
Definition: lex.h:446
bool parsing_classdef_get_method
Definition: lex.h:355
std::deque< token * > buffer
Definition: lex.h:245
bool is_keyword(const std::string &s)
Definition: lex.cc:4522
std::stack< int > context
Definition: lex.h:171
int promptflag(void) const
Definition: lex.h:799
input_buffer input_buf
Definition: lex.h:633
#define panic_impossible()
Definition: error.h:33
bool parsing_class_method
Definition: lex.h:344
std::string fcn_file_name
Definition: lex.h:424
void decrement_promptflag(void)
Definition: lex.h:730
int string_column
Definition: lex.h:421
std::set< std::string > pending_local_variables
Definition: lex.h:439
octave_lexer(FILE *file)
Definition: lex.h:713
int looping
Definition: lex.h:389
bool at_beginning_of_statement
Definition: lex.h:313
bool looking_for_object_index
Definition: lex.h:337
bool input_from_eval_string(void) const
Definition: lex.h:751
bool parsing_classdef
Definition: lex.h:347
int promptflag(int n)
Definition: lex.h:801
std::stack< symbol_table::scope_id > frame_stack
Definition: lex.h:82
octave_input_reader input_reader
Definition: lex.h:758
int start_state(void) const
Definition: lex.h:660
std::string input_source(void) const
Definition: lex.h:808
const token * at(size_t n) const
Definition: lex.h:206
octave_push_lexer(const std::string &input=std::string(), bool eof=false)
Definition: lex.h:774
std::string comment_text
Definition: lex.h:411
charNDArray max(char d, const charNDArray &m)
Definition: chNDArray.cc:233
std::string fcn_file_full_name
Definition: lex.h:427
bool quote_is_transpose
Definition: lex.h:361
const token * front(void) const
Definition: lex.h:217
bool at_eof(void) const
Definition: lex.h:487
int bracketflag
Definition: lex.h:383
bool force_script
Definition: lex.h:365
std::string help_text
Definition: lex.h:414
bool looking_at_matrix_or_assign_lhs
Definition: lex.h:334
#define scanner
void decrement_promptflag(void)
Definition: lex.h:797
bool reading_classdef_file
Definition: lex.h:374
bool looking_at_decl_list
Definition: lex.h:326
bool looking_at_return_list
Definition: lex.h:319
bool maybe_classdef_get_set_method
Definition: lex.h:352
int looking_at_function_handle
Definition: lex.h:395
static int input(yyscan_t yyscanner)
int defining_func
Definition: lex.h:392
bool looking_at_indirect_ref
Definition: lex.h:341
bool parsing_classdef_set_method
Definition: lex.h:358
bool input_from_file(void) const
Definition: lex.h:746
bool reading_fcn_file
Definition: lex.h:368
octave_base_lexer(void)
Definition: lex.h:539
Definition: token.h:30
comment_buffer comment_buf
Definition: lex.h:636
static scope_id current_scope(void)
Definition: symtab.h:1163
size_t size(void) const
Definition: lex.h:233
octave_lexer(const std::string &eval_string)
Definition: lex.h:717
void increment_promptflag(void)
Definition: lex.h:728