MonoidalAttackTrees / ILL-Impl

Implementation of a term assignment for intuitionistic linear logic
0 stars 0 forks source link

Parsec tables #11

Closed tattymennis closed 8 years ago

tattymennis commented 8 years ago

In RecCalc, we only had one binary operation to consider, and that was the arrow type. In this language, we have (x) and (-o) which need to be parsed. I'd like to simply add to the modified table from RecCalc

table = [[binOp AssocRight "->" (\d r -> Arr d r)]]

So the table would look like:

 table = [[binOp AssocRight "(x)" (\d r -> TensorTy d r)],
         [binOp AssocRight "-o" (\e s -> Lolly e s]]

Haskell doesn't seem to like this. Am I on the right track for setting up these bin ops?

heades commented 8 years ago

RecCalc, we only had one binary operation to consider, and that was the arrow type. In this language, we have (x) and (-o) which need to be parsed. I'd like to simply add to the modified table from RecCalc table = [[binOp AssocRight "->" (\d r -> Arr d r)]]

So the table would look like:

table = [[binOp AssocRight "(x)" (\d r -> TensorTy d r)], [binOp AssocRight "-o" (\e s -> Lolly e s]] Haskell doesn't seem to like this. Am I on the right track for setting up these bin ops?

You are on the right track, but AssocRight should be AssocLeft for lolly.

What error do you get?

heades commented 8 years ago

Should this be closed now? If so, please go a head and close it. 🙃

tattymennis commented 8 years ago

Yes, closing this issue.