#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 "anon-fcn-validator.h"#include "builtin-defun-decls.h"#include "defun.h"#include "dynamic-ld.h"#include "error.h"#include "input.h"#include "interpreter-private.h"#include "interpreter.h"#include "lex.h"#include "load-path.h"#include "lo-sysdep.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 "symtab.h"#include "token.h"#include "unwind-prot.h"#include "utils.h"#include "variables.h"#include "oct-parse.h"#include <limits.h>Go to the source code of this file.
Namespaces | |
| octave | |
Macros | |
| #define | lexer (parser.get_lexer ()) |
| #define | octave_nerrs yyps->octave_nerrs |
| #define | OCTAVE_YYUSE(...) |
| #define | scanner lexer.m_scanner |
| #define | YY_(Msgid) Msgid |
| #define | YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) |
| Accessing symbol of state STATE. More... | |
| #define | YY_ASSERT(E) ((void) (0 && (E))) |
| #define | YY_ATTRIBUTE_PURE |
| #define | YY_ATTRIBUTE_UNUSED |
| #define | YY_CAST(Type, Val) ((Type) (Val)) |
| #define | YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
| #define | YY_IGNORE_MAYBE_UNINITIALIZED_END |
| #define | YY_IGNORE_USELESS_CAST_BEGIN |
| #define | YY_IGNORE_USELESS_CAST_END |
| #define | YY_INITIAL_VALUE(Value) Value |
| #define | YY_NULLPTR ((void*)0) |
| #define | YY_REDUCE_PRINT(Rule) |
| #define | YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) |
| #define | YY_STACK_PRINT(Bottom, Top) |
| #define | YY_SYMBOL_PRINT(Title, Kind, Value, Location) |
| #define | YY_USE(E) ((void) (E)) |
| #define | YYABORT goto yyabortlab |
| #define | YYACCEPT goto yyacceptlab |
| #define | YYBACKUP(Token, Value) |
| #define | YYBISON 30802 |
| #define | YYBISON_VERSION "3.8.2" |
| #define | yyclearin (yychar = OCTAVE_EMPTY) |
| #define | YYCOPY(Dst, Src, Count) |
| #define | YYCOPY_NEEDED 1 |
| #define | yydebug octave_debug |
| #define | YYDEBUG 1 |
| #define | YYDPRINTF(Args) ((void) 0) |
| #define | YYERRCODE OCTAVE_UNDEF |
| #define | yyerrok (yyerrstatus = 0) |
| #define | yyerror octave_error |
| #define | YYERROR goto yyerrorlab |
| #define | yyerrstatus yyps->yyerrstatus |
| #define | YYFINAL 110 |
| #define | YYFREE free |
| #define | YYINITDEPTH 200 |
| #define | YYLAST 1538 |
| #define | yylex octave_lex |
| #define | YYMALLOC malloc |
| #define | YYMAXDEPTH 10000 |
| #define | YYMAXUTOK 333 |
| #define | yynerrs octave_nerrs |
| #define | YYNNTS 130 |
| #define | YYNOMEM goto yyexhaustedlab |
| #define | YYNRULES 315 |
| #define | YYNSTATES 578 |
| #define | YYNTOKENS 98 |
| #define | YYPACT_NINF (-465) |
| #define | yypact_value_is_default(Yyn) ((Yyn) == YYPACT_NINF) |
| #define | yyparse octave_parse |
| #define | YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) |
| #define | yypstate octave_pstate |
| #define | yypstate_clear octave_pstate_clear |
| #define | yypstate_delete octave_pstate_delete |
| #define | yypstate_new octave_pstate_new |
| #define | YYPTRDIFF_MAXIMUM LONG_MAX |
| #define | YYPTRDIFF_T long |
| #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 |
| #define | YYSIZE_T unsigned |
| #define | YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) |
| #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 (YYSIZEOF (union yyalloc) - 1) |
| #define | YYSTACK_RELOCATE(Stack_alloc, Stack) |
| #define | yystacksize yyps->yystacksize |
| #define | yystate yyps->yystate |
| #define | YYSTYPE OCTAVE_STYPE |
| #define | YYTABLE_NINF (-316) |
| #define | yytable_value_is_error(Yyn) 0 |
| #define | YYTRANSLATE(YYX) |
| #define | yyvs yyps->yyvs |
| #define | yyvsa yyps->yyvsa |
| #define | yyvsp yyps->yyvsp |
Typedefs | |
| typedef int | yy_state_fast_t |
| typedef yytype_int16 | yy_state_t |
| typedef enum yysymbol_kind_t | yysymbol_kind_t |
| typedef short | yytype_int16 |
| typedef signed char | yytype_int8 |
| typedef unsigned short | yytype_uint16 |
| typedef unsigned char | yytype_uint8 |
Functions | |
| octave_value_list | octave::F__parse_file__ (octave::interpreter &interp, const octave_value_list &args, int) |
| octave_value_list | octave::F__parser_debug_flag__ (const octave_value_list &args, int nargout) |
| octave_value_list | octave::Fassignin (octave::interpreter &interp, const octave_value_list &args, int) |
| octave_value_list | octave::Fautoload (octave::interpreter &interp, const octave_value_list &args, int) |
| octave_value_list | octave::Fbuiltin (octave::interpreter &interp, const octave_value_list &args, int nargout) |
| octave_value_list | octave::feval (const char *name, const octave_value_list &args, int nargout) |
| Evaluate an Octave function (built-in or interpreted) and return the list of result values. More... | |
| octave_value_list | octave::feval (const octave_value &val, const octave_value_list &args, int nargout) |
| octave_value_list | octave::feval (const octave_value_list &args, int nargout) |
| octave_value_list | octave::feval (const std::string &name, const octave_value_list &args, int nargout) |
| octave_value_list | octave::Feval (octave::interpreter &interp, const octave_value_list &args, int nargout) |
| octave_value_list | octave::feval (octave_function *fcn, const octave_value_list &args, int nargout) |
| octave_value_list | octave::Fevalc (octave::interpreter &interp, const octave_value_list &args, int nargout) |
| octave_value_list | octave::Fevalin (octave::interpreter &interp, const octave_value_list &args, int nargout) |
| octave_value_list | octave::Ffeval (octave::interpreter &interp, const octave_value_list &args, int nargout) |
| octave_value_list | octave::Fmfilename (octave::interpreter &interp, const octave_value_list &args, int) |
| void | free (void *) |
| octave_value_list | octave::Fsource (octave::interpreter &interp, const octave_value_list &args, int) |
| std::string | octave::get_help_from_file (const std::string &nm, bool &symbol_found) |
| std::string | octave::get_help_from_file (const std::string &nm, bool &symbol_found, std::string &full_file) |
| octave_value | octave::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) |
| void * | malloc (unsigned) |
| 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 *yyps) |
| octave_pstate * | octave_pstate_new (void) |
| int | octave_pull_parse (octave_pstate *yyps, octave::base_parser &parser) |
| int | octave_push_parse (octave_pstate *yyps, int yypushed_char, OCTAVE_STYPE const *yypushed_val, octave::base_parser &parser) |
| octave_value | octave::parse_fcn_file (interpreter &interp, const std::string &full_file, const std::string &file, const std::string &dir_name, const std::string &dispatch_type, const std::string &package_name, bool require_file, bool force_script, bool autoload, bool relative_lookup) |
| void | octave::source_file (const std::string &file_name, const std::string &context, bool verbose, bool require_file) |
| #define lexer (parser.get_lexer ()) |
Definition at line 146 of file oct-parse.cc.
| #define octave_nerrs yyps->octave_nerrs |
Definition at line 3058 of file oct-parse.cc.
| #define OCTAVE_YYUSE | ( | ... | ) |
Definition at line 155 of file oct-parse.cc.
| #define scanner lexer.m_scanner |
Definition at line 147 of file oct-parse.cc.
| #define YY_ | ( | Msgid | ) | Msgid |
Definition at line 552 of file oct-parse.cc.
| #define YY_ACCESSING_SYMBOL | ( | State | ) | YY_CAST (yysymbol_kind_t, yystos[State]) |
| #define YY_ASSERT | ( | E | ) | ((void) (0 && (E))) |
Definition at line 618 of file oct-parse.cc.
| #define YY_ATTRIBUTE_PURE |
Definition at line 561 of file oct-parse.cc.
| #define YY_ATTRIBUTE_UNUSED |
Definition at line 569 of file oct-parse.cc.
| #define YY_CAST | ( | Type, | |
| Val | |||
| ) | ((Type) (Val)) |
Definition at line 174 of file oct-parse.cc.
| #define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
Definition at line 598 of file oct-parse.cc.
| #define YY_IGNORE_MAYBE_UNINITIALIZED_END |
Definition at line 599 of file oct-parse.cc.
| #define YY_IGNORE_USELESS_CAST_BEGIN |
Definition at line 613 of file oct-parse.cc.
| #define YY_IGNORE_USELESS_CAST_END |
Definition at line 614 of file oct-parse.cc.
| #define YY_INITIAL_VALUE | ( | Value | ) | Value |
Definition at line 595 of file oct-parse.cc.
| #define YY_NULLPTR ((void*)0) |
Definition at line 186 of file oct-parse.cc.
| #define YY_REDUCE_PRINT | ( | Rule | ) |
Definition at line 1684 of file oct-parse.cc.
| #define YY_REINTERPRET_CAST | ( | Type, | |
| Val | |||
| ) | ((Type) (Val)) |
Definition at line 175 of file oct-parse.cc.
| #define YY_STACK_PRINT | ( | Bottom, | |
| Top | |||
| ) |
Definition at line 1683 of file oct-parse.cc.
| #define YY_SYMBOL_PRINT | ( | Title, | |
| Kind, | |||
| Value, | |||
| Location | |||
| ) |
Definition at line 1682 of file oct-parse.cc.
| #define YY_USE | ( | E | ) | ((void) (E)) |
Definition at line 575 of file oct-parse.cc.
| #define YYABORT goto yyabortlab |
Definition at line 1531 of file oct-parse.cc.
| #define YYACCEPT goto yyacceptlab |
Definition at line 1530 of file oct-parse.cc.
| #define YYBACKUP | ( | Token, | |
| Value | |||
| ) |
Definition at line 1538 of file oct-parse.cc.
| #define YYBISON 30802 |
Definition at line 49 of file oct-parse.cc.
| #define YYBISON_VERSION "3.8.2" |
Definition at line 52 of file oct-parse.cc.
| #define yyclearin (yychar = OCTAVE_EMPTY) |
Definition at line 1528 of file oct-parse.cc.
| #define YYCOPY | ( | Dst, | |
| Src, | |||
| Count | |||
| ) |
Definition at line 711 of file oct-parse.cc.
| #define YYCOPY_NEEDED 1 |
Definition at line 683 of file oct-parse.cc.
| #define yydebug octave_debug |
Definition at line 78 of file oct-parse.cc.
| #define YYDEBUG 1 |
Definition at line 85 of file oct-parse.cc.
| #define YYDPRINTF | ( | Args | ) | ((void) 0) |
Definition at line 1681 of file oct-parse.cc.
| #define YYERRCODE OCTAVE_UNDEF |
Definition at line 1557 of file oct-parse.cc.
| #define yyerrok (yyerrstatus = 0) |
Definition at line 1527 of file oct-parse.cc.
| #define yyerror octave_error |
Definition at line 77 of file oct-parse.cc.
| #define YYERROR goto yyerrorlab |
Definition at line 1532 of file oct-parse.cc.
| #define yyerrstatus yyps->yyerrstatus |
Definition at line 3060 of file oct-parse.cc.
| #define YYFINAL 110 |
Definition at line 724 of file oct-parse.cc.
| #define YYFREE free |
Definition at line 655 of file oct-parse.cc.
| #define YYINITDEPTH 200 |
Definition at line 1690 of file oct-parse.cc.
| #define YYLAST 1538 |
Definition at line 726 of file oct-parse.cc.
| #define yylex octave_lex |
Definition at line 76 of file oct-parse.cc.
| #define YYMALLOC malloc |
Definition at line 649 of file oct-parse.cc.
| #define YYMAXDEPTH 10000 |
Definition at line 1701 of file oct-parse.cc.
| #define YYMAXUTOK 333 |
Definition at line 738 of file oct-parse.cc.
| #define yynerrs octave_nerrs |
Definition at line 79 of file oct-parse.cc.
| #define YYNNTS 130 |
Definition at line 731 of file oct-parse.cc.
| #define YYNOMEM goto yyexhaustedlab |
Definition at line 1533 of file oct-parse.cc.
| #define YYNRULES 315 |
Definition at line 733 of file oct-parse.cc.
| #define YYNSTATES 578 |
Definition at line 735 of file oct-parse.cc.
| #define YYNTOKENS 98 |
Definition at line 729 of file oct-parse.cc.
| #define YYPACT_NINF (-465) |
Definition at line 892 of file oct-parse.cc.
| #define yypact_value_is_default | ( | Yyn | ) | ((Yyn) == YYPACT_NINF) |
Definition at line 894 of file oct-parse.cc.
| #define yyparse octave_parse |
Definition at line 69 of file oct-parse.cc.
| #define yypstate octave_pstate |
Definition at line 75 of file oct-parse.cc.
| #define yypstate_clear octave_pstate_clear |
Definition at line 73 of file oct-parse.cc.
| #define yypstate_delete octave_pstate_delete |
Definition at line 74 of file oct-parse.cc.
| #define yypstate_new octave_pstate_new |
Definition at line 72 of file oct-parse.cc.
| #define YYPTRDIFF_MAXIMUM LONG_MAX |
Definition at line 512 of file oct-parse.cc.
| #define YYPTRDIFF_T long |
Definition at line 511 of file oct-parse.cc.
| #define YYPULL 1 |
Definition at line 64 of file oct-parse.cc.
| #define yypull_parse octave_pull_parse |
Definition at line 71 of file oct-parse.cc.
| #define YYPURE 1 |
Definition at line 58 of file oct-parse.cc.
| #define YYPUSH 1 |
Definition at line 61 of file oct-parse.cc.
| #define yypush_parse octave_push_parse |
Definition at line 70 of file oct-parse.cc.
| #define YYRECOVERING | ( | ) | (!!yyerrstatus) |
Definition at line 1536 of file oct-parse.cc.
| #define YYSIZE_MAXIMUM |
Definition at line 529 of file oct-parse.cc.
| #define YYSIZE_T unsigned |
Definition at line 525 of file oct-parse.cc.
| #define YYSIZEOF | ( | X | ) | YY_CAST (YYPTRDIFF_T, sizeof (X)) |
Definition at line 535 of file oct-parse.cc.
| #define YYSKELETON_NAME "yacc.c" |
Definition at line 55 of file oct-parse.cc.
| #define yyss yyps->yyss |
Definition at line 3062 of file oct-parse.cc.
| #define yyssa yyps->yyssa |
Definition at line 3061 of file oct-parse.cc.
| #define yyssp yyps->yyssp |
Definition at line 3063 of file oct-parse.cc.
| #define YYSTACK_ALLOC YYMALLOC |
Definition at line 635 of file oct-parse.cc.
| #define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
Definition at line 638 of file oct-parse.cc.
| #define YYSTACK_BYTES | ( | N | ) |
Definition at line 679 of file oct-parse.cc.
| #define YYSTACK_FREE YYFREE |
Definition at line 636 of file oct-parse.cc.
Definition at line 675 of file oct-parse.cc.
| #define YYSTACK_RELOCATE | ( | Stack_alloc, | |
| Stack | |||
| ) |
Definition at line 690 of file oct-parse.cc.
| #define yystacksize yyps->yystacksize |
Definition at line 3067 of file oct-parse.cc.
| #define yystate yyps->yystate |
Definition at line 3059 of file oct-parse.cc.
| #define YYSTYPE OCTAVE_STYPE |
Definition at line 67 of file oct-parse.cc.
| #define YYTABLE_NINF (-316) |
Definition at line 897 of file oct-parse.cc.
| #define yytable_value_is_error | ( | Yyn | ) | 0 |
Definition at line 899 of file oct-parse.cc.
| #define YYTRANSLATE | ( | YYX | ) |
Definition at line 743 of file oct-parse.cc.
| #define yyvs yyps->yyvs |
Definition at line 3065 of file oct-parse.cc.
| #define yyvsa yyps->yyvsa |
Definition at line 3064 of file oct-parse.cc.
| #define yyvsp yyps->yyvsp |
Definition at line 3066 of file oct-parse.cc.
| typedef int yy_state_fast_t |
Definition at line 542 of file oct-parse.cc.
| typedef yytype_int16 yy_state_t |
Definition at line 539 of file oct-parse.cc.
| typedef enum yysymbol_kind_t yysymbol_kind_t |
Definition at line 144 of file oct-parse.cc.
| typedef short yytype_int16 |
Definition at line 463 of file oct-parse.cc.
| typedef signed char yytype_int8 |
Definition at line 455 of file oct-parse.cc.
| typedef unsigned short yytype_uint16 |
Definition at line 495 of file oct-parse.cc.
| typedef unsigned char yytype_uint8 |
Definition at line 484 of file oct-parse.cc.
| anonymous enum |
| Enumerator | |
|---|---|
| YYENOMEM | |
Definition at line 1525 of file oct-parse.cc.
| enum yysymbol_kind_t |
Definition at line 192 of file oct-parse.cc.
| void free | ( | void * | ) |
| void* malloc | ( | unsigned | ) |
| int octave_lex | ( | OCTAVE_STYPE * | yylval_param, |
| void * | yyscanner | ||
| ) |
The main scanner function which does all the work.
Definition at line 1621 of file lex.cc.
References YY_AT_BOL, YY_BUF_SIZE, yy_create_buffer, YY_CURRENT_BUFFER, YY_CURRENT_BUFFER_LVALUE, yy_load_buffer_state, yyensure_buffer_stack, yyguts_t, yyin, yylval, and yyout.
| int octave_parse | ( | octave::base_parser & | parser | ) |
Definition at line 3032 of file oct-parse.cc.
References YY_, yyerror, yypstate, yypstate_delete, yypstate_new, and yypull_parse.
| void octave_pstate_delete | ( | octave_pstate * | yyps | ) |
Definition at line 3102 of file oct-parse.cc.
References YYFREE, yyss, yyssa, and YYSTACK_FREE.
| octave_pstate* octave_pstate_new | ( | void | ) |
Definition at line 3088 of file oct-parse.cc.
References YY_CAST, YY_NULLPTR, YYINITDEPTH, YYMALLOC, yypstate, yypstate_clear, yyss, yyssa, yystacksize, yyvs, and yyvsa.
| int octave_pull_parse | ( | octave_pstate * | yyps, |
| octave::base_parser & | parser | ||
| ) |
Definition at line 3046 of file oct-parse.cc.
References scanner, YY_ASSERT, yylex, yylval, YYPUSH_MORE, yypush_parse, and YYSTYPE.
Referenced by parser::run().
| int octave_push_parse | ( | octave_pstate * | yyps, |
| int | yypushed_char, | ||
| OCTAVE_STYPE const * | yypushed_val, | ||
| octave::base_parser & | parser | ||
| ) |
Definition at line 3123 of file oct-parse.cc.
References YY_INITIAL_VALUE, yylval, YYSTYPE, and YYSYMBOL_YYEMPTY.