aboutsummaryrefslogtreecommitdiffhomepage
path: root/parse_tree.h
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-01-12 22:39:12 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-01-12 22:39:12 -0800
commit096f8504335577d05392436ddcffd5bceabef6d4 (patch)
tree6d7f48aa9d76cc03a14cf51eb78437036b66cd74 /parse_tree.h
parentec469782c8f146476de28453e971642095e4f381 (diff)
Eliminate class parse_t
Diffstat (limited to 'parse_tree.h')
-rw-r--r--parse_tree.h25
1 files changed, 3 insertions, 22 deletions
diff --git a/parse_tree.h b/parse_tree.h
index 76cd80ec..6ce82299 100644
--- a/parse_tree.h
+++ b/parse_tree.h
@@ -74,28 +74,6 @@ enum
};
typedef unsigned int parse_tree_flags_t;
-class parse_ll_t;
-class parse_t
-{
- parse_ll_t * const parser;
-
- bool parse_internal(const wcstring &str, parse_tree_flags_t flags, parse_node_tree_t *output, parse_error_list_t *errors, bool log_it = false);
-
-public:
- parse_t();
- ~parse_t();
-
- /* Parse a string all at once */
- static bool parse(const wcstring &str, parse_tree_flags_t flags, parse_node_tree_t *output, parse_error_list_t *errors, bool log_it = false);
-
- /* Parse a single token */
- bool parse_1_token(parse_token_type_t token, parse_keyword_t keyword, parse_node_tree_t *output, parse_error_list_t *errors);
-
- /* Reset, ready to parse something else */
- void clear();
-
-};
-
wcstring parse_dump_tree(const parse_node_tree_t &tree, const wcstring &src);
wcstring token_type_description(parse_token_type_t type);
@@ -218,6 +196,9 @@ public:
parse_node_list_t specific_statements_for_job(const parse_node_t &job) const;
};
+/* The big entry point. Parse a string! */
+bool parse_tree_from_string(const wcstring &str, parse_tree_flags_t flags, parse_node_tree_t *output, parse_error_list_t *errors, bool log_it = false);
+
/* Fish grammar:
# A job_list is a list of jobs, separated by semicolons or newlines