Mercurial > hg > octave-terminal
changeset 3973:826092b5665e
[project @ 2002-07-04 01:42:46 by jwe]
author | jwe |
---|---|
date | Thu, 04 Jul 2002 01:42:46 +0000 |
parents | c21bb69ea262 |
children | e2290bf911f0 |
files | src/ChangeLog src/lex.l src/parse.y |
diffstat | 3 files changed, 15 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2002-07-03 John W. Eaton <jwe@bevo.che.wisc.edu> + * lex.l (EL): Return VARARGIN or VARARGOUT, not ELLIPSIS. + * parse.y (param_list): Use VARARGIN instead of ELLIPSIS. + (return_list): Use VARARGOUT instead of ELLIPSIS. + * data.cc (make_diag const octave_value&, const octave_value&): Allow first arg to be 1x0 or 0x1.
--- a/src/lex.l +++ b/src/lex.l @@ -480,7 +480,12 @@ %} {EL} { - return ELLIPSIS; + if (lexer_flags.looking_at_parameter_list) + return VARARGIN; + else if (lexer_flags.looking_at_return_list) + return VARARGOUT; + else + return LEXICAL_ERROR; } %{
--- a/src/parse.y +++ b/src/parse.y @@ -398,7 +398,7 @@ // Other tokens. %token END_OF_INPUT LEXICAL_ERROR -%token FCN ELLIPSIS ALL_VA_ARGS +%token FCN VARARGIN VARARGOUT ALL_VA_ARGS %token USING TITLE WITH AXES COLON OPEN_BRACE CLOSE_BRACE CLEAR // Nonterminals we construct. @@ -1103,7 +1103,7 @@ lexer_flags.quote_is_transpose = false; $$ = 0; } - | param_list_beg ELLIPSIS param_list_end + | param_list_beg VARARGIN param_list_end { lexer_flags.quote_is_transpose = false; tree_parameter_list *tmp = new tree_parameter_list (); @@ -1116,7 +1116,7 @@ $1->mark_as_formal_parameters (); $$ = $1; } - | param_list1 ',' ELLIPSIS param_list_end + | param_list1 ',' VARARGIN param_list_end { lexer_flags.quote_is_transpose = false; $1->mark_as_formal_parameters (); @@ -1158,7 +1158,7 @@ lexer_flags.looking_at_return_list = false; $$ = new tree_parameter_list (); } - | return_list_beg ELLIPSIS return_list_end + | return_list_beg VARARGOUT return_list_end { lexer_flags.looking_at_return_list = false; tree_parameter_list *tmp = new tree_parameter_list (); @@ -1170,7 +1170,7 @@ lexer_flags.looking_at_return_list = false; $$ = $2; } - | return_list_beg return_list1 ',' ELLIPSIS return_list_end + | return_list_beg return_list1 ',' VARARGOUT return_list_end { lexer_flags.looking_at_return_list = false; $2->mark_varargs ();