sqlfun
An SQL parser, generated from Bison (Yacc) and Flex (Lex).
Original version - most of the work - comes from John Levine's
Flex & Bison book published by O'Reilley.
Example usage:
$ echo "SELECT a.name,b.address FROM people ORDER BY name;" | ./
这篇文尝试近距离地探究 Druid SQL 解析器如何工作。
Demo 代码
以这份代码为例
/**
*
*
* author beanlam
* date 2017年1月10日 下午11:06:26
* version 1.0
*
*/
public class ParserMain {
public static void main(String[] args) {
String sql = select * from user order by id;