Hi all. I want to use "Lemon" parser generator for my own project because of multi-threading. But I find the strange bug.
I made sample calculator program for testing. See the part of grammar file : expr(X) ::= expr(A) PLUS NUM(B) . { X = A+B; printf("plus-result : %d\n",X); } After execute lemon, that changed like this: #line 19 "cal.y" { yygotominor.yy4 = yymsp[-2].minor.yy4+yymsp[0].minor.yy0; printf("plus-result : 0d\n",yygotominor.yy4); } '%' changed to '0'! I don't analyze lemon source yet. But I think it's about parsng directive. Or, is there another technique that I don't know? At least, not in lemon document. :) I used lemon in sqlite-3.3.6 source archive. If Somebody who give me advice or fix it, I'll glad. Thanks.