From 9300f661214a4f4dfac75878485867b30c7db389 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 19 Jan 2010 15:36:35 -0800 Subject: PR11195: Prevent all nested argument substitution Our existing protection only made sure that the first token in a substitution wasn't a nested substitution. That's not sufficient when there could be multiple tokens involved. This patch makes sure that no nested tokens are ever allowed to be argument substitutions. This also adds a cursor_suspended_line/column and resets the main cursor_line/column to the beginning of the substitution, so errors will point a little closer to the right place. --- parse.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'parse.h') diff --git a/parse.h b/parse.h index 5587586e..0ff8664c 100644 --- a/parse.h +++ b/parse.h @@ -79,12 +79,14 @@ public: private: inline int input_get (); inline int input_peek (unsigned n=0); - void input_put (const std::string&); + void input_put (const std::string&, const token*); std::string input_name; std::string input_contents; const char *input_pointer; // index into input_contents const char *input_end; unsigned cursor_suspend_count; + unsigned cursor_suspend_line; + unsigned cursor_suspend_column; unsigned cursor_line; unsigned cursor_column; systemtap_session& session; -- cgit