diff options
author | fche <fche> | 2005-07-28 18:07:02 +0000 |
---|---|---|
committer | fche <fche> | 2005-07-28 18:07:02 +0000 |
commit | 24cb178fd82936f55d254ebd0cd79802da21134a (patch) | |
tree | d9fbde4a94c16abf37a994c7d3ae147d04b77919 /parse.h | |
parent | b290c791d701b5841ed824fddfce3f949b0a7b61 (diff) | |
download | systemtap-steved-24cb178fd82936f55d254ebd0cd79802da21134a.tar.gz systemtap-steved-24cb178fd82936f55d254ebd0cd79802da21134a.tar.xz systemtap-steved-24cb178fd82936f55d254ebd0cd79802da21134a.zip |
2005-07-28 Frank Ch. Eigler <fche@redhat.com>
translator/1120
* main.cxx (main): Preset -R and -I options from environment
variables (if set). Pass guru mode flags to parser.
* parse.cxx (privileged): New parser operation flag. Update callers.
(parse_embeddedcode): Throw an error if !privileged.
(parse_functiondecl): Change signature. Prevent duplicates.
(parse_globals): Ditto.
* parse.h: Corresponding changes.
* tapset/*.stp: Beginnings of real tapset library, to replace
previous builtins.
* tapsets.cxx: Greatly reduce verbose mode output.
* Makefile.am: Install & dist it.
* runtest.sh: Refer to it.
* Makefile.in, aclocal.m4: Regenerated.
* testsuite/*/*.stp: Set guru mode via /bin/sh if needed.
* testusite/*/*ko.stp: Homogenize shell scripts.
Diffstat (limited to 'parse.h')
-rw-r--r-- | parse.h | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -70,19 +70,20 @@ private: class parser { public: - parser (std::istream& i); - parser (const std::string& n); + parser (std::istream& i, bool p); + parser (const std::string& n, bool p); ~parser (); stapfile* parse (); - static stapfile* parse (std::istream& i); - static stapfile* parse (const std::string& n); + static stapfile* parse (std::istream& i, bool privileged); + static stapfile* parse (const std::string& n, bool privileged); private: std::string input_name; std::istream* free_input; lexer input; + bool privileged; // scanning state const token* last (); @@ -98,10 +99,10 @@ private: private: // nonterminals void parse_probe (std::vector<probe*>&, std::vector<probe_alias*>&); void parse_global (std::vector<vardecl*>&); + void parse_functiondecl (std::vector<functiondecl*>&); embeddedcode* parse_embeddedcode (); probe_point* parse_probe_point (); literal* parse_literal (); - functiondecl* parse_functiondecl (); block* parse_stmt_block (); statement* parse_statement (); if_statement* parse_if_statement (); |