aboutsummaryrefslogtreecommitdiffhomepage
path: root/parse_productions.h
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-10-12 02:46:49 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-10-12 02:46:49 -0700
commitddec870d252c0ae84fd80f8b4b75d91a97e99395 (patch)
treee20e089a65768da9ebbd26405fcb1c92246206c2 /parse_productions.h
parent77e358a001eea9a36e0c466b0af253d992c370bd (diff)
Rework decision process for whether to interpret keywords as structural
or as commands (for LL parser). Will allow 'builtin --' to parse as a plain statement, instead of a decorated statement '--'
Diffstat (limited to 'parse_productions.h')
-rw-r--r--parse_productions.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/parse_productions.h b/parse_productions.h
index 298be0b1..18894ca7 100644
--- a/parse_productions.h
+++ b/parse_productions.h
@@ -14,7 +14,6 @@ namespace parse_productions
#define MAX_PRODUCTIONS 5
#define MAX_SYMBOLS_PER_PRODUCTION 5
-
typedef uint32_t production_tag_t;
/* A production is an array of unsigned char. Symbols are encoded directly as their symbol value. Keywords are encoded with an offset of LAST_TOKEN_OR_SYMBOL + 1. So essentially we glom together keywords and symbols. */
@@ -63,7 +62,7 @@ inline bool production_element_is_valid(production_element_t elem)
}
/* Fetch a production. We are passed two input tokens. The first input token is guaranteed to not be invalid; the second token may be invalid if there's no more tokens. */
-const production_t *production_for_token(parse_token_type_t node_type, parse_token_type_t input_type, parse_keyword_t input_keyword, parse_token_type_t input_type2, parse_keyword_t input_keyword2, production_option_idx_t *out_idx, wcstring *out_error_text);
+const production_t *production_for_token(parse_token_type_t node_type, const parse_token_t &input1, const parse_token_t &input2, production_option_idx_t *out_which_production, wcstring *out_error_text);
}