GNU Octave 11.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
lex.h
Go to the documentation of this file.
1////////////////////////////////////////////////////////////////////////
2//
3// Copyright (C) 1993-2026 The Octave Project Developers
4//
5// See the file COPYRIGHT.md in the top-level directory of this
6// distribution or <https://octave.org/copyright/>.
7//
8// This file is part of Octave.
9//
10// Octave is free software: you can redistribute it and/or modify it
11// under the terms of the GNU General Public License as published by
12// the Free Software Foundation, either version 3 of the License, or
13// (at your option) any later version.
14//
15// Octave is distributed in the hope that it will be useful, but
16// WITHOUT ANY WARRANTY; without even the implied warranty of
17// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18// GNU General Public License for more details.
19//
20// You should have received a copy of the GNU General Public License
21// along with Octave; see the file COPYING. If not, see
22// <https://www.gnu.org/licenses/>.
23//
24////////////////////////////////////////////////////////////////////////
25
26#if ! defined (octave_lex_h)
27#define octave_lex_h 1
28
29#include "octave-config.h"
30
31#include <deque>
32#include <list>
33#include <set>
34#include <stack>
35
36#include "comment-list.h"
37#include "filepos.h"
38#include "input.h"
39#include "symscope.h"
40#include "token.h"
41
43
44class interpreter;
45
46// Is the given string a keyword?
47extern bool iskeyword (const std::string& s);
48
49// For communication between the lexer and parser.
50
51class OCTINTERP_API lexical_feedback
52{
53public:
54
55 // Track symbol table information when parsing functions.
56
58 {
59 public:
60
62 : m_interpreter (interp), m_frame_stack () { }
63
64 OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (symbol_table_context)
65
66 ~symbol_table_context () { clear (); }
67
68 void clear ();
69
70 bool empty () const { return m_frame_stack.empty (); }
71
72 std::size_t size () const { return m_frame_stack.size (); }
73
74 void pop ();
75
76 void push (const symbol_scope& scope)
77 {
78 m_frame_stack.push_front (scope);
79 }
80
81 symbol_scope curr_scope () const;
82 symbol_scope parent_scope () const;
83
84 private:
85
86 interpreter& m_interpreter;
87
88 std::deque<symbol_scope> m_frame_stack;
89 };
90
91 // Track nesting of square brackets, curly braces, and parentheses.
92
94 {
95 private:
96
97 enum bracket_type
98 {
99 BRACKET = 1,
100 BRACE = 2,
101 PAREN = 3,
102 ANON_FCN_BODY = 4
103 };
104
105 public:
106
107 bbp_nesting_level () : m_context () { }
108
110 : m_context (nl.m_context)
111 { }
112
113 bbp_nesting_level& operator = (const bbp_nesting_level& nl)
114 {
115 if (&nl != this)
116 m_context = nl.m_context;
117
118 return *this;
119 }
120
121 ~bbp_nesting_level () = default;
122
123 // Alias for clear function.
124 void reset () { clear (); }
125
126 void bracket () { m_context.push (BRACKET); }
127
129 {
130 return ! m_context.empty () && m_context.top () == BRACKET;
131 }
132
133 void brace () { m_context.push (BRACE); }
134
135 bool is_brace ()
136 {
137 return ! m_context.empty () && m_context.top () == BRACE;
138 }
139
140 void paren () { m_context.push (PAREN); }
141
142 bool is_paren ()
143 {
144 return ! m_context.empty () && m_context.top () == PAREN;
145 }
146
147 void anon_fcn_body () { m_context.push (ANON_FCN_BODY); }
148
150 {
151 return ! m_context.empty () && m_context.top () == ANON_FCN_BODY;
152 }
153
155 {
156 return (! m_context.empty ()
157 && (m_context.top () == BRACKET || m_context.top () == BRACE));
158 }
159
160 bool none () { return m_context.empty (); }
161
162 void remove ()
163 {
164 if (! m_context.empty ())
165 m_context.pop ();
166 }
167
168 void clear ()
169 {
170 while (! m_context.empty ())
171 m_context.pop ();
172 }
173
174 private:
175
176 std::stack<int> m_context;
177 };
178
180 {
181 public:
182
183 // Store an "unlimited" number of tokens.
184
185 // Tokens are allocated with new. Delete them when they are
186 // removed from the cache.
187 //
188 // One of the reasons for using this class instead of std::deque
189 // directly is that we can ensure that memory is cleaned up
190 // properly. It's more tedious to do that with deque since the
191 // deque destructor and clear method don't call delete on the
192 // elements that it stores. Another reason is that it makes it
193 // easier to change the implementation later if needed.
194
195 token_cache () : m_buffer () { }
196
197 OCTAVE_DISABLE_COPY_MOVE (token_cache)
198
199 ~token_cache () { clear (); }
200
201 void push (token *tok)
202 {
203 m_buffer.push_front (tok);
204 }
205
206 void pop ()
207 {
208 if (! empty ())
209 {
210 delete m_buffer.back ();
211 m_buffer.pop_back ();
212 }
213 }
214
215 // Direct access.
216 token * at (std::size_t n)
217 {
218 return empty () ? nullptr : m_buffer.at (n);
219 }
220
221 const token * at (std::size_t n) const
222 {
223 return empty () ? nullptr : m_buffer.at (n);
224 }
225
226 // Most recently pushed.
228 {
229 return empty () ? nullptr : m_buffer.front ();
230 }
231
232 const token * front () const
233 {
234 return empty () ? nullptr : m_buffer.front ();
235 }
236
238 {
239 return empty () ? nullptr : m_buffer.back ();
240 }
241
242 const token * back () const
243 {
244 return empty () ? nullptr : m_buffer.back ();
245 }
246
247 // Number of elements currently in the buffer.
248 std::size_t size () const { return m_buffer.size (); }
249
250 bool empty () const { return m_buffer.empty (); }
251
252 void clear ()
253 {
254 while (! empty ())
255 pop ();
256 }
257
258 private:
259
260 std::deque<token *> m_buffer;
261 };
262
264 : m_interpreter (interp),
265 m_end_of_input (false),
266 m_allow_command_syntax (true),
267 m_at_beginning_of_statement (true),
268 m_looking_at_anon_fcn_args (false),
269 m_looking_at_return_list (false),
270 m_looking_at_parameter_list (false),
271 m_looking_at_decl_list (false),
272 m_looking_at_matrix_or_assign_lhs (false),
273 m_looking_for_object_index (false),
274 m_looking_at_indirect_ref (false),
275 m_arguments_is_keyword (false),
276 m_classdef_element_names_are_keywords (false),
277 m_parsing_anon_fcn_body (false),
278 m_parsing_class_method (false),
279 m_parsing_classdef (false),
280 m_parsing_classdef_decl (false),
281 m_parsing_classdef_superclass (false),
282 m_maybe_classdef_get_set_method (false),
283 m_parsing_classdef_get_method (false),
284 m_parsing_classdef_set_method (false),
285 m_quote_is_transpose (false),
286 m_force_script (false),
287 m_reading_fcn_file (false),
288 m_reading_script_file (false),
289 m_reading_classdef_file (false),
290 m_buffer_function_text (false),
291 m_comment_uses_hash_char (false),
292 m_bracketflag (0),
293 m_braceflag (0),
294 m_looping (0),
295 m_defining_fcn (0),
296 m_looking_at_function_handle (0),
297 m_block_comment_nesting_level (0),
298 m_command_arg_paren_count (0),
299 m_token_count (0),
300 m_filepos (1, 1),
301 m_tok_beg (),
302 m_tok_end (),
303 m_string_text (),
304 m_current_input_line (),
305 m_comment_text (),
306 m_function_text (),
307 m_fcn_file_name (),
308 m_fcn_file_full_name (),
309 m_dir_name (),
310 m_package_name (),
311 m_looking_at_object_index (),
312 m_parsed_function_name (),
313 m_symtab_context (interp),
314 m_nesting_level (),
315 m_tokens ()
316 {
317 init ();
318 }
319
320 OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (lexical_feedback)
321
323
324 void init ();
325
326 void reset ();
327
328 int previous_token_id () const;
329 token * previous_token ();
330 const token * previous_token () const;
331
332 bool previous_token_is (int tok_id) const;
333 bool previous_token_is (const token *tok) const;
334
335 void mark_previous_token_trailing_space ();
336
337 bool space_follows_previous_token () const;
338
339 bool previous_token_is_binop () const;
340
341 bool previous_token_is_keyword () const;
342
343 bool previous_token_may_be_command () const;
344
345 void mark_as_variable (const std::string& nm);
346 void mark_as_variables (const std::list<std::string>& lst);
347
348 //--------
349
351
352 // true means that we have encountered eof on the input stream.
354
355 // true means command syntax is allowed.
357
358 // true means we are at the beginning of a statement, where a
359 // command name is possible.
361
362 // true means we are parsing an anonymous function argument list.
364
365 // true means we're parsing the return list for a function.
367
368 // true means we're parsing the parameter list for a function.
370
371 // true means we're parsing a declaration list (global or
372 // persistent).
374
375 // true means we're parsing a matrix or the left hand side of
376 // multi-value assignment statement.
378
379 // object index not possible until we've seen something.
381
382 // true means we're looking at an indirect reference to a
383 // structure element.
385
386 // true means arguments is handled as keyword.
388
389 // true means "properties", "methods", "events", and "enumeration"
390 // are treated like keywords.
392
393 // true means we are parsing the body of an anonymous function.
395
396 // true means we are parsing a class method in function or classdef file.
398
399 // true means we are parsing a classdef file
401
402 // true means we are parsing the initial classdef declaration
403 // portion of classdef file, from the "classdef" token through the
404 // optional list of superclasses.
406
407 // true means we are parsing the superclass part of a classdef
408 // declaration.
410
411 // true means we are parsing a class method declaration line in a
412 // classdef file and can accept a property get or set method name.
413 // for example, "get.propertyname" is recognized as a function name.
415
416 // TRUE means we are parsing a classdef get.method.
418
419 // TRUE means we are parsing a classdef set.method.
421
422 // return transpose or start a string?
424
425 // TRUE means treat the current file as a script even if the first
426 // token is "function" or "classdef".
428
429 // TRUE means we're parsing a function file.
431
432 // TRUE means we're parsing a script file.
434
435 // TRUE means we're parsing a classdef file.
437
438 // TRUE means we should store the text of the function we are
439 // parsing.
441
442 // TRUE means a line comment uses '#' or a block comment used at least
443 // one '#' delimiter.
445
446 // square bracket level count.
448
449 // curly brace level count.
451
452 // true means we're in the middle of defining a loop.
454
455 // nonzero means we're in the middle of defining a function.
457
458 // nonzero means we are parsing a function handle.
460
461 // nestng level for block comments.
463
464 // Parenthesis count for command argument parsing.
466
467 // Count of tokens recognized by this lexer since initialized or
468 // since the last reset.
469 std::size_t m_token_count;
470
471 // The current position in the file (line and column).
473
474 // The positions of the beginning and end of the current token after
475 // calling update_token_positions. Also used apart from
476 // update_token_positions to handle the beginning and end of
477 // character strings.
480
481 // The current character string text.
482 std::string m_string_text;
483
484 // The current line of input.
486
487 // The text of the current comment, used to gather comment lines
488 // before storing in m_comment_list.
489 std::string m_comment_text;
490
491 // The text of functions entered on the command line.
492 std::string m_function_text;
493
494 // Simple name of function file we are reading.
495 std::string m_fcn_file_name;
496
497 // Full name of file we are reading.
499
500 // Directory name where this file was found. May be relative.
501 std::string m_dir_name;
502
503 // Name of +package containing this file, if any.
504 std::string m_package_name;
505
506 // if the front of the list is true, the closest paren, brace, or
507 // bracket nesting is an index for an object.
509
510 // if the top of the stack is true, then we've already seen the name
511 // of the current function. should only matter if
512 // current_function_level > 0
513 std::stack<bool> m_parsed_function_name;
514
515 // Track current symbol table scope and context.
517
518 // is the closest nesting level a square bracket, squiggly brace,
519 // a paren, or an anonymous function body?
521
522 // Tokens generated by the lexer.
524};
525
526// base_lexer inherits from lexical_feedback because we will
527// eventually have several different constructors and it is easier to
528// initialize if everything is grouped in a parent class rather than
529// listing all the members in the base_lexer class.
530
531class OCTINTERP_API base_lexer : public lexical_feedback
532{
533public:
534
535 // Handle buffering of input for lexer.
536
538 {
539 public:
540
542 : m_buffer (), m_offset (0), m_chars_left (0), m_eof (false)
543 { }
544
545 OCTAVE_DEFAULT_COPY_MOVE_DELETE (input_buffer)
546
547 void fill (const std::string& input, bool eof_arg);
548
549 // Copy at most max_size characters to buf.
550 int copy_chunk (char *buf, std::size_t max_size, bool by_lines = false);
551
552 bool empty () const { return m_chars_left == 0; }
553
554 bool at_eof () const { return m_eof; }
555
556 private:
557
558 std::string m_buffer;
559 std::size_t m_offset;
560 std::size_t m_chars_left;
561 bool m_eof;
562 };
563
565 : lexical_feedback (interp), m_scanner (nullptr), m_input_buf ()
566 {
567 init ();
568 }
569
570 OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (base_lexer)
571
572 virtual ~base_lexer ();
573
574 void init ();
575
576 virtual bool is_push_lexer () const { return false; }
577
578 virtual void reset ();
579
580 void prep_for_file ();
581
582 void begin_string (int state);
583
584 virtual int fill_flex_buffer (char *buf, unsigned int max_size) = 0;
585
586 bool at_end_of_buffer () const { return m_input_buf.empty (); }
587
588 bool at_end_of_file () const { return m_input_buf.at_eof (); }
589
590 int handle_end_of_input ();
591
592 char * flex_yytext ();
593
594 int flex_yyleng ();
595
596 int text_yyinput ();
597
598 void xunput (char c, char *buf);
599
600 void xunput (char c);
601
602 void update_token_positions (int tok_len);
603
604 bool looking_at_space ();
605
606 bool inside_any_object_index ();
607
608 token * make_keyword_token (const std::string& s);
609
610 bool fq_identifier_contains_keyword (const std::string& s);
611
612 bool whitespace_is_significant ();
613
614 // We only provide specializations with base equal to 2, 10, or 16.
615 template <int base>
617
618 void handle_continuation ();
619
620 void finish_comment (comment_elt::comment_type typ);
621
623 {
624 comment_list retval = m_comment_list;
625 m_comment_list.clear ();
626 return retval;
627 }
628
629 int handle_close_bracket (int bracket_type);
630
631 bool looks_like_command_arg ();
632
633 int handle_superclass_identifier ();
634
635 token * make_meta_identifier_token (const std::string& cls);
636
637 token * make_fq_identifier_token (const std::string& ident);
638
639 int handle_identifier ();
640
641 void check_comment_for_hash_char (const char *txt, std::size_t len);
642
643 void maybe_warn_separator_insert (char sep);
644
645 void warn_language_extension (const std::string& msg);
646
647 void maybe_warn_language_extension_comment (char c);
648
649 void warn_language_extension_continuation ();
650
651 void warn_language_extension_operator (const std::string& op);
652
653 void warn_deprecated_syntax (const std::string& msg);
654
655 int syntax_error (const std::string& msg);
656 int syntax_error (const std::string& msg, const filepos& pos);
657 int syntax_error (const std::string& msg, const filepos& beg_pos, const filepos& end_pos);
658
659 void push_token (token *);
660
661 token * current_token ();
662
663 std::size_t pending_token_count () const;
664
665 void display_token (int tok_id);
666
667 void fatal_error (const char *msg);
668
669 bool debug_flag () const;
670
671 bool display_tokens () const;
672
673 void increment_token_count ();
674
675 void lexer_debug (const char *pattern);
676
677 // Internal state of the flex-generated lexer.
679
680 // Object that reads and buffers input.
682
683 // List of collected comments.
685
686 virtual std::string input_source () const { return "unknown"; }
687
688 virtual bool input_from_terminal () const { return false; }
689
690 virtual bool input_from_file () const { return false; }
691
692 virtual bool input_from_eval_string () const { return false; }
693
694 bool input_from_tmp_history_file ();
695
696 void push_start_state (int state);
697
698 void pop_start_state ();
699
700 void clear_start_state ();
701
702 int start_state () const { return start_state_stack.top (); }
703
704 void display_start_state () const;
705
706 bool maybe_unput_comma_before_unary_op (int tok_id);
707
708 int handle_op (int tok_id, const std::string& tok_txt, int tok_len, bool bos = false, bool compat = true);
709
710 int finish_command_arg ();
711
712 int handle_token (int tok_id);
713 int handle_token (token *tok);
714
715 int count_token_internal (int tok_id);
716
717 int show_token (int tok_id);
718
719protected:
720
721 std::stack<int> start_state_stack;
722};
723
724class OCTINTERP_API lexer : public base_lexer
725{
726public:
727
729 : base_lexer (interp), m_reader (interp), m_initial_input (true)
730 { }
731
732 lexer (FILE *file, interpreter& interp)
733 : base_lexer (interp), m_reader (interp, file), m_initial_input (true)
734 { }
735
736 lexer (FILE *file, interpreter& interp, const std::string& encoding)
737 : base_lexer (interp), m_reader (interp, file, encoding),
738 m_initial_input (true)
739 { }
740
741 lexer (const std::string& eval_string, interpreter& interp)
742 : base_lexer (interp), m_reader (interp, eval_string),
743 m_initial_input (true)
744 { }
745
746 OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (lexer)
747
748 ~lexer () = default;
749
750 void reset ()
751 {
752 m_initial_input = true;
753
755 }
756
757 std::string input_source () const
758 {
759 return m_reader.input_source ();
760 }
761
763 {
764 return m_reader.input_from_terminal ();
765 }
766
767 bool input_from_file () const
768 {
769 return m_reader.input_from_file ();
770 }
771
773 {
774 return m_reader.input_from_eval_string ();
775 }
776
777 int fill_flex_buffer (char *buf, unsigned int max_size);
778
779 //--------
780
782
783 // TRUE means we are filling the input buffer for the first time.
784 // Otherwise, we are requesting more input to complete the parse
785 // and, if printing a prompt, should use the secondary prompt
786 // string.
787
789};
790
791template <> OCTINTERP_API int base_lexer::handle_number<2> ();
792template <> OCTINTERP_API int base_lexer::handle_number<10> ();
793template <> OCTINTERP_API int base_lexer::handle_number<16> ();
794
795class OCTINTERP_API push_lexer : public base_lexer
796{
797public:
798
800 : base_lexer (interp)
801 {
802 append_input ("", false);
803 }
804
805 push_lexer (const std::string& input, interpreter& interp)
806 : base_lexer (interp)
807 {
808 append_input (input, false);
809 }
810
811 push_lexer (bool eof, interpreter& interp)
812 : base_lexer (interp)
813 {
814 append_input ("", eof);
815 }
816
817 push_lexer (const std::string& input, bool eof, interpreter& interp)
818 : base_lexer (interp)
819 {
820 append_input (input, eof);
821 }
822
823 OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (push_lexer)
824
825 ~push_lexer () = default;
826
827 bool is_push_lexer () const { return true; }
828
829 void append_input (const std::string& input, bool eof);
830
831 std::string input_source () const { return "push buffer"; }
832
833 int fill_flex_buffer (char *buf, unsigned int max_size);
834};
835
836OCTAVE_END_NAMESPACE(octave)
837
838#endif
bool at_eof() const
Definition lex.h:554
bool empty() const
Definition lex.h:552
base_lexer(interpreter &interp)
Definition lex.h:564
comment_list get_comment_list()
Definition lex.h:622
bool at_end_of_buffer() const
Definition lex.h:586
std::stack< int > start_state_stack
Definition lex.h:721
virtual bool is_push_lexer() const
Definition lex.h:576
bool at_end_of_file() const
Definition lex.h:588
virtual int fill_flex_buffer(char *buf, unsigned int max_size)=0
int start_state() const
Definition lex.h:702
virtual bool input_from_terminal() const
Definition lex.h:688
void * m_scanner
Definition lex.h:678
void display_start_state() const
virtual bool input_from_file() const
Definition lex.h:690
input_buffer m_input_buf
Definition lex.h:681
virtual std::string input_source() const
Definition lex.h:686
bool debug_flag() const
void display_token(int tok_id)
int handle_number()
virtual bool input_from_eval_string() const
Definition lex.h:692
virtual void reset()
Definition lex.cc:5403
bool display_tokens() const
comment_list m_comment_list
Definition lex.h:684
Definition lex.h:725
bool m_initial_input
Definition lex.h:788
bool input_from_eval_string() const
Definition lex.h:772
input_reader m_reader
Definition lex.h:781
lexer(FILE *file, interpreter &interp)
Definition lex.h:732
bool input_from_file() const
Definition lex.h:767
std::string input_source() const
Definition lex.h:757
void reset()
Definition lex.h:750
lexer(interpreter &interp)
Definition lex.h:728
~lexer()=default
lexer(FILE *file, interpreter &interp, const std::string &encoding)
Definition lex.h:736
lexer(const std::string &eval_string, interpreter &interp)
Definition lex.h:741
bool input_from_terminal() const
Definition lex.h:762
bbp_nesting_level(const bbp_nesting_level &nl)
Definition lex.h:109
symbol_table_context(interpreter &interp)
Definition lex.h:61
std::size_t size() const
Definition lex.h:72
void push(const symbol_scope &scope)
Definition lex.h:76
std::size_t size() const
Definition lex.h:248
const token * back() const
Definition lex.h:242
void push(token *tok)
Definition lex.h:201
const token * front() const
Definition lex.h:232
token * at(std::size_t n)
Definition lex.h:216
const token * at(std::size_t n) const
Definition lex.h:221
bool m_looking_at_parameter_list
Definition lex.h:369
bool m_reading_classdef_file
Definition lex.h:436
bool m_looking_at_anon_fcn_args
Definition lex.h:363
std::string m_package_name
Definition lex.h:504
filepos m_filepos
Definition lex.h:472
bool m_arguments_is_keyword
Definition lex.h:387
std::string m_current_input_line
Definition lex.h:485
bool m_end_of_input
Definition lex.h:353
bool m_allow_command_syntax
Definition lex.h:356
int m_looping
Definition lex.h:453
bool m_parsing_classdef_set_method
Definition lex.h:420
int m_bracketflag
Definition lex.h:447
bool m_parsing_anon_fcn_body
Definition lex.h:394
std::string m_comment_text
Definition lex.h:489
token_cache m_tokens
Definition lex.h:523
std::stack< bool > m_parsed_function_name
Definition lex.h:513
bool m_at_beginning_of_statement
Definition lex.h:360
int m_block_comment_nesting_level
Definition lex.h:462
int m_command_arg_paren_count
Definition lex.h:465
std::string m_fcn_file_full_name
Definition lex.h:498
bool m_looking_at_return_list
Definition lex.h:366
bool m_parsing_classdef_get_method
Definition lex.h:417
std::string m_string_text
Definition lex.h:482
std::list< bool > m_looking_at_object_index
Definition lex.h:508
int m_braceflag
Definition lex.h:450
bool m_parsing_classdef_decl
Definition lex.h:405
bool m_looking_at_matrix_or_assign_lhs
Definition lex.h:377
bool m_parsing_classdef_superclass
Definition lex.h:409
lexical_feedback(interpreter &interp)
Definition lex.h:263
bool m_looking_for_object_index
Definition lex.h:380
interpreter & m_interpreter
Definition lex.h:350
bbp_nesting_level m_nesting_level
Definition lex.h:520
bool m_parsing_classdef
Definition lex.h:400
bool m_reading_script_file
Definition lex.h:433
bool m_classdef_element_names_are_keywords
Definition lex.h:391
bool m_reading_fcn_file
Definition lex.h:430
std::size_t m_token_count
Definition lex.h:469
std::string m_function_text
Definition lex.h:492
bool m_comment_uses_hash_char
Definition lex.h:444
filepos m_tok_end
Definition lex.h:479
std::string m_fcn_file_name
Definition lex.h:495
bool m_looking_at_decl_list
Definition lex.h:373
symbol_table_context m_symtab_context
Definition lex.h:516
bool m_quote_is_transpose
Definition lex.h:423
filepos m_tok_beg
Definition lex.h:478
bool m_parsing_class_method
Definition lex.h:397
bool m_buffer_function_text
Definition lex.h:440
bool m_force_script
Definition lex.h:427
std::string m_dir_name
Definition lex.h:501
bool m_maybe_classdef_get_set_method
Definition lex.h:414
bool m_looking_at_indirect_ref
Definition lex.h:384
int m_looking_at_function_handle
Definition lex.h:459
int m_defining_fcn
Definition lex.h:456
push_lexer(const std::string &input, bool eof, interpreter &interp)
Definition lex.h:817
~push_lexer()=default
push_lexer(interpreter &interp)
Definition lex.h:799
push_lexer(bool eof, interpreter &interp)
Definition lex.h:811
bool is_push_lexer() const
Definition lex.h:827
std::string input_source() const
Definition lex.h:831
push_lexer(const std::string &input, interpreter &interp)
Definition lex.h:805
Definition token.h:42
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
bool iskeyword(const std::string &s)
Definition lex.cc:1351
#define m_scanner
F77_RET_T len
Definition xerbla.cc:61