Fixed the parse bug. I think it's legal for the post-shift table check to be invalid and you have to account for that in the table

This commit is contained in:
Nathan Braswell
2015-12-26 01:52:29 +00:00
parent 5476289b51
commit 22b334a2ae
5 changed files with 18 additions and 6 deletions

View File

@@ -598,7 +598,9 @@ obj table (Object, Serializable) {
}
fun get(state: int, on_symbol: symbol::symbol): vector::vector<action> {
var cleaned_symbol = clean_symbol(on_symbol)
return items[state][cleaned_symbol]
if (items[state].contains_key(cleaned_symbol))
return items[state][cleaned_symbol]
return vector::vector<action>()
}
fun get_shift(state: int, on_symbol: symbol::symbol): action {
var actions = get(state, on_symbol)