From bug-octave-request at bevo dot che dot wisc dot edu Tue Oct 17 04:34:52 1995 Subject: Parser error From: John Eaton To: Eyal Doron Cc: bug-octave at che dot utexas dot edu Date: Tue, 17 Oct 1995 04:34:32 -0500 Eyal Doron wrote: : Octave has difficulty parsing the file below, which is legal in : MATLAB (and in Octave, according to the docs). : : Asymp_coef=[ : 0.08333333333333333 % 1/12 : -0.002777777777777778 % -1/360 : ]; : : Invoking it then gives: : : octave:2> try : parse error near line 3 of file try.m: : : >>> -0.002777777777777778 % -1/360 Please try this patch: Tue Oct 17 04:31:06 1995 John Eaton * lex.l ({CCHAR}): If nesting_level.top() is BRACE, return ';', not '\n'. *** src/lex.~ 1995/10/09 13:31:42 --- src/lex.l 1995/10/17 09:23:58 *************** *** 493,500 **** current_input_column = 1; convert_spaces_to_comma = 1; ! if (nesting_level.empty () || nesting_level.top () == BRACE) return '\n'; } %{ --- 493,502 ---- current_input_column = 1; convert_spaces_to_comma = 1; ! if (nesting_level.empty ()) return '\n'; + else if (nesting_level.top () == BRACE) + return ';'; } %{