reduce shift/reduce conflicts

This commit is contained in:
Ilya Rezvov
2018-02-23 16:40:40 -08:00
parent 97ae291be5
commit 4c8a71de16
+1 -2
View File
@@ -578,7 +578,6 @@ instruction :: { [Instruction] }
: raw_instr { $1 }
| foldedinstr { $1 }
-- TODO: handle call_direct call properly, now it tries to consume ')'
raw_instr :: { [Instruction] }
: plaininstr { [PlainInstr $1] }
| 'call_indirect' raw_call_indirect { $2 }
@@ -653,7 +652,7 @@ raw_call_indirect_functype1 :: { (Maybe FuncType, [Instruction]) }
: paramsresulttypeuse raw_call_indirect_functype {
(Just $ mergeFuncType $1 $ fromMaybe emptyFuncType $ fst $2, snd $2)
}
| foldedinstr1 list(instruction) { (Nothing, $1 ++ concat $2) }
| foldedinstr1 { (Nothing, $1) }
foldedinstr :: { [Instruction] }
: '(' foldedinstr1 { $2 }