comparison NEWS @ 16898:531473481084

rewrite string parsing to avoid unlimited lookahead * NEWS: Mention change. * lex.h, lex.ll (lexical_feedback::string_text, lexical_feedback::string_line, lexical_feedback::string_column): New data members (lexical_feedback::lexical_feedback): Initialize them. (lexical_feedback::reset): Initialize them. (octave_base_lexer::begin_string): New function. (\", "'", <COMMAND_START>[\"\']): Use begin_string to set start state * instead of calling handle_string to parse string. (DQ_STRING_START, SQ_STRING_START): New exclusive start states. (<DQ_STRING_START>\"\", <DQ_STRING_START>\", <DQ_STRING_START>{NL}, <DQ_STRING_START>\\[0-7]{1,3}, <DQ_STRING_START>"\\a", <DQ_STRING_START>"\\b", <DQ_STRING_START>"\\f", <DQ_STRING_START>"\\n", <DQ_STRING_START>"\\r", <DQ_STRING_START>"\\t", <DQ_STRING_START>"\\v", <DQ_STRING_START>\\{ANY_INCLUDING_NL}, <DQ_STRING_START>[^\\\n\"]+, <SQ_STRING_START>[^\'\n\r]*\', <SQ_STRING_START>{NL}): New rules for parsing character strings. (octave_base_lexer::have_continuation, octave_base_lexer::have_ellipsis_continuation, octave_base_lexer::handle_string): Delete.
author John W. Eaton <jwe@octave.org>
date Thu, 04 Jul 2013 20:33:02 -0400
parents 83425e536ce1
children 861516dcad19
comparison
equal deleted inserted replaced
16897:21d5e76891fe 16898:531473481084
74 74
75 [a,... 75 [a,...
76 b,... 76 b,...
77 c,... 77 c,...
78 ] = deal (1,2,3) 78 ] = deal (1,2,3)
79
80 ** Line continuations inside character strings have changed.
81
82 The sequence '...' is no longer recognized as a line continuations
83 are inside character strings. A backslash followed by a newline
84 character is no longer recognized as a line continuation inside
85 single-quoted character strings. Inside double-quoted character
86 strings, a backslash followed by a newline character is still
87 recognized as a line continuation but the backslash character must
88 be followed immediately by the newline character. No whitespace or
89 end-of-linecomment may appear between them.
79 90
80 ** Warning IDs renamed: 91 ** Warning IDs renamed:
81 92
82 Octave:array-as-scalar => Octave:array-to-scalar 93 Octave:array-as-scalar => Octave:array-to-scalar
83 Octave:array-as-vector => Octave:array-to-vector 94 Octave:array-as-vector => Octave:array-to-vector