Conversation

I was starting on a hand-rolled parser because over the LR parser generator I was using because `(x : A) -> B` is ambiguous. It could either be parsed as: - a dependent function type - a non-dependent function with the input type annotated I want to prioritise the former.
3
1
This is the grammar that they tend to use: term ::= var | term term | "(" term ")" | term ":" term | term "->" term | ( "(" var+ ":" term ")" )+ "->" term Coming up with good precendences is left as an exercise 😊
1
3
Looks like an inherent ambiguity that is not solvable by priorities, since those select between a re-ordering of the tree using the same productions. Will do an experiment with SDF3
2
2
Show replies