diff options
author | Dave Brolley <brolley@redhat.com> | 2009-07-10 11:10:51 -0400 |
---|---|---|
committer | Dave Brolley <brolley@redhat.com> | 2009-07-10 11:10:51 -0400 |
commit | 1e9ab8199dff90c1b6e7290f0f7b4eb424a9ff9f (patch) | |
tree | a0c10b78ad3e7142a59ffd6f6e75b75abf90d88e /parse.h | |
parent | 7d54db1a2c0b3831b6fbc8282f1155426c4be540 (diff) | |
parent | c728b7da8be430367aa33f9fbacda93d4add9ea2 (diff) | |
download | systemtap-steved-1e9ab8199dff90c1b6e7290f0f7b4eb424a9ff9f.tar.gz systemtap-steved-1e9ab8199dff90c1b6e7290f0f7b4eb424a9ff9f.tar.xz systemtap-steved-1e9ab8199dff90c1b6e7290f0f7b4eb424a9ff9f.zip |
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
Diffstat (limited to 'parse.h')
-rw-r--r-- | parse.h | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -15,6 +15,7 @@ #include <fstream> #include <iostream> #include <vector> +#include <set> #include <stdexcept> #include <stdint.h> @@ -22,10 +23,9 @@ struct stapfile; struct source_loc { - std::string file; + stapfile* file; unsigned line; unsigned column; - stapfile* stap_file; }; std::ostream& operator << (std::ostream& o, const source_loc& loc); @@ -74,23 +74,22 @@ class lexer public: token* scan (bool wildcard=false); lexer (std::istream&, const std::string&, systemtap_session&); - std::string get_input_contents (); void set_current_file (stapfile* f); private: - int input_get (); - void input_put (int); + inline int input_get (); + inline int input_peek (unsigned n=0); void input_put (const std::string&); - int input_peek (unsigned n=0); - std::istream& input; std::string input_name; std::string input_contents; - int input_pointer; // index into input_contents + const char *input_pointer; // index into input_contents + const char *input_end; unsigned cursor_suspend_count; unsigned cursor_line; unsigned cursor_column; systemtap_session& session; stapfile* current_file; + static std::set<std::string> keywords; }; struct probe; |