You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am doing some sql parser work and need to support syntax of other oracle, postgresql etc. Because of the performance requirements, it is possible to do this by emulating the way parser handwrites lexical parsing and yacc does syntax parsing.
I saw the ebnf file in the history and was curious where this file was found, or did you write it yourselves?
When I compare the two files, it seems to remove all the declarative parts, the {...} in the rules in the syntax code, and only kept part of the syntax in %%... %% of the syntax.
Activity
tangenta commentedon Jan 21, 2021
这个文件是从 MySQL 8.0 的语法文件转换而成的。
This file is converted from the MySQL 8.0 syntax file.
leveryd commentedon Jan 21, 2021
是怎么转的?有脚本么?
我对照这两个文件,似乎是 去掉了所有的声明部分、语法中规则中的 {...} 代码,只保留了 %%...%% 中的部分语法。
How is it transferred? Is there a script?
When I compare the two files, it seems to remove all the declarative parts, the {...} in the rules in the syntax code, and only kept part of the syntax in %%... %% of the syntax.
tangenta commentedon Jan 21, 2021
用 bison 指定
-v参数传入语法文件,然后将不需要的部分删掉就行了。Use bison to specify the -v parameter to pass in the syntax file, and then just delete the parts you don't need.
tangenta commentedon Jan 21, 2021
欢迎随时移步 tidb-community slack 的 sig-sql-infra channel 进一步讨论。
Feel free to move to the sig-sql-infra channel of the tidb-community slack for further discussion.
[-]ebnf原始文件是从哪里来的?[/-][+]Where did the original ebnf file come from?[/+]