Mercurial > octave
changeset 21705:764e586dca4b
Avoid use of REJECT in parser (bug #45947).
* lex.ll (HANDLE_IDENTIFIER): Strip get/set from input if pattern
(get|set)\s*\( matched.
* lex.ll: Change pattern to "(get|set)\s*\(" from "(get|set)/\s*\("
to eliminate trailing context usage which can invoke REJECT.
author | Rik <rik@octave.org> |
---|---|
date | Sun, 15 May 2016 21:08:30 -0700 |
parents | ac59b72712fd |
children | cce4eb3f6f7c |
files | libinterp/parse-tree/lex.ll |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/parse-tree/lex.ll Fri Feb 26 17:53:28 2016 +1100 +++ b/libinterp/parse-tree/lex.ll Sun May 15 21:08:30 2016 -0700 @@ -317,7 +317,10 @@ else \ { \ if (get_set) \ - curr_lexer->maybe_classdef_get_set_method = false; \ + { \ + yyless (3); \ + curr_lexer->maybe_classdef_get_set_method = false; \ + } \ \ int id_tok = curr_lexer->handle_identifier (); \ \ @@ -1254,7 +1257,7 @@ // followed by "(". %} -(set|get)/{S}*\( { +(set|get){S}*\( { HANDLE_IDENTIFIER ("(set|get)/{S}*\\(", true); }