GNU Octave  4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Namespaces | Macros | Typedefs | Functions | Variables
oct-parse.cc File Reference
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <map>
#include <sstream>
#include "Matrix.h"
#include "cmd-edit.h"
#include "cmd-hist.h"
#include "file-ops.h"
#include "file-stat.h"
#include "oct-env.h"
#include "oct-time.h"
#include "quit.h"
#include "Cell.h"
#include "call-stack.h"
#include "comment-list.h"
#include "defaults.h"
#include "defun.h"
#include "dirfns.h"
#include "dynamic-ld.h"
#include "error.h"
#include "input.h"
#include "interpreter.h"
#include "lex.h"
#include "load-path.h"
#include "oct-hist.h"
#include "oct-map.h"
#include "ov-classdef.h"
#include "ov-fcn-handle.h"
#include "ov-usr-fcn.h"
#include "ov-null-mat.h"
#include "pager.h"
#include "parse.h"
#include "pt-all.h"
#include "pt-eval.h"
#include "pt-funcall.h"
#include "symtab.h"
#include "token.h"
#include "unwind-prot.h"
#include "utils.h"
#include "variables.h"
#include <oct-parse.h>
#include <stddef.h>
Include dependency graph for oct-parse.cc:

Go to the source code of this file.

Classes

struct  octave_pstate
 
union  yyalloc
 

Namespaces

 octave
 Octave interface to the compression and uncompression libraries.
 

Macros

#define _Noreturn   YY_ATTRIBUTE ((__noreturn__))
 
#define ADD_EQ   258
 
#define AND_EQ   268
 
#define BREAK   311
 
#define CASE   309
 
#define CATCH   317
 
#define CLASSDEF   321
 
#define CLEANUP   315
 
#define CONTINUE   312
 
#define DIV_EQ   261
 
#define DO   303
 
#define DQ_STRING   298
 
#define EDIV   283
 
#define EDIV_EQ   265
 
#define ELEFTDIV   284
 
#define ELEFTDIV_EQ   266
 
#define ELSE   307
 
#define ELSEIF   306
 
#define EMINUS   286
 
#define EMUL   282
 
#define EMUL_EQ   264
 
#define END   297
 
#define END_OF_INPUT   333
 
#define ENUMERATION   325
 
#define EPLUS   285
 
#define EPOW   292
 
#define EPOW_EQ   267
 
#define EVENTS   324
 
#define EXPR_AND   272
 
#define EXPR_AND_AND   270
 
#define EXPR_EQ   277
 
#define EXPR_GE   279
 
#define EXPR_GT   280
 
#define EXPR_LE   276
 
#define EXPR_LT   275
 
#define EXPR_NE   278
 
#define EXPR_NOT   274
 
#define EXPR_OR   273
 
#define EXPR_OR_OR   271
 
#define FCN   331
 
#define FCN_HANDLE   320
 
#define FOR   300
 
#define FQ_IDENT   328
 
#define FUNC_RET   313
 
#define GET   329
 
#define GLOBAL   318
 
#define HERMITIAN   287
 
#define IF   305
 
#define IMAG_NUM   294
 
#define INPUT_FILE   334
 
#define LEFTDIV   281
 
#define LEFTDIV_EQ   262
 
#define lexer   parser.lexer
 
#define LEXICAL_ERROR   332
 
#define METAQUERY   326
 
#define METHODS   323
 
#define MINUS_MINUS   290
 
#define MUL_EQ   260
 
#define NAME   296
 
#define NUM   293
 
#define octave_nerrs   yyps->octave_nerrs
 
#define OR_EQ   269
 
#define OTHERWISE   310
 
#define PARFOR   301
 
#define PERSISTENT   319
 
#define PLUS_PLUS   289
 
#define POW   291
 
#define POW_EQ   263
 
#define PROPERTIES   322
 
#define scanner   lexer.scanner
 
#define SET   330
 
#define SQ_STRING   299
 
#define STRUCT_ELT   295
 
#define SUB_EQ   259
 
#define SUPERCLASSREF   327
 
#define SWITCH   308
 
#define TRANSPOSE   288
 
#define TRY   316
 
#define UNARY   335
 
#define UNTIL   304
 
#define UNWIND   314
 
#define WHILE   302
 
#define YY_(Msgid)   Msgid
 
#define YY_ATTRIBUTE(Spec)   /* empty */
 
#define YY_ATTRIBUTE_PURE   YY_ATTRIBUTE ((__pure__))
 
#define YY_ATTRIBUTE_UNUSED   YY_ATTRIBUTE ((__unused__))
 
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
 
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
 
#define YY_INITIAL_VALUE(Value)   Value
 
#define YY_NULLPTR   0
 
#define YY_OCTAVE_LIBINTERP_PARSE_TREE_OCT_PARSE_H_INCLUDED
 
#define YY_REDUCE_PRINT(Rule)
 
#define YY_STACK_PRINT(Bottom, Top)
 
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
 
#define YYABORT   goto yyabortlab
 
#define YYACCEPT   goto yyacceptlab
 
#define YYBACKUP(Token, Value)
 
#define YYBISON   1
 
#define YYBISON_VERSION   "3.0.4"
 
#define yyclearin   (yychar = YYEMPTY)
 
#define YYCOPY(Dst, Src, Count)
 
#define YYCOPY_NEEDED   1
 
#define yydebug   octave_debug
 
#define YYDEBUG   1
 
#define YYDPRINTF(Args)
 
#define YYEMPTY   (-2)
 
#define YYEOF   0
 
#define YYERRCODE   256
 
#define yyerrok   (yyerrstatus = 0)
 
#define yyerror   octave_error
 
#define YYERROR   goto yyerrorlab
 
#define YYERROR_VERBOSE   0
 
#define yyerrstatus   yyps->yyerrstatus
 
#define YYFINAL   110
 
#define YYFREE   free
 
#define YYINITDEPTH   200
 
#define YYLAST   1508
 
#define yylex   octave_lex
 
#define YYMALLOC   malloc
 
#define YYMAXDEPTH   10000
 
#define YYMAXUTOK   335
 
#define yynerrs   octave_nerrs
 
#define YYNNTS   105
 
#define YYNRULES   278
 
#define YYNSTATES   516
 
#define YYNTOKENS   98
 
#define YYPACT_NINF   -413
 
#define yypact_value_is_default(Yystate)   (!!((Yystate) == (-413)))
 
#define yyparse   octave_parse
 
#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
 
#define yypstate   octave_pstate
 
#define yypstate_delete   octave_pstate_delete
 
#define yypstate_new   octave_pstate_new
 
#define YYPULL   1
 
#define yypull_parse   octave_pull_parse
 
#define YYPURE   1
 
#define YYPUSH   1
 
#define yypush_parse   octave_push_parse
 
#define YYRECOVERING()   (!!yyerrstatus)
 
#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)
 
#define YYSIZE_T   size_t
 
#define YYSKELETON_NAME   "yacc.c"
 
#define yyss   yyps->yyss
 
#define yyssa   yyps->yyssa
 
#define yyssp   yyps->yyssp
 
#define YYSTACK_ALLOC   YYMALLOC
 
#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM
 
#define YYSTACK_BYTES(N)
 
#define YYSTACK_FREE   YYFREE
 
#define YYSTACK_GAP_MAXIMUM   (sizeof (union yyalloc) - 1)
 
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
 
#define yystacksize   yyps->yystacksize
 
#define yystate   yyps->yystate
 
#define YYSTYPE   OCTAVE_STYPE
 
#define YYTABLE_NINF   -266
 
#define yytable_value_is_error(Yytable_value)   0
 
#define YYTERROR   1
 
#define YYTRANSLATE(YYX)   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
 
#define YYUNDEFTOK   2
 
#define YYUSE(E)   ((void) (E))
 
#define yyvs   yyps->yyvs
 
#define yyvsa   yyps->yyvsa
 
#define yyvsp   yyps->yyvsp
 

Typedefs

typedef struct octave_pstate octave_pstate
 
typedef short int yytype_int16
 
typedef signed char yytype_int8
 
typedef unsigned short int yytype_uint16
 
typedef unsigned char yytype_uint8
 

Functions

end example noindent will load
the function or usages such as
example 
autoload ("foo", file_in_loadpath("bar.oct"))@end example @noindent are strongly discouraged
 
string_vector autoloaded_functions (void)
 
static std::string end_token_as_string (token::end_tok_type ettype)
 
OCTAVE_EXPORT octave_value_list Fautoload (const octave_value_list &args, int) ar
 
 feval (ar{f}, 1) esult
 
void free (void *)
 
std::string get_help_from_file (const std::string &nm, bool &symbol_found, std::string &full_file)
 
std::string get_help_from_file (const std::string &nm, bool &symbol_found)
 
octave_functionload_fcn_from_file (const std::string &file_name, const std::string &dir_name, const std::string &dispatch_type, const std::string &package_name, const std::string &fcn_name, bool autoload)
 
std::string lookup_autoload (const std::string &nm)
 
void * malloc (size_t)
 
static void octave_error (octave::base_parser &parser, const char *s)
 
int octave_lex (OCTAVE_STYPE *, void *)
 The main scanner function which does all the work. More...
 
int octave_parse (octave::base_parser &parser)
 
void octave_pstate_delete (octave_pstate *ps)
 
octave_pstateoctave_pstate_new (void)
 
int octave_pull_parse (octave_pstate *ps, octave::base_parser &parser)
 
int octave_push_parse (octave_pstate *ps, int pushed_char, OCTAVE_STYPE const *pushed_val, octave::base_parser &parser)
 
static octave_functionparse_fcn_file (const std::string &full_file, const std::string &file, const std::string &dispatch_type, const std::string &package_name, bool require_file, bool force_script, bool autoload, bool relative_lookup, const std::string &warn_for)
 
string_vector reverse_lookup_autoload (const std::string &nm)
 
static void safe_fclose (FILE *f)
 
static void yydestruct (const char *yymsg, int yytype, OCTAVE_STYPE *yyvaluep, octave::base_parser &parser)
 

Variables

should be an absolute filename
or a file name in the same
directory as the function or
script from which the autoload
command was run 
ar {file} mph{should not} depend on the Octave load path. Normally
 
end example noindent will load
the function or usages such as
example as their behavior may
be unpredictable With no 
arguments
 
static std::map< std::string,
std::string
autoload_map
 
end example noindent will load
the function 
code {foo} from the file @code{bar.oct}. The above usage when @code{bar.oct} is not in the same directory
 
octave::base_lexerLEXER = 0
 
should be an absolute filename
or a file name in the same
directory as the function or
script from which the autoload
command was run calls to 
ode {autoload} appear in PKG_ADD script files that are evaluated when a directory is added to Octave's load path. To avoid having to hardcode directory names in @var{file}
 
end example noindent will load
the function or usages such as
example as their behavior may
be unpredictable With no
return a structure containing
the current autoload map If a
third argument 
qcode {"remove"} is given
 
bool reading_startup_message_printed = false
 
end example noindent will load
the function or usages such as
example as their behavior may
be unpredictable With no
return a structure containing
the current autoload map If a
third argument the function is
cleared and not loaded anymore
during the current Octave
session 
seealso
 
function name in a string
 
should be an absolute filename
or a file name in the same
directory as the function or
script from which the autoload
command was run calls to if 
var {file} is in the same directory as the PKG_ADD script then @example autoload ("foo", "bar.oct")
 
static const yytype_int16 yycheck []
 
static const yytype_uint16 yydefact []
 
static const yytype_int16 yydefgoto []
 
static const yytype_int16 yypact []
 
static const yytype_int16 yypgoto []
 
static const yytype_uint8 yyr1 []
 
static const yytype_uint8 yyr2 []
 
static const yytype_uint8 yystos []
 
static const yytype_int16 yytable []
 
static const yytype_uint8 yytranslate []
 

Macro Definition Documentation

#define _Noreturn   YY_ATTRIBUTE ((__noreturn__))

Definition at line 537 of file oct-parse.cc.

#define ADD_EQ   258

Definition at line 288 of file oct-parse.cc.

Referenced by octave::base_parser::make_assign_op(), and octave_push_parse().

#define AND_EQ   268

Definition at line 298 of file oct-parse.cc.

Referenced by octave::base_parser::make_assign_op(), and octave_push_parse().

#define BREAK   311

Definition at line 341 of file oct-parse.cc.

#define CASE   309

Definition at line 339 of file oct-parse.cc.

#define CATCH   317

Definition at line 347 of file oct-parse.cc.

#define CLASSDEF   321

Definition at line 351 of file oct-parse.cc.

#define CLEANUP   315

Definition at line 345 of file oct-parse.cc.

#define CONTINUE   312

Definition at line 342 of file oct-parse.cc.

#define DIV_EQ   261

Definition at line 291 of file oct-parse.cc.

Referenced by octave::base_parser::make_assign_op(), and octave_push_parse().

#define DO   303

Definition at line 333 of file oct-parse.cc.

#define DQ_STRING   298

Definition at line 328 of file oct-parse.cc.

Referenced by octave::base_parser::make_constant(), and octave_push_parse().

#define EDIV   283

Definition at line 313 of file oct-parse.cc.

Referenced by octave::base_parser::make_binary_op(), and octave_push_parse().

#define EDIV_EQ   265

Definition at line 295 of file oct-parse.cc.

Referenced by octave::base_parser::make_assign_op(), and octave_push_parse().

#define ELEFTDIV   284

Definition at line 314 of file oct-parse.cc.

Referenced by octave::base_parser::make_binary_op(), and octave_push_parse().

#define ELEFTDIV_EQ   266

Definition at line 296 of file oct-parse.cc.

Referenced by octave::base_parser::make_assign_op(), and octave_push_parse().

#define ELSE   307

Definition at line 337 of file oct-parse.cc.

#define ELSEIF   306

Definition at line 336 of file oct-parse.cc.

#define EMINUS   286

Definition at line 316 of file oct-parse.cc.

#define EMUL   282

Definition at line 312 of file oct-parse.cc.

Referenced by octave::base_parser::make_binary_op(), and octave_push_parse().

#define EMUL_EQ   264

Definition at line 294 of file oct-parse.cc.

Referenced by octave::base_parser::make_assign_op(), and octave_push_parse().

#define END   297

Definition at line 327 of file oct-parse.cc.

#define END_OF_INPUT   333

Definition at line 363 of file oct-parse.cc.

#define ENUMERATION   325

Definition at line 355 of file oct-parse.cc.

#define EPLUS   285

Definition at line 315 of file oct-parse.cc.

#define EPOW   292

Definition at line 322 of file oct-parse.cc.

Referenced by octave::base_parser::make_binary_op(), and octave_push_parse().

#define EPOW_EQ   267

Definition at line 297 of file oct-parse.cc.

Referenced by octave::base_parser::make_assign_op(), and octave_push_parse().

#define EVENTS   324

Definition at line 354 of file oct-parse.cc.

#define EXPR_AND   272

Definition at line 302 of file oct-parse.cc.

Referenced by octave::base_parser::make_binary_op(), and octave_push_parse().

#define EXPR_AND_AND   270

Definition at line 300 of file oct-parse.cc.

Referenced by octave::base_parser::make_boolean_op(), and octave_push_parse().

#define EXPR_EQ   277

Definition at line 307 of file oct-parse.cc.

Referenced by octave::base_parser::make_binary_op(), and octave_push_parse().

#define EXPR_GE   279

Definition at line 309 of file oct-parse.cc.

Referenced by octave::base_parser::make_binary_op(), and octave_push_parse().

#define EXPR_GT   280

Definition at line 310 of file oct-parse.cc.

Referenced by octave::base_parser::make_binary_op(), and octave_push_parse().

#define EXPR_LE   276

Definition at line 306 of file oct-parse.cc.

Referenced by octave::base_parser::make_binary_op(), and octave_push_parse().

#define EXPR_LT   275

Definition at line 305 of file oct-parse.cc.

Referenced by octave::base_parser::make_binary_op(), and octave_push_parse().

#define EXPR_NE   278

Definition at line 308 of file oct-parse.cc.

Referenced by octave::base_parser::make_binary_op(), and octave_push_parse().

#define EXPR_NOT   274

Definition at line 304 of file oct-parse.cc.

Referenced by octave::base_parser::make_prefix_op(), and octave_push_parse().

#define EXPR_OR   273

Definition at line 303 of file oct-parse.cc.

Referenced by octave::base_parser::make_binary_op(), and octave_push_parse().

#define EXPR_OR_OR   271

Definition at line 301 of file oct-parse.cc.

Referenced by octave::base_parser::make_boolean_op(), and octave_push_parse().

#define FCN   331

Definition at line 361 of file oct-parse.cc.

#define FCN_HANDLE   320

Definition at line 350 of file oct-parse.cc.

#define FOR   300

Definition at line 330 of file oct-parse.cc.

Referenced by octave_push_parse().

#define FQ_IDENT   328

Definition at line 358 of file oct-parse.cc.

#define FUNC_RET   313

Definition at line 343 of file oct-parse.cc.

#define GET   329

Definition at line 359 of file oct-parse.cc.

#define GLOBAL   318

Definition at line 348 of file oct-parse.cc.

Referenced by octave::base_parser::make_decl_command(), and octave_push_parse().

#define HERMITIAN   287

Definition at line 317 of file oct-parse.cc.

Referenced by octave::base_parser::make_postfix_op(), and octave_push_parse().

#define IF   305

Definition at line 335 of file oct-parse.cc.

#define IMAG_NUM   294

Definition at line 324 of file oct-parse.cc.

Referenced by octave::base_parser::make_constant(), and octave_push_parse().

#define INPUT_FILE   334

Definition at line 364 of file oct-parse.cc.

#define LEFTDIV   281

Definition at line 311 of file oct-parse.cc.

Referenced by octave::base_parser::make_binary_op(), and octave_push_parse().

#define LEFTDIV_EQ   262

Definition at line 292 of file oct-parse.cc.

Referenced by octave::base_parser::make_assign_op(), and octave_push_parse().

#define lexer   parser.lexer
#define LEXICAL_ERROR   332

Definition at line 362 of file oct-parse.cc.

#define METAQUERY   326

Definition at line 356 of file oct-parse.cc.

#define METHODS   323

Definition at line 353 of file oct-parse.cc.

#define MINUS_MINUS   290
#define MUL_EQ   260

Definition at line 290 of file oct-parse.cc.

Referenced by octave::base_parser::make_assign_op(), and octave_push_parse().

#define NAME   296

Definition at line 326 of file oct-parse.cc.

#define NUM   293

Definition at line 323 of file oct-parse.cc.

Referenced by octave::base_parser::make_constant(), and octave_push_parse().

#define octave_nerrs   yyps->octave_nerrs

Definition at line 3006 of file oct-parse.cc.

#define OR_EQ   269

Definition at line 299 of file oct-parse.cc.

Referenced by octave::base_parser::make_assign_op(), and octave_push_parse().

#define OTHERWISE   310

Definition at line 340 of file oct-parse.cc.

#define PARFOR   301

Definition at line 331 of file oct-parse.cc.

Referenced by octave::base_parser::make_for_command(), and octave_push_parse().

#define PERSISTENT   319
#define PLUS_PLUS   289
#define POW   291

Definition at line 321 of file oct-parse.cc.

Referenced by octave::base_parser::make_binary_op(), and octave_push_parse().

#define POW_EQ   263

Definition at line 293 of file oct-parse.cc.

Referenced by octave::base_parser::make_assign_op(), and octave_push_parse().

#define PROPERTIES   322

Definition at line 352 of file oct-parse.cc.

#define scanner   lexer.scanner

Definition at line 153 of file oct-parse.cc.

Referenced by octave_pull_parse(), and octave::push_parser::run().

#define SET   330

Definition at line 360 of file oct-parse.cc.

#define SQ_STRING   299

Definition at line 329 of file oct-parse.cc.

Referenced by octave::base_parser::make_constant(), and octave_push_parse().

#define STRUCT_ELT   295

Definition at line 325 of file oct-parse.cc.

#define SUB_EQ   259

Definition at line 289 of file oct-parse.cc.

Referenced by octave::base_parser::make_assign_op(), and octave_push_parse().

#define SUPERCLASSREF   327

Definition at line 357 of file oct-parse.cc.

#define SWITCH   308

Definition at line 338 of file oct-parse.cc.

#define TRANSPOSE   288

Definition at line 318 of file oct-parse.cc.

Referenced by octave::base_parser::make_postfix_op(), and octave_push_parse().

#define TRY   316

Definition at line 346 of file oct-parse.cc.

#define UNARY   335

Definition at line 365 of file oct-parse.cc.

#define UNTIL   304

Definition at line 334 of file oct-parse.cc.

#define UNWIND   314

Definition at line 344 of file oct-parse.cc.

#define WHILE   302

Definition at line 332 of file oct-parse.cc.

#define YY_ (   Msgid)    Msgid

Definition at line 510 of file oct-parse.cc.

Referenced by octave_pull_parse(), and octave_push_parse().

#define YY_ATTRIBUTE (   Spec)    /* empty */

Definition at line 520 of file oct-parse.cc.

#define YY_ATTRIBUTE_PURE   YY_ATTRIBUTE ((__pure__))

Definition at line 525 of file oct-parse.cc.

#define YY_ATTRIBUTE_UNUSED   YY_ATTRIBUTE ((__unused__))

Definition at line 529 of file oct-parse.cc.

#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

Definition at line 560 of file oct-parse.cc.

Referenced by octave_push_parse(), and yydestruct().

#define YY_IGNORE_MAYBE_UNINITIALIZED_END

Definition at line 561 of file oct-parse.cc.

Referenced by octave_push_parse(), and yydestruct().

#define YY_INITIAL_VALUE (   Value)    Value

Definition at line 557 of file oct-parse.cc.

Referenced by octave_push_parse().

#define YY_NULLPTR   0

Definition at line 170 of file oct-parse.cc.

Referenced by octave_parse(), and octave_pstate_new().

#define YY_OCTAVE_LIBINTERP_PARSE_TREE_OCT_PARSE_H_INCLUDED

Definition at line 185 of file oct-parse.cc.

#define YY_REDUCE_PRINT (   Rule)

Definition at line 1592 of file oct-parse.cc.

Referenced by octave_push_parse().

#define YY_STACK_PRINT (   Bottom,
  Top 
)

Definition at line 1591 of file oct-parse.cc.

Referenced by octave_push_parse().

#define YY_SYMBOL_PRINT (   Title,
  Type,
  Value,
  Location 
)

Definition at line 1590 of file oct-parse.cc.

Referenced by octave_push_parse(), and yydestruct().

#define YYABORT   goto yyabortlab

Definition at line 1436 of file oct-parse.cc.

Referenced by octave_push_parse().

#define YYACCEPT   goto yyacceptlab

Definition at line 1435 of file oct-parse.cc.

Referenced by octave_push_parse().

#define YYBACKUP (   Token,
  Value 
)
Value:
if (yychar == YYEMPTY) \
{ \
yychar = (Token); \
yylval = (Value); \
YYPOPSTACK (yylen); \
goto yybackup; \
} \
{ \
yyerror (parser, YY_("syntax error: cannot back up")); \
} \
while (0)
#define YYERROR
Definition: oct-parse.cc:1437
while(ischar(s=fgets(fid))) fputs(stdout
#define yyssp
Definition: oct-parse.cc:3011
This class gets nodes and searchs inside of 'info files'.
Definition: parser.h:52
if(nargin< 2) print_usage()
Definition: cellfun.cc:405
#define YYEMPTY
Definition: oct-parse.cc:1432
#define YYPOPSTACK(N)
#define YY_(Msgid)
Definition: oct-parse.cc:510
#define yystate
Definition: oct-parse.cc:3007
else
Definition: cellfun.cc:437
#define yylval
#define yyerror
Definition: oct-parse.cc:71

Definition at line 1442 of file oct-parse.cc.

#define YYBISON   1

Definition at line 44 of file oct-parse.cc.

#define YYBISON_VERSION   "3.0.4"

Definition at line 47 of file oct-parse.cc.

#define yyclearin   (yychar = YYEMPTY)

Definition at line 1431 of file oct-parse.cc.

#define YYCOPY (   Dst,
  Src,
  Count 
)
Value:
do \
{ \
for (yyi = 0; yyi < (Count); yyi++) \
(Dst)[yyi] = (Src)[yyi]; \
} \
while (0)
while(ischar(s=fgets(fid))) fputs(stdout
#define YYSIZE_T
Definition: oct-parse.cc:494
for(octave_idx_type n=0;n< hcv.numel();n++)
Definition: graphics.cc:10128

Definition at line 660 of file oct-parse.cc.

#define YYCOPY_NEEDED   1

Definition at line 632 of file oct-parse.cc.

#define yydebug   octave_debug

Definition at line 72 of file oct-parse.cc.

#define YYDEBUG   1

Definition at line 80 of file oct-parse.cc.

#define YYDPRINTF (   Args)

Definition at line 1589 of file oct-parse.cc.

Referenced by octave_push_parse().

#define YYEMPTY   (-2)

Definition at line 1432 of file oct-parse.cc.

Referenced by octave_push_parse().

#define YYEOF   0

Definition at line 1433 of file oct-parse.cc.

Referenced by octave_push_parse().

#define YYERRCODE   256

Definition at line 1461 of file oct-parse.cc.

#define yyerrok   (yyerrstatus = 0)

Definition at line 1430 of file oct-parse.cc.

#define yyerror   octave_error

Definition at line 71 of file oct-parse.cc.

Referenced by octave_pull_parse(), and octave_push_parse().

#define YYERROR   goto yyerrorlab

Definition at line 1437 of file oct-parse.cc.

#define YYERROR_VERBOSE   0

Definition at line 179 of file oct-parse.cc.

#define yyerrstatus   yyps->yyerrstatus

Definition at line 3008 of file oct-parse.cc.

Referenced by octave_push_parse(), and octave_tex_parse().

#define YYFINAL   110

Definition at line 673 of file oct-parse.cc.

Referenced by octave_push_parse().

#define YYFREE   free

Definition at line 603 of file oct-parse.cc.

#define YYINITDEPTH   200

Definition at line 1598 of file oct-parse.cc.

Referenced by octave_push_parse().

#define YYLAST   1508

Definition at line 675 of file oct-parse.cc.

Referenced by octave_push_parse().

#define yylex   octave_lex

Definition at line 70 of file oct-parse.cc.

Referenced by octave_pull_parse().

#define YYMALLOC   malloc

Definition at line 597 of file oct-parse.cc.

#define YYMAXDEPTH   10000

Definition at line 1609 of file oct-parse.cc.

Referenced by octave_push_parse().

#define YYMAXUTOK   335

Definition at line 689 of file oct-parse.cc.

#define yynerrs   octave_nerrs

Definition at line 73 of file oct-parse.cc.

Referenced by octave_push_parse().

#define YYNNTS   105

Definition at line 680 of file oct-parse.cc.

#define YYNRULES   278

Definition at line 682 of file oct-parse.cc.

#define YYNSTATES   516

Definition at line 684 of file oct-parse.cc.

#define YYNTOKENS   98

Definition at line 678 of file oct-parse.cc.

Referenced by octave_push_parse().

#define YYPACT_NINF   -413

Definition at line 833 of file oct-parse.cc.

#define yypact_value_is_default (   Yystate)    (!!((Yystate) == (-413)))

Definition at line 835 of file oct-parse.cc.

Referenced by octave_push_parse().

#define yyparse   octave_parse

Definition at line 64 of file oct-parse.cc.

#define YYPOPSTACK (   N)    (yyvsp -= (N), yyssp -= (N))

Referenced by octave_push_parse().

#define yypstate   octave_pstate
#define yypstate_delete   octave_pstate_delete
#define yypstate_new   octave_pstate_new

Definition at line 67 of file oct-parse.cc.

Referenced by octave_pull_parse(), and octave::base_parser::reset().

#define YYPULL   1

Definition at line 59 of file oct-parse.cc.

#define yypull_parse   octave_pull_parse

Definition at line 66 of file oct-parse.cc.

Referenced by octave_parse().

#define YYPURE   1

Definition at line 53 of file oct-parse.cc.

#define YYPUSH   1

Definition at line 56 of file oct-parse.cc.

#define yypush_parse   octave_push_parse

Definition at line 65 of file oct-parse.cc.

Referenced by octave_pull_parse().

#define YYRECOVERING ( )    (!!yyerrstatus)

Definition at line 1440 of file oct-parse.cc.

#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)

Definition at line 500 of file oct-parse.cc.

#define YYSIZE_T   size_t

Definition at line 494 of file oct-parse.cc.

Referenced by octave_push_parse().

#define YYSKELETON_NAME   "yacc.c"

Definition at line 50 of file oct-parse.cc.

#define yyss   yyps->yyss

Definition at line 3010 of file oct-parse.cc.

Referenced by octave_push_parse(), and octave_tex_parse().

#define yyssa   yyps->yyssa

Definition at line 3009 of file oct-parse.cc.

Referenced by octave_push_parse(), and octave_tex_parse().

#define yyssp   yyps->yyssp

Definition at line 3011 of file oct-parse.cc.

Referenced by octave_push_parse(), and octave_tex_parse().

#define YYSTACK_ALLOC   YYMALLOC

Definition at line 583 of file oct-parse.cc.

Referenced by octave_push_parse().

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM

Definition at line 586 of file oct-parse.cc.

#define YYSTACK_BYTES (   N)
Value:
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
short int yytype_int16
F77_RET_T const F77_INT & N
#define YYSTYPE
Definition: oct-parse.cc:62
#define YYSTACK_GAP_MAXIMUM
Definition: oct-parse.cc:624

Definition at line 628 of file oct-parse.cc.

Referenced by octave_push_parse().

#define YYSTACK_FREE   YYFREE

Definition at line 584 of file oct-parse.cc.

Referenced by octave_pstate_delete(), and octave_push_parse().

#define YYSTACK_GAP_MAXIMUM   (sizeof (union yyalloc) - 1)

Definition at line 624 of file oct-parse.cc.

#define YYSTACK_RELOCATE (   Stack_alloc,
  Stack 
)
Value:
do \
{ \
YYSIZE_T yynewbytes; \
YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
Stack = &yyptr->Stack_alloc; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
while (0)
while(ischar(s=fgets(fid))) fputs(stdout
#define YYSIZE_T
Definition: oct-parse.cc:494
#define yystacksize
Definition: oct-parse.cc:3015
#define YYCOPY(Dst, Src, Count)
Definition: oct-parse.cc:660
#define YYSTACK_GAP_MAXIMUM
Definition: oct-parse.cc:624

Definition at line 639 of file oct-parse.cc.

Referenced by octave_push_parse().

#define yystacksize   yyps->yystacksize

Definition at line 3015 of file oct-parse.cc.

Referenced by octave_push_parse(), and octave_tex_parse().

#define yystate   yyps->yystate

Definition at line 3007 of file oct-parse.cc.

Referenced by octave_push_parse(), and octave_tex_parse().

#define YYSTYPE   OCTAVE_STYPE

Definition at line 62 of file oct-parse.cc.

Referenced by octave_pull_parse(), octave_push_parse(), and octave::push_parser::run().

#define YYTABLE_NINF   -266

Definition at line 838 of file oct-parse.cc.

#define yytable_value_is_error (   Yytable_value)    0

Definition at line 840 of file oct-parse.cc.

Referenced by octave_push_parse().

#define YYTERROR   1

Definition at line 1460 of file oct-parse.cc.

Referenced by octave_push_parse().

#define YYTRANSLATE (   YYX)    ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)

Definition at line 691 of file oct-parse.cc.

Referenced by octave_push_parse().

#define YYUNDEFTOK   2

Definition at line 688 of file oct-parse.cc.

#define YYUSE (   E)    ((void) (E))

Definition at line 543 of file oct-parse.cc.

Referenced by octave_push_parse(), and yydestruct().

#define yyvs   yyps->yyvs

Definition at line 3013 of file oct-parse.cc.

Referenced by octave_push_parse(), and octave_tex_parse().

#define yyvsa   yyps->yyvsa

Definition at line 3012 of file oct-parse.cc.

Referenced by octave_push_parse(), and octave_tex_parse().

#define yyvsp   yyps->yyvsp

Definition at line 3014 of file oct-parse.cc.

Referenced by octave_tex_parse().

Typedef Documentation

Definition at line 445 of file oct-parse.cc.

typedef short int yytype_int16

Definition at line 484 of file oct-parse.cc.

typedef signed char yytype_int8

Definition at line 472 of file oct-parse.cc.

typedef unsigned short int yytype_uint16

Definition at line 478 of file oct-parse.cc.

typedef unsigned char yytype_uint8

Definition at line 466 of file oct-parse.cc.

Function Documentation

end example noindent will load the function or usages such as example autoload ( "foo"  ,
file_in_loadpath("bar.oct")   
)
string_vector autoloaded_functions ( void  )

Definition at line 8234 of file oct-parse.cc.

References p.

Referenced by make_name_list().

static std::string end_token_as_string ( token::end_tok_type  ettype)
static
OCTAVE_EXPORT octave_value_list Fautoload ( const octave_value_list args,
int   
)

Definition at line 8381 of file oct-parse.cc.

Referenced by install_oct_parse_fcns().

feval ( ar{f ,
 
)
void free ( void *  )

Referenced by octave_pstate_delete().

std::string get_help_from_file ( const std::string nm,
bool symbol_found,
std::string full_file 
)
std::string get_help_from_file ( const std::string nm,
bool symbol_found 
)

Definition at line 8212 of file oct-parse.cc.

References file, get_help_from_file(), and string.

octave_function* load_fcn_from_file ( const std::string file_name,
const std::string dir_name,
const std::string dispatch_type,
const std::string package_name,
const std::string fcn_name,
bool  autoload 
)
std::string lookup_autoload ( const std::string nm)
void* malloc ( size_t  )

Referenced by octave_pstate_new().

static void octave_error ( octave::base_parser parser,
const char *  s 
)
static

Definition at line 5941 of file oct-parse.cc.

References octave::base_parser::bison_error().

int octave_lex ( OCTAVE_STYPE ,
void *   
)

The main scanner function which does all the work.

Definition at line 1274 of file lex.cc.

References ADD_EQ, AND_EQ, octave_comment_elt::block, BLOCK_COMMENT_START, c, CMD_OR_COMPUTED_ASSIGN_OP, CMD_OR_OP, CMD_OR_UNARY_OP, COMMAND_ARG_FINISH, COMMAND_START, curr_lexer, DIV_EQ, DQ_STRING, DQ_STRING_START, ECHO, EDIV, EDIV_EQ, ELEFTDIV, ELEFTDIV_EQ, EMINUS, EMUL, EMUL_EQ, octave_comment_elt::end_of_line, EOB_ACT_CONTINUE_SCAN, EOB_ACT_END_OF_FILE, EOB_ACT_LAST_MATCH, EPLUS, EPOW, EPOW_EQ, EXPR_AND, EXPR_AND_AND, EXPR_EQ, EXPR_GE, EXPR_GT, EXPR_LE, EXPR_LT, EXPR_NE, EXPR_NOT, EXPR_OR, EXPR_OR_OR, FQ_IDENT_START, octave_comment_elt::full_line, HANDLE_IDENTIFIER, HANDLE_STRING_CONTINUATION, HERMITIAN, IMAG_NUM, INITIAL, INPUT_FILE, INPUT_FILE_START, LEFTDIV, LEFTDIV_EQ, LEXICAL_ERROR, LINE_COMMENT_START, MATRIX_START, MINUS_MINUS, MUL_EQ, nm, NUM, octave__create_buffer(), octave__load_buffer_state(), octave_ensure_buffer_stack(), octave_wrap, OR_EQ, PLUS_PLUS, POW, POW_EQ, result, SQ_STRING, SQ_STRING_START, string, SUB_EQ, TRANSPOSE, undo_string_escape(), unput, warning_with_id(), yy_accept, YY_AT_BOL, yy_base, YY_BREAK, YY_BUF_SIZE, YY_BUFFER_NEW, YY_BUFFER_NORMAL, yyguts_t::yy_c_buf_p, yy_chk, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_def, yyguts_t::yy_did_buffer_switch_on_eof, YY_DO_BEFORE_ACTION, yy_ec, YY_END_OF_BUFFER, YY_FATAL_ERROR, yy_get_next_buffer(), yy_get_previous_state(), yyguts_t::yy_hold_char, yyguts_t::yy_init, yyguts_t::yy_last_accepting_cpos, yyguts_t::yy_last_accepting_state, yy_meta, YY_MORE_ADJ, yyguts_t::yy_n_chars, YY_NEW_FILE, yy_nxt, YY_RESTORE_YY_MORE_OFFSET, YY_RULE_SETUP, YY_SC_TO_UI, YY_START, yyguts_t::yy_start, YY_STATE_EOF, yy_try_NUL_trans(), yyin, yyleng, yyless, yylval, yyout, and yytext.

Referenced by octave::push_parser::run().

int octave_parse ( octave::base_parser parser)

Definition at line 2949 of file oct-parse.cc.

References YY_NULLPTR, and yypull_parse.

void octave_pstate_delete ( octave_pstate ps)

Definition at line 2995 of file oct-parse.cc.

References free(), and YYSTACK_FREE.

octave_pstate * octave_pstate_new ( void  )

Definition at line 2984 of file oct-parse.cc.

References malloc(), YY_NULLPTR, and yypstate.

int octave_pull_parse ( octave_pstate ps,
octave::base_parser parser 
)
int octave_push_parse ( octave_pstate ps,
int  pushed_char,
OCTAVE_STYPE const *  pushed_val,
octave::base_parser parser 
)

Definition at line 3023 of file oct-parse.cc.

References ADD_EQ, symbol_table::alloc_scope(), AND_EQ, append, octave::base_parser::append_statement_list(), octave::base_parser::bison_error(), octave::base_parser::classdef_object, column, octave::base_parser::curr_fcn_depth, DIV_EQ, DQ_STRING, EDIV, EDIV_EQ, ELEFTDIV, ELEFTDIV_EQ, EMUL, EMUL_EQ, octave::base_parser::end_token_error(), octave::base_parser::end_token_ok(), octave::base_parser::endfunction_found, EPOW, EPOW_EQ, EXPR_AND, EXPR_AND_AND, EXPR_EQ, EXPR_GE, EXPR_GT, EXPR_LE, EXPR_LT, EXPR_NE, EXPR_NOT, EXPR_OR, EXPR_OR_OR, fcn, octave::base_parser::finish_cell(), octave::base_parser::finish_classdef_external_method(), octave::base_parser::finish_colon_expression(), octave::base_parser::finish_function(), octave::base_parser::finish_if_command(), octave::base_parser::finish_matrix(), octave::base_parser::finish_switch_command(), fname, FOR, octave::base_parser::frob_function(), token::function_end, octave::base_parser::function_scopes, GLOBAL, HERMITIAN, IMAG_NUM, tree_parameter_list::in, LEFTDIV, LEFTDIV_EQ, lexer, octave_value::magic_colon_t, octave::base_parser::make_anon_fcn_handle(), octave::base_parser::make_assign_op(), octave::base_parser::make_binary_op(), octave::base_parser::make_boolean_op(), octave::base_parser::make_break_command(), octave::base_parser::make_classdef(), octave::base_parser::make_classdef_enum_block(), octave::base_parser::make_classdef_events_block(), octave::base_parser::make_classdef_methods_block(), octave::base_parser::make_classdef_properties_block(), octave::base_parser::make_constant(), octave::base_parser::make_continue_command(), octave::base_parser::make_decl_command(), octave::base_parser::make_do_until_command(), octave::base_parser::make_elseif_clause(), octave::base_parser::make_end(), octave::base_parser::make_fcn_handle(), octave::base_parser::make_for_command(), octave::base_parser::make_index_expression(), octave::base_parser::make_indirect_ref(), octave::base_parser::make_meta_class_query(), octave::base_parser::make_postfix_op(), octave::base_parser::make_prefix_op(), octave::base_parser::make_return_command(), octave::base_parser::make_script(), octave::base_parser::make_statement(), octave::base_parser::make_statement_list(), octave::base_parser::make_superclass_ref(), octave::base_parser::make_switch_case(), octave::base_parser::make_try_command(), octave::base_parser::make_unwind_command(), octave::base_parser::make_while_command(), octave::base_parser::max_fcn_depth, MINUS_MINUS, MUL_EQ, name, NUM, OR_EQ, tree_parameter_list::out, PARFOR, octave::base_parser::parsing_subfunctions, PERSISTENT, PLUS_PLUS, POW, POW_EQ, octave::base_parser::primary_fcn_scope, octave::base_parser::recover_from_parsing_function(), octave::base_parser::set_stmt_print_flag(), SQ_STRING, octave::base_parser::start_classdef_external_method(), octave::base_parser::start_function(), octave::base_parser::start_if_command(), octave::base_parser::stmt_list, string, SUB_EQ, tmp, TRANSPOSE, tree_parameter_list::validate(), octave::base_parser::validate_array_list(), octave::base_parser::validate_matrix_for_assignment(), YY_, YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN, YY_IGNORE_MAYBE_UNINITIALIZED_END, YY_INITIAL_VALUE, YY_REDUCE_PRINT, YY_STACK_PRINT, YY_SYMBOL_PRINT, YYABORT, YYACCEPT, yycheck, yydefact, yydefgoto, yydestruct(), YYDPRINTF, YYEMPTY, YYEOF, yyerror, yyerrstatus, YYFINAL, YYINITDEPTH, YYLAST, yylval, YYMAXDEPTH, yynerrs, YYNTOKENS, yypact, yypact_value_is_default, yypgoto, YYPOPSTACK, YYPUSH_MORE, yyr1, yyr2, YYSIZE_T, yyss, yyalloc::yyss_alloc, yyssa, yyssp, YYSTACK_ALLOC, YYSTACK_BYTES, YYSTACK_FREE, YYSTACK_RELOCATE, yystacksize, yystate, yystos, YYSTYPE, yytable, yytable_value_is_error, YYTERROR, YYTRANSLATE, YYUSE, yyvs, yyalloc::yyvs_alloc, and yyvsa.

Referenced by octave::push_parser::run().

static octave_function* parse_fcn_file ( const std::string full_file,
const std::string file,
const std::string dispatch_type,
const std::string package_name,
bool  require_file,
bool  force_script,
bool  autoload,
bool  relative_lookup,
const std::string warn_for 
)
static
string_vector reverse_lookup_autoload ( const std::string nm)

Definition at line 8247 of file oct-parse.cc.

References string_vector::append(), and p.

static void safe_fclose ( FILE *  f)
static

Definition at line 8064 of file oct-parse.cc.

References fclose().

Referenced by octave::gl2ps_print(), and parse_fcn_file().

static void yydestruct ( const char *  yymsg,
int  yytype,
OCTAVE_STYPE yyvaluep,
octave::base_parser parser 
)
static

Variable Documentation

ar {file} mph{should not} depend on the Octave load path. Normally

Definition at line 8381 of file oct-parse.cc.

end example noindent will load the function or usages such as example as their behavior may be unpredictable With no arguments

Definition at line 8381 of file oct-parse.cc.

std::map<std::string, std::string> autoload_map
static

Definition at line 145 of file oct-parse.cc.

end example noindent will load the function code {foo} from the file @code{bar.oct}. The above usage when @code{bar.oct} is not in the same directory

Definition at line 8381 of file oct-parse.cc.

octave::base_lexer* LEXER = 0

Definition at line 139 of file oct-parse.cc.

should be an absolute filename or a file name in the same directory as the function or script from which the autoload command was run calls to ode {autoload} appear in PKG_ADD script files that are evaluated when a directory is added to Octave's load path. To avoid having to hardcode directory names in @var{file}

Definition at line 8381 of file oct-parse.cc.

end example noindent will load the function or usages such as example as their behavior may be unpredictable With no return a structure containing the current autoload map If a third argument qcode {"remove"} is given

Definition at line 8381 of file oct-parse.cc.

bool reading_startup_message_printed = false

Definition at line 142 of file oct-parse.cc.

end example noindent will load the function or usages such as example as their behavior may be unpredictable With no return a structure containing the current autoload map If a third argument the function is cleared and not loaded anymore during the current Octave session seealso

Definition at line 8381 of file oct-parse.cc.

function name in a string
should be an absolute filename or a file name in the same directory as the function or script from which the autoload command was run calls to if var {file} is in the same directory as the PKG_ADD script then @example autoload ("foo", "bar.oct")

Definition at line 8381 of file oct-parse.cc.

const yytype_int16 yycheck[]
static

Definition at line 1150 of file oct-parse.cc.

Referenced by octave_push_parse().

const yytype_uint16 yydefact[]
static

Definition at line 904 of file oct-parse.cc.

Referenced by octave_push_parse().

const yytype_int16 yydefgoto[]
static
Initial value:
=
{
-1, 35, 36, 37, 185, 186, 187, 188, 39, 115,
73, 41, 42, 43, 44, 45, 98, 46, 104, 99,
47, 48, 49, 100, 101, 102, 136, 50, 225, 51,
52, 53, 54, 55, 56, 57, 58, 88, 282, 89,
59, 60, 177, 178, 277, 278, 61, 332, 333, 334,
335, 62, 63, 64, 65, 108, 295, 504, 203, 204,
205, 261, 316, 66, 67, 68, 262, 263, 319, 388,
189, 190, 342, 378, 379, 405, 406, 420, 444, 433,
439, 440, 473, 474, 441, 495, 477, 512, 478, 479,
442, 483, 484, 443, 487, 488, 206, 480, 69, 70,
71, 92, 93, 174, 175
}

Definition at line 977 of file oct-parse.cc.

Referenced by octave_push_parse().

const yytype_int16 yypact[]
static

Definition at line 845 of file oct-parse.cc.

Referenced by octave_push_parse().

const yytype_int16 yypgoto[]
static
Initial value:
=
{
-413, -413, -413, -413, -137, -413, -413, 4, -413, -413,
0, -413, -413, -15, -413, -413, -413, -413, -413, -9,
-413, -413, -100, -170, -91, -94, -141, 410, -74, -413,
-413, 601, -28, -413, -24, -413, -413, 347, -374, -72,
-413, -413, -413, -413, -413, -413, -413, -413, -413, 40,
44, -413, -413, -413, -413, -413, -413, -25, -413, -413,
83, -98, -413, -413, -413, -412, -413, 63, -413, -1,
-413, -413, -217, -413, -20, -413, -413, -413, -413, -59,
-413, -66, -413, -102, -64, -121, -413, -413, -99, -413,
-58, -413, -96, -57, -413, -97, -168, -2, -413, 365,
368, -413, -413, -186, 113
}

Definition at line 961 of file oct-parse.cc.

Referenced by octave_push_parse().

const yytype_uint8 yyr1[]
static

Definition at line 1364 of file oct-parse.cc.

Referenced by octave_push_parse().

const yytype_uint8 yyr2[]
static

Definition at line 1397 of file oct-parse.cc.

Referenced by octave_push_parse().

const yytype_uint8 yystos[]
static

Definition at line 1307 of file oct-parse.cc.

Referenced by octave_push_parse().

const yytype_int16 yytable[]
static

Definition at line 995 of file oct-parse.cc.

Referenced by octave_push_parse().

const yytype_uint8 yytranslate[]
static

Definition at line 696 of file oct-parse.cc.