Fix vector out of bounds access for parser, ast_transformation, and c_generator, remove many printlns in prep for better error handling, add features to captian.sh to facillitate development

This commit is contained in:
Nathan Braswell
2016-03-30 16:13:10 -04:00
parent 8c18e00aa7
commit 09158cd2b9
5 changed files with 179 additions and 170 deletions

View File

@@ -213,9 +213,9 @@ obj parser (Object) {
// do non-null reductions
if (curr_reduction.length) {
gram.parse_table.get(shift_to, input[i]).for_each(fun(act: action) {
var reduce_rule = gram.rules[act.state_or_rule]
/*if (act.act == reduce && !fully_reduces_to_null(reduce_rule)) {*/
if (act.act == action_type::reduce() && act.rule_position != 0) {
var reduce_rule = gram.rules[act.state_or_rule]
to_reduce.push(reduction(curr_reached, reduce_rule.lhs,
act.rule_position,
get_nullable_parts(reduce_rule),