# HG changeset patch # User John W. Eaton # Date 1400862005 14400 # Node ID 4293f49795d930850d16e855255f1e696f56c192 # Parent 5e99fd6ea758825aa9c46138769248a7933c8875 don't crash on empty script files (bug #42064) * lex.ll (<>): New pattern. diff -r 5e99fd6ea758 -r 4293f49795d9 libinterp/parse-tree/lex.ll --- a/libinterp/parse-tree/lex.ll Wed May 21 18:21:05 2014 +0200 +++ b/libinterp/parse-tree/lex.ll Fri May 23 12:20:05 2014 -0400 @@ -280,6 +280,18 @@ return curr_lexer->show_token (INPUT_FILE); } +<> { + curr_lexer->lexer_debug ("<>"); + + // May be reset later if we see "function" or "classdef" appears + // as the first token. + curr_lexer->reading_script_file = true; + + curr_lexer->pop_start_state (); + + return curr_lexer->show_token (INPUT_FILE); + } + %{ // Help and other command-style functions. %}