Thank you for spending time on this, I should probably read up on parsing instead of asking a lot of questions... :-)
Yes, switching to LALR showed a lot of other errsors that probably were causing all kinds of troubles, and I managed to get rid of them by adding "PrefereShiftHere()", and that actually cleared up the error for the join as well, but i haven't tested
it against any really hairy joins yet..
I am not sure you are right about how i want the joins to evaluate...
If in MS SQL the rules should be (as found on the net):
1) JOINS are (effectively) executed left to right, following the usual
rules for nesting parentheses. There is no precedence for INNER and
2) The ON clause associates with the nearest JOIN clause.
But the output I am currently getting, with your recommended ReduceHere() hints seems to work out according to that, so...
SELECT * FROM tA cross join tB cross Join tC
INNER JOIN tB ON tA.AffiliationId = tB.AffiliationId
RIGHT OUTER JOIN tC
CROSS JOIN tD
INNER JOIN tE ON tD.MediaId = tE.MediaId
ON tB.MediaId = tD.MediaId
FROM ( ( `tA`CROSS JOIN `tB` ) CROSS JOIN `tC` ) ;
INNER JOIN `tB` ON ( `tA`.`AffiliationId` = `tB`.`AffiliationId` )
RIGHT OUTER JOIN
( `tC`CROSS JOIN `tD` )
INNER JOIN `tE` ON ( `tD`.`MediaId` = `tE`.`MediaId` )
ON ( `tB`.`MediaId` = `tD`.`MediaId` )
The reason i was using NLALR was that it seemed to work, as opposed to LALR, wich i suppose it did by hiding my basic problems until they got worse enough, and also that I from your blog entry of Apr 27 mistakenly deduced that ther was something wrong with
the LALR implementation and that NLALR was the corrected version.
Re-reading it now, with a little bit more knowledge of the subject, I see my mistake. ( I will try to understand your "NonCanonTestGrammars" samples before i use it... :-) )
Thanks for your help. If I ever get this translator done I will put it up on codeplex.