Mercurial > hg > octave-lyh
comparison src/parse.h @ 14329:8d1ae996c122
also save and restore symbol table context in parser (bug #35448)
* parse-private.h: New file to define new symtab_context class.
* Makefile.am (octinclude_HEADERS): Include it in the list.
* lex.ll, oct-parse.yy: Include parse-private.h.
* lex.ll (reset_parser): Clear parser_symtab_context.
* parse.h (symtab_context): Delete variable declaration.
* oct-parse.yy (symtab_context): Delete variable definition.
(parser_symtab_context): New variable.
(ABORT_PARSE, make_anon_fcn_handle, recover_from_parsing_function):
Pop parser_symtab_context.
(push_fcn_symtab, param_list_beg): Push parser_symtab_context.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 05 Feb 2012 13:53:55 -0500 |
parents | 72c96de7a403 |
children |
comparison
equal
deleted
inserted
replaced
14328:19078011cdc3 | 14329:8d1ae996c122 |
---|---|
60 extern bool reading_startup_message_printed; | 60 extern bool reading_startup_message_printed; |
61 | 61 |
62 // TRUE means input is coming from startup file. | 62 // TRUE means input is coming from startup file. |
63 extern bool input_from_startup_file; | 63 extern bool input_from_startup_file; |
64 | 64 |
65 // Keep track of symbol table information when parsing functions. | |
66 extern std::stack<symbol_table::scope_id> symtab_context; | |
67 | |
68 // Name of the current class when we are parsing class methods or | 65 // Name of the current class when we are parsing class methods or |
69 // constructors. | 66 // constructors. |
70 extern std::string current_class_name; | 67 extern std::string current_class_name; |
71 | 68 |
72 extern OCTINTERP_API std::string | 69 extern OCTINTERP_API std::string |