diff libinterp/interp-core/comment-list.h @ 16228:e19b1632d7c1

revamp most comment handling * comment-list.h (octave_comment_elt::comment_type): New value, full_line. * lex.h (lexical_feedback::comment_text): New member variable. (lexical_feedback::finish_comment): New function. (octave_lexer::grab_block_comment, octave_lexer::grab_comment_block, octave_lexer::process_comment): Delete. * lex.ll (BLOCK_COMMENT_START, LINE_COMMENT_START): New exclusive start states. (ANY_INCLUDING_NL): New pattern. (<INPUT_FILE_START>{ANY_INCLUDING_NL}): Use it instead of ".". (^{S}*{CCHAR}\{{S}*{NL}, <BLOCK_COMMENT_START>^{S}*{CCHAR}\{{S}*{NL}, <BLOCK_COMMENT_START>^{S}*{CCHAR}\}{S}*{NL}, <BLOCK_COMMENT_START>.*{NL}, {S}*{CCHAR}.*{NL}, <LINE_COMMENT_START>{S}*{CCHAR}.*{NL}, <LINE_COMMENT_START>{ANY_INCLUDING_NL}): New patterns and rules for handling comments. ({CCHAR}, ^{S}*{CCHAR}\{{S}*{NL}): Delete old rules for comments. (display_start_state): Also handle BLOCK_COMMENT_START and LINE_COMMENT_START.
author John W. Eaton <jwe@octave.org>
date Fri, 08 Mar 2013 17:13:54 -0500
parents 2fc554ffbc28
children
line wrap: on
line diff
--- a/libinterp/interp-core/comment-list.h	Fri Mar 08 16:57:28 2013 -0500
+++ b/libinterp/interp-core/comment-list.h	Fri Mar 08 17:13:54 2013 -0500
@@ -42,6 +42,7 @@
   {
     unknown,
     block,
+    full_line,
     end_of_line,
     doc_string,
     copyright