SQLite Forum

parse.y: a typo in a special comment
Login

parse.y: a typo in a special comment

(1) By Ryusei Yamaguchi (mandel59) on 2021-09-27 10:22:56 [link] [source]

Hello,

I found a typo in a comment in parse.y, line 1175:

likeop(A) ::= NOT LIKE_KW|MATCH(X). {A=X; A.n|=0x80000000; /*A-overwrite-X*/}

/*A-overwrite-X*/ would be a typo of /*A-overwrites-X*/, and it would not work as a special comment.

I'm not sure how much this typo will affect the functionality, but just wanted to report it.

Thanks,

Ryusei

(2) By Larry Brasfield (larrybr) on 2021-09-28 00:12:47 in reply to 1 [source]

While it is a typo, it is inconsequential. I doubt those reading that code to discern its purpose and effect are even in a frame of mind where grammar registers with them. The "/* ... */" construct is a comment, and remains such as lemon puts the brace-delimited code into the generated parse.c file. So there is no functionality impact.

We appreciate reports of minor errors in anything that either ends up in the docs or in active (non-comment) code, so I do not want to discourage your reporting. Yet this flaw should be overlooked.

(3) By Ryusei Yamaguchi (mandel59) on 2021-09-28 15:03:55 in reply to 2 [link] [source]

I thought the generator was switching lhsdirect when there was a special comment, but there were other conditions for switching lhsdirect, and in this case it was just a comment, not related to lhsdirect. I understand now.