From bug-octave-request at bevo dot che dot wisc dot edu Tue Feb 13 18:16:32 2001 Subject: parse/help error From: "John W. Eaton" To: bsapp at lanl dot gov Cc: bug-octave at bevo dot che dot wisc dot edu Date: Tue, 13 Feb 2001 18:16:26 -0600 On 13-Feb-2001, Ben Sapp wrote: | Bug report for Octave 2.1.33 configured for mips-sgi-irix6.5 | | I also see this problem on RedHat distributions of GNU/Linux. | | Description: | ----------- | | With a certain command the help system can be broken. | | Repeat-By: | --------- | | octave:1> help inv | inv is a built-in function | | - Loadable Function: inv (A) | - Loadable Function: inverse (A) | Compute the inverse of the square matrix A. | | | | Additional help for built-in functions, operators, and variables | is available in the on-line version of the manual. Use the command | `help -i ' to search the manual index. | | Help and information about Octave is also available on the WWW | at http://www.che.wisc.edu/octave/octave.html and via the | help-octave at bevo dot che dot wisc dot edu mailing list. | octave:2> tmp = ["test", sprintf ("%s","newstring")] | parse error: | | >>> tmp = ["test", sprintf ("%s","newstring")] | ^ | | octave:2> help inv | parse error: | | >>> help inv | ^ Please try the following patch. Help isn't broken by the parse error. It's just that the parser state was not being reset correctly after the parse error. jwe 2001-02-13 John W. Eaton * lex.l (lexical_feedbac::init): Initialize looking_at_matrix_or_assign_lhs too. Index: lex.l =================================================================== RCS file: /usr/local/cvsroot/octave/src/lex.l,v retrieving revision 1.168 diff -c -r1.168 lex.l *** lex.l 2001/02/07 04:48:01 1.168 --- lex.l 2001/02/14 00:15:24 *************** *** 2420,2425 **** --- 2420,2429 ---- looking_at_return_list = false; looking_at_parameter_list = false; + // Not parsing a matrix or the left hand side of multi-value + // assignment statement. + looking_at_matrix_or_assign_lhs = false; + // Next token can be identifier. cant_be_identifier = false; ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------