diff libinterp/parse-tree/lex.h @ 28149:026bff6a54d7 stable

improve position tracking in the lexer (bug #57924) * oct-parse.yy (base_parser::bison_error): Fix error column adjustment. * lex.h, lex.ll (lexical_feedback::handle_language_extension_op, lexical_feedback::handle_assign_op, lexical_feedback::handle_language_extension_assign_op, lexical_feedback::handle_op_internal): Delete. Replace uses with calls to handle_op instead. (lexical_feedback::handle_op, lexical_feedback::handle_identifier, lexical_feedback::handle_superclass_identifier): Update token positions inside these functions. Remove updates from rules that use them. Consistently handle file position updates.
author John W. Eaton <jwe@octave.org>
date Tue, 10 Mar 2020 07:51:20 -0400
parents ab22056e8c1f
children 22cddebcb0d0
line wrap: on
line diff
--- a/libinterp/parse-tree/lex.h	Mon Mar 09 10:24:07 2020 -0400
+++ b/libinterp/parse-tree/lex.h	Tue Mar 10 07:51:20 2020 -0400
@@ -740,18 +740,9 @@
 
     void display_start_state (void) const;
 
-    int handle_op (const char *pattern, int tok, bool bos = false);
-
-    int handle_language_extension_op (const char *pattern, int tok,
-                                      bool bos = false);
-
     bool maybe_unput_comma_before_unary_op (int tok);
 
-    int handle_assign_op (const char *pattern, int tok);
-
-    int handle_language_extension_assign_op (const char *pattern, int tok);
-
-    int handle_op_internal (int tok, bool bos, bool compat);
+    int handle_op (int tok, bool bos = false, bool compat = true);
 
     int finish_command_arg (void);