diff options
Diffstat (limited to 'cli/parser.hxx')
-rw-r--r-- | cli/parser.hxx | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/cli/parser.hxx b/cli/parser.hxx index f09816f..458efbc 100644 --- a/cli/parser.hxx +++ b/cli/parser.hxx @@ -7,8 +7,12 @@ #define CLI_PARSER_HXX #include <string> +#include <memory> // std::auto_ptr #include <istream> +#include <semantics/elements.hxx> +#include <semantics/unit.hxx> + class token; class lexer; @@ -17,7 +21,7 @@ class parser public: struct invalid_input {}; - void + std::auto_ptr<semantics::cli_unit> parse (std::istream& is, std::string const& id); private: @@ -42,10 +46,10 @@ private: option_def (token&); bool - qualified_name (token&); + qualified_name (token&, std::string& name); bool - fundamental_type (token&); + fundamental_type (token&, std::string& name); private: void @@ -53,8 +57,12 @@ private: private: bool valid_; - lexer* lexer_; std::string const* id_; + + lexer* lexer_; + + semantics::cli_unit* unit_; + semantics::scope* scope_; }; #endif // CLI_PARSER_HXX |