Mercurial > hg > octave-nkf
changeset 16279:8c17cd370477
maint: merge recent parser/lexer changes
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 11 Mar 2013 15:13:39 -0400 |
parents | 8cb65fd72164 (current diff) c8bf749fe6f8 (diff) |
children | 1bbc2fc552cf |
files | Doxyfile libinterp/parse-tree/oct-parse.in.yy |
diffstat | 7 files changed, 70 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/configure.ac +++ b/configure.ac @@ -2857,6 +2857,7 @@ AC_CONFIG_FILES([ Makefile doc/Makefile + doc/doxyhtml/Makefile doc/icons/Makefile doc/interpreter/Makefile doc/liboctave/Makefile
--- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -29,5 +29,5 @@ texinfo.tex \ texmf.cnf -SUBDIRS = icons interpreter liboctave refcard +SUBDIRS = doxyhtml icons interpreter liboctave refcard
new file mode 100644 --- /dev/null +++ b/doc/doxyhtml/Makefile.am @@ -0,0 +1,32 @@ +# Makefile for Octave's doc/doxyhtml directory +# +# Copyright (C) 1993-2012 John W. Eaton +# +# This file is part of Octave. +# +# Octave is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 3 of the License, or (at +# your option) any later version. +# +# Octave is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with Octave; see the file COPYING. If not, see +# <http://www.gnu.org/licenses/>. + +include $(top_srcdir)/build-aux/common.mk + +doxyhtml: + cd ../..; doxygen doc/doxyhtml/Doxygen.cfg + +EXTRA_DIST = \ + Doxygen.cfg \ + Makefile.am \ + README + +maintainer-clean-local: + rm -rf `ls | $(GREP) -v Doxygen.cfg | $(GREP) -v Makefile.am | $(GREP) -v Makefile.in | $(GREP) -v README`
new file mode 100644 --- /dev/null +++ b/doc/doxyhtml/README @@ -0,0 +1,11 @@ +This directory contains documentation in Doxygen format for +Octave's source code. It is not created by default. + +To produce Doxygen documentation use + +make doxyhtml + +Doxygen documentation can be helpful for developers of Octave, but is not +needed by users of Octave. In addition, the documentation requires +approximately 1.2GB of storage space. For these reasons it is not maintained +under version control nor distributed in tarballs.
--- a/doc/interpreter/testfun.txi +++ b/doc/interpreter/testfun.txi @@ -41,8 +41,12 @@ Since @code{eval()} will stop at the first error it encounters, you must divide your tests up into blocks, with anything in a separate -block evaluated separately. Blocks are introduced by the keyword -@code{test} immediately following @samp{%!}. For example: +block evaluated separately. Blocks are introduced by valid keywords like +@code{test}, @code{function}, or @code{assert} immediately following @samp{%!}. +A block is defined by indentation as in Python. Lines beginning with +@samp{%!<whitespace>} are part of the preceeding block. + +For example: @example @group @@ -137,7 +141,7 @@ @end example @noindent -Review @file{config.h} or @code{octave_config_info ("DEFS")} to see some +Review @file{config.h} or @code{octave_config_info ("features")} to see some of the possible values to check. Sometimes during development there is a test that should work but is @@ -197,6 +201,24 @@ Note that all previous variables and values are lost when a new shared block is declared. +Remember that @code{%!function} begins a new block and that +@code{%!endfunction} ends this block. Be aware that until a new block +is started, lines starting with @samp{%!<space>} will be discarded as comments. +The following is nearly identical to the example above, but does nothing. + +@example +@group +%!function @var{a} = fn (@var{b}) +%! @var{a} = 2*@var{b}; +%!endfunction +%! assert (fn(2), 4); +@end group +@end example + +@noindent +Because there is a space after @samp{%!} the @code{assert} statement does +not begin a new block and this line is treated as a comment. + Error and warning blocks are like test blocks, but they only succeed if the code generates an error. You can check the text of the error is correct using an optional regular expression @code{<pattern>}.