Closed patrickfrey closed 2 years ago
Example (example language1):
printComplex<double>( 1.3, 2 );
is parsed as
(printComplex < double) > ( 1.3, 2 )
conflicts with
printComplex
The conflict detection has been strengthened a little bit. I think the problems can be handled now. I don't see it as an urgent issue. I do not consider operator precedence definition as a better solution either.
I closed this issue because it became obvious to me, that this issue is a problem of all parser generators, solving conflicts with some sort of precedence rules.
I saw some "working" grammars, that are obviously hiding parts of the syntax tree. My solution of assigning priorities to productions is not better or worse in this regard. I consider it more readable.
In some cases, conflicts in the language grammar are silently ignored. I suspect that it has to do with the prioritization of productions that causes the selection of one path over the other. Probably the prioritization of rules is wrong and an operator precedence implementation like in Bison/Yacc should be implemented.