diff options
author | Dave Brolley <brolley@redhat.com> | 2009-07-10 11:17:03 -0400 |
---|---|---|
committer | Dave Brolley <brolley@redhat.com> | 2009-07-10 11:17:03 -0400 |
commit | 5739030625d3f1697c264e3d8f04e932d1e0773d (patch) | |
tree | 0ed2d10376f2bf9bb009e31357d7913277d29bfc /parse.h | |
parent | bdf70a5d466fa9c1559a93ab71603981f1c0d753 (diff) | |
parent | 1e9ab8199dff90c1b6e7290f0f7b4eb424a9ff9f (diff) | |
download | systemtap-steved-5739030625d3f1697c264e3d8f04e932d1e0773d.tar.gz systemtap-steved-5739030625d3f1697c264e3d8f04e932d1e0773d.tar.xz systemtap-steved-5739030625d3f1697c264e3d8f04e932d1e0773d.zip |
Merge branch 'master' of git://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; |