GNU Octave  3.8.0
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 | Macros | Typedefs | Enumerations | Functions | Variables
oct-parse.cc File Reference
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <map>
#include <sstream>
#include "Cell.h"
#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 "comment-list.h"
#include "defaults.h"
#include "defun.h"
#include "dirfns.h"
#include "dynamic-ld.h"
#include "error.h"
#include "input.h"
#include "lex.h"
#include "load-path.h"
#include "oct-hist.h"
#include "oct-map.h"
#include "ov-fcn-handle.h"
#include "ov-usr-fcn.h"
#include "ov-null-mat.h"
#include "toplev.h"
#include "pager.h"
#include "parse.h"
#include "pt-all.h"
#include "pt-eval.h"
#include "symtab.h"
#include "token.h"
#include "unwind-prot.h"
#include "utils.h"
#include "variables.h"
#include <oct-parse.h>
#include <stdio.h>
Include dependency graph for oct-parse.cc:

Go to the source code of this file.

Classes

union  yyalloc
union  YYSTYPE

Macros

#define __attribute__(Spec)   /* empty */
#define ABORT_PARSE
#define ADD_EQ   258
#define AND_EQ   268
#define BREAK   315
#define CASE   313
#define CATCH   321
#define CLASSDEF   337
#define CLEANUP   319
#define CONTINUE   316
#define DIV_EQ   261
#define DO   307
#define DQ_STRING   302
#define EDIV   287
#define EDIV_EQ   265
#define ELEFTDIV   288
#define ELEFTDIV_EQ   266
#define ELSE   311
#define ELSEIF   310
#define EMINUS   290
#define EMUL   286
#define EMUL_EQ   264
#define END   301
#define END_OF_INPUT   334
#define ENUMERATION   328
#define EPLUS   289
#define EPOW   296
#define EPOW_EQ   267
#define EVENTS   327
#define EXPR_AND   276
#define EXPR_AND_AND   274
#define EXPR_EQ   281
#define EXPR_GE   283
#define EXPR_GT   284
#define EXPR_LE   280
#define EXPR_LT   279
#define EXPR_NE   282
#define EXPR_NOT   278
#define EXPR_OR   277
#define EXPR_OR_OR   275
#define FCN   333
#define FCN_HANDLE   324
#define FOR   304
#define FUNC_RET   317
#define GET   331
#define GLOBAL   322
#define HERMITIAN   291
#define IF   309
#define IMAG_NUM   298
#define INPUT_FILE   336
#define LEFTDIV   285
#define LEFTDIV_EQ   262
#define lexer   parser.lexer
#define LEXICAL_ERROR   335
#define LSHIFT   272
#define LSHIFT_EQ   270
#define METAQUERY   329
#define METHODS   326
#define MINUS_MINUS   294
#define MUL_EQ   260
#define NAME   300
#define NUM   297
#define octave_nerrs   yyps->octave_nerrs
#define OR_EQ   269
#define OTHERWISE   314
#define PARFOR   305
#define PERSISTENT   323
#define PLUS_PLUS   293
#define POW   295
#define POW_EQ   263
#define PROPERTIES   325
#define RSHIFT   273
#define RSHIFT_EQ   271
#define scanner   lexer.scanner
#define SET   332
#define SQ_STRING   303
#define STRUCT_ELT   299
#define SUB_EQ   259
#define SUPERCLASSREF   330
#define SWITCH   312
#define TRANSPOSE   292
#define TRY   320
#define UNARY   338
#define UNTIL   308
#define UNWIND   318
#define WHILE   306
#define YY_(Msgid)   Msgid
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
#define YY_INITIAL_VALUE(Value)   = Value
#define YY_LOCATION_PRINT(File, Loc)   ((void) 0)
#define YY_NULL   0
#define YY_OCTAVE_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   "2.7.12-4996"
#define yychar   octave_char
#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 YYFAIL   goto yyerrlab
#define YYFINAL   115
#define YYFPRINTF   fprintf
#define YYFREE   free
#define YYID(N)   (N)
#define YYINITDEPTH   200
#define YYLAST   1410
#define yylex   octave_lex
#define YYLEX   yylex (&yylval, scanner)
#define yylval   octave_lval
#define YYMALLOC   malloc
#define YYMAXDEPTH   10000
#define YYMAXUTOK   338
#define yynerrs   octave_nerrs
#define YYNNTS   104
#define YYNRULES   275
#define YYNSTATES   514
#define YYNTOKENS   101
#define YYPACT_NINF   -400
#define yypact_value_is_default(Yystate)   (!!((Yystate) == (-400)))
#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_MORE_DEFINED
#define yypush_parse   octave_push_parse
#define YYRECOVERING()   (!!yyerrstatus)
#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)
#define YYSIZE_T   unsigned int
#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   YYSTYPE /* obsolescent; will be withdrawn */
#define YYSTYPE_IS_DECLARED   1
#define YYSTYPE_IS_TRIVIAL   1
#define YYTABLE_NINF   -263
#define yytable_value_is_error(Yytable_value)   YYID (0)
#define YYTERROR   1
#define YYTOKENTYPE
#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 union YYSTYPE YYSTYPE
typedef short int yytype_int16
typedef short int yytype_int8
typedef unsigned short int yytype_uint16
typedef unsigned char yytype_uint8

Enumerations

enum  { YYPUSH_MORE = 4 }
enum  yytokentype {
  BF = 258, IT = 259, SL = 260, RM = 261,
  FONTNAME = 262, FONTSIZE = 263, COLOR = 264, COLOR_RGB = 265,
  START = 266, END = 267, SUPER = 268, SUB = 269,
  CH = 270, NUM = 271, SYM = 272, SCRIPT = 273,
  STR = 274, ADD_EQ = 258, SUB_EQ = 259, MUL_EQ = 260,
  DIV_EQ = 261, LEFTDIV_EQ = 262, POW_EQ = 263, EMUL_EQ = 264,
  EDIV_EQ = 265, ELEFTDIV_EQ = 266, EPOW_EQ = 267, AND_EQ = 268,
  OR_EQ = 269, LSHIFT_EQ = 270, RSHIFT_EQ = 271, LSHIFT = 272,
  RSHIFT = 273, EXPR_AND_AND = 274, EXPR_OR_OR = 275, EXPR_AND = 276,
  EXPR_OR = 277, EXPR_NOT = 278, EXPR_LT = 279, EXPR_LE = 280,
  EXPR_EQ = 281, EXPR_NE = 282, EXPR_GE = 283, EXPR_GT = 284,
  LEFTDIV = 285, EMUL = 286, EDIV = 287, ELEFTDIV = 288,
  EPLUS = 289, EMINUS = 290, HERMITIAN = 291, TRANSPOSE = 292,
  PLUS_PLUS = 293, MINUS_MINUS = 294, POW = 295, EPOW = 296,
  NUM = 297, IMAG_NUM = 298, STRUCT_ELT = 299, NAME = 300,
  END = 301, DQ_STRING = 302, SQ_STRING = 303, FOR = 304,
  PARFOR = 305, WHILE = 306, DO = 307, UNTIL = 308,
  IF = 309, ELSEIF = 310, ELSE = 311, SWITCH = 312,
  CASE = 313, OTHERWISE = 314, BREAK = 315, CONTINUE = 316,
  FUNC_RET = 317, UNWIND = 318, CLEANUP = 319, TRY = 320,
  CATCH = 321, GLOBAL = 322, PERSISTENT = 323, FCN_HANDLE = 324,
  PROPERTIES = 325, METHODS = 326, EVENTS = 327, ENUMERATION = 328,
  METAQUERY = 329, SUPERCLASSREF = 330, GET = 331, SET = 332,
  FCN = 333, END_OF_INPUT = 334, LEXICAL_ERROR = 335, INPUT_FILE = 336,
  CLASSDEF = 337, UNARY = 338, ADD_EQ = 258, SUB_EQ = 259,
  MUL_EQ = 260, DIV_EQ = 261, LEFTDIV_EQ = 262, POW_EQ = 263,
  EMUL_EQ = 264, EDIV_EQ = 265, ELEFTDIV_EQ = 266, EPOW_EQ = 267,
  AND_EQ = 268, OR_EQ = 269, LSHIFT_EQ = 270, RSHIFT_EQ = 271,
  LSHIFT = 272, RSHIFT = 273, EXPR_AND_AND = 274, EXPR_OR_OR = 275,
  EXPR_AND = 276, EXPR_OR = 277, EXPR_NOT = 278, EXPR_LT = 279,
  EXPR_LE = 280, EXPR_EQ = 281, EXPR_NE = 282, EXPR_GE = 283,
  EXPR_GT = 284, LEFTDIV = 285, EMUL = 286, EDIV = 287,
  ELEFTDIV = 288, EPLUS = 289, EMINUS = 290, HERMITIAN = 291,
  TRANSPOSE = 292, PLUS_PLUS = 293, MINUS_MINUS = 294, POW = 295,
  EPOW = 296, NUM = 297, IMAG_NUM = 298, STRUCT_ELT = 299,
  NAME = 300, END = 301, DQ_STRING = 302, SQ_STRING = 303,
  FOR = 304, PARFOR = 305, WHILE = 306, DO = 307,
  UNTIL = 308, IF = 309, ELSEIF = 310, ELSE = 311,
  SWITCH = 312, CASE = 313, OTHERWISE = 314, BREAK = 315,
  CONTINUE = 316, FUNC_RET = 317, UNWIND = 318, CLEANUP = 319,
  TRY = 320, CATCH = 321, GLOBAL = 322, PERSISTENT = 323,
  FCN_HANDLE = 324, PROPERTIES = 325, METHODS = 326, EVENTS = 327,
  ENUMERATION = 328, METAQUERY = 329, SUPERCLASSREF = 330, GET = 331,
  SET = 332, FCN = 333, END_OF_INPUT = 334, LEXICAL_ERROR = 335,
  INPUT_FILE = 336, CLASSDEF = 337, UNARY = 338
}

Functions

static void octave_error (octave_base_parser &parser, const char *s)
int octave_lex (YYSTYPE *, void *)
 The main scanner function which does all the work.
int octave_parse ()
int octave_parse (parser) octave_base_parser &parser
void octave_pstate_delete ()
octave_pstateoctave_pstate_new ()
int octave_pull_parse ()
int octave_push_parse ()
static void yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser) FILE *yyoutput
static void yydestruct (yymsg, yytype, yyvaluep, parser) const char *yymsg

Variables

static std::map< std::string,
std::string > 
autoload_map
octave_base_lexerLEXER = 0
int octave_debug
octave_base_parserparser
bool reading_startup_message_printed = false
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_uint16 yyprhs []
int yypushed_char
YYSTYPE const * yypushed_val
static const yytype_uint8 yyr1 []
static const yytype_uint8 yyr2 []
static const yytype_int16 yyrhs []
static const yytype_uint16 yyrline []
int yyrule
static const yytype_uint8 yystos []
static const yytype_int16 yytable []
static const char *const yytname []
yytype_int16yytop
static const yytype_uint8 yytranslate []
int yytype
YYSTYPE const *const yyvaluep

Macro Definition Documentation

#define __attribute__ (   Spec)    /* empty */

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

#define ABORT_PARSE
Value:
do \
{ \
yyerrok; \
&& ! lexer.input_from_eval_string ()) \
} \
while (0)

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

#define ADD_EQ   258
#define AND_EQ   268
#define BREAK   315

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

Referenced by octave_base_lexer::display_token().

#define CASE   313

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

Referenced by octave_base_lexer::display_token().

#define CATCH   321

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

Referenced by octave_base_lexer::display_token().

#define CLASSDEF   337

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

Referenced by octave_base_lexer::display_token().

#define CLEANUP   319

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

Referenced by octave_base_lexer::display_token().

#define CONTINUE   316

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

Referenced by octave_base_lexer::display_token().

#define DIV_EQ   261
#define DO   307

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

Referenced by octave_base_lexer::display_token().

#define DQ_STRING   302

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

Referenced by octave_base_lexer::display_token(), and octave_lex().

#define EDIV   287
#define EDIV_EQ   265
#define ELEFTDIV   288
#define ELEFTDIV_EQ   266
#define ELSE   311

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

Referenced by octave_base_lexer::display_token().

#define ELSEIF   310

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

Referenced by octave_base_lexer::display_token().

#define EMINUS   290
#define EMUL   286
#define EMUL_EQ   264
#define END   301

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

#define END_OF_INPUT   334
#define ENUMERATION   328

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

#define EPLUS   289

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

Referenced by octave_base_lexer::display_token(), and octave_lex().

#define EPOW   296
#define EPOW_EQ   267
#define EVENTS   327

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

Referenced by octave_base_lexer::display_token().

#define EXPR_AND   276
#define EXPR_AND_AND   274
#define EXPR_EQ   281
#define EXPR_GE   283
#define EXPR_GT   284
#define EXPR_LE   280
#define EXPR_LT   279
#define EXPR_NE   282
#define EXPR_NOT   278
#define EXPR_OR   277
#define EXPR_OR_OR   275
#define FCN   333

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

Referenced by octave_base_lexer::display_token().

#define FCN_HANDLE   324
#define FOR   304

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

Referenced by octave_base_lexer::display_token().

#define FUNC_RET   317

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

Referenced by octave_base_lexer::display_token().

#define GET   331

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

Referenced by octave_base_lexer::display_token().

#define GLOBAL   322

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

Referenced by octave_base_lexer::display_token().

#define HERMITIAN   291

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

Referenced by octave_base_lexer::display_token(), and octave_lex().

#define IF   309

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

Referenced by octave_base_lexer::display_token().

#define IMAG_NUM   298

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

Referenced by octave_base_lexer::display_token(), and octave_lex().

#define INPUT_FILE   336

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

Referenced by octave_base_lexer::display_token(), and octave_lex().

#define LEFTDIV   285
#define LEFTDIV_EQ   262
#define lexer   parser.lexer
#define LEXICAL_ERROR   335
#define LSHIFT   272
#define LSHIFT_EQ   270
#define METAQUERY   329
#define METHODS   326

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

Referenced by octave_base_lexer::display_token().

#define MINUS_MINUS   294

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

Referenced by octave_base_lexer::display_token(), and octave_lex().

#define MUL_EQ   260
#define NAME   300
#define NUM   297

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

#define octave_nerrs   yyps->octave_nerrs
#define OR_EQ   269
#define OTHERWISE   314

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

Referenced by octave_base_lexer::display_token().

#define PARFOR   305

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

#define PERSISTENT   323
#define PLUS_PLUS   293

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

Referenced by octave_base_lexer::display_token(), and octave_lex().

#define POW   295
#define POW_EQ   263
#define PROPERTIES   325

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

Referenced by octave_base_lexer::display_token().

#define RSHIFT   273
#define RSHIFT_EQ   271
#define scanner   lexer.scanner

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

#define SET   332

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

Referenced by octave_base_lexer::display_token().

#define SQ_STRING   303

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

Referenced by octave_base_lexer::display_token(), and octave_lex().

#define STRUCT_ELT   299
#define SUB_EQ   259
#define SUPERCLASSREF   330
#define SWITCH   312

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

Referenced by octave_base_lexer::display_token().

#define TRANSPOSE   292

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

Referenced by octave_base_lexer::display_token(), and octave_lex().

#define TRY   320

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

Referenced by octave_base_lexer::display_token().

#define UNARY   338

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

#define UNTIL   308

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

Referenced by octave_base_lexer::display_token().

#define UNWIND   318

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

Referenced by octave_base_lexer::display_token().

#define WHILE   306

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

Referenced by octave_base_lexer::display_token().

#define YY_ (   Msgid)    Msgid

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

#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
#define YY_INITIAL_VALUE (   Value)    = Value
#define YY_LOCATION_PRINT (   File,
  Loc 
)    ((void) 0)

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

#define YY_NULL   0

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

#define YY_OCTAVE_PARSE_TREE_OCT_PARSE_H_INCLUDED

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

#define YY_REDUCE_PRINT (   Rule)
Value:
do { \
if (yydebug) \
yy_reduce_print (yyvsp, Rule, parser); \
} while (YYID (0))
#define YY_STACK_PRINT (   Bottom,
  Top 
)
Value:
do { \
if (yydebug) \
yy_stack_print ((Bottom), (Top)); \
} while (YYID (0))
#define YY_SYMBOL_PRINT (   Title,
  Type,
  Value,
  Location 
)
Value:
do { \
if (yydebug) \
{ \
YYFPRINTF (stderr, "%s ", Title); \
yy_symbol_print (stderr, \
Type, Value, parser); \
YYFPRINTF (stderr, "\n"); \
} \
} while (YYID (0))

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

#define YYABORT   goto yyabortlab

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

#define YYACCEPT   goto yyacceptlab

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

#define YYBACKUP (   Token,
  Value 
)
Value:
{ \
yychar = (Token); \
yylval = (Value); \
YYPOPSTACK (yylen); \
yystate = *yyssp; \
goto yybackup; \
} \
else \
{ \
yyerror (parser, YY_("syntax error: cannot back up")); \
YYERROR; \
} \
while (YYID (0))

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

#define YYBISON   1

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

#define YYBISON_VERSION   "2.7.12-4996"

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

#define yychar   octave_char

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

#define yyclearin   (yychar = YYEMPTY)

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

#define YYCOPY (   Dst,
  Src,
  Count 
)
Value:
do \
{ \
YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(Dst)[yyi] = (Src)[yyi]; \
} \
while (YYID (0))

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

#define YYCOPY_NEEDED   1

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

#define yydebug   octave_debug

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

#define YYDEBUG   1

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

#define YYDPRINTF (   Args)
Value:
do { \
if (yydebug) \
YYFPRINTF Args; \
} while (YYID (0))

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

#define YYEMPTY   (-2)

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

#define YYEOF   0

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

#define YYERRCODE   256

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

#define yyerrok   (yyerrstatus = 0)

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

#define yyerror   octave_error

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

#define YYERROR   goto yyerrorlab

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

#define YYERROR_VERBOSE   0

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

#define yyerrstatus   yyps->yyerrstatus
#define YYFAIL   goto yyerrlab

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

#define YYFINAL   115

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

#define YYFPRINTF   fprintf

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

#define YYFREE   free

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

#define YYID (   N)    (N)

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

#define YYINITDEPTH   200

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

#define YYLAST   1410

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

#define yylex   octave_lex

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

#define YYLEX   yylex (&yylval, scanner)

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

#define yylval   octave_lval

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

#define YYMALLOC   malloc

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

#define YYMAXDEPTH   10000

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

#define YYMAXUTOK   338

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

#define yynerrs   octave_nerrs

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

#define YYNNTS   104

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

#define YYNRULES   275

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

#define YYNSTATES   514

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

#define YYNTOKENS   101

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

#define YYPACT_NINF   -400

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

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

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

#define yyparse   octave_parse

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

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

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

#define yypstate_delete   octave_pstate_delete

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

#define yypstate_new   octave_pstate_new

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

#define YYPULL   1

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

#define yypull_parse   octave_pull_parse

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

#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_MORE_DEFINED

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

#define yypush_parse   octave_push_parse

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

#define YYRECOVERING ( )    (!!yyerrstatus)

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

#define YYSIZE_MAXIMUM   ((YYSIZE_T) -1)

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

#define YYSIZE_T   unsigned int

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

#define YYSKELETON_NAME   "yacc.c"

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

#define yyss   yyps->yyss
#define yyssa   yyps->yyssa
#define yyssp   yyps->yyssp
#define YYSTACK_ALLOC   YYMALLOC

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

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM

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

#define YYSTACK_BYTES (   N)
Value:
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \

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

#define YYSTACK_FREE   YYFREE

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

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

Definition at line 621 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 (YYID (0))

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

#define yystacksize   yyps->yystacksize
#define yystate   yyps->yystate
#define yystype   YYSTYPE /* obsolescent; will be withdrawn */

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

#define YYSTYPE_IS_DECLARED   1

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

#define YYSTYPE_IS_TRIVIAL   1

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

#define YYTABLE_NINF   -263

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

#define yytable_value_is_error (   Yytable_value)    YYID (0)

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

#define YYTERROR   1

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

#define YYTOKENTYPE

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

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

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

#define YYUNDEFTOK   2

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

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

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

#define yyvs   yyps->yyvs
#define yyvsa   yyps->yyvsa
#define yyvsp   yyps->yyvsp

Typedef Documentation

typedef struct octave_pstate octave_pstate

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

typedef union YYSTYPE YYSTYPE
typedef short int yytype_int16

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

typedef short int yytype_int8

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

typedef unsigned short int yytype_uint16

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

typedef unsigned char yytype_uint8

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

Enumeration Type Documentation

anonymous enum
Enumerator:
YYPUSH_MORE 

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

Enumerator:
BF 
IT 
SL 
RM 
FONTNAME 
FONTSIZE 
COLOR 
COLOR_RGB 
START 
END 
SUPER 
SUB 
CH 
NUM 
SYM 
SCRIPT 
STR 
ADD_EQ 
SUB_EQ 
MUL_EQ 
DIV_EQ 
LEFTDIV_EQ 
POW_EQ 
EMUL_EQ 
EDIV_EQ 
ELEFTDIV_EQ 
EPOW_EQ 
AND_EQ 
OR_EQ 
LSHIFT_EQ 
RSHIFT_EQ 
LSHIFT 
RSHIFT 
EXPR_AND_AND 
EXPR_OR_OR 
EXPR_AND 
EXPR_OR 
EXPR_NOT 
EXPR_LT 
EXPR_LE 
EXPR_EQ 
EXPR_NE 
EXPR_GE 
EXPR_GT 
LEFTDIV 
EMUL 
EDIV 
ELEFTDIV 
EPLUS 
EMINUS 
HERMITIAN 
TRANSPOSE 
PLUS_PLUS 
MINUS_MINUS 
POW 
EPOW 
NUM 
IMAG_NUM 
STRUCT_ELT 
NAME 
END 
DQ_STRING 
SQ_STRING 
FOR 
PARFOR 
WHILE 
DO 
UNTIL 
IF 
ELSEIF 
ELSE 
SWITCH 
CASE 
OTHERWISE 
BREAK 
CONTINUE 
FUNC_RET 
UNWIND 
CLEANUP 
TRY 
CATCH 
GLOBAL 
PERSISTENT 
FCN_HANDLE 
PROPERTIES 
METHODS 
EVENTS 
ENUMERATION 
METAQUERY 
SUPERCLASSREF 
GET 
SET 
FCN 
END_OF_INPUT 
LEXICAL_ERROR 
INPUT_FILE 
CLASSDEF 
UNARY 
ADD_EQ 
SUB_EQ 
MUL_EQ 
DIV_EQ 
LEFTDIV_EQ 
POW_EQ 
EMUL_EQ 
EDIV_EQ 
ELEFTDIV_EQ 
EPOW_EQ 
AND_EQ 
OR_EQ 
LSHIFT_EQ 
RSHIFT_EQ 
LSHIFT 
RSHIFT 
EXPR_AND_AND 
EXPR_OR_OR 
EXPR_AND 
EXPR_OR 
EXPR_NOT 
EXPR_LT 
EXPR_LE 
EXPR_EQ 
EXPR_NE 
EXPR_GE 
EXPR_GT 
LEFTDIV 
EMUL 
EDIV 
ELEFTDIV 
EPLUS 
EMINUS 
HERMITIAN 
TRANSPOSE 
PLUS_PLUS 
MINUS_MINUS 
POW 
EPOW 
NUM 
IMAG_NUM 
STRUCT_ELT 
NAME 
END 
DQ_STRING 
SQ_STRING 
FOR 
PARFOR 
WHILE 
DO 
UNTIL 
IF 
ELSEIF 
ELSE 
SWITCH 
CASE 
OTHERWISE 
BREAK 
CONTINUE 
FUNC_RET 
UNWIND 
CLEANUP 
TRY 
CATCH 
GLOBAL 
PERSISTENT 
FCN_HANDLE 
PROPERTIES 
METHODS 
EVENTS 
ENUMERATION 
METAQUERY 
SUPERCLASSREF 
GET 
SET 
FCN 
END_OF_INPUT 
LEXICAL_ERROR 
INPUT_FILE 
CLASSDEF 
UNARY 

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

Function Documentation

static void octave_error ( octave_base_parser parser,
const char s 
)
static
int octave_lex ( YYSTYPE ,
void  
)

The main scanner function which does all the work.

Definition at line 1329 of file lex.cc.

References ADD_EQ, AND_EQ, octave_comment_elt::block, BLOCK_COMMENT_START, CMD_OR_COMPUTED_ASSIGN_OP, CMD_OR_OP, CMD_OR_UNARY_OP, 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, error(), EXPR_AND, EXPR_AND_AND, EXPR_EQ, EXPR_GE, EXPR_GT, EXPR_LE, EXPR_LT, EXPR_NE, EXPR_NOT, EXPR_OR, EXPR_OR_OR, octave_comment_elt::full_line, HANDLE_STRING_CONTINUATION, HERMITIAN, IMAG_NUM, INITIAL, INPUT_FILE, INPUT_FILE_START, LEFTDIV, LEFTDIV_EQ, LEXICAL_ERROR, LINE_COMMENT_START, LSHIFT, LSHIFT_EQ, MATRIX_START, METAQUERY, MINUS_MINUS, MUL_EQ, NUM, octave__create_buffer(), octave__load_buffer_state(), octave_ensure_buffer_stack(), octave_wrap, OR_EQ, PLUS_PLUS, POW, POW_EQ, RSHIFT, RSHIFT_EQ, SQ_STRING, SQ_STRING_START, strip_trailing_whitespace(), SUB_EQ, SUPERCLASSREF, 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.

int octave_parse ( )
int octave_parse ( parser  )
void octave_pstate_delete ( )
octave_pstate* octave_pstate_new ( )
int octave_pull_parse ( )
int octave_push_parse ( )
static void yy_symbol_value_print ( yyoutput  ,
yytype  ,
yyvaluep  ,
parser   
)
static
static void yydestruct ( yymsg  ,
yytype  ,
yyvaluep  ,
parser   
) const
static

Variable Documentation

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

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

octave_base_lexer* LEXER = 0

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

int octave_debug

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

bool reading_startup_message_printed = false

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

Referenced by octave_execute_interpreter().

const yytype_int16 yycheck[]
static

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

const yytype_uint16 yydefact[]
static

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

const yytype_int16 yydefgoto[]
static
Initial value:
{
-1, 36, 37, 38, 196, 197, 198, 199, 40, 120,
77, 42, 43, 44, 45, 46, 109, 47, 103, 104,
48, 49, 50, 105, 106, 107, 141, 51, 234, 52,
53, 54, 55, 56, 57, 58, 59, 92, 313, 93,
60, 61, 189, 190, 308, 309, 62, 377, 378, 379,
380, 63, 64, 65, 66, 113, 324, 114, 212, 213,
214, 274, 345, 67, 68, 69, 275, 276, 348, 438,
70, 443, 71, 72, 173, 279, 280, 355, 356, 289,
290, 291, 445, 446, 292, 293, 448, 294, 295, 450,
451, 296, 297, 453, 454, 215, 83, 73, 74, 75,
96, 97, 177, 178
}

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

const yytype_int16 yypact[]
static

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

const yytype_int16 yypgoto[]
static
Initial value:
{
-400, -400, -400, -400, 81, -400, -400, 1, -400, -400,
0, -400, -400, -30, -400, -400, -400, -400, -400, -27,
-400, -400, -68, -183, -98, -99, -180, 14, -128, -400,
-400, 740, -76, -400, 44, -400, -400, 345, -345, -82,
-400, -400, -400, -400, -400, -400, -400, -400, -400, -3,
4, -400, -400, -400, -400, -400, -400, 101, -400, -400,
52, -400, -400, -400, -400, -399, -400, 39, -400, -55,
-400, -400, -400, -400, -201, -400, 31, -400, -400, -400,
-400, 23, -400, -85, -400, 26, -400, -400, 29, -400,
-81, -400, 30, -400, -80, -184, 13, -400, 355, 360,
-400, -400, 201, 69
}

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

const yytype_uint16 yyprhs[]
static

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

int yypushed_char

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

YYSTYPE const* yypushed_val

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

const yytype_uint8 yyr1[]
static

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

const yytype_uint8 yyr2[]
static

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

const yytype_int16 yyrhs[]
static

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

const yytype_uint16 yyrline[]
static

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

int yyrule

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

const yytype_uint8 yystos[]
static

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

const yytype_int16 yytable[]
static

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

const char* const yytname[]
static

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

yytype_int16* yytop

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

const yytype_uint8 yytranslate[]
static

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

int yytype

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

YYSTYPE* yyvaluep

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