├── study ├── src │ └── test │ │ └── java │ │ ├── Point.java │ │ ├── TTT.java │ │ ├── StreamSQL.scala │ │ ├── A.java │ │ ├── Study.java │ │ ├── TailMap.java │ │ ├── TestJava.java │ │ ├── ByteMagic.java │ │ ├── DynamicProxyTest.java │ │ ├── instrument │ │ ├── Base.java │ │ └── TestTransformer.java │ │ ├── IntegerError.java │ │ ├── Extractor.scala │ │ ├── LowLevelTest.java │ │ ├── JavassistProxyFactory02.java │ │ ├── JavassistProxyFactory.java │ │ ├── TryWithResourceTest.java │ │ ├── TestBatch.java │ │ ├── ClassCreateUtils.scala │ │ └── ManagedKeyedStateStreaming.scala └── pom.xml ├── .gitignore ├── json-flink-1.10 ├── src │ └── main │ │ ├── resources │ │ ├── data.txt │ │ ├── funcs │ │ ├── exampleBatch2.json │ │ ├── exampleBatch.json │ │ └── example.json │ │ └── java │ │ ├── udfs │ │ ├── udf │ │ │ ├── IsMidnight.java │ │ │ ├── HashCode.java │ │ │ └── ExtractDate.java │ │ └── udft │ │ │ └── Split.java │ │ ├── tool │ │ ├── JSONTool.java │ │ ├── CallBehavior.java │ │ ├── FormatDate.java │ │ ├── UDFRegister.scala │ │ └── UDFLoadTool.scala │ │ ├── AppMain.scala │ │ ├── dsource │ │ └── MysqlSQLSource.java │ │ └── invoke │ │ └── MyLoaderInvoke.scala └── pom.xml ├── json-dsl ├── src │ └── main │ │ ├── java │ │ ├── anno │ │ │ └── UDFRegisterAnno.java │ │ ├── trans │ │ │ └── UnitBuild.scala │ │ ├── entity │ │ │ └── UDFDefine.java │ │ └── parse │ │ │ ├── MingBdJSON.tokens │ │ │ ├── MingBdJSONLexer.tokens │ │ │ ├── MingBdJSONVisitor.java │ │ │ ├── MingBdJSONBaseVisitor.java │ │ │ ├── MingBdJSONListener.java │ │ │ ├── MingBdJSONBaseListener.java │ │ │ ├── MingBdJSON.interp │ │ │ ├── MingBdJSONLexer.interp │ │ │ ├── MingBdJSONLexer.java │ │ │ └── MingBdJSONParser.java │ │ └── resources │ │ ├── Functions.g4 │ │ ├── CommLexer.g4 │ │ └── MingBdJSON.g4 └── pom.xml ├── sql-dsl └── pom.xml ├── README.md └── pom.xml /study/src/test/java/Point.java: -------------------------------------------------------------------------------- 1 | class Point { 2 | int x, y; 3 | void move(int dx, int dy) { x += dx; y += dy; } 4 | } 5 | -------------------------------------------------------------------------------- /study/src/test/java/TTT.java: -------------------------------------------------------------------------------- 1 | public interface TTT { 2 | static void say(){ 3 | System.out.println("hi"); 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /study/src/test/java/StreamSQL.scala: -------------------------------------------------------------------------------- 1 | /** 2 | * FileName: StreamSQL 3 | * Author: JERRY 4 | * Date: 2020/5/26 20:49 5 | * Description: 6 | */ 7 | class StreamSQL { 8 | } 9 | -------------------------------------------------------------------------------- /study/src/test/java/A.java: -------------------------------------------------------------------------------- 1 | public class A { 2 | public void save(){ 3 | System.out.println("保存商品"); 4 | } 5 | public void del(){ 6 | System.out.println("删除商品"); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /study/src/test/java/Study.java: -------------------------------------------------------------------------------- 1 | public class Study { 2 | private void say(String word) { 3 | String rs = word + "_tail"; 4 | System.out.println(word); 5 | } 6 | 7 | public static void main(String[] args) { 8 | TTT.say(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /study/src/test/java/TailMap.java: -------------------------------------------------------------------------------- 1 | import org.apache.flink.table.functions.ScalarFunction; 2 | 3 | 4 | public class TailMap extends ScalarFunction { 5 | public String eval(String var1) { 6 | return var1 + "_tail"; 7 | } 8 | 9 | public TailMap() { 10 | } 11 | } 12 | 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.idea/ 2 | /target/ 3 | /mingBd-dsl.iml 4 | /json-dsl/json-dsl.iml 5 | /json-flink-1.10/json-flink-1.10.iml 6 | /sql-dsl/sql-dsl.iml 7 | /study/study.iml 8 | /ZRDSL.iml 9 | /json-dsl/json-flink-V1.10/json-flink-V1.10.iml 10 | /json-dsl/target/ 11 | /json-flink-1.10/target/ 12 | /sql-dsl/target/ 13 | /study/target/ 14 | -------------------------------------------------------------------------------- /json-flink-1.10/src/main/resources/data.txt: -------------------------------------------------------------------------------- 1 | t1 : 2 | {"id":1,"name":"jerry"} 3 | {"id":2,"name":"tom"} 4 | {"id":3,"name":"jack"} 5 | {"id":4,"name":"fk"} 6 | {"id":5,"name":"fk1"} 7 | {"id":6,"name":"fk2"} 8 | 9 | t2: 10 | {"id":1,"age":18} 11 | {"id":2,"age":28} 12 | {"id":3,"age":18} 13 | {"id":4,"age":18} 14 | {"id":5,"age":18} 15 | {"id":6,"age":18} -------------------------------------------------------------------------------- /json-flink-1.10/src/main/resources/funcs: -------------------------------------------------------------------------------- 1 | start tailMap 2 | className = TailMapFun 3 | code = """ 4 | public String eval(String name){ 5 | return name+"_tail"; 6 | } 7 | """ 8 | type = udf 9 | 10 | start headMap 11 | className = HeadMapFun 12 | code = """ 13 | public String eval(String name){ 14 | return "head_"+name; 15 | } 16 | """ 17 | type = udf -------------------------------------------------------------------------------- /json-dsl/src/main/java/anno/UDFRegisterAnno.java: -------------------------------------------------------------------------------- 1 | package anno; 2 | 3 | import java.lang.annotation.ElementType; 4 | import java.lang.annotation.Retention; 5 | import java.lang.annotation.RetentionPolicy; 6 | import java.lang.annotation.Target; 7 | 8 | @Target(ElementType.TYPE) 9 | @Retention(RetentionPolicy.RUNTIME) 10 | public @interface UDFRegisterAnno { 11 | String value(); 12 | String type(); 13 | } 14 | -------------------------------------------------------------------------------- /json-flink-1.10/src/main/java/udfs/udf/IsMidnight.java: -------------------------------------------------------------------------------- 1 | package udfs.udf; 2 | 3 | import anno.UDFRegisterAnno; 4 | import org.apache.flink.table.functions.ScalarFunction; 5 | import tool.CallBehavior; 6 | 7 | @UDFRegisterAnno(value = "isNight", type = "udf") 8 | public class IsMidnight extends ScalarFunction { 9 | public Boolean eval(String time) { 10 | return CallBehavior.isMidnight(time); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /json-flink-1.10/src/main/java/tool/JSONTool.java: -------------------------------------------------------------------------------- 1 | package tool; 2 | 3 | import com.alibaba.fastjson.JSONArray; 4 | import com.alibaba.fastjson.JSONObject; 5 | 6 | public class JSONTool { 7 | public static JSONObject parseObj(String str) { 8 | return JSONObject.parseObject(str); 9 | } 10 | 11 | public static JSONArray parseArray(String str) { 12 | return JSONArray.parseArray(str); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /json-dsl/src/main/resources/Functions.g4: -------------------------------------------------------------------------------- 1 | grammar Functions; 2 | import CommLexer; 3 | 4 | funcs 5 | : (func)* 6 | ; 7 | 8 | func 9 | : 'start' ID 10 | 'className' '=' ID 11 | 'code' '=' '"""' funcInfo '"""' 12 | 'type' '=' ('udf' | 'udaf') 13 | ; 14 | 15 | funcInfo: 16 | 'public' ID 'eval' '(' (ID ID) ')' '{' 17 | .*?'+'';' 18 | '}' 19 | ; 20 | ID: 21 | [a-zA-Z0-9]+ 22 | ; 23 | 24 | STRING: '"' .*? '"' ; -------------------------------------------------------------------------------- /json-dsl/src/main/java/trans/UnitBuild.scala: -------------------------------------------------------------------------------- 1 | package trans 2 | 3 | /** 4 | * FileName: UnitBuild 5 | * Author: JERRY 6 | * Date: 2020/5/25 20:59 7 | * Description: 8 | */ 9 | object UnitBuild { 10 | // def chooseApi(name: String) = { 11 | // 12 | // } 13 | // 14 | // def chooseFun(name: String) = { 15 | // 16 | // } 17 | // 18 | // def build = (apiName:String,funName:String,other:String) => { 19 | // case ("select",_) => 20 | // } 21 | } 22 | -------------------------------------------------------------------------------- /study/src/test/java/TestJava.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C), 2018-2020, 明略科技集团 3 | * FileName: TestJava 4 | * Author: JERRY 5 | * ID: 0001146 6 | * Date: 2020/5/11 10:58 7 | * Description: 测试 8 | * 9 | * @since 1.0.0 10 | */ 11 | public class TestJava { 12 | private String[] schema; 13 | 14 | public String[] getSchema() { 15 | return schema; 16 | } 17 | 18 | public void setSchema(String[] schema) { 19 | this.schema = schema; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /json-flink-1.10/src/main/java/udfs/udf/HashCode.java: -------------------------------------------------------------------------------- 1 | package udfs.udf; 2 | 3 | import anno.UDFRegisterAnno; 4 | import org.apache.flink.table.functions.ScalarFunction; 5 | 6 | /** 7 | * FileName: HashCode 8 | * Author: JERRY 9 | * Date: 2020/5/13 11:33 10 | * Description: hashCode 11 | */ 12 | @UDFRegisterAnno(value = "hashCode", type = "udf") 13 | public class HashCode extends ScalarFunction { 14 | public String eval(String s) { 15 | return String.valueOf(s.hashCode()); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /json-dsl/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | mingBd-dsl 7 | com.jerry 8 | 1.0 9 | 10 | 4.0.0 11 | 12 | json-dsl 13 | -------------------------------------------------------------------------------- /study/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | mingBd-dsl 7 | com.jerry 8 | 1.0 9 | 10 | 4.0.0 11 | 12 | study 13 | 14 | 15 | -------------------------------------------------------------------------------- /sql-dsl/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | mingBd-dsl 7 | com.jerry 8 | 1.0 9 | 10 | 4.0.0 11 | 12 | sql-dsl 13 | 14 | 15 | -------------------------------------------------------------------------------- /json-flink-1.10/src/main/java/udfs/udf/ExtractDate.java: -------------------------------------------------------------------------------- 1 | package udfs.udf; 2 | 3 | import anno.UDFRegisterAnno; 4 | import org.apache.flink.table.functions.ScalarFunction; 5 | import tool.FormatDate; 6 | 7 | /** 8 | * FileName: ExtractDate 9 | * Author: JERRY 10 | * Date: 2020/5/13 20:25 11 | * Description: 12 | */ 13 | 14 | @UDFRegisterAnno(value = "extractDate", type = "udf") 15 | public class ExtractDate extends ScalarFunction { 16 | public String eval(String time) { 17 | return FormatDate.formatterYmd(time); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /study/src/test/java/ByteMagic.java: -------------------------------------------------------------------------------- 1 | import javassist.ClassPool; 2 | import javassist.CtClass; 3 | import javassist.CtMethod; 4 | import javassist.CtNewMethod; 5 | 6 | public class ByteMagic { 7 | public static void main(String[] args) throws Exception { 8 | ClassPool pool = ClassPool.getDefault(); 9 | CtClass cc = pool.makeClass("TailMapFun", pool.get("org.apache.flink.table.functions.ScalarFunction")); 10 | CtMethod m = CtNewMethod.make("public String eval(String name){return name+\"_tail\";}", cc); 11 | cc.addMethod(m); 12 | cc.toClass().newInstance(); 13 | cc.writeFile(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /study/src/test/java/DynamicProxyTest.java: -------------------------------------------------------------------------------- 1 | public class DynamicProxyTest { 2 | public static void main(String[] args) throws IllegalAccessException, InstantiationException { 3 | System.out.println("*******************方式一*******************"); 4 | JavassistProxyFactory jpf = new JavassistProxyFactory(); 5 | A a = new A(); 6 | jpf.setTarget(a); 7 | A proxy = jpf.getProxy(); 8 | proxy.del(); 9 | 10 | System.out.println("*******************方式二*******************"); 11 | JavassistProxyFactory02 jpf02 = new JavassistProxyFactory02(); 12 | A a2 = (A) jpf02.getProxy(A.class); 13 | a2.del(); 14 | a2.save(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /study/src/test/java/instrument/Base.java: -------------------------------------------------------------------------------- 1 | package instrument; 2 | 3 | import java.lang.management.ManagementFactory; 4 | 5 | public class Base { 6 | public static void main(String[] args) { 7 | String name = ManagementFactory.getRuntimeMXBean().getName(); 8 | String s = name.split("@")[0]; 9 | //打印当前Pid 10 | System.out.println("pid:"+s); 11 | while (true) { 12 | try { 13 | Thread.sleep(5000L); 14 | } catch (Exception e) { 15 | break; 16 | } 17 | process(); 18 | } 19 | } 20 | 21 | public static void process() { 22 | System.out.println("process"); 23 | } 24 | } 25 | 26 | -------------------------------------------------------------------------------- /study/src/test/java/IntegerError.java: -------------------------------------------------------------------------------- 1 | /** 2 | * FileName: IntegerError 3 | * Author: JERRY 4 | * Date: 2020/5/26 16:38 5 | * Description: 6 | */ 7 | public class IntegerError { 8 | public static void main(String[] args) { 9 | //Integer里面有个IntegerCache,会在类加载的时候缓存-128->127的数字 10 | //Integer a=100,会先查找缓存,找到的话直接返回。所以a==b为true。 11 | //c和d不在缓存中,各自new了新的对象,所以c!=d 12 | Integer a = 100; 13 | Integer b = 100; 14 | Integer c = 200; 15 | Integer d = 200; 16 | System.out.println(a==b); 17 | System.out.println(c==d); 18 | //下面这个特殊符号编译时会转为换行,所以最终还是会打印hello world 19 | // \u000d System.out.println("Hello World!"); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /study/src/test/java/Extractor.scala: -------------------------------------------------------------------------------- 1 | import scala.reflect.ClassTag 2 | 3 | /** 4 | * FileName: Extractor 5 | * Author: JERRY 6 | * Date: 2020/5/28 15:54 7 | * Description: scala类型擦除应对方案 8 | */ 9 | object Extractor { 10 | 11 | // def extract[T](list: List[Any]) = list.flatMap { 12 | // case element: T => Some(element) 13 | // case _ => None 14 | // } 15 | 16 | def extract[T](list: List[Any])(implicit tag: ClassTag[T]) = 17 | list.flatMap { 18 | case element: T => Some(element) 19 | case _ => None 20 | } 21 | 22 | def main(args: Array[String]): Unit = { 23 | val list = List(1, "string1", List(), "string2") 24 | val result = Extractor.extract[String](list) 25 | println(result) 26 | } 27 | } 28 | 29 | 30 | -------------------------------------------------------------------------------- /json-dsl/src/main/resources/CommLexer.g4: -------------------------------------------------------------------------------- 1 | lexer grammar CommLexer; 2 | 3 | STRING 4 | : '"' (ESC | SAFECODEPOINT)* '"' 5 | ; 6 | FUNCNAME: 7 | [a-fA-F0-9]* 8 | ; 9 | BLOCK_STRING 10 | : '\'\'\'' ~[+] .*? '\'\'\'' 11 | ; 12 | fragment ESC 13 | : '\\' (["\\/bfnrt] | UNICODE) 14 | ; 15 | fragment UNICODE 16 | : 'u' HEX HEX HEX HEX 17 | ; 18 | fragment HEX 19 | : [0-9a-fA-F] 20 | ; 21 | fragment SAFECODEPOINT 22 | : ~ ["\\\u0000-\u001F] 23 | ; 24 | 25 | NUMBER 26 | : '-'? INT ('.' [0-9] +)? EXP? 27 | ; 28 | 29 | fragment INT 30 | : '0' | [1-9] [0-9]* 31 | ; 32 | 33 | // no leading zeros 34 | fragment EXP 35 | : [Ee] [+\-]? INT 36 | ; 37 | 38 | // \- since - means "range" inside [...] 39 | WS 40 | : [ \t\n\r] + -> skip 41 | ; -------------------------------------------------------------------------------- /json-flink-1.10/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | mingBd-dsl 7 | com.jerry 8 | 1.0 9 | 10 | 4.0.0 11 | 12 | json-flink-1.10 13 | 14 | 15 | 16 | com.jerry 17 | json-dsl 18 | 1.0 19 | 20 | 21 | -------------------------------------------------------------------------------- /json-flink-1.10/src/main/java/udfs/udft/Split.java: -------------------------------------------------------------------------------- 1 | package udfs.udft; 2 | 3 | import anno.UDFRegisterAnno; 4 | import org.apache.flink.api.java.tuple.Tuple2; 5 | import org.apache.flink.table.functions.TableFunction; 6 | 7 | /** 8 | * FileName: Split 9 | * Author: JERRY 10 | * Date: 2020/5/13 19:46 11 | * Description: 12 | */ 13 | 14 | @UDFRegisterAnno(value = "split",type = "udft") 15 | public class Split extends TableFunction> { 16 | private String separator = " "; 17 | 18 | public Split(String separator) { 19 | this.separator = separator; 20 | } 21 | 22 | public void eval(String str) { 23 | for (String s : str.split(separator)) { 24 | collect(new Tuple2(s, s.length())); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /json-dsl/src/main/java/entity/UDFDefine.java: -------------------------------------------------------------------------------- 1 | package entity; 2 | 3 | /** 4 | * FileName: UDFDefine 5 | * Author: JERRY 6 | * Date: 2020/5/13 17:22 7 | * Description: 动态UDF实体 8 | */ 9 | public class UDFDefine { 10 | private String className; 11 | private String code; 12 | private String type; 13 | 14 | public String getCode() { 15 | return code; 16 | } 17 | 18 | public void setCode(String code) { 19 | this.code = code; 20 | } 21 | 22 | public String getClassName() { 23 | return className; 24 | } 25 | 26 | public void setClassName(String className) { 27 | this.className = className; 28 | } 29 | 30 | public String getType() { 31 | return type; 32 | } 33 | 34 | public void setType(String type) { 35 | this.type = type; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /study/src/test/java/LowLevelTest.java: -------------------------------------------------------------------------------- 1 | import javassist.bytecode.*; 2 | 3 | import java.io.BufferedInputStream; 4 | import java.io.DataInputStream; 5 | import java.io.FileInputStream; 6 | 7 | public class LowLevelTest { 8 | public static void main(String[] args) throws Exception { 9 | BufferedInputStream fin 10 | = new BufferedInputStream(new FileInputStream("target\\test-classes\\Study.class")); 11 | ClassFile cf = new ClassFile(new DataInputStream(fin)); 12 | MethodInfo methodInfo = cf.getMethod("say"); 13 | CodeAttribute attr = methodInfo.getCodeAttribute(); 14 | CodeIterator ci = attr.iterator(); 15 | while (ci.hasNext()) { 16 | int index = ci.next(); 17 | int op = ci.byteAt(index); 18 | System.out.println(Mnemonic.OPCODE[op]); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /study/src/test/java/JavassistProxyFactory02.java: -------------------------------------------------------------------------------- 1 | import javassist.util.proxy.MethodHandler; 2 | import javassist.util.proxy.Proxy; 3 | import javassist.util.proxy.ProxyFactory; 4 | 5 | public class JavassistProxyFactory02 { 6 | public Object getProxy(Class clazz) throws InstantiationException, IllegalAccessException { 7 | ProxyFactory f = new ProxyFactory(); 8 | f.setSuperclass(clazz); 9 | f.setFilter(m -> { 10 | // ignore finalize() 11 | return !m.getName().equals("finalize"); 12 | }); 13 | Class c = f.createClass(); 14 | MethodHandler mi = (self, m, proceed, args) -> { 15 | System.out.println("Name: " + m.getName()); 16 | return proceed.invoke(self, args); // execute the original method. 17 | }; 18 | Object foo = c.newInstance(); 19 | ((Proxy) foo).setHandler(mi); 20 | return foo; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /json-flink-1.10/src/main/java/AppMain.scala: -------------------------------------------------------------------------------- 1 | import java.io.{File, FileInputStream} 2 | 3 | import invoke.MyLoaderInvoke 4 | import org.antlr.v4.runtime.tree.ParseTreeWalker 5 | import org.antlr.v4.runtime.{ANTLRInputStream, CommonTokenStream} 6 | import parse.{MingBdJSONLexer, MingBdJSONParser} 7 | 8 | /** 9 | * FileName: AppMain 10 | * Author: JERRY 11 | * Date: 2020/5/13 17:20 12 | * Description: 项目入口 13 | */ 14 | object AppMain extends App { 15 | // val fileName = new File("json-dsl/src/main/resources/exampleBatch.json") 16 | val fileName = new File("json-flink-1.10\\src\\main\\resources\\exampleBatch.json") 17 | val in = new FileInputStream(fileName) 18 | val input = new ANTLRInputStream(in) 19 | val lexer = new MingBdJSONLexer(input) 20 | val tokens = new CommonTokenStream(lexer) 21 | val parser = new MingBdJSONParser(tokens) 22 | parser.setBuildParseTree(true) 23 | val tree = parser.json 24 | val walker = new ParseTreeWalker 25 | val converter = new MyLoaderInvoke 26 | walker.walk(converter, tree) 27 | } 28 | -------------------------------------------------------------------------------- /json-flink-1.10/src/main/java/tool/CallBehavior.java: -------------------------------------------------------------------------------- 1 | package tool; 2 | 3 | import java.time.LocalDateTime; 4 | import java.time.format.DateTimeFormatter; 5 | 6 | public class CallBehavior { 7 | 8 | static DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); 9 | 10 | public static boolean isMidnight(String startTime, DateTimeFormatter formatter) { 11 | boolean isMidnightTime = false; 12 | LocalDateTime dateTime = LocalDateTime.parse(startTime, formatter); 13 | int hour = dateTime.getHour(); 14 | if (hour <= 5 || hour >= 23) isMidnightTime = true; 15 | return isMidnightTime; 16 | } 17 | 18 | public static boolean isMidnight(String startTime) { 19 | return isMidnight(startTime, formatter); 20 | } 21 | 22 | // public static void main(String[] args) { 23 | // System.out.println(isMidnight("2017-08-16 00:18:20")); 24 | // System.out.println(isMidnight("2018-11-22 06:58:20")); 25 | // System.out.println(isMidnight("2018-02-24 23:08:19")); 26 | // } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /study/src/test/java/JavassistProxyFactory.java: -------------------------------------------------------------------------------- 1 | import javassist.util.proxy.ProxyFactory; 2 | 3 | public class JavassistProxyFactory { 4 | private T target; 5 | 6 | public void setTarget(T target) { 7 | this.target = target; 8 | } 9 | 10 | @SuppressWarnings("deprecation") 11 | public T getProxy() throws InstantiationException, IllegalAccessException { 12 | ProxyFactory proxyFactory = new ProxyFactory(); 13 | proxyFactory.setSuperclass(target.getClass()); 14 | proxyFactory.setHandler((self, thismethod, proceed, args) -> { 15 | System.out.println("--------------------------------"); 16 | System.out.println(self.getClass()); 17 | System.out.println("要调用的方法名:" + thismethod.getName()); 18 | System.out.println(proceed.getName()); 19 | System.out.println("开启事务-------"); 20 | Object result = proceed.invoke(self, args); 21 | System.out.println("提交事务-------"); 22 | return result; 23 | }); 24 | return (T) proxyFactory.createClass().newInstance(); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /json-flink-1.10/src/main/java/tool/FormatDate.java: -------------------------------------------------------------------------------- 1 | package tool; 2 | 3 | import java.time.LocalDateTime; 4 | import java.time.format.DateTimeFormatter; 5 | 6 | /** 7 | * FileName: FormatterDate 8 | * Author: JERRY 9 | * Date: 2020/5/13 20:25 10 | * Description: 11 | */ 12 | public class FormatDate { 13 | static DateTimeFormatter formatterYmdHms = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); 14 | static DateTimeFormatter formatterYmd = DateTimeFormatter.ofPattern("yyyy-MM-dd"); 15 | 16 | public static String formatter(String startTime, DateTimeFormatter formatter) { 17 | LocalDateTime dateTime = LocalDateTime.parse(startTime, formatterYmdHms); 18 | return formatter.format(dateTime); 19 | } 20 | 21 | public static String formatterYmd(String startTime) { 22 | return formatter(startTime, formatterYmd); 23 | } 24 | 25 | // public static void main(String[] args) { 26 | // System.out.println(formatterYmd("2017-08-16 00:18:20")); 27 | // System.out.println(formatterYmd("2018-11-22 06:58:20")); 28 | // System.out.println(formatterYmd("2018-02-24 23:08:19")); 29 | // } 30 | } 31 | -------------------------------------------------------------------------------- /study/src/test/java/instrument/TestTransformer.java: -------------------------------------------------------------------------------- 1 | package instrument; 2 | 3 | import javassist.ClassPool; 4 | import javassist.CtClass; 5 | import javassist.CtMethod; 6 | 7 | import java.lang.instrument.ClassFileTransformer; 8 | import java.lang.instrument.IllegalClassFormatException; 9 | import java.security.ProtectionDomain; 10 | 11 | public class TestTransformer implements ClassFileTransformer { 12 | @Override 13 | public byte[] transform(ClassLoader loader, String className, Class classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws IllegalClassFormatException { 14 | System.out.println("Transforming " + className); 15 | try { 16 | ClassPool cp = ClassPool.getDefault(); 17 | CtClass cc = cp.get("meituan.bytecode.jvmti.Base"); 18 | CtMethod m = cc.getDeclaredMethod("process"); 19 | m.insertBefore("{ System.out.println(\"start\"); }"); 20 | m.insertAfter("{ System.out.println(\"end\"); }"); 21 | return cc.toBytecode(); 22 | } catch (Exception e) { 23 | e.printStackTrace(); 24 | } 25 | return null; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /study/src/test/java/TryWithResourceTest.java: -------------------------------------------------------------------------------- 1 | import java.io.File; 2 | import java.io.FileInputStream; 3 | import java.io.IOException; 4 | 5 | public class TryWithResourceTest { 6 | public static void main(String[] args) { 7 | FileInputStream inputStream = null; 8 | try { 9 | inputStream = new FileInputStream(new File("test")); 10 | System.out.println(inputStream.read()); 11 | } catch (IOException e) { 12 | throw new RuntimeException(e.getMessage(), e); 13 | } finally { 14 | if (inputStream != null) { 15 | try { 16 | inputStream.close(); 17 | } catch (IOException e) { 18 | throw new RuntimeException(e.getMessage(), e); 19 | } 20 | } 21 | } 22 | } 23 | 24 | //FieInputStream实现了AutoCloseable接口,代码可以简化 25 | private void test(){ 26 | try (FileInputStream inputStream = new FileInputStream(new File("test"))) { 27 | System.out.println(inputStream.read()); 28 | } catch (IOException e) { 29 | throw new RuntimeException(e.getMessage(), e); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /json-dsl/src/main/java/parse/MingBdJSON.tokens: -------------------------------------------------------------------------------- 1 | T__0=1 2 | T__1=2 3 | T__2=3 4 | T__3=4 5 | T__4=5 6 | T__5=6 7 | T__6=7 8 | T__7=8 9 | T__8=9 10 | T__9=10 11 | T__10=11 12 | T__11=12 13 | T__12=13 14 | T__13=14 15 | T__14=15 16 | T__15=16 17 | T__16=17 18 | T__17=18 19 | T__18=19 20 | T__19=20 21 | T__20=21 22 | T__21=22 23 | T__22=23 24 | T__23=24 25 | T__24=25 26 | T__25=26 27 | T__26=27 28 | T__27=28 29 | T__28=29 30 | T__29=30 31 | T__30=31 32 | T__31=32 33 | T__32=33 34 | T__33=34 35 | T__34=35 36 | T__35=36 37 | T__36=37 38 | T__37=38 39 | T__38=39 40 | T__39=40 41 | T__40=41 42 | STRING=42 43 | FUNCNAME=43 44 | BLOCK_STRING=44 45 | NUMBER=45 46 | WS=46 47 | '{'=1 48 | ','=2 49 | '}'=3 50 | '"runMode"'=4 51 | ':'=5 52 | '"stream"'=6 53 | '"batch"'=7 54 | '"load"'=8 55 | '['=9 56 | ']'=10 57 | '"join"'=11 58 | '"transform"'=12 59 | '"zkQuorum"'=13 60 | '"table"'=14 61 | '"info"'=15 62 | '"schema"'=16 63 | '"tableName"'=17 64 | '"driver"'=18 65 | '"url"'=19 66 | '"user"'=20 67 | '"pass"'=21 68 | '"query"'=22 69 | '"from"'=23 70 | '"to"'=24 71 | '"distinct"'=25 72 | 'true'=26 73 | 'false'=27 74 | '"group"'=28 75 | '"condition"'=29 76 | '"cols"'=30 77 | '"save"'=31 78 | '"zk"'=32 79 | '"btServers"'=33 80 | '"topic"'=34 81 | '"types"'=35 82 | '"inputT"'=36 83 | '"conditionT"'=37 84 | '"outputT"'=38 85 | '"groupId"'=39 86 | '"nameI"'=40 87 | '"aliasI"'=41 88 | -------------------------------------------------------------------------------- /json-flink-1.10/src/main/resources/exampleBatch2.json: -------------------------------------------------------------------------------- 1 | { 2 | "runMode": "batch", 3 | "load": [ 4 | { 5 | "info": { 6 | "driver": "com.mysql.cj.jdbc.Driver", 7 | "url": "jdbc:mysql://xxx/xxx", 8 | "user": "xxx", 9 | "pass": "xxx", 10 | "query": "SELECT sfz_id,sjhm,thkssj,zbjqf,thsc,dfhm FROM `serv_czrsjhdxx` where zbjqf = '1'" 11 | }, 12 | "schema": [ 13 | "sfz_id","sjhm","thkssj","zbjqf","thsc","dfhm" 14 | ], 15 | "tableName": "hdxx" 16 | } 17 | ], 18 | "transform": [ 19 | { 20 | "cols" : ["sjhm","isNight(thkssj) as isMidnight"], 21 | "from" : "hdxx", 22 | "to" : "hdxx", 23 | "distinct": false, 24 | "condition": "isMidnight = true" 25 | }, 26 | { 27 | "cols" : ["sjhm","\"夜间通话\" as label"], 28 | "from" : "hdxx", 29 | "to" : "hdxx", 30 | "distinct": false 31 | } 32 | ], 33 | "save": [ 34 | { 35 | "info": { 36 | "driver": "com.mysql.cj.jdbc.Driver", 37 | "url": "jdbc:mysql://xxx/xxx", 38 | "user": "xxx", 39 | "pass": "xxxx", 40 | "query": "INSERT INTO serv_result(sjhm,label) VALUES (?,?)" 41 | }, 42 | "schema": [ 43 | "sjhm","label" 44 | ], 45 | "from": "hdxx", 46 | "to" : "serv_result" 47 | } 48 | ] 49 | } -------------------------------------------------------------------------------- /json-dsl/src/main/java/parse/MingBdJSONLexer.tokens: -------------------------------------------------------------------------------- 1 | T__0=1 2 | T__1=2 3 | T__2=3 4 | T__3=4 5 | T__4=5 6 | T__5=6 7 | T__6=7 8 | T__7=8 9 | T__8=9 10 | T__9=10 11 | T__10=11 12 | T__11=12 13 | T__12=13 14 | T__13=14 15 | T__14=15 16 | T__15=16 17 | T__16=17 18 | T__17=18 19 | T__18=19 20 | T__19=20 21 | T__20=21 22 | T__21=22 23 | T__22=23 24 | T__23=24 25 | T__24=25 26 | T__25=26 27 | T__26=27 28 | T__27=28 29 | T__28=29 30 | T__29=30 31 | T__30=31 32 | T__31=32 33 | T__32=33 34 | T__33=34 35 | T__34=35 36 | T__35=36 37 | T__36=37 38 | T__37=38 39 | T__38=39 40 | T__39=40 41 | T__40=41 42 | STRING=42 43 | FUNCNAME=43 44 | BLOCK_STRING=44 45 | NUMBER=45 46 | WS=46 47 | '{'=1 48 | ','=2 49 | '}'=3 50 | '"runMode"'=4 51 | ':'=5 52 | '"stream"'=6 53 | '"batch"'=7 54 | '"load"'=8 55 | '['=9 56 | ']'=10 57 | '"join"'=11 58 | '"transform"'=12 59 | '"zkQuorum"'=13 60 | '"table"'=14 61 | '"info"'=15 62 | '"schema"'=16 63 | '"tableName"'=17 64 | '"driver"'=18 65 | '"url"'=19 66 | '"user"'=20 67 | '"pass"'=21 68 | '"query"'=22 69 | '"from"'=23 70 | '"to"'=24 71 | '"distinct"'=25 72 | 'true'=26 73 | 'false'=27 74 | '"group"'=28 75 | '"condition"'=29 76 | '"cols"'=30 77 | '"save"'=31 78 | '"zk"'=32 79 | '"btServers"'=33 80 | '"topic"'=34 81 | '"types"'=35 82 | '"inputT"'=36 83 | '"conditionT"'=37 84 | '"outputT"'=38 85 | '"groupId"'=39 86 | '"nameI"'=40 87 | '"aliasI"'=41 88 | -------------------------------------------------------------------------------- /json-flink-1.10/src/main/resources/exampleBatch.json: -------------------------------------------------------------------------------- 1 | { 2 | "runMode": "batch", 3 | "load": [ 4 | { 5 | "info": { 6 | "driver": "com.mysql.cj.jdbc.Driver", 7 | "url": "jdbc:mysql://xxx/xxx", 8 | "user": "xxx", 9 | "pass": "xxxx", 10 | "query": "SELECT sfz_id,sjhm,thkssj,zbjqf,thsc,dfhm FROM `serv_czrsjhdxx` where zbjqf = '1'" 11 | }, 12 | "schema": [ 13 | "sfz_id","sjhm","thkssj","zbjqf","thsc","dfhm" 14 | ], 15 | "tableName": "hdxx" 16 | } 17 | ], 18 | "transform": [ 19 | { 20 | "cols" : ["sjhm", "dfhm", "extractDate(thkssj) as tDate", "1 as freq"], 21 | "from" : "hdxx", 22 | "to" : "hdxx", 23 | "distinct": false 24 | }, 25 | { 26 | "group": ["sjhm","dfhm","tDate"], 27 | "cols" : ["sjhm","freq.sum as freqs"], 28 | "from" : "hdxx", 29 | "to" : "hdxx", 30 | "distinct": false, 31 | "condition": "freqs > 1" 32 | } 33 | ], 34 | "save": [ 35 | { 36 | "info": { 37 | "driver": "com.mysql.cj.jdbc.Driver", 38 | "url": "jdbc:mysql://xxx/xxxxx", 39 | "user": "xxx", 40 | "pass": "xxx", 41 | "query": "INSERT INTO serv_result(sjhm,freqs) VALUES (?,?)" 42 | }, 43 | "schema": [ 44 | "sjhm","freqs" 45 | ], 46 | "from": "hdxx", 47 | "to" : "serv_result" 48 | } 49 | ] 50 | } -------------------------------------------------------------------------------- /json-flink-1.10/src/main/java/dsource/MysqlSQLSource.java: -------------------------------------------------------------------------------- 1 | package dsource; 2 | 3 | import org.apache.flink.api.common.typeinfo.BasicTypeInfo; 4 | import org.apache.flink.api.common.typeinfo.TypeInformation; 5 | import org.apache.flink.api.java.ExecutionEnvironment; 6 | import org.apache.flink.api.java.io.jdbc.JDBCInputFormat; 7 | import org.apache.flink.api.java.operators.DataSource; 8 | import org.apache.flink.api.java.typeutils.RowTypeInfo; 9 | import org.apache.flink.types.Row; 10 | 11 | /** 12 | * FileName: MysqlSQLSource 13 | * Author: JERRY 14 | * Date: 2020/5/14 10:48 15 | * Description: 16 | */ 17 | public class MysqlSQLSource { 18 | 19 | public static DataSource getMysqlSource(ExecutionEnvironment env, String url, String user, String pass, 20 | String query, String[] fields){ 21 | 22 | TypeInformation[] fieldTypes = new TypeInformation[fields.length]; 23 | for(int i=0;i source = env.createInput(jdbcInputFormat); 38 | return source; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /study/src/test/java/TestBatch.java: -------------------------------------------------------------------------------- 1 | import org.apache.flink.api.common.typeinfo.BasicTypeInfo; 2 | import org.apache.flink.api.common.typeinfo.TypeInformation; 3 | import org.apache.flink.api.java.io.jdbc.JDBCInputFormat; 4 | import org.apache.flink.api.java.typeutils.RowTypeInfo; 5 | import org.apache.flink.streaming.api.datastream.DataStreamSource; 6 | import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment; 7 | import org.apache.flink.types.Row; 8 | 9 | /** 10 | * FileName: TestBatch 11 | * Author: JERRY 12 | * Date: 2020/5/14 11:05 13 | * Description: 14 | */ 15 | public class TestBatch { 16 | public static void main(String[] args) throws Exception { 17 | 18 | TypeInformation[] fieldTypes = new TypeInformation[]{BasicTypeInfo.STRING_TYPE_INFO}; 19 | //2.定义field name 20 | String[] fieldNames = new String[]{"riqi"}; 21 | //3.定义Row类型 22 | RowTypeInfo rowTypeInfo = new RowTypeInfo(fieldTypes, fieldNames); 23 | 24 | JDBCInputFormat jdbcInputFormat = JDBCInputFormat.buildJDBCInputFormat() 25 | .setDrivername("com.mysql.cj.jdbc.Driver") 26 | .setDBUrl("jdbc:mysql://172.17.1.165/gadsj_demo") 27 | .setUsername("root") 28 | .setPassword("123456") 29 | .setQuery("select riqi from serv_czrsjhdxx") 30 | .setRowTypeInfo(rowTypeInfo) 31 | .finish(); 32 | 33 | final StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(); 34 | 35 | DataStreamSource source = env.createInput(jdbcInputFormat); 36 | source.print(); 37 | env.execute(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## 目标 2 | Flink,Spark技术能解决大数据实时和离线处理问题,但是这些大数据技术学习有一定的门槛,那么其他非大数据专业人员如何去解决自己的业务问题呢?针对这个问题,本项目提供了一种简单的描述语法,通过描述任务过程,自动编译为大数据处理任务。 3 | 此项目未来的目标是支持json,SQL语言,引擎支持Flink,Spark的不同版本,存储支持主流的存储读写。 4 | 5 | ## 语法示例 6 | 7 | ``` 8 | { 9 | "runMode": "stream", 10 | "load": [{ 11 | "zk": "127.0.0.1:2181", 12 | "btServers": "127.0.0.1:9092", 13 | "topic": "t1", 14 | "groupId": "test1", 15 | "schema": [{ 16 | "nameI": "id", 17 | "aliasI": "id1" 18 | }, 19 | { 20 | "nameI": "name", 21 | "aliasI": "name" 22 | } 23 | ], 24 | "tableName": "t1" 25 | }, 26 | { 27 | "zk": "127.0.0.1:2181", 28 | "btServers": "127.0.0.1:9092", 29 | "topic": "t2", 30 | "groupId": "test2", 31 | "schema": [{ 32 | "nameI": "id", 33 | "aliasI": "id2" 34 | }, 35 | { 36 | "nameI": "age", 37 | "aliasI": "age" 38 | } 39 | ], 40 | "tableName": "t2" 41 | } 42 | ], 43 | "join": [{ 44 | "inputT": [ 45 | "t1", 46 | "t2" 47 | ], 48 | "conditionT": [ 49 | "id1=id2" 50 | ], 51 | "outputT": "tout" 52 | }], 53 | "transform": [{ 54 | "cols": [ 55 | "id1", 56 | "tailMap(name)", 57 | "headMap(name)", 58 | "age" 59 | ], 60 | "from": "tout", 61 | "to": "outTable", 62 | "distinct": false 63 | }, 64 | { 65 | "condition": "age===\"18\"", 66 | "from": "outTable", 67 | "to": "outTableF" 68 | } 69 | ], 70 | "save": [{ 71 | "zk": "127.0.0.1:2181", 72 | "btServers": "127.0.0.1:9092", 73 | "topic": "t4", 74 | "from": "outTableF", 75 | "cols": [ 76 | "id1", 77 | "_c1", 78 | "_c2", 79 | "age" 80 | ] 81 | }] 82 | } 83 | ``` 84 | 通过load,join,transform,save等描述,自动完成数据流加载,连接,转换,存储。 -------------------------------------------------------------------------------- /json-flink-1.10/src/main/resources/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "runMode": "stream", 3 | "load": [ 4 | { 5 | "zk": "127.0.0.1:2181", 6 | "btServers": "127.0.0.1:9092", 7 | "topic": "t1", 8 | "groupId": "test1", 9 | "schema": [ 10 | { 11 | "nameI": "id", 12 | "aliasI": "id1" 13 | }, 14 | { 15 | "nameI": "name", 16 | "aliasI": "name" 17 | } 18 | ], 19 | "tableName": "t1" 20 | }, 21 | { 22 | "zk": "127.0.0.1:2181", 23 | "btServers": "127.0.0.1:9092", 24 | "topic": "t2", 25 | "groupId": "test2", 26 | "schema": [ 27 | { 28 | "nameI": "id", 29 | "aliasI": "id2" 30 | }, 31 | { 32 | "nameI": "age", 33 | "aliasI": "age" 34 | } 35 | ], 36 | "tableName": "t2" 37 | } 38 | ], 39 | "join": [ 40 | { 41 | "inputT": [ 42 | "t1", 43 | "t2" 44 | ], 45 | "conditionT": [ 46 | "id1=id2" 47 | ], 48 | "outputT": "tout" 49 | } 50 | ], 51 | "transform": [ 52 | { 53 | "cols": [ 54 | "id1", 55 | "tailMap(name)", 56 | "tailMap(name)", 57 | "age" 58 | ], 59 | "from": "tout", 60 | "to": "outTable", 61 | "distinct": false 62 | }, 63 | { 64 | "condition": "age===18", 65 | "from": "outTable", 66 | "to": "outTableF" 67 | } 68 | ], 69 | "save": [ 70 | { 71 | "zk": "127.0.0.1:2181", 72 | "btServers": "127.0.0.1:9092", 73 | "topic": "t4", 74 | "from": "outTableF", 75 | "cols": [ 76 | "id1", 77 | "_c1", 78 | "_c2", 79 | "age" 80 | ] 81 | } 82 | ] 83 | } -------------------------------------------------------------------------------- /json-flink-1.10/src/main/java/tool/UDFRegister.scala: -------------------------------------------------------------------------------- 1 | package tool 2 | 3 | import java.nio.charset.Charset 4 | 5 | import javassist.{ClassPool, CtNewMethod} 6 | import org.apache.flink.shaded.guava18.com.google.common.hash.{BloomFilter, Funnels} 7 | import org.apache.flink.table.api.TableEnvironment 8 | import org.apache.flink.table.functions.ScalarFunction 9 | 10 | object UDFRegister { 11 | val pool = ClassPool.getDefault 12 | val dynamicUdfs = UDFLoadTool.getDynamicUdf() 13 | val innerUdfs = UDFLoadTool.getInnerUdf() 14 | val bloomFilter = BloomFilter.create(Funnels.stringFunnel(Charset.forName("UTF-8")), 1000) 15 | 16 | /** 17 | * 加载顺序:内置函数->动态函数 18 | */ 19 | def register(bsTableEnv: TableEnvironment, name: String) = { 20 | if (!isAlreadyRegister(name)) { 21 | registerInnerUdf(bsTableEnv, name) 22 | if (!isAlreadyRegister(name)) 23 | registerDynamicUdf(bsTableEnv, name) 24 | } 25 | } 26 | 27 | def isAlreadyRegister(name: String) = { 28 | bloomFilter.mightContain(name) 29 | } 30 | 31 | private def registerDynamicUdf(bsTableEnv: TableEnvironment, name: String) = { 32 | val item = dynamicUdfs.get(name).getOrElse(null) 33 | if (item != null && item.getType == "udf") { 34 | val define = item 35 | val cc = pool.makeClass(define.getClassName, pool.get("org.apache.flink.table.functions.ScalarFunction")) 36 | val m = CtNewMethod.make(define.getCode, cc) 37 | cc.addMethod(m) 38 | val func = cc.toClass.newInstance.asInstanceOf[ScalarFunction] 39 | bsTableEnv.registerFunction(name, func) 40 | bloomFilter.put(name) 41 | } 42 | } 43 | 44 | private def registerInnerUdf(bsTableEnv: TableEnvironment, name: String) = { 45 | val clazz = innerUdfs.get(name).getOrElse(null) 46 | if (clazz != null) { 47 | bsTableEnv.registerFunction(name, clazz) 48 | bloomFilter.put(name) 49 | } 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /study/src/test/java/ClassCreateUtils.scala: -------------------------------------------------------------------------------- 1 | import java.lang.reflect.Method 2 | import java.util 3 | 4 | import scala.reflect.runtime.universe 5 | import scala.tools.reflect.ToolBox 6 | 7 | case class ClassInfo(clazz: Class[_], instance: Any, defaultMethod: Method, methods: Map[String, Method]) { 8 | def invoke[T](args: Object*): T = { 9 | defaultMethod.invoke(instance, args: _*).asInstanceOf[T] 10 | } 11 | } 12 | 13 | object ClassCreateUtils { 14 | private val clazzs = new util.HashMap[String, ClassInfo]() 15 | private val classLoader = scala.reflect.runtime.universe.getClass.getClassLoader 16 | private val toolBox = universe.runtimeMirror(classLoader).mkToolBox() 17 | 18 | 19 | def apply(func: String): ClassInfo = this.synchronized { 20 | var clazz = clazzs.get(func) 21 | if (clazz == null) { 22 | //val (className, classBody) = wrapClass(func) 23 | val pattern = "(.*)class\\s*([a-zA-Z]+)*\\s*(extends|\\{)(.*)".r 24 | val r = pattern findAllMatchIn func 25 | var className = "" 26 | for (res <- r) { 27 | className = res.group(2) 28 | } 29 | val classBody = func 30 | val zz = compile(prepareScala(className, classBody)) 31 | val defaultMethod = zz.getDeclaredMethods.head 32 | val methods = zz.getDeclaredMethods 33 | clazz = ClassInfo( 34 | zz, 35 | zz.newInstance(), 36 | defaultMethod, 37 | methods = methods.map { m => (m.getName, m) }.toMap 38 | ) 39 | clazzs.put(func, clazz) 40 | } 41 | clazz 42 | } 43 | 44 | def compile(src: String): Class[_] = { 45 | val tree = toolBox.parse(src) 46 | toolBox.compile(tree).apply().asInstanceOf[Class[_]] 47 | } 48 | 49 | def prepareScala(className: String, classBody: String): String = { 50 | classBody + "\n" + s"scala.reflect.classTag[$className].runtimeClass" 51 | } 52 | 53 | /*def wrapClass(function: String): (String, String) = { 54 | val className = s"dynamic_class_${UUID.randomUUID().toString.replaceAll("-", "")}" 55 | val classBody = 56 | s""" 57 | |class ${className} { 58 | | ${function} 59 | |} 60 | """.stripMargin 61 | (className, classBody) 62 | }*/ 63 | } 64 | -------------------------------------------------------------------------------- /json-flink-1.10/src/main/java/tool/UDFLoadTool.scala: -------------------------------------------------------------------------------- 1 | package tool 2 | 3 | import java.io.File 4 | import java.net.URLDecoder 5 | 6 | import anno.UDFRegisterAnno 7 | import entity.UDFDefine 8 | import org.apache.flink.table.functions.ScalarFunction 9 | 10 | import scala.collection.mutable 11 | 12 | object UDFLoadTool { 13 | 14 | def getDynamicUdf() = { 15 | var map = new mutable.HashMap[String, UDFDefine]() 16 | val f1 = new UDFDefine 17 | f1.setClassName("TailMapFun") 18 | f1.setCode( 19 | """ 20 | | public String eval(String name){ 21 | | return name+"_tail"; 22 | | } 23 | |""".stripMargin) 24 | f1.setType("udf") 25 | 26 | val f2 = new UDFDefine 27 | f2.setClassName("HeadMapFun") 28 | f2.setCode( 29 | """ 30 | | public String eval(String name){ 31 | | return "head_"+name; 32 | | } 33 | |""".stripMargin) 34 | f2.setType("udf") 35 | map.+=(("tailMap", f1)) 36 | map.+=(("headMap", f2)) 37 | map 38 | } 39 | 40 | 41 | def getInnerUdf() = { 42 | val map = new mutable.HashMap[String, ScalarFunction]() 43 | val packageName = "udfs.udf." 44 | val packageDirName: String = packageName.replace('.', '/') 45 | val dirs = UDFLoadTool.getClass.getClassLoader.getResources(packageDirName) 46 | while (dirs.hasMoreElements) { 47 | val url = dirs.nextElement 48 | val protocol = url.getProtocol 49 | if ("file" == protocol) { 50 | val filePath = URLDecoder.decode(url.getFile(), "UTF-8") 51 | val dir = new File(filePath) 52 | dir.listFiles().foreach(file => { 53 | val className = file.getName.substring(0, file.getName.length - 6) 54 | val classFullName = packageName + className 55 | println(classFullName) 56 | val clazz = Class.forName(classFullName) 57 | if (clazz.isAnnotationPresent(classOf[UDFRegisterAnno])) { 58 | val infoAnno = clazz.getAnnotation(classOf[UDFRegisterAnno]) 59 | if (infoAnno.`type`() == "udf") 60 | map.put(infoAnno.value(), clazz.newInstance().asInstanceOf[ScalarFunction]) 61 | } 62 | }) 63 | } 64 | } 65 | map 66 | } 67 | 68 | 69 | } 70 | -------------------------------------------------------------------------------- /json-dsl/src/main/resources/MingBdJSON.g4: -------------------------------------------------------------------------------- 1 | grammar MingBdJSON; 2 | import CommLexer; 3 | 4 | json 5 | : value 6 | ; 7 | 8 | value 9 | : '{' pair (',' pair)* '}' 10 | ; 11 | //定义pair 12 | pair : runtype 13 | | load 14 | | join 15 | | trans 16 | | save 17 | ; 18 | 19 | runtype: 20 | '"runMode"' ':' ('"stream"' | '"batch"') 21 | ; 22 | 23 | load : 24 | '"load"' ':' '[' dataSource (',' dataSource)* ']' 25 | ; 26 | 27 | join: 28 | '"join"' ':' '[' joinpair (',' joinpair)* ']' 29 | ; 30 | 31 | trans: 32 | '"transform"' ':' '[' transinfo (',' transinfo)* ']' 33 | ; 34 | 35 | 36 | dataSource: 37 | kafkaSource 38 | | hbaseSource 39 | | mysqlSource 40 | ; 41 | 42 | hbaseSource: 43 | '{' 44 | '"zkQuorum"' ':' STRING ',' 45 | '"table"' ':' STRING 46 | '}' 47 | ; 48 | 49 | mysqlSource: 50 | '{' 51 | '"info"' ':' mysqlInfo ',' 52 | '"schema"' ':' mysqlSchema ',' 53 | '"tableName"' ':' STRING 54 | '}' 55 | ; 56 | 57 | mysqlInfo: 58 | '{' 59 | '"driver"' ':' STRING ',' 60 | '"url"' ':' STRING ',' 61 | '"user"' ':' STRING ',' 62 | '"pass"' ':' STRING ',' 63 | '"query"' ':' STRING 64 | '}' 65 | ; 66 | mysqlSchema: 67 | '[' STRING (',' STRING)* ']' 68 | ; 69 | transinfo: 70 | select 71 | ; 72 | 73 | 74 | 75 | select: 76 | '{' 77 | (groupBy ',')? 78 | cols ',' 79 | '"from"' ':' STRING ',' 80 | '"to"' ':' STRING ',' 81 | '"distinct"' ':' ('true' | 'false') 82 | (',' filter)* 83 | '}' 84 | ; 85 | groupBy: 86 | '"group"' ':' '[' col (',' col)* ']' 87 | ; 88 | filter: 89 | '"condition"' ':' STRING 90 | ; 91 | cols: 92 | '"cols"' ':' '[' col (',' col)* ']' 93 | ; 94 | 95 | col: 96 | STRING 97 | ; 98 | 99 | 100 | 101 | save: 102 | '"save"' ':' '[' saveInfo (',' saveInfo)* ']' 103 | ; 104 | 105 | saveInfo: 106 | kafkaSave 107 | | mysqlSave 108 | ; 109 | 110 | kafkaSave: 111 | '{' 112 | '"zk"' ':' STRING ',' 113 | '"btServers"' ':' STRING ',' 114 | '"topic"' ':' STRING ',' 115 | '"from"' ':' STRING ',' 116 | cols ',' 117 | '"types"' ':' '[' col (',' col)* ']' 118 | '}' 119 | ; 120 | mysqlSave: 121 | '{' 122 | '"info"' ':' mysqlInfo ',' 123 | '"schema"' ':' mysqlSchema ',' 124 | '"from"' ':' STRING ',' 125 | '"to"' ':' STRING 126 | '}' 127 | ; 128 | 129 | joinpair: 130 | '{' 131 | '"inputT"' ':' '[' STRING ',' STRING ']' ',' 132 | '"conditionT"' ':' '[' STRING ']' ',' 133 | '"outputT"' ':' STRING 134 | '}' 135 | ; 136 | 137 | 138 | kafkaSource: 139 | '{' 140 | '"zk"' ':' STRING ',' 141 | '"btServers"' ':' STRING ',' 142 | '"topic"' ':' STRING ',' 143 | '"groupId"' ':' STRING ',' 144 | '"schema"' ':' '[' field (',' field)* ']' ',' 145 | '"tableName"' ':' STRING 146 | '}' 147 | ; 148 | field: 149 | '{' 150 | '"nameI"' ':' STRING ',' 151 | '"aliasI"' ':' STRING 152 | '}' 153 | ; -------------------------------------------------------------------------------- /study/src/test/java/ManagedKeyedStateStreaming.scala: -------------------------------------------------------------------------------- 1 | //import java.util.Properties 2 | //import java.util.stream.Collector 3 | // 4 | //import org.apache.flink.api.common.functions.RichFlatMapFunction 5 | //import org.apache.flink.api.common.restartstrategy.RestartStrategies 6 | //import org.apache.flink.api.common.serialization.SimpleStringSchema 7 | //import org.apache.flink.api.common.state.{ValueState, ValueStateDescriptor} 8 | //import org.apache.flink.configuration.Configuration 9 | //import org.apache.flink.core.fs.Path 10 | //import org.apache.flink.runtime.state.StateBackend 11 | //import org.apache.flink.runtime.state.filesystem.FsStateBackend 12 | //import org.apache.flink.streaming.api.environment.CheckpointConfig.ExternalizedCheckpointCleanup 13 | //import org.apache.flink.streaming.api.{CheckpointingMode, TimeCharacteristic} 14 | //import org.apache.flink.streaming.api.scala.StreamExecutionEnvironment 15 | //import org.apache.flink.streaming.connectors.kafka.FlinkKafkaConsumer010 16 | //import org.slf4j.LoggerFactory 17 | // 18 | //object ManagedKeyedStateStreaming { 19 | // 20 | // private val LOG = LoggerFactory.getLogger(ManagedKeyedStateStreaming.getClass) 21 | // private val KAFKA_CONSUMER_TOPIC="test" 22 | // private val KAFKA_BROKERS="hadoop01:9092,hadoop02:9092,hadoop03:9092" 23 | // private val KAFKA_ZOOKEEPER_CONNECTION="hadoop01:2181,hadoop02:2181,hadoop03:2181" 24 | // private val KAFKA_GROUP_ID="flink-demo-group" 25 | // private val KAFKA_PROP: Properties = new Properties()() { 26 | // setProperty("bootstrap.servers", KAFKA_BROKERS) 27 | // setProperty("zookeeper.connect", KAFKA_ZOOKEEPER_CONNECTION) 28 | // setProperty("group.id", KAFKA_GROUP_ID) 29 | // setProperty("key.serializer", "org.apache.kafka.common.serialization.StringSerializer") 30 | // setProperty("value.serializer", "org.apache.kafka.common.serialization.StringSerializer") 31 | // } 32 | // 33 | // def main(args: Array[String]): Unit = { 34 | // LOG.info("===Stateful Computation Demo===") 35 | // val env: StreamExecutionEnvironment = StreamExecutionEnvironment.getExecutionEnvironment 36 | // env.enableCheckpointing(5000)//5秒一个checkpoint 37 | // env.setStreamTimeCharacteristic(TimeCharacteristic.ProcessingTime)//指定处理的时间特性 38 | // env.setRestartStrategy(RestartStrategies.noRestart())//重启策略 39 | // env.getCheckpointConfig.setCheckpointingMode(CheckpointingMode.EXACTLY_ONCE)//确保一次语义 40 | // 41 | // val checkPointPath = new Path("hdfs:///flink/checkpoints")//fs状态后端配置,如为file:///,则在taskmanager的本地 42 | // val fsStateBackend: StateBackend= new FsStateBackend(checkPointPath) 43 | // env.setStateBackend(fsStateBackend) 44 | // env.getCheckpointConfig.enableExternalizedCheckpoints(ExternalizedCheckpointCleanup.RETAIN_ON_CANCELLATION)//退出不删除checkpoint 45 | // 46 | // val dataStream = env.addSource(new FlinkKafkaConsumer010[String](KAFKA_CONSUMER_TOPIC,new SimpleStringSchema(),KAFKA_PROP)) 47 | // dataStream.filter(_.split("\\|").length==3) 48 | // .map(line=>{ 49 | // val arr = line.split("\\|") 50 | // (arr(0),arr(2).toInt) 51 | // }).keyBy(_._1) 52 | // .flatMap(new SalesAmountCalculation()) 53 | // .print() 54 | // 55 | // //flink封装了简便的接口供使用 56 | // // dataStream.filter(_.split("\\|").length==3) 57 | // // .map(line=>{ 58 | // // val arr = line.split("\\|") 59 | // // (arr(0),arr(2).toInt) 60 | // // }).keyBy(_._1) 61 | // // .mapWithState((in:(String,Int),count:Option[(String,Int)])=>{ 62 | // // count match { 63 | // // case Some(c) => ((in._1,c),Some((in._1,in._2+c._2))) 64 | // // case None=>((in._1,0),Some((in._1,in._2))) 65 | // // } 66 | // // }) 67 | // // .print() 68 | // 69 | // env.execute("Stateful Computation Demo") 70 | // 71 | // } 72 | //} 73 | // 74 | ////计算汇总值 75 | //class SalesAmountCalculation extends RichFlatMapFunction[(String, Int), (String, Int)] { 76 | // private var sum: ValueState[(String, Int)] = _ 77 | // override def flatMap(input: (String, Int), out: Collector[(String, Int)]): Unit = { 78 | // //显式调用已经过期的状态值会被删除,可以配置在读取快照时清除过期状态值,如: 79 | // // val ttlConfig = StateTtlConfig 80 | // // .newBuilder(Time.seconds(1)) 81 | // // .cleanupFullSnapshot 82 | // // .build 83 | // val tmpCurrentSum = sum.value 84 | // val currentSum = if (tmpCurrentSum != null) { 85 | // tmpCurrentSum 86 | // } else { 87 | // (input._1, 0) 88 | // } 89 | // val newSum = (currentSum._1, currentSum._2 + input._2) 90 | // sum.update(newSum) 91 | // out.collect(newSum) 92 | // } 93 | // 94 | // override def open(parameters: Configuration): Unit = { 95 | // //设置状态值的过期时间 96 | // // val ttlConfig = StateTtlConfig 97 | // // .newBuilder(Time.seconds(1))//过期时间1秒 98 | // // .setUpdateType(StateTtlConfig.UpdateType.OnCreateAndWrite)//在创建和写入时更新状态值 99 | // // .setStateVisibility(StateTtlConfig.StateVisibility.NeverReturnExpired)//过期访问不返回状态值 100 | // // .build 101 | // val valueStateDescriptor = new ValueStateDescriptor[(String, Int)]("sum", createTypeInformation[(String, Int)]) 102 | // // valueStateDescriptor.enableTimeToLive(ttlConfig)//启用状态值过期配置 103 | // sum = getRuntimeContext.getState(valueStateDescriptor) 104 | // } 105 | //} 106 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | com.jerry 8 | mingBd-dsl 9 | pom 10 | 1.0 11 | 12 | json-dsl 13 | json-flink-1.10 14 | sql-dsl 15 | study 16 | 17 | 18 | UTF-8 19 | 1.10.0 20 | 1.8 21 | 2.11 22 | 0.11 23 | 1.2.0 24 | ${java.version} 25 | ${java.version} 26 | 27 | 28 | 29 | 30 | 31 | org.apache.maven.plugins 32 | maven-compiler-plugin 33 | 34 | 8 35 | 8 36 | 37 | 38 | 39 | 40 | 41 | 42 | org.antlr 43 | antlr4-runtime 44 | 4.8 45 | 46 | 47 | 48 | 49 | org.apache.flink 50 | flink-table-api-java-bridge_${scala.binary.version} 51 | ${flink.version} 52 | 53 | 54 | org.apache.flink 55 | flink-table-api-scala-bridge_${scala.binary.version} 56 | ${flink.version} 57 | 58 | 59 | org.apache.flink 60 | flink-table-planner_${scala.binary.version} 61 | ${flink.version} 62 | 63 | 64 | org.apache.flink 65 | flink-table-planner-blink_${scala.binary.version} 66 | ${flink.version} 67 | 68 | 69 | org.apache.flink 70 | flink-streaming-scala_${scala.binary.version} 71 | ${flink.version} 72 | 73 | 74 | org.apache.flink 75 | flink-table-common 76 | ${flink.version} 77 | 78 | 79 | org.apache.flink 80 | flink-connector-kafka_${scala.binary.version} 81 | ${flink.version} 82 | 83 | 84 | org.apache.flink 85 | flink-jdbc_${scala.binary.version} 86 | ${flink.version} 87 | 88 | 89 | org.apache.flink 90 | flink-json 91 | 1.10.0 92 | 93 | 94 | org.apache.flink 95 | flink-statebackend-rocksdb_${scala.binary.version} 96 | ${flink.version} 97 | 98 | 99 | 100 | 101 | 102 | 103 | com.alibaba 104 | fastjson 105 | 1.2.67 106 | 107 | 108 | org.slf4j 109 | slf4j-log4j12 110 | 1.7.7 111 | runtime 112 | 113 | 114 | log4j 115 | log4j 116 | 1.2.17 117 | runtime 118 | 119 | 120 | org.javassist 121 | javassist 122 | 3.27.0-GA 123 | 124 | 125 | mysql 126 | mysql-connector-java 127 | 8.0.19 128 | 129 | 130 | 131 | -------------------------------------------------------------------------------- /json-dsl/src/main/java/parse/MingBdJSONVisitor.java: -------------------------------------------------------------------------------- 1 | // Generated from D:/MyWorkSpace/zrDSL-flink/json-dsl/src/main/resources\MingBdJSON.g4 by ANTLR 4.8 2 | package parse; 3 | import org.antlr.v4.runtime.tree.ParseTreeVisitor; 4 | 5 | /** 6 | * This interface defines a complete generic visitor for a parse tree produced 7 | * by {@link MingBdJSONParser}. 8 | * 9 | * @param The return type of the visit operation. Use {@link Void} for 10 | * operations with no return type. 11 | */ 12 | public interface MingBdJSONVisitor extends ParseTreeVisitor { 13 | /** 14 | * Visit a parse tree produced by {@link MingBdJSONParser#json}. 15 | * @param ctx the parse tree 16 | * @return the visitor result 17 | */ 18 | T visitJson(MingBdJSONParser.JsonContext ctx); 19 | /** 20 | * Visit a parse tree produced by {@link MingBdJSONParser#value}. 21 | * @param ctx the parse tree 22 | * @return the visitor result 23 | */ 24 | T visitValue(MingBdJSONParser.ValueContext ctx); 25 | /** 26 | * Visit a parse tree produced by {@link MingBdJSONParser#pair}. 27 | * @param ctx the parse tree 28 | * @return the visitor result 29 | */ 30 | T visitPair(MingBdJSONParser.PairContext ctx); 31 | /** 32 | * Visit a parse tree produced by {@link MingBdJSONParser#runtype}. 33 | * @param ctx the parse tree 34 | * @return the visitor result 35 | */ 36 | T visitRuntype(MingBdJSONParser.RuntypeContext ctx); 37 | /** 38 | * Visit a parse tree produced by {@link MingBdJSONParser#load}. 39 | * @param ctx the parse tree 40 | * @return the visitor result 41 | */ 42 | T visitLoad(MingBdJSONParser.LoadContext ctx); 43 | /** 44 | * Visit a parse tree produced by {@link MingBdJSONParser#join}. 45 | * @param ctx the parse tree 46 | * @return the visitor result 47 | */ 48 | T visitJoin(MingBdJSONParser.JoinContext ctx); 49 | /** 50 | * Visit a parse tree produced by {@link MingBdJSONParser#trans}. 51 | * @param ctx the parse tree 52 | * @return the visitor result 53 | */ 54 | T visitTrans(MingBdJSONParser.TransContext ctx); 55 | /** 56 | * Visit a parse tree produced by {@link MingBdJSONParser#dataSource}. 57 | * @param ctx the parse tree 58 | * @return the visitor result 59 | */ 60 | T visitDataSource(MingBdJSONParser.DataSourceContext ctx); 61 | /** 62 | * Visit a parse tree produced by {@link MingBdJSONParser#hbaseSource}. 63 | * @param ctx the parse tree 64 | * @return the visitor result 65 | */ 66 | T visitHbaseSource(MingBdJSONParser.HbaseSourceContext ctx); 67 | /** 68 | * Visit a parse tree produced by {@link MingBdJSONParser#mysqlSource}. 69 | * @param ctx the parse tree 70 | * @return the visitor result 71 | */ 72 | T visitMysqlSource(MingBdJSONParser.MysqlSourceContext ctx); 73 | /** 74 | * Visit a parse tree produced by {@link MingBdJSONParser#mysqlInfo}. 75 | * @param ctx the parse tree 76 | * @return the visitor result 77 | */ 78 | T visitMysqlInfo(MingBdJSONParser.MysqlInfoContext ctx); 79 | /** 80 | * Visit a parse tree produced by {@link MingBdJSONParser#mysqlSchema}. 81 | * @param ctx the parse tree 82 | * @return the visitor result 83 | */ 84 | T visitMysqlSchema(MingBdJSONParser.MysqlSchemaContext ctx); 85 | /** 86 | * Visit a parse tree produced by {@link MingBdJSONParser#transinfo}. 87 | * @param ctx the parse tree 88 | * @return the visitor result 89 | */ 90 | T visitTransinfo(MingBdJSONParser.TransinfoContext ctx); 91 | /** 92 | * Visit a parse tree produced by {@link MingBdJSONParser#select}. 93 | * @param ctx the parse tree 94 | * @return the visitor result 95 | */ 96 | T visitSelect(MingBdJSONParser.SelectContext ctx); 97 | /** 98 | * Visit a parse tree produced by {@link MingBdJSONParser#groupBy}. 99 | * @param ctx the parse tree 100 | * @return the visitor result 101 | */ 102 | T visitGroupBy(MingBdJSONParser.GroupByContext ctx); 103 | /** 104 | * Visit a parse tree produced by {@link MingBdJSONParser#filter}. 105 | * @param ctx the parse tree 106 | * @return the visitor result 107 | */ 108 | T visitFilter(MingBdJSONParser.FilterContext ctx); 109 | /** 110 | * Visit a parse tree produced by {@link MingBdJSONParser#cols}. 111 | * @param ctx the parse tree 112 | * @return the visitor result 113 | */ 114 | T visitCols(MingBdJSONParser.ColsContext ctx); 115 | /** 116 | * Visit a parse tree produced by {@link MingBdJSONParser#col}. 117 | * @param ctx the parse tree 118 | * @return the visitor result 119 | */ 120 | T visitCol(MingBdJSONParser.ColContext ctx); 121 | /** 122 | * Visit a parse tree produced by {@link MingBdJSONParser#save}. 123 | * @param ctx the parse tree 124 | * @return the visitor result 125 | */ 126 | T visitSave(MingBdJSONParser.SaveContext ctx); 127 | /** 128 | * Visit a parse tree produced by {@link MingBdJSONParser#saveInfo}. 129 | * @param ctx the parse tree 130 | * @return the visitor result 131 | */ 132 | T visitSaveInfo(MingBdJSONParser.SaveInfoContext ctx); 133 | /** 134 | * Visit a parse tree produced by {@link MingBdJSONParser#kafkaSave}. 135 | * @param ctx the parse tree 136 | * @return the visitor result 137 | */ 138 | T visitKafkaSave(MingBdJSONParser.KafkaSaveContext ctx); 139 | /** 140 | * Visit a parse tree produced by {@link MingBdJSONParser#mysqlSave}. 141 | * @param ctx the parse tree 142 | * @return the visitor result 143 | */ 144 | T visitMysqlSave(MingBdJSONParser.MysqlSaveContext ctx); 145 | /** 146 | * Visit a parse tree produced by {@link MingBdJSONParser#joinpair}. 147 | * @param ctx the parse tree 148 | * @return the visitor result 149 | */ 150 | T visitJoinpair(MingBdJSONParser.JoinpairContext ctx); 151 | /** 152 | * Visit a parse tree produced by {@link MingBdJSONParser#kafkaSource}. 153 | * @param ctx the parse tree 154 | * @return the visitor result 155 | */ 156 | T visitKafkaSource(MingBdJSONParser.KafkaSourceContext ctx); 157 | /** 158 | * Visit a parse tree produced by {@link MingBdJSONParser#field}. 159 | * @param ctx the parse tree 160 | * @return the visitor result 161 | */ 162 | T visitField(MingBdJSONParser.FieldContext ctx); 163 | } -------------------------------------------------------------------------------- /json-dsl/src/main/java/parse/MingBdJSONBaseVisitor.java: -------------------------------------------------------------------------------- 1 | // Generated from D:/MyWorkSpace/zrDSL-flink/json-dsl/src/main/resources\MingBdJSON.g4 by ANTLR 4.8 2 | package parse; 3 | import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor; 4 | 5 | /** 6 | * This class provides an empty implementation of {@link MingBdJSONVisitor}, 7 | * which can be extended to create a visitor which only needs to handle a subset 8 | * of the available methods. 9 | * 10 | * @param The return type of the visit operation. Use {@link Void} for 11 | * operations with no return type. 12 | */ 13 | public class MingBdJSONBaseVisitor extends AbstractParseTreeVisitor implements MingBdJSONVisitor { 14 | /** 15 | * {@inheritDoc} 16 | * 17 | *

The default implementation returns the result of calling 18 | * {@link #visitChildren} on {@code ctx}.

19 | */ 20 | @Override public T visitJson(MingBdJSONParser.JsonContext ctx) { return visitChildren(ctx); } 21 | /** 22 | * {@inheritDoc} 23 | * 24 | *

The default implementation returns the result of calling 25 | * {@link #visitChildren} on {@code ctx}.

26 | */ 27 | @Override public T visitValue(MingBdJSONParser.ValueContext ctx) { return visitChildren(ctx); } 28 | /** 29 | * {@inheritDoc} 30 | * 31 | *

The default implementation returns the result of calling 32 | * {@link #visitChildren} on {@code ctx}.

33 | */ 34 | @Override public T visitPair(MingBdJSONParser.PairContext ctx) { return visitChildren(ctx); } 35 | /** 36 | * {@inheritDoc} 37 | * 38 | *

The default implementation returns the result of calling 39 | * {@link #visitChildren} on {@code ctx}.

40 | */ 41 | @Override public T visitRuntype(MingBdJSONParser.RuntypeContext ctx) { return visitChildren(ctx); } 42 | /** 43 | * {@inheritDoc} 44 | * 45 | *

The default implementation returns the result of calling 46 | * {@link #visitChildren} on {@code ctx}.

47 | */ 48 | @Override public T visitLoad(MingBdJSONParser.LoadContext ctx) { return visitChildren(ctx); } 49 | /** 50 | * {@inheritDoc} 51 | * 52 | *

The default implementation returns the result of calling 53 | * {@link #visitChildren} on {@code ctx}.

54 | */ 55 | @Override public T visitJoin(MingBdJSONParser.JoinContext ctx) { return visitChildren(ctx); } 56 | /** 57 | * {@inheritDoc} 58 | * 59 | *

The default implementation returns the result of calling 60 | * {@link #visitChildren} on {@code ctx}.

61 | */ 62 | @Override public T visitTrans(MingBdJSONParser.TransContext ctx) { return visitChildren(ctx); } 63 | /** 64 | * {@inheritDoc} 65 | * 66 | *

The default implementation returns the result of calling 67 | * {@link #visitChildren} on {@code ctx}.

68 | */ 69 | @Override public T visitDataSource(MingBdJSONParser.DataSourceContext ctx) { return visitChildren(ctx); } 70 | /** 71 | * {@inheritDoc} 72 | * 73 | *

The default implementation returns the result of calling 74 | * {@link #visitChildren} on {@code ctx}.

75 | */ 76 | @Override public T visitHbaseSource(MingBdJSONParser.HbaseSourceContext ctx) { return visitChildren(ctx); } 77 | /** 78 | * {@inheritDoc} 79 | * 80 | *

The default implementation returns the result of calling 81 | * {@link #visitChildren} on {@code ctx}.

82 | */ 83 | @Override public T visitMysqlSource(MingBdJSONParser.MysqlSourceContext ctx) { return visitChildren(ctx); } 84 | /** 85 | * {@inheritDoc} 86 | * 87 | *

The default implementation returns the result of calling 88 | * {@link #visitChildren} on {@code ctx}.

89 | */ 90 | @Override public T visitMysqlInfo(MingBdJSONParser.MysqlInfoContext ctx) { return visitChildren(ctx); } 91 | /** 92 | * {@inheritDoc} 93 | * 94 | *

The default implementation returns the result of calling 95 | * {@link #visitChildren} on {@code ctx}.

96 | */ 97 | @Override public T visitMysqlSchema(MingBdJSONParser.MysqlSchemaContext ctx) { return visitChildren(ctx); } 98 | /** 99 | * {@inheritDoc} 100 | * 101 | *

The default implementation returns the result of calling 102 | * {@link #visitChildren} on {@code ctx}.

103 | */ 104 | @Override public T visitTransinfo(MingBdJSONParser.TransinfoContext ctx) { return visitChildren(ctx); } 105 | /** 106 | * {@inheritDoc} 107 | * 108 | *

The default implementation returns the result of calling 109 | * {@link #visitChildren} on {@code ctx}.

110 | */ 111 | @Override public T visitSelect(MingBdJSONParser.SelectContext ctx) { return visitChildren(ctx); } 112 | /** 113 | * {@inheritDoc} 114 | * 115 | *

The default implementation returns the result of calling 116 | * {@link #visitChildren} on {@code ctx}.

117 | */ 118 | @Override public T visitGroupBy(MingBdJSONParser.GroupByContext ctx) { return visitChildren(ctx); } 119 | /** 120 | * {@inheritDoc} 121 | * 122 | *

The default implementation returns the result of calling 123 | * {@link #visitChildren} on {@code ctx}.

124 | */ 125 | @Override public T visitFilter(MingBdJSONParser.FilterContext ctx) { return visitChildren(ctx); } 126 | /** 127 | * {@inheritDoc} 128 | * 129 | *

The default implementation returns the result of calling 130 | * {@link #visitChildren} on {@code ctx}.

131 | */ 132 | @Override public T visitCols(MingBdJSONParser.ColsContext ctx) { return visitChildren(ctx); } 133 | /** 134 | * {@inheritDoc} 135 | * 136 | *

The default implementation returns the result of calling 137 | * {@link #visitChildren} on {@code ctx}.

138 | */ 139 | @Override public T visitCol(MingBdJSONParser.ColContext ctx) { return visitChildren(ctx); } 140 | /** 141 | * {@inheritDoc} 142 | * 143 | *

The default implementation returns the result of calling 144 | * {@link #visitChildren} on {@code ctx}.

145 | */ 146 | @Override public T visitSave(MingBdJSONParser.SaveContext ctx) { return visitChildren(ctx); } 147 | /** 148 | * {@inheritDoc} 149 | * 150 | *

The default implementation returns the result of calling 151 | * {@link #visitChildren} on {@code ctx}.

152 | */ 153 | @Override public T visitSaveInfo(MingBdJSONParser.SaveInfoContext ctx) { return visitChildren(ctx); } 154 | /** 155 | * {@inheritDoc} 156 | * 157 | *

The default implementation returns the result of calling 158 | * {@link #visitChildren} on {@code ctx}.

159 | */ 160 | @Override public T visitKafkaSave(MingBdJSONParser.KafkaSaveContext ctx) { return visitChildren(ctx); } 161 | /** 162 | * {@inheritDoc} 163 | * 164 | *

The default implementation returns the result of calling 165 | * {@link #visitChildren} on {@code ctx}.

166 | */ 167 | @Override public T visitMysqlSave(MingBdJSONParser.MysqlSaveContext ctx) { return visitChildren(ctx); } 168 | /** 169 | * {@inheritDoc} 170 | * 171 | *

The default implementation returns the result of calling 172 | * {@link #visitChildren} on {@code ctx}.

173 | */ 174 | @Override public T visitJoinpair(MingBdJSONParser.JoinpairContext ctx) { return visitChildren(ctx); } 175 | /** 176 | * {@inheritDoc} 177 | * 178 | *

The default implementation returns the result of calling 179 | * {@link #visitChildren} on {@code ctx}.

180 | */ 181 | @Override public T visitKafkaSource(MingBdJSONParser.KafkaSourceContext ctx) { return visitChildren(ctx); } 182 | /** 183 | * {@inheritDoc} 184 | * 185 | *

The default implementation returns the result of calling 186 | * {@link #visitChildren} on {@code ctx}.

187 | */ 188 | @Override public T visitField(MingBdJSONParser.FieldContext ctx) { return visitChildren(ctx); } 189 | } -------------------------------------------------------------------------------- /json-dsl/src/main/java/parse/MingBdJSONListener.java: -------------------------------------------------------------------------------- 1 | // Generated from D:/MyWorkSpace/zrDSL-flink/json-dsl/src/main/resources\MingBdJSON.g4 by ANTLR 4.8 2 | package parse; 3 | import org.antlr.v4.runtime.tree.ParseTreeListener; 4 | 5 | /** 6 | * This interface defines a complete listener for a parse tree produced by 7 | * {@link MingBdJSONParser}. 8 | */ 9 | public interface MingBdJSONListener extends ParseTreeListener { 10 | /** 11 | * Enter a parse tree produced by {@link MingBdJSONParser#json}. 12 | * @param ctx the parse tree 13 | */ 14 | void enterJson(MingBdJSONParser.JsonContext ctx); 15 | /** 16 | * Exit a parse tree produced by {@link MingBdJSONParser#json}. 17 | * @param ctx the parse tree 18 | */ 19 | void exitJson(MingBdJSONParser.JsonContext ctx); 20 | /** 21 | * Enter a parse tree produced by {@link MingBdJSONParser#value}. 22 | * @param ctx the parse tree 23 | */ 24 | void enterValue(MingBdJSONParser.ValueContext ctx); 25 | /** 26 | * Exit a parse tree produced by {@link MingBdJSONParser#value}. 27 | * @param ctx the parse tree 28 | */ 29 | void exitValue(MingBdJSONParser.ValueContext ctx); 30 | /** 31 | * Enter a parse tree produced by {@link MingBdJSONParser#pair}. 32 | * @param ctx the parse tree 33 | */ 34 | void enterPair(MingBdJSONParser.PairContext ctx); 35 | /** 36 | * Exit a parse tree produced by {@link MingBdJSONParser#pair}. 37 | * @param ctx the parse tree 38 | */ 39 | void exitPair(MingBdJSONParser.PairContext ctx); 40 | /** 41 | * Enter a parse tree produced by {@link MingBdJSONParser#runtype}. 42 | * @param ctx the parse tree 43 | */ 44 | void enterRuntype(MingBdJSONParser.RuntypeContext ctx); 45 | /** 46 | * Exit a parse tree produced by {@link MingBdJSONParser#runtype}. 47 | * @param ctx the parse tree 48 | */ 49 | void exitRuntype(MingBdJSONParser.RuntypeContext ctx); 50 | /** 51 | * Enter a parse tree produced by {@link MingBdJSONParser#load}. 52 | * @param ctx the parse tree 53 | */ 54 | void enterLoad(MingBdJSONParser.LoadContext ctx); 55 | /** 56 | * Exit a parse tree produced by {@link MingBdJSONParser#load}. 57 | * @param ctx the parse tree 58 | */ 59 | void exitLoad(MingBdJSONParser.LoadContext ctx); 60 | /** 61 | * Enter a parse tree produced by {@link MingBdJSONParser#join}. 62 | * @param ctx the parse tree 63 | */ 64 | void enterJoin(MingBdJSONParser.JoinContext ctx); 65 | /** 66 | * Exit a parse tree produced by {@link MingBdJSONParser#join}. 67 | * @param ctx the parse tree 68 | */ 69 | void exitJoin(MingBdJSONParser.JoinContext ctx); 70 | /** 71 | * Enter a parse tree produced by {@link MingBdJSONParser#trans}. 72 | * @param ctx the parse tree 73 | */ 74 | void enterTrans(MingBdJSONParser.TransContext ctx); 75 | /** 76 | * Exit a parse tree produced by {@link MingBdJSONParser#trans}. 77 | * @param ctx the parse tree 78 | */ 79 | void exitTrans(MingBdJSONParser.TransContext ctx); 80 | /** 81 | * Enter a parse tree produced by {@link MingBdJSONParser#dataSource}. 82 | * @param ctx the parse tree 83 | */ 84 | void enterDataSource(MingBdJSONParser.DataSourceContext ctx); 85 | /** 86 | * Exit a parse tree produced by {@link MingBdJSONParser#dataSource}. 87 | * @param ctx the parse tree 88 | */ 89 | void exitDataSource(MingBdJSONParser.DataSourceContext ctx); 90 | /** 91 | * Enter a parse tree produced by {@link MingBdJSONParser#hbaseSource}. 92 | * @param ctx the parse tree 93 | */ 94 | void enterHbaseSource(MingBdJSONParser.HbaseSourceContext ctx); 95 | /** 96 | * Exit a parse tree produced by {@link MingBdJSONParser#hbaseSource}. 97 | * @param ctx the parse tree 98 | */ 99 | void exitHbaseSource(MingBdJSONParser.HbaseSourceContext ctx); 100 | /** 101 | * Enter a parse tree produced by {@link MingBdJSONParser#mysqlSource}. 102 | * @param ctx the parse tree 103 | */ 104 | void enterMysqlSource(MingBdJSONParser.MysqlSourceContext ctx); 105 | /** 106 | * Exit a parse tree produced by {@link MingBdJSONParser#mysqlSource}. 107 | * @param ctx the parse tree 108 | */ 109 | void exitMysqlSource(MingBdJSONParser.MysqlSourceContext ctx); 110 | /** 111 | * Enter a parse tree produced by {@link MingBdJSONParser#mysqlInfo}. 112 | * @param ctx the parse tree 113 | */ 114 | void enterMysqlInfo(MingBdJSONParser.MysqlInfoContext ctx); 115 | /** 116 | * Exit a parse tree produced by {@link MingBdJSONParser#mysqlInfo}. 117 | * @param ctx the parse tree 118 | */ 119 | void exitMysqlInfo(MingBdJSONParser.MysqlInfoContext ctx); 120 | /** 121 | * Enter a parse tree produced by {@link MingBdJSONParser#mysqlSchema}. 122 | * @param ctx the parse tree 123 | */ 124 | void enterMysqlSchema(MingBdJSONParser.MysqlSchemaContext ctx); 125 | /** 126 | * Exit a parse tree produced by {@link MingBdJSONParser#mysqlSchema}. 127 | * @param ctx the parse tree 128 | */ 129 | void exitMysqlSchema(MingBdJSONParser.MysqlSchemaContext ctx); 130 | /** 131 | * Enter a parse tree produced by {@link MingBdJSONParser#transinfo}. 132 | * @param ctx the parse tree 133 | */ 134 | void enterTransinfo(MingBdJSONParser.TransinfoContext ctx); 135 | /** 136 | * Exit a parse tree produced by {@link MingBdJSONParser#transinfo}. 137 | * @param ctx the parse tree 138 | */ 139 | void exitTransinfo(MingBdJSONParser.TransinfoContext ctx); 140 | /** 141 | * Enter a parse tree produced by {@link MingBdJSONParser#select}. 142 | * @param ctx the parse tree 143 | */ 144 | void enterSelect(MingBdJSONParser.SelectContext ctx); 145 | /** 146 | * Exit a parse tree produced by {@link MingBdJSONParser#select}. 147 | * @param ctx the parse tree 148 | */ 149 | void exitSelect(MingBdJSONParser.SelectContext ctx); 150 | /** 151 | * Enter a parse tree produced by {@link MingBdJSONParser#groupBy}. 152 | * @param ctx the parse tree 153 | */ 154 | void enterGroupBy(MingBdJSONParser.GroupByContext ctx); 155 | /** 156 | * Exit a parse tree produced by {@link MingBdJSONParser#groupBy}. 157 | * @param ctx the parse tree 158 | */ 159 | void exitGroupBy(MingBdJSONParser.GroupByContext ctx); 160 | /** 161 | * Enter a parse tree produced by {@link MingBdJSONParser#filter}. 162 | * @param ctx the parse tree 163 | */ 164 | void enterFilter(MingBdJSONParser.FilterContext ctx); 165 | /** 166 | * Exit a parse tree produced by {@link MingBdJSONParser#filter}. 167 | * @param ctx the parse tree 168 | */ 169 | void exitFilter(MingBdJSONParser.FilterContext ctx); 170 | /** 171 | * Enter a parse tree produced by {@link MingBdJSONParser#cols}. 172 | * @param ctx the parse tree 173 | */ 174 | void enterCols(MingBdJSONParser.ColsContext ctx); 175 | /** 176 | * Exit a parse tree produced by {@link MingBdJSONParser#cols}. 177 | * @param ctx the parse tree 178 | */ 179 | void exitCols(MingBdJSONParser.ColsContext ctx); 180 | /** 181 | * Enter a parse tree produced by {@link MingBdJSONParser#col}. 182 | * @param ctx the parse tree 183 | */ 184 | void enterCol(MingBdJSONParser.ColContext ctx); 185 | /** 186 | * Exit a parse tree produced by {@link MingBdJSONParser#col}. 187 | * @param ctx the parse tree 188 | */ 189 | void exitCol(MingBdJSONParser.ColContext ctx); 190 | /** 191 | * Enter a parse tree produced by {@link MingBdJSONParser#save}. 192 | * @param ctx the parse tree 193 | */ 194 | void enterSave(MingBdJSONParser.SaveContext ctx); 195 | /** 196 | * Exit a parse tree produced by {@link MingBdJSONParser#save}. 197 | * @param ctx the parse tree 198 | */ 199 | void exitSave(MingBdJSONParser.SaveContext ctx); 200 | /** 201 | * Enter a parse tree produced by {@link MingBdJSONParser#saveInfo}. 202 | * @param ctx the parse tree 203 | */ 204 | void enterSaveInfo(MingBdJSONParser.SaveInfoContext ctx); 205 | /** 206 | * Exit a parse tree produced by {@link MingBdJSONParser#saveInfo}. 207 | * @param ctx the parse tree 208 | */ 209 | void exitSaveInfo(MingBdJSONParser.SaveInfoContext ctx); 210 | /** 211 | * Enter a parse tree produced by {@link MingBdJSONParser#kafkaSave}. 212 | * @param ctx the parse tree 213 | */ 214 | void enterKafkaSave(MingBdJSONParser.KafkaSaveContext ctx); 215 | /** 216 | * Exit a parse tree produced by {@link MingBdJSONParser#kafkaSave}. 217 | * @param ctx the parse tree 218 | */ 219 | void exitKafkaSave(MingBdJSONParser.KafkaSaveContext ctx); 220 | /** 221 | * Enter a parse tree produced by {@link MingBdJSONParser#mysqlSave}. 222 | * @param ctx the parse tree 223 | */ 224 | void enterMysqlSave(MingBdJSONParser.MysqlSaveContext ctx); 225 | /** 226 | * Exit a parse tree produced by {@link MingBdJSONParser#mysqlSave}. 227 | * @param ctx the parse tree 228 | */ 229 | void exitMysqlSave(MingBdJSONParser.MysqlSaveContext ctx); 230 | /** 231 | * Enter a parse tree produced by {@link MingBdJSONParser#joinpair}. 232 | * @param ctx the parse tree 233 | */ 234 | void enterJoinpair(MingBdJSONParser.JoinpairContext ctx); 235 | /** 236 | * Exit a parse tree produced by {@link MingBdJSONParser#joinpair}. 237 | * @param ctx the parse tree 238 | */ 239 | void exitJoinpair(MingBdJSONParser.JoinpairContext ctx); 240 | /** 241 | * Enter a parse tree produced by {@link MingBdJSONParser#kafkaSource}. 242 | * @param ctx the parse tree 243 | */ 244 | void enterKafkaSource(MingBdJSONParser.KafkaSourceContext ctx); 245 | /** 246 | * Exit a parse tree produced by {@link MingBdJSONParser#kafkaSource}. 247 | * @param ctx the parse tree 248 | */ 249 | void exitKafkaSource(MingBdJSONParser.KafkaSourceContext ctx); 250 | /** 251 | * Enter a parse tree produced by {@link MingBdJSONParser#field}. 252 | * @param ctx the parse tree 253 | */ 254 | void enterField(MingBdJSONParser.FieldContext ctx); 255 | /** 256 | * Exit a parse tree produced by {@link MingBdJSONParser#field}. 257 | * @param ctx the parse tree 258 | */ 259 | void exitField(MingBdJSONParser.FieldContext ctx); 260 | } -------------------------------------------------------------------------------- /json-dsl/src/main/java/parse/MingBdJSONBaseListener.java: -------------------------------------------------------------------------------- 1 | // Generated from D:/MyWorkSpace/zrDSL-flink/json-dsl/src/main/resources\MingBdJSON.g4 by ANTLR 4.8 2 | package parse; 3 | 4 | import org.antlr.v4.runtime.ParserRuleContext; 5 | import org.antlr.v4.runtime.tree.ErrorNode; 6 | import org.antlr.v4.runtime.tree.TerminalNode; 7 | 8 | /** 9 | * This class provides an empty implementation of {@link MingBdJSONListener}, 10 | * which can be extended to create a listener which only needs to handle a subset 11 | * of the available methods. 12 | */ 13 | public class MingBdJSONBaseListener implements MingBdJSONListener { 14 | /** 15 | * {@inheritDoc} 16 | * 17 | *

The default implementation does nothing.

18 | */ 19 | @Override public void enterJson(MingBdJSONParser.JsonContext ctx) { } 20 | /** 21 | * {@inheritDoc} 22 | * 23 | *

The default implementation does nothing.

24 | */ 25 | @Override public void exitJson(MingBdJSONParser.JsonContext ctx) { } 26 | /** 27 | * {@inheritDoc} 28 | * 29 | *

The default implementation does nothing.

30 | */ 31 | @Override public void enterValue(MingBdJSONParser.ValueContext ctx) { } 32 | /** 33 | * {@inheritDoc} 34 | * 35 | *

The default implementation does nothing.

36 | */ 37 | @Override public void exitValue(MingBdJSONParser.ValueContext ctx) { } 38 | /** 39 | * {@inheritDoc} 40 | * 41 | *

The default implementation does nothing.

42 | */ 43 | @Override public void enterPair(MingBdJSONParser.PairContext ctx) { } 44 | /** 45 | * {@inheritDoc} 46 | * 47 | *

The default implementation does nothing.

48 | */ 49 | @Override public void exitPair(MingBdJSONParser.PairContext ctx) { } 50 | /** 51 | * {@inheritDoc} 52 | * 53 | *

The default implementation does nothing.

54 | */ 55 | @Override public void enterRuntype(MingBdJSONParser.RuntypeContext ctx) { } 56 | /** 57 | * {@inheritDoc} 58 | * 59 | *

The default implementation does nothing.

60 | */ 61 | @Override public void exitRuntype(MingBdJSONParser.RuntypeContext ctx) { } 62 | /** 63 | * {@inheritDoc} 64 | * 65 | *

The default implementation does nothing.

66 | */ 67 | @Override public void enterLoad(MingBdJSONParser.LoadContext ctx) { } 68 | /** 69 | * {@inheritDoc} 70 | * 71 | *

The default implementation does nothing.

72 | */ 73 | @Override public void exitLoad(MingBdJSONParser.LoadContext ctx) { } 74 | /** 75 | * {@inheritDoc} 76 | * 77 | *

The default implementation does nothing.

78 | */ 79 | @Override public void enterJoin(MingBdJSONParser.JoinContext ctx) { } 80 | /** 81 | * {@inheritDoc} 82 | * 83 | *

The default implementation does nothing.

84 | */ 85 | @Override public void exitJoin(MingBdJSONParser.JoinContext ctx) { } 86 | /** 87 | * {@inheritDoc} 88 | * 89 | *

The default implementation does nothing.

90 | */ 91 | @Override public void enterTrans(MingBdJSONParser.TransContext ctx) { } 92 | /** 93 | * {@inheritDoc} 94 | * 95 | *

The default implementation does nothing.

96 | */ 97 | @Override public void exitTrans(MingBdJSONParser.TransContext ctx) { } 98 | /** 99 | * {@inheritDoc} 100 | * 101 | *

The default implementation does nothing.

102 | */ 103 | @Override public void enterDataSource(MingBdJSONParser.DataSourceContext ctx) { } 104 | /** 105 | * {@inheritDoc} 106 | * 107 | *

The default implementation does nothing.

108 | */ 109 | @Override public void exitDataSource(MingBdJSONParser.DataSourceContext ctx) { } 110 | /** 111 | * {@inheritDoc} 112 | * 113 | *

The default implementation does nothing.

114 | */ 115 | @Override public void enterHbaseSource(MingBdJSONParser.HbaseSourceContext ctx) { } 116 | /** 117 | * {@inheritDoc} 118 | * 119 | *

The default implementation does nothing.

120 | */ 121 | @Override public void exitHbaseSource(MingBdJSONParser.HbaseSourceContext ctx) { } 122 | /** 123 | * {@inheritDoc} 124 | * 125 | *

The default implementation does nothing.

126 | */ 127 | @Override public void enterMysqlSource(MingBdJSONParser.MysqlSourceContext ctx) { } 128 | /** 129 | * {@inheritDoc} 130 | * 131 | *

The default implementation does nothing.

132 | */ 133 | @Override public void exitMysqlSource(MingBdJSONParser.MysqlSourceContext ctx) { } 134 | /** 135 | * {@inheritDoc} 136 | * 137 | *

The default implementation does nothing.

138 | */ 139 | @Override public void enterMysqlInfo(MingBdJSONParser.MysqlInfoContext ctx) { } 140 | /** 141 | * {@inheritDoc} 142 | * 143 | *

The default implementation does nothing.

144 | */ 145 | @Override public void exitMysqlInfo(MingBdJSONParser.MysqlInfoContext ctx) { } 146 | /** 147 | * {@inheritDoc} 148 | * 149 | *

The default implementation does nothing.

150 | */ 151 | @Override public void enterMysqlSchema(MingBdJSONParser.MysqlSchemaContext ctx) { } 152 | /** 153 | * {@inheritDoc} 154 | * 155 | *

The default implementation does nothing.

156 | */ 157 | @Override public void exitMysqlSchema(MingBdJSONParser.MysqlSchemaContext ctx) { } 158 | /** 159 | * {@inheritDoc} 160 | * 161 | *

The default implementation does nothing.

162 | */ 163 | @Override public void enterTransinfo(MingBdJSONParser.TransinfoContext ctx) { } 164 | /** 165 | * {@inheritDoc} 166 | * 167 | *

The default implementation does nothing.

168 | */ 169 | @Override public void exitTransinfo(MingBdJSONParser.TransinfoContext ctx) { } 170 | /** 171 | * {@inheritDoc} 172 | * 173 | *

The default implementation does nothing.

174 | */ 175 | @Override public void enterSelect(MingBdJSONParser.SelectContext ctx) { } 176 | /** 177 | * {@inheritDoc} 178 | * 179 | *

The default implementation does nothing.

180 | */ 181 | @Override public void exitSelect(MingBdJSONParser.SelectContext ctx) { } 182 | /** 183 | * {@inheritDoc} 184 | * 185 | *

The default implementation does nothing.

186 | */ 187 | @Override public void enterGroupBy(MingBdJSONParser.GroupByContext ctx) { } 188 | /** 189 | * {@inheritDoc} 190 | * 191 | *

The default implementation does nothing.

192 | */ 193 | @Override public void exitGroupBy(MingBdJSONParser.GroupByContext ctx) { } 194 | /** 195 | * {@inheritDoc} 196 | * 197 | *

The default implementation does nothing.

198 | */ 199 | @Override public void enterFilter(MingBdJSONParser.FilterContext ctx) { } 200 | /** 201 | * {@inheritDoc} 202 | * 203 | *

The default implementation does nothing.

204 | */ 205 | @Override public void exitFilter(MingBdJSONParser.FilterContext ctx) { } 206 | /** 207 | * {@inheritDoc} 208 | * 209 | *

The default implementation does nothing.

210 | */ 211 | @Override public void enterCols(MingBdJSONParser.ColsContext ctx) { } 212 | /** 213 | * {@inheritDoc} 214 | * 215 | *

The default implementation does nothing.

216 | */ 217 | @Override public void exitCols(MingBdJSONParser.ColsContext ctx) { } 218 | /** 219 | * {@inheritDoc} 220 | * 221 | *

The default implementation does nothing.

222 | */ 223 | @Override public void enterCol(MingBdJSONParser.ColContext ctx) { } 224 | /** 225 | * {@inheritDoc} 226 | * 227 | *

The default implementation does nothing.

228 | */ 229 | @Override public void exitCol(MingBdJSONParser.ColContext ctx) { } 230 | /** 231 | * {@inheritDoc} 232 | * 233 | *

The default implementation does nothing.

234 | */ 235 | @Override public void enterSave(MingBdJSONParser.SaveContext ctx) { } 236 | /** 237 | * {@inheritDoc} 238 | * 239 | *

The default implementation does nothing.

240 | */ 241 | @Override public void exitSave(MingBdJSONParser.SaveContext ctx) { } 242 | /** 243 | * {@inheritDoc} 244 | * 245 | *

The default implementation does nothing.

246 | */ 247 | @Override public void enterSaveInfo(MingBdJSONParser.SaveInfoContext ctx) { } 248 | /** 249 | * {@inheritDoc} 250 | * 251 | *

The default implementation does nothing.

252 | */ 253 | @Override public void exitSaveInfo(MingBdJSONParser.SaveInfoContext ctx) { } 254 | /** 255 | * {@inheritDoc} 256 | * 257 | *

The default implementation does nothing.

258 | */ 259 | @Override public void enterKafkaSave(MingBdJSONParser.KafkaSaveContext ctx) { } 260 | /** 261 | * {@inheritDoc} 262 | * 263 | *

The default implementation does nothing.

264 | */ 265 | @Override public void exitKafkaSave(MingBdJSONParser.KafkaSaveContext ctx) { } 266 | /** 267 | * {@inheritDoc} 268 | * 269 | *

The default implementation does nothing.

270 | */ 271 | @Override public void enterMysqlSave(MingBdJSONParser.MysqlSaveContext ctx) { } 272 | /** 273 | * {@inheritDoc} 274 | * 275 | *

The default implementation does nothing.

276 | */ 277 | @Override public void exitMysqlSave(MingBdJSONParser.MysqlSaveContext ctx) { } 278 | /** 279 | * {@inheritDoc} 280 | * 281 | *

The default implementation does nothing.

282 | */ 283 | @Override public void enterJoinpair(MingBdJSONParser.JoinpairContext ctx) { } 284 | /** 285 | * {@inheritDoc} 286 | * 287 | *

The default implementation does nothing.

288 | */ 289 | @Override public void exitJoinpair(MingBdJSONParser.JoinpairContext ctx) { } 290 | /** 291 | * {@inheritDoc} 292 | * 293 | *

The default implementation does nothing.

294 | */ 295 | @Override public void enterKafkaSource(MingBdJSONParser.KafkaSourceContext ctx) { } 296 | /** 297 | * {@inheritDoc} 298 | * 299 | *

The default implementation does nothing.

300 | */ 301 | @Override public void exitKafkaSource(MingBdJSONParser.KafkaSourceContext ctx) { } 302 | /** 303 | * {@inheritDoc} 304 | * 305 | *

The default implementation does nothing.

306 | */ 307 | @Override public void enterField(MingBdJSONParser.FieldContext ctx) { } 308 | /** 309 | * {@inheritDoc} 310 | * 311 | *

The default implementation does nothing.

312 | */ 313 | @Override public void exitField(MingBdJSONParser.FieldContext ctx) { } 314 | 315 | /** 316 | * {@inheritDoc} 317 | * 318 | *

The default implementation does nothing.

319 | */ 320 | @Override public void enterEveryRule(ParserRuleContext ctx) { } 321 | /** 322 | * {@inheritDoc} 323 | * 324 | *

The default implementation does nothing.

325 | */ 326 | @Override public void exitEveryRule(ParserRuleContext ctx) { } 327 | /** 328 | * {@inheritDoc} 329 | * 330 | *

The default implementation does nothing.

331 | */ 332 | @Override public void visitTerminal(TerminalNode node) { } 333 | /** 334 | * {@inheritDoc} 335 | * 336 | *

The default implementation does nothing.

337 | */ 338 | @Override public void visitErrorNode(ErrorNode node) { } 339 | } -------------------------------------------------------------------------------- /json-flink-1.10/src/main/java/invoke/MyLoaderInvoke.scala: -------------------------------------------------------------------------------- 1 | package invoke 2 | 3 | import java.util 4 | 5 | import org.apache.flink.api.common.typeinfo.{BasicTypeInfo, TypeInformation, Types} 6 | import org.apache.flink.api.java.ExecutionEnvironment 7 | import org.apache.flink.api.java.io.jdbc.JDBCAppendTableSink 8 | import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment 9 | import org.apache.flink.table.api.java.{BatchTableEnvironment, StreamTableEnvironment} 10 | import org.apache.flink.table.api.{DataTypes, GroupedTable, Table, TableEnvironment} 11 | import org.apache.flink.table.descriptors.{Json, Kafka, Schema} 12 | import parse.{MingBdJSONBaseListener, MingBdJSONParser} 13 | import dsource.MysqlSQLSource 14 | import tool.{JSONTool, UDFRegister} 15 | 16 | import scala.collection.JavaConverters._ 17 | 18 | class MyLoaderInvoke extends MingBdJSONBaseListener { 19 | 20 | 21 | var tableEnv: TableEnvironment = _ 22 | var streamEnv: StreamExecutionEnvironment = _ 23 | var batchEnv: ExecutionEnvironment = _ 24 | var rMode: String = _ 25 | // private[dsl] val values: ParseTreeProperty[Table] = new ParseTreeProperty[Table] 26 | // private[dsl] val mapSchema: util.Map[String, String] = new util.HashMap[String, String] 27 | private[invoke] val map: util.Map[String, Table] = new util.HashMap[String, Table] 28 | 29 | 30 | override def exitJson(ctx: MingBdJSONParser.JsonContext): Unit = { 31 | if (rMode == "stream") 32 | streamEnv.execute() 33 | else 34 | batchEnv.execute() 35 | } 36 | 37 | override def enterRuntype(ctx: MingBdJSONParser.RuntypeContext): Unit = { 38 | val mode: String = ctx.getChild(2).getText.replaceAll("\"", "") 39 | mode match { 40 | case "stream" => { 41 | println("===================stream mode=====================") 42 | import org.apache.flink.table.api.EnvironmentSettings 43 | streamEnv = StreamExecutionEnvironment.getExecutionEnvironment 44 | val bsSettings = EnvironmentSettings.newInstance.useBlinkPlanner.inStreamingMode.build 45 | tableEnv = StreamTableEnvironment.create(streamEnv, bsSettings) 46 | } 47 | case "batch" => { 48 | println("===================batch mode=====================") 49 | // val bbSettings = EnvironmentSettings.newInstance().useBlinkPlanner().inBatchMode().build() 50 | // tableEnv = TableEnvironment.create(bbSettings) 51 | batchEnv = ExecutionEnvironment.getExecutionEnvironment 52 | tableEnv = BatchTableEnvironment.create(batchEnv) 53 | } 54 | case _ => throw new RuntimeException(s"$mode not support") 55 | } 56 | rMode = mode 57 | } 58 | 59 | override def enterKafkaSource(ctx: MingBdJSONParser.KafkaSourceContext): Unit = { 60 | val kafkaSource = ctx.getText 61 | val json = JSONTool.parseObj(kafkaSource) 62 | val tname = json.getString("tableName") 63 | val array = json.getJSONArray("schema").toJavaList(classOf[String]).asScala 64 | val schema = new Schema() 65 | val aliasNames = new util.ArrayList[String]() 66 | for (value <- array) { 67 | val field = JSONTool.parseObj(value.toString) 68 | schema.field(field.getString("nameI"), DataTypes.STRING()) 69 | aliasNames.add(field.getString("aliasI")) 70 | } 71 | tableEnv.connect( 72 | new Kafka() 73 | .version("universal") 74 | .topic(json.getString("topic")) 75 | .startFromEarliest() 76 | .property("zookeeper.connect", json.getString("zk")) 77 | .property("bootstrap.servers", json.getString("btServers")) 78 | ) 79 | .withFormat( 80 | new Json() 81 | .failOnMissingField(false) 82 | ) 83 | .withSchema( 84 | schema 85 | ).createTemporaryTable(json.getString("topic")) 86 | val m1 = tableEnv.from(json.getString("topic")).as(String.join(",", aliasNames)) 87 | map.put(tname, m1) 88 | } 89 | 90 | 91 | override def exitKafkaSource(ctx: MingBdJSONParser.KafkaSourceContext): Unit = { 92 | } 93 | 94 | override def enterHbaseSource(ctx: MingBdJSONParser.HbaseSourceContext): Unit = { 95 | 96 | } 97 | 98 | override def exitHbaseSource(ctx: MingBdJSONParser.HbaseSourceContext): Unit = { 99 | } 100 | 101 | override def enterMysqlSource(ctx: MingBdJSONParser.MysqlSourceContext): Unit = { 102 | val obj = JSONTool.parseObj(ctx.getText) 103 | val info = obj.getJSONObject("info") 104 | val schema = obj.getJSONArray("schema").toJavaList(classOf[String]) 105 | val strings = new Array[String](schema.size) 106 | val tableName = obj.getString("tableName") 107 | val url = info.getString("url") 108 | val user = info.getString("user") 109 | val pass = info.getString("pass") 110 | val query = info.getString("query") 111 | val source = MysqlSQLSource.getMysqlSource(batchEnv, url, user, pass, query, schema.toArray(strings)) 112 | val fields = String.join(",", schema) 113 | tableEnv.asInstanceOf[BatchTableEnvironment].createTemporaryView(tableName, source, fields) 114 | val table = tableEnv.from(tableName) 115 | map.put(tableName, table) 116 | } 117 | 118 | override def exitMysqlSource(ctx: MingBdJSONParser.MysqlSourceContext): Unit = { 119 | } 120 | 121 | override def enterCol(ctx: MingBdJSONParser.ColContext): Unit = { 122 | val colDesc = ctx.getText 123 | if (colDesc.contains("(")) { 124 | val fname = colDesc 125 | .split("\\(")(0) 126 | .trim 127 | .replaceAll("\"", "") 128 | UDFRegister.register(tableEnv, fname) 129 | } 130 | } 131 | 132 | override def exitCol(ctx: MingBdJSONParser.ColContext): Unit = { 133 | } 134 | 135 | override def enterSelect(ctx: MingBdJSONParser.SelectContext): Unit = { 136 | } 137 | 138 | override def exitSelect(ctx: MingBdJSONParser.SelectContext): Unit = { 139 | println(ctx.getText) 140 | val obj = JSONTool.parseObj(ctx.getText) 141 | var gp : GroupedTable= null 142 | if(obj.containsKey("group")){ 143 | val table = map.get(obj.getString("from")) 144 | gp = table.groupBy(String.join(",",obj.getJSONArray("group").toJavaList(classOf[String]))) 145 | } 146 | val cols = JSONTool.parseArray(obj.getString("cols")).toJavaList(classOf[String]) 147 | val from = obj.getString("from") 148 | val to = obj.getString("to") 149 | val distinct = obj.getBoolean("distinct") 150 | var table2:Table = null 151 | if(gp == null){ 152 | val table1 = map.get(from) 153 | table2= table1.select(String.join(",", cols)) 154 | }else{ 155 | table2= gp.select(String.join(",", cols)) 156 | } 157 | if (distinct) table2 = table2.distinct() 158 | if(obj.containsKey("condition")){ 159 | table2 = table2.filter(obj.getString("condition")) 160 | } 161 | table2.printSchema() 162 | map.put(to, table2) 163 | } 164 | 165 | override def enterMysqlSave(ctx: MingBdJSONParser.MysqlSaveContext): Unit = { 166 | val obj = JSONTool.parseObj(ctx.getText) 167 | val info = obj.getJSONObject("info") 168 | val schema = obj.getJSONArray("schema").toJavaList(classOf[String]) 169 | val from = obj.getString("from") 170 | val to = obj.getString("to") 171 | val url = info.getString("url") 172 | val user = info.getString("user") 173 | val pass = info.getString("pass") 174 | val query = info.getString("query") 175 | val sink: JDBCAppendTableSink = JDBCAppendTableSink.builder() 176 | .setDrivername("com.mysql.cj.jdbc.Driver") 177 | .setDBUrl(url) 178 | .setUsername(user) 179 | .setPassword(pass) 180 | .setQuery(query) 181 | .setParameterTypes( 182 | BasicTypeInfo.STRING_TYPE_INFO, 183 | BasicTypeInfo.INT_TYPE_INFO) 184 | .build() 185 | tableEnv.registerTableSink( 186 | to, Array[String]("sjhm","freqs"), 187 | Array[TypeInformation[_]](Types.STRING,Types.INT), 188 | sink) 189 | map.get(from).insertInto(to) 190 | } 191 | 192 | override def exitMysqlSave(ctx: MingBdJSONParser.MysqlSaveContext): Unit = { 193 | 194 | } 195 | override def enterGroupBy(ctx: MingBdJSONParser.GroupByContext): Unit = { 196 | 197 | } 198 | 199 | override def exitGroupBy(ctx: MingBdJSONParser.GroupByContext): Unit = { 200 | 201 | } 202 | 203 | override def enterFilter(ctx: MingBdJSONParser.FilterContext): Unit = { 204 | // val filter = ctx.getText 205 | // val obj = JSONTool.parseObj(filter) 206 | // val condition = obj.getString("condition") 207 | // val from = obj.getString("from") 208 | // val to = obj.getString("to") 209 | // val table1 = map.get(from) 210 | // val table2 = table1.filter(condition) 211 | // map.put(to, table2) 212 | } 213 | 214 | override def exitFilter(ctx: MingBdJSONParser.FilterContext): Unit = { 215 | } 216 | 217 | override def enterJoinpair(ctx: MingBdJSONParser.JoinpairContext): Unit = { 218 | val joinInfo = ctx.getText 219 | val obj = JSONTool.parseObj(joinInfo) 220 | val array = obj.getJSONArray("inputT") 221 | val condition = obj.getJSONArray("conditionT").get(0).toString 222 | val tout = obj.getString("outputT") 223 | val t1 = map.get(array.get(0).toString) 224 | val t2 = map.get(array.get(1).toString) 225 | val tf = t1.join(t2).where(condition) 226 | map.put(tout, tf) 227 | } 228 | 229 | override def exitJoinpair(ctx: MingBdJSONParser.JoinpairContext): Unit = { 230 | } 231 | 232 | override def enterKafkaSave(ctx: MingBdJSONParser.KafkaSaveContext): Unit = { 233 | val str = ctx.getText 234 | val obj = JSONTool.parseObj(str) 235 | val fTable = obj.getString("from") 236 | val cols = JSONTool.parseArray(obj.getString("cols")).toJavaList(classOf[String]).asScala 237 | val types = obj.getJSONArray("types").toJavaList(classOf[String]).asScala 238 | val zips = cols.zip(types) 239 | val schema = new Schema() 240 | for (field <- zips) { 241 | schema.field(field._1, field._2 match { 242 | case "string" => DataTypes.STRING() 243 | case "int" => DataTypes.INT() 244 | case _ => throw new RuntimeException(s"${field._2} 类型不支持") 245 | }) 246 | } 247 | tableEnv.connect( 248 | new Kafka() 249 | .version("universal") 250 | .topic(obj.getString("topic")) 251 | .property("zookeeper.connect", obj.getString("zk")) 252 | .property("bootstrap.servers", obj.getString("btServers")) 253 | ) 254 | .withFormat( 255 | new Json() 256 | .failOnMissingField(false).deriveSchema() 257 | ).withSchema( 258 | schema 259 | ) 260 | .createTemporaryTable(obj.getString("topic")) 261 | map.get(fTable).printSchema() 262 | map.get(fTable).insertInto(obj.getString("topic")) 263 | } 264 | 265 | override def exitKafkaSave(ctx: MingBdJSONParser.KafkaSaveContext): Unit = { 266 | } 267 | 268 | // def setValue(node: ParseTree, value: Table): Unit = { 269 | // values.put(node, value) 270 | // } 271 | // 272 | // def getValue(node: ParseTree): Any = values.get(node) 273 | 274 | } 275 | -------------------------------------------------------------------------------- /json-dsl/src/main/java/parse/MingBdJSON.interp: -------------------------------------------------------------------------------- 1 | token literal names: 2 | null 3 | '{' 4 | ',' 5 | '}' 6 | '"runMode"' 7 | ':' 8 | '"stream"' 9 | '"batch"' 10 | '"load"' 11 | '[' 12 | ']' 13 | '"join"' 14 | '"transform"' 15 | '"zkQuorum"' 16 | '"table"' 17 | '"info"' 18 | '"schema"' 19 | '"tableName"' 20 | '"driver"' 21 | '"url"' 22 | '"user"' 23 | '"pass"' 24 | '"query"' 25 | '"from"' 26 | '"to"' 27 | '"distinct"' 28 | 'true' 29 | 'false' 30 | '"group"' 31 | '"condition"' 32 | '"cols"' 33 | '"save"' 34 | '"zk"' 35 | '"btServers"' 36 | '"topic"' 37 | '"types"' 38 | '"inputT"' 39 | '"conditionT"' 40 | '"outputT"' 41 | '"groupId"' 42 | '"nameI"' 43 | '"aliasI"' 44 | null 45 | null 46 | null 47 | null 48 | null 49 | 50 | token symbolic names: 51 | null 52 | null 53 | null 54 | null 55 | null 56 | null 57 | null 58 | null 59 | null 60 | null 61 | null 62 | null 63 | null 64 | null 65 | null 66 | null 67 | null 68 | null 69 | null 70 | null 71 | null 72 | null 73 | null 74 | null 75 | null 76 | null 77 | null 78 | null 79 | null 80 | null 81 | null 82 | null 83 | null 84 | null 85 | null 86 | null 87 | null 88 | null 89 | null 90 | null 91 | null 92 | null 93 | STRING 94 | FUNCNAME 95 | BLOCK_STRING 96 | NUMBER 97 | WS 98 | 99 | rule names: 100 | json 101 | value 102 | pair 103 | runtype 104 | load 105 | join 106 | trans 107 | dataSource 108 | hbaseSource 109 | mysqlSource 110 | mysqlInfo 111 | mysqlSchema 112 | transinfo 113 | select 114 | groupBy 115 | filter 116 | cols 117 | col 118 | save 119 | saveInfo 120 | kafkaSave 121 | mysqlSave 122 | joinpair 123 | kafkaSource 124 | field 125 | 126 | 127 | atn: 128 | [3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 48, 373, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 3, 2, 3, 2, 3, 3, 3, 3, 3, 3, 3, 3, 7, 3, 59, 10, 3, 12, 3, 14, 3, 62, 11, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 5, 4, 71, 10, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 7, 6, 83, 10, 6, 12, 6, 14, 6, 86, 11, 6, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 7, 7, 96, 10, 7, 12, 7, 14, 7, 99, 11, 7, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 7, 8, 109, 10, 8, 12, 8, 14, 8, 112, 11, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 5, 9, 119, 10, 9, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 13, 3, 13, 3, 13, 3, 13, 7, 13, 171, 10, 13, 12, 13, 14, 13, 174, 11, 13, 3, 13, 3, 13, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 15, 5, 15, 184, 10, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 7, 15, 201, 10, 15, 12, 15, 14, 15, 204, 11, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 7, 16, 214, 10, 16, 12, 16, 14, 16, 217, 11, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 7, 18, 231, 10, 18, 12, 18, 14, 18, 234, 11, 18, 3, 18, 3, 18, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 7, 20, 246, 10, 20, 12, 20, 14, 20, 249, 11, 20, 3, 20, 3, 20, 3, 21, 3, 21, 5, 21, 255, 10, 21, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 7, 22, 282, 10, 22, 12, 22, 14, 22, 285, 11, 22, 3, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 7, 25, 351, 10, 25, 12, 25, 14, 25, 354, 11, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 2, 2, 27, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 2, 4, 3, 2, 8, 9, 3, 2, 28, 29, 2, 366, 2, 52, 3, 2, 2, 2, 4, 54, 3, 2, 2, 2, 6, 70, 3, 2, 2, 2, 8, 72, 3, 2, 2, 2, 10, 76, 3, 2, 2, 2, 12, 89, 3, 2, 2, 2, 14, 102, 3, 2, 2, 2, 16, 118, 3, 2, 2, 2, 18, 120, 3, 2, 2, 2, 20, 130, 3, 2, 2, 2, 22, 144, 3, 2, 2, 2, 24, 166, 3, 2, 2, 2, 26, 177, 3, 2, 2, 2, 28, 179, 3, 2, 2, 2, 30, 207, 3, 2, 2, 2, 32, 220, 3, 2, 2, 2, 34, 224, 3, 2, 2, 2, 36, 237, 3, 2, 2, 2, 38, 239, 3, 2, 2, 2, 40, 254, 3, 2, 2, 2, 42, 256, 3, 2, 2, 2, 44, 289, 3, 2, 2, 2, 46, 307, 3, 2, 2, 2, 48, 327, 3, 2, 2, 2, 50, 362, 3, 2, 2, 2, 52, 53, 5, 4, 3, 2, 53, 3, 3, 2, 2, 2, 54, 55, 7, 3, 2, 2, 55, 60, 5, 6, 4, 2, 56, 57, 7, 4, 2, 2, 57, 59, 5, 6, 4, 2, 58, 56, 3, 2, 2, 2, 59, 62, 3, 2, 2, 2, 60, 58, 3, 2, 2, 2, 60, 61, 3, 2, 2, 2, 61, 63, 3, 2, 2, 2, 62, 60, 3, 2, 2, 2, 63, 64, 7, 5, 2, 2, 64, 5, 3, 2, 2, 2, 65, 71, 5, 8, 5, 2, 66, 71, 5, 10, 6, 2, 67, 71, 5, 12, 7, 2, 68, 71, 5, 14, 8, 2, 69, 71, 5, 38, 20, 2, 70, 65, 3, 2, 2, 2, 70, 66, 3, 2, 2, 2, 70, 67, 3, 2, 2, 2, 70, 68, 3, 2, 2, 2, 70, 69, 3, 2, 2, 2, 71, 7, 3, 2, 2, 2, 72, 73, 7, 6, 2, 2, 73, 74, 7, 7, 2, 2, 74, 75, 9, 2, 2, 2, 75, 9, 3, 2, 2, 2, 76, 77, 7, 10, 2, 2, 77, 78, 7, 7, 2, 2, 78, 79, 7, 11, 2, 2, 79, 84, 5, 16, 9, 2, 80, 81, 7, 4, 2, 2, 81, 83, 5, 16, 9, 2, 82, 80, 3, 2, 2, 2, 83, 86, 3, 2, 2, 2, 84, 82, 3, 2, 2, 2, 84, 85, 3, 2, 2, 2, 85, 87, 3, 2, 2, 2, 86, 84, 3, 2, 2, 2, 87, 88, 7, 12, 2, 2, 88, 11, 3, 2, 2, 2, 89, 90, 7, 13, 2, 2, 90, 91, 7, 7, 2, 2, 91, 92, 7, 11, 2, 2, 92, 97, 5, 46, 24, 2, 93, 94, 7, 4, 2, 2, 94, 96, 5, 46, 24, 2, 95, 93, 3, 2, 2, 2, 96, 99, 3, 2, 2, 2, 97, 95, 3, 2, 2, 2, 97, 98, 3, 2, 2, 2, 98, 100, 3, 2, 2, 2, 99, 97, 3, 2, 2, 2, 100, 101, 7, 12, 2, 2, 101, 13, 3, 2, 2, 2, 102, 103, 7, 14, 2, 2, 103, 104, 7, 7, 2, 2, 104, 105, 7, 11, 2, 2, 105, 110, 5, 26, 14, 2, 106, 107, 7, 4, 2, 2, 107, 109, 5, 26, 14, 2, 108, 106, 3, 2, 2, 2, 109, 112, 3, 2, 2, 2, 110, 108, 3, 2, 2, 2, 110, 111, 3, 2, 2, 2, 111, 113, 3, 2, 2, 2, 112, 110, 3, 2, 2, 2, 113, 114, 7, 12, 2, 2, 114, 15, 3, 2, 2, 2, 115, 119, 5, 48, 25, 2, 116, 119, 5, 18, 10, 2, 117, 119, 5, 20, 11, 2, 118, 115, 3, 2, 2, 2, 118, 116, 3, 2, 2, 2, 118, 117, 3, 2, 2, 2, 119, 17, 3, 2, 2, 2, 120, 121, 7, 3, 2, 2, 121, 122, 7, 15, 2, 2, 122, 123, 7, 7, 2, 2, 123, 124, 7, 44, 2, 2, 124, 125, 7, 4, 2, 2, 125, 126, 7, 16, 2, 2, 126, 127, 7, 7, 2, 2, 127, 128, 7, 44, 2, 2, 128, 129, 7, 5, 2, 2, 129, 19, 3, 2, 2, 2, 130, 131, 7, 3, 2, 2, 131, 132, 7, 17, 2, 2, 132, 133, 7, 7, 2, 2, 133, 134, 5, 22, 12, 2, 134, 135, 7, 4, 2, 2, 135, 136, 7, 18, 2, 2, 136, 137, 7, 7, 2, 2, 137, 138, 5, 24, 13, 2, 138, 139, 7, 4, 2, 2, 139, 140, 7, 19, 2, 2, 140, 141, 7, 7, 2, 2, 141, 142, 7, 44, 2, 2, 142, 143, 7, 5, 2, 2, 143, 21, 3, 2, 2, 2, 144, 145, 7, 3, 2, 2, 145, 146, 7, 20, 2, 2, 146, 147, 7, 7, 2, 2, 147, 148, 7, 44, 2, 2, 148, 149, 7, 4, 2, 2, 149, 150, 7, 21, 2, 2, 150, 151, 7, 7, 2, 2, 151, 152, 7, 44, 2, 2, 152, 153, 7, 4, 2, 2, 153, 154, 7, 22, 2, 2, 154, 155, 7, 7, 2, 2, 155, 156, 7, 44, 2, 2, 156, 157, 7, 4, 2, 2, 157, 158, 7, 23, 2, 2, 158, 159, 7, 7, 2, 2, 159, 160, 7, 44, 2, 2, 160, 161, 7, 4, 2, 2, 161, 162, 7, 24, 2, 2, 162, 163, 7, 7, 2, 2, 163, 164, 7, 44, 2, 2, 164, 165, 7, 5, 2, 2, 165, 23, 3, 2, 2, 2, 166, 167, 7, 11, 2, 2, 167, 172, 7, 44, 2, 2, 168, 169, 7, 4, 2, 2, 169, 171, 7, 44, 2, 2, 170, 168, 3, 2, 2, 2, 171, 174, 3, 2, 2, 2, 172, 170, 3, 2, 2, 2, 172, 173, 3, 2, 2, 2, 173, 175, 3, 2, 2, 2, 174, 172, 3, 2, 2, 2, 175, 176, 7, 12, 2, 2, 176, 25, 3, 2, 2, 2, 177, 178, 5, 28, 15, 2, 178, 27, 3, 2, 2, 2, 179, 183, 7, 3, 2, 2, 180, 181, 5, 30, 16, 2, 181, 182, 7, 4, 2, 2, 182, 184, 3, 2, 2, 2, 183, 180, 3, 2, 2, 2, 183, 184, 3, 2, 2, 2, 184, 185, 3, 2, 2, 2, 185, 186, 5, 34, 18, 2, 186, 187, 7, 4, 2, 2, 187, 188, 7, 25, 2, 2, 188, 189, 7, 7, 2, 2, 189, 190, 7, 44, 2, 2, 190, 191, 7, 4, 2, 2, 191, 192, 7, 26, 2, 2, 192, 193, 7, 7, 2, 2, 193, 194, 7, 44, 2, 2, 194, 195, 7, 4, 2, 2, 195, 196, 7, 27, 2, 2, 196, 197, 7, 7, 2, 2, 197, 202, 9, 3, 2, 2, 198, 199, 7, 4, 2, 2, 199, 201, 5, 32, 17, 2, 200, 198, 3, 2, 2, 2, 201, 204, 3, 2, 2, 2, 202, 200, 3, 2, 2, 2, 202, 203, 3, 2, 2, 2, 203, 205, 3, 2, 2, 2, 204, 202, 3, 2, 2, 2, 205, 206, 7, 5, 2, 2, 206, 29, 3, 2, 2, 2, 207, 208, 7, 30, 2, 2, 208, 209, 7, 7, 2, 2, 209, 210, 7, 11, 2, 2, 210, 215, 5, 36, 19, 2, 211, 212, 7, 4, 2, 2, 212, 214, 5, 36, 19, 2, 213, 211, 3, 2, 2, 2, 214, 217, 3, 2, 2, 2, 215, 213, 3, 2, 2, 2, 215, 216, 3, 2, 2, 2, 216, 218, 3, 2, 2, 2, 217, 215, 3, 2, 2, 2, 218, 219, 7, 12, 2, 2, 219, 31, 3, 2, 2, 2, 220, 221, 7, 31, 2, 2, 221, 222, 7, 7, 2, 2, 222, 223, 7, 44, 2, 2, 223, 33, 3, 2, 2, 2, 224, 225, 7, 32, 2, 2, 225, 226, 7, 7, 2, 2, 226, 227, 7, 11, 2, 2, 227, 232, 5, 36, 19, 2, 228, 229, 7, 4, 2, 2, 229, 231, 5, 36, 19, 2, 230, 228, 3, 2, 2, 2, 231, 234, 3, 2, 2, 2, 232, 230, 3, 2, 2, 2, 232, 233, 3, 2, 2, 2, 233, 235, 3, 2, 2, 2, 234, 232, 3, 2, 2, 2, 235, 236, 7, 12, 2, 2, 236, 35, 3, 2, 2, 2, 237, 238, 7, 44, 2, 2, 238, 37, 3, 2, 2, 2, 239, 240, 7, 33, 2, 2, 240, 241, 7, 7, 2, 2, 241, 242, 7, 11, 2, 2, 242, 247, 5, 40, 21, 2, 243, 244, 7, 4, 2, 2, 244, 246, 5, 40, 21, 2, 245, 243, 3, 2, 2, 2, 246, 249, 3, 2, 2, 2, 247, 245, 3, 2, 2, 2, 247, 248, 3, 2, 2, 2, 248, 250, 3, 2, 2, 2, 249, 247, 3, 2, 2, 2, 250, 251, 7, 12, 2, 2, 251, 39, 3, 2, 2, 2, 252, 255, 5, 42, 22, 2, 253, 255, 5, 44, 23, 2, 254, 252, 3, 2, 2, 2, 254, 253, 3, 2, 2, 2, 255, 41, 3, 2, 2, 2, 256, 257, 7, 3, 2, 2, 257, 258, 7, 34, 2, 2, 258, 259, 7, 7, 2, 2, 259, 260, 7, 44, 2, 2, 260, 261, 7, 4, 2, 2, 261, 262, 7, 35, 2, 2, 262, 263, 7, 7, 2, 2, 263, 264, 7, 44, 2, 2, 264, 265, 7, 4, 2, 2, 265, 266, 7, 36, 2, 2, 266, 267, 7, 7, 2, 2, 267, 268, 7, 44, 2, 2, 268, 269, 7, 4, 2, 2, 269, 270, 7, 25, 2, 2, 270, 271, 7, 7, 2, 2, 271, 272, 7, 44, 2, 2, 272, 273, 7, 4, 2, 2, 273, 274, 5, 34, 18, 2, 274, 275, 7, 4, 2, 2, 275, 276, 7, 37, 2, 2, 276, 277, 7, 7, 2, 2, 277, 278, 7, 11, 2, 2, 278, 283, 5, 36, 19, 2, 279, 280, 7, 4, 2, 2, 280, 282, 5, 36, 19, 2, 281, 279, 3, 2, 2, 2, 282, 285, 3, 2, 2, 2, 283, 281, 3, 2, 2, 2, 283, 284, 3, 2, 2, 2, 284, 286, 3, 2, 2, 2, 285, 283, 3, 2, 2, 2, 286, 287, 7, 12, 2, 2, 287, 288, 7, 5, 2, 2, 288, 43, 3, 2, 2, 2, 289, 290, 7, 3, 2, 2, 290, 291, 7, 17, 2, 2, 291, 292, 7, 7, 2, 2, 292, 293, 5, 22, 12, 2, 293, 294, 7, 4, 2, 2, 294, 295, 7, 18, 2, 2, 295, 296, 7, 7, 2, 2, 296, 297, 5, 24, 13, 2, 297, 298, 7, 4, 2, 2, 298, 299, 7, 25, 2, 2, 299, 300, 7, 7, 2, 2, 300, 301, 7, 44, 2, 2, 301, 302, 7, 4, 2, 2, 302, 303, 7, 26, 2, 2, 303, 304, 7, 7, 2, 2, 304, 305, 7, 44, 2, 2, 305, 306, 7, 5, 2, 2, 306, 45, 3, 2, 2, 2, 307, 308, 7, 3, 2, 2, 308, 309, 7, 38, 2, 2, 309, 310, 7, 7, 2, 2, 310, 311, 7, 11, 2, 2, 311, 312, 7, 44, 2, 2, 312, 313, 7, 4, 2, 2, 313, 314, 7, 44, 2, 2, 314, 315, 7, 12, 2, 2, 315, 316, 7, 4, 2, 2, 316, 317, 7, 39, 2, 2, 317, 318, 7, 7, 2, 2, 318, 319, 7, 11, 2, 2, 319, 320, 7, 44, 2, 2, 320, 321, 7, 12, 2, 2, 321, 322, 7, 4, 2, 2, 322, 323, 7, 40, 2, 2, 323, 324, 7, 7, 2, 2, 324, 325, 7, 44, 2, 2, 325, 326, 7, 5, 2, 2, 326, 47, 3, 2, 2, 2, 327, 328, 7, 3, 2, 2, 328, 329, 7, 34, 2, 2, 329, 330, 7, 7, 2, 2, 330, 331, 7, 44, 2, 2, 331, 332, 7, 4, 2, 2, 332, 333, 7, 35, 2, 2, 333, 334, 7, 7, 2, 2, 334, 335, 7, 44, 2, 2, 335, 336, 7, 4, 2, 2, 336, 337, 7, 36, 2, 2, 337, 338, 7, 7, 2, 2, 338, 339, 7, 44, 2, 2, 339, 340, 7, 4, 2, 2, 340, 341, 7, 41, 2, 2, 341, 342, 7, 7, 2, 2, 342, 343, 7, 44, 2, 2, 343, 344, 7, 4, 2, 2, 344, 345, 7, 18, 2, 2, 345, 346, 7, 7, 2, 2, 346, 347, 7, 11, 2, 2, 347, 352, 5, 50, 26, 2, 348, 349, 7, 4, 2, 2, 349, 351, 5, 50, 26, 2, 350, 348, 3, 2, 2, 2, 351, 354, 3, 2, 2, 2, 352, 350, 3, 2, 2, 2, 352, 353, 3, 2, 2, 2, 353, 355, 3, 2, 2, 2, 354, 352, 3, 2, 2, 2, 355, 356, 7, 12, 2, 2, 356, 357, 7, 4, 2, 2, 357, 358, 7, 19, 2, 2, 358, 359, 7, 7, 2, 2, 359, 360, 7, 44, 2, 2, 360, 361, 7, 5, 2, 2, 361, 49, 3, 2, 2, 2, 362, 363, 7, 3, 2, 2, 363, 364, 7, 42, 2, 2, 364, 365, 7, 7, 2, 2, 365, 366, 7, 44, 2, 2, 366, 367, 7, 4, 2, 2, 367, 368, 7, 43, 2, 2, 368, 369, 7, 7, 2, 2, 369, 370, 7, 44, 2, 2, 370, 371, 7, 5, 2, 2, 371, 51, 3, 2, 2, 2, 17, 60, 70, 84, 97, 110, 118, 172, 183, 202, 215, 232, 247, 254, 283, 352] -------------------------------------------------------------------------------- /json-dsl/src/main/java/parse/MingBdJSONLexer.interp: -------------------------------------------------------------------------------- 1 | token literal names: 2 | null 3 | '{' 4 | ',' 5 | '}' 6 | '"runMode"' 7 | ':' 8 | '"stream"' 9 | '"batch"' 10 | '"load"' 11 | '[' 12 | ']' 13 | '"join"' 14 | '"transform"' 15 | '"zkQuorum"' 16 | '"table"' 17 | '"info"' 18 | '"schema"' 19 | '"tableName"' 20 | '"driver"' 21 | '"url"' 22 | '"user"' 23 | '"pass"' 24 | '"query"' 25 | '"from"' 26 | '"to"' 27 | '"distinct"' 28 | 'true' 29 | 'false' 30 | '"group"' 31 | '"condition"' 32 | '"cols"' 33 | '"save"' 34 | '"zk"' 35 | '"btServers"' 36 | '"topic"' 37 | '"types"' 38 | '"inputT"' 39 | '"conditionT"' 40 | '"outputT"' 41 | '"groupId"' 42 | '"nameI"' 43 | '"aliasI"' 44 | null 45 | null 46 | null 47 | null 48 | null 49 | 50 | token symbolic names: 51 | null 52 | null 53 | null 54 | null 55 | null 56 | null 57 | null 58 | null 59 | null 60 | null 61 | null 62 | null 63 | null 64 | null 65 | null 66 | null 67 | null 68 | null 69 | null 70 | null 71 | null 72 | null 73 | null 74 | null 75 | null 76 | null 77 | null 78 | null 79 | null 80 | null 81 | null 82 | null 83 | null 84 | null 85 | null 86 | null 87 | null 88 | null 89 | null 90 | null 91 | null 92 | null 93 | STRING 94 | FUNCNAME 95 | BLOCK_STRING 96 | NUMBER 97 | WS 98 | 99 | rule names: 100 | T__0 101 | T__1 102 | T__2 103 | T__3 104 | T__4 105 | T__5 106 | T__6 107 | T__7 108 | T__8 109 | T__9 110 | T__10 111 | T__11 112 | T__12 113 | T__13 114 | T__14 115 | T__15 116 | T__16 117 | T__17 118 | T__18 119 | T__19 120 | T__20 121 | T__21 122 | T__22 123 | T__23 124 | T__24 125 | T__25 126 | T__26 127 | T__27 128 | T__28 129 | T__29 130 | T__30 131 | T__31 132 | T__32 133 | T__33 134 | T__34 135 | T__35 136 | T__36 137 | T__37 138 | T__38 139 | T__39 140 | T__40 141 | STRING 142 | FUNCNAME 143 | BLOCK_STRING 144 | ESC 145 | UNICODE 146 | HEX 147 | SAFECODEPOINT 148 | NUMBER 149 | INT 150 | EXP 151 | WS 152 | 153 | channel names: 154 | DEFAULT_TOKEN_CHANNEL 155 | HIDDEN 156 | 157 | mode names: 158 | DEFAULT_MODE 159 | 160 | atn: 161 | [3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 48, 500, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 4, 49, 9, 49, 4, 50, 9, 50, 4, 51, 9, 51, 4, 52, 9, 52, 4, 53, 9, 53, 3, 2, 3, 2, 3, 3, 3, 3, 3, 4, 3, 4, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 5, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 9, 3, 10, 3, 10, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 12, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 25, 3, 25, 3, 25, 3, 25, 3, 25, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 26, 3, 27, 3, 27, 3, 27, 3, 27, 3, 27, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 28, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 29, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 30, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 31, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 32, 3, 33, 3, 33, 3, 33, 3, 33, 3, 33, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 34, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 35, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 36, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 37, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 38, 3, 39, 3, 39, 3, 39, 3, 39, 3, 39, 3, 39, 3, 39, 3, 39, 3, 39, 3, 39, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 40, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 42, 3, 43, 3, 43, 3, 43, 7, 43, 420, 10, 43, 12, 43, 14, 43, 423, 11, 43, 3, 43, 3, 43, 3, 44, 7, 44, 428, 10, 44, 12, 44, 14, 44, 431, 11, 44, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 45, 7, 45, 439, 10, 45, 12, 45, 14, 45, 442, 11, 45, 3, 45, 3, 45, 3, 45, 3, 45, 3, 46, 3, 46, 3, 46, 5, 46, 451, 10, 46, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 47, 3, 48, 3, 48, 3, 49, 3, 49, 3, 50, 5, 50, 464, 10, 50, 3, 50, 3, 50, 3, 50, 6, 50, 469, 10, 50, 13, 50, 14, 50, 470, 5, 50, 473, 10, 50, 3, 50, 5, 50, 476, 10, 50, 3, 51, 3, 51, 3, 51, 7, 51, 481, 10, 51, 12, 51, 14, 51, 484, 11, 51, 5, 51, 486, 10, 51, 3, 52, 3, 52, 5, 52, 490, 10, 52, 3, 52, 3, 52, 3, 53, 6, 53, 495, 10, 53, 13, 53, 14, 53, 496, 3, 53, 3, 53, 3, 440, 2, 54, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 17, 10, 19, 11, 21, 12, 23, 13, 25, 14, 27, 15, 29, 16, 31, 17, 33, 18, 35, 19, 37, 20, 39, 21, 41, 22, 43, 23, 45, 24, 47, 25, 49, 26, 51, 27, 53, 28, 55, 29, 57, 30, 59, 31, 61, 32, 63, 33, 65, 34, 67, 35, 69, 36, 71, 37, 73, 38, 75, 39, 77, 40, 79, 41, 81, 42, 83, 43, 85, 44, 87, 45, 89, 46, 91, 2, 93, 2, 95, 2, 97, 2, 99, 47, 101, 2, 103, 2, 105, 48, 3, 2, 11, 5, 2, 50, 59, 67, 72, 99, 104, 3, 2, 45, 45, 10, 2, 36, 36, 49, 49, 94, 94, 100, 100, 104, 104, 112, 112, 116, 116, 118, 118, 5, 2, 2, 33, 36, 36, 94, 94, 3, 2, 50, 59, 3, 2, 51, 59, 4, 2, 71, 71, 103, 103, 4, 2, 45, 45, 47, 47, 5, 2, 11, 12, 15, 15, 34, 34, 2, 506, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2, 2, 2, 2, 49, 3, 2, 2, 2, 2, 51, 3, 2, 2, 2, 2, 53, 3, 2, 2, 2, 2, 55, 3, 2, 2, 2, 2, 57, 3, 2, 2, 2, 2, 59, 3, 2, 2, 2, 2, 61, 3, 2, 2, 2, 2, 63, 3, 2, 2, 2, 2, 65, 3, 2, 2, 2, 2, 67, 3, 2, 2, 2, 2, 69, 3, 2, 2, 2, 2, 71, 3, 2, 2, 2, 2, 73, 3, 2, 2, 2, 2, 75, 3, 2, 2, 2, 2, 77, 3, 2, 2, 2, 2, 79, 3, 2, 2, 2, 2, 81, 3, 2, 2, 2, 2, 83, 3, 2, 2, 2, 2, 85, 3, 2, 2, 2, 2, 87, 3, 2, 2, 2, 2, 89, 3, 2, 2, 2, 2, 99, 3, 2, 2, 2, 2, 105, 3, 2, 2, 2, 3, 107, 3, 2, 2, 2, 5, 109, 3, 2, 2, 2, 7, 111, 3, 2, 2, 2, 9, 113, 3, 2, 2, 2, 11, 123, 3, 2, 2, 2, 13, 125, 3, 2, 2, 2, 15, 134, 3, 2, 2, 2, 17, 142, 3, 2, 2, 2, 19, 149, 3, 2, 2, 2, 21, 151, 3, 2, 2, 2, 23, 153, 3, 2, 2, 2, 25, 160, 3, 2, 2, 2, 27, 172, 3, 2, 2, 2, 29, 183, 3, 2, 2, 2, 31, 191, 3, 2, 2, 2, 33, 198, 3, 2, 2, 2, 35, 207, 3, 2, 2, 2, 37, 219, 3, 2, 2, 2, 39, 228, 3, 2, 2, 2, 41, 234, 3, 2, 2, 2, 43, 241, 3, 2, 2, 2, 45, 248, 3, 2, 2, 2, 47, 256, 3, 2, 2, 2, 49, 263, 3, 2, 2, 2, 51, 268, 3, 2, 2, 2, 53, 279, 3, 2, 2, 2, 55, 284, 3, 2, 2, 2, 57, 290, 3, 2, 2, 2, 59, 298, 3, 2, 2, 2, 61, 310, 3, 2, 2, 2, 63, 317, 3, 2, 2, 2, 65, 324, 3, 2, 2, 2, 67, 329, 3, 2, 2, 2, 69, 341, 3, 2, 2, 2, 71, 349, 3, 2, 2, 2, 73, 357, 3, 2, 2, 2, 75, 366, 3, 2, 2, 2, 77, 379, 3, 2, 2, 2, 79, 389, 3, 2, 2, 2, 81, 399, 3, 2, 2, 2, 83, 407, 3, 2, 2, 2, 85, 416, 3, 2, 2, 2, 87, 429, 3, 2, 2, 2, 89, 432, 3, 2, 2, 2, 91, 447, 3, 2, 2, 2, 93, 452, 3, 2, 2, 2, 95, 458, 3, 2, 2, 2, 97, 460, 3, 2, 2, 2, 99, 463, 3, 2, 2, 2, 101, 485, 3, 2, 2, 2, 103, 487, 3, 2, 2, 2, 105, 494, 3, 2, 2, 2, 107, 108, 7, 125, 2, 2, 108, 4, 3, 2, 2, 2, 109, 110, 7, 46, 2, 2, 110, 6, 3, 2, 2, 2, 111, 112, 7, 127, 2, 2, 112, 8, 3, 2, 2, 2, 113, 114, 7, 36, 2, 2, 114, 115, 7, 116, 2, 2, 115, 116, 7, 119, 2, 2, 116, 117, 7, 112, 2, 2, 117, 118, 7, 79, 2, 2, 118, 119, 7, 113, 2, 2, 119, 120, 7, 102, 2, 2, 120, 121, 7, 103, 2, 2, 121, 122, 7, 36, 2, 2, 122, 10, 3, 2, 2, 2, 123, 124, 7, 60, 2, 2, 124, 12, 3, 2, 2, 2, 125, 126, 7, 36, 2, 2, 126, 127, 7, 117, 2, 2, 127, 128, 7, 118, 2, 2, 128, 129, 7, 116, 2, 2, 129, 130, 7, 103, 2, 2, 130, 131, 7, 99, 2, 2, 131, 132, 7, 111, 2, 2, 132, 133, 7, 36, 2, 2, 133, 14, 3, 2, 2, 2, 134, 135, 7, 36, 2, 2, 135, 136, 7, 100, 2, 2, 136, 137, 7, 99, 2, 2, 137, 138, 7, 118, 2, 2, 138, 139, 7, 101, 2, 2, 139, 140, 7, 106, 2, 2, 140, 141, 7, 36, 2, 2, 141, 16, 3, 2, 2, 2, 142, 143, 7, 36, 2, 2, 143, 144, 7, 110, 2, 2, 144, 145, 7, 113, 2, 2, 145, 146, 7, 99, 2, 2, 146, 147, 7, 102, 2, 2, 147, 148, 7, 36, 2, 2, 148, 18, 3, 2, 2, 2, 149, 150, 7, 93, 2, 2, 150, 20, 3, 2, 2, 2, 151, 152, 7, 95, 2, 2, 152, 22, 3, 2, 2, 2, 153, 154, 7, 36, 2, 2, 154, 155, 7, 108, 2, 2, 155, 156, 7, 113, 2, 2, 156, 157, 7, 107, 2, 2, 157, 158, 7, 112, 2, 2, 158, 159, 7, 36, 2, 2, 159, 24, 3, 2, 2, 2, 160, 161, 7, 36, 2, 2, 161, 162, 7, 118, 2, 2, 162, 163, 7, 116, 2, 2, 163, 164, 7, 99, 2, 2, 164, 165, 7, 112, 2, 2, 165, 166, 7, 117, 2, 2, 166, 167, 7, 104, 2, 2, 167, 168, 7, 113, 2, 2, 168, 169, 7, 116, 2, 2, 169, 170, 7, 111, 2, 2, 170, 171, 7, 36, 2, 2, 171, 26, 3, 2, 2, 2, 172, 173, 7, 36, 2, 2, 173, 174, 7, 124, 2, 2, 174, 175, 7, 109, 2, 2, 175, 176, 7, 83, 2, 2, 176, 177, 7, 119, 2, 2, 177, 178, 7, 113, 2, 2, 178, 179, 7, 116, 2, 2, 179, 180, 7, 119, 2, 2, 180, 181, 7, 111, 2, 2, 181, 182, 7, 36, 2, 2, 182, 28, 3, 2, 2, 2, 183, 184, 7, 36, 2, 2, 184, 185, 7, 118, 2, 2, 185, 186, 7, 99, 2, 2, 186, 187, 7, 100, 2, 2, 187, 188, 7, 110, 2, 2, 188, 189, 7, 103, 2, 2, 189, 190, 7, 36, 2, 2, 190, 30, 3, 2, 2, 2, 191, 192, 7, 36, 2, 2, 192, 193, 7, 107, 2, 2, 193, 194, 7, 112, 2, 2, 194, 195, 7, 104, 2, 2, 195, 196, 7, 113, 2, 2, 196, 197, 7, 36, 2, 2, 197, 32, 3, 2, 2, 2, 198, 199, 7, 36, 2, 2, 199, 200, 7, 117, 2, 2, 200, 201, 7, 101, 2, 2, 201, 202, 7, 106, 2, 2, 202, 203, 7, 103, 2, 2, 203, 204, 7, 111, 2, 2, 204, 205, 7, 99, 2, 2, 205, 206, 7, 36, 2, 2, 206, 34, 3, 2, 2, 2, 207, 208, 7, 36, 2, 2, 208, 209, 7, 118, 2, 2, 209, 210, 7, 99, 2, 2, 210, 211, 7, 100, 2, 2, 211, 212, 7, 110, 2, 2, 212, 213, 7, 103, 2, 2, 213, 214, 7, 80, 2, 2, 214, 215, 7, 99, 2, 2, 215, 216, 7, 111, 2, 2, 216, 217, 7, 103, 2, 2, 217, 218, 7, 36, 2, 2, 218, 36, 3, 2, 2, 2, 219, 220, 7, 36, 2, 2, 220, 221, 7, 102, 2, 2, 221, 222, 7, 116, 2, 2, 222, 223, 7, 107, 2, 2, 223, 224, 7, 120, 2, 2, 224, 225, 7, 103, 2, 2, 225, 226, 7, 116, 2, 2, 226, 227, 7, 36, 2, 2, 227, 38, 3, 2, 2, 2, 228, 229, 7, 36, 2, 2, 229, 230, 7, 119, 2, 2, 230, 231, 7, 116, 2, 2, 231, 232, 7, 110, 2, 2, 232, 233, 7, 36, 2, 2, 233, 40, 3, 2, 2, 2, 234, 235, 7, 36, 2, 2, 235, 236, 7, 119, 2, 2, 236, 237, 7, 117, 2, 2, 237, 238, 7, 103, 2, 2, 238, 239, 7, 116, 2, 2, 239, 240, 7, 36, 2, 2, 240, 42, 3, 2, 2, 2, 241, 242, 7, 36, 2, 2, 242, 243, 7, 114, 2, 2, 243, 244, 7, 99, 2, 2, 244, 245, 7, 117, 2, 2, 245, 246, 7, 117, 2, 2, 246, 247, 7, 36, 2, 2, 247, 44, 3, 2, 2, 2, 248, 249, 7, 36, 2, 2, 249, 250, 7, 115, 2, 2, 250, 251, 7, 119, 2, 2, 251, 252, 7, 103, 2, 2, 252, 253, 7, 116, 2, 2, 253, 254, 7, 123, 2, 2, 254, 255, 7, 36, 2, 2, 255, 46, 3, 2, 2, 2, 256, 257, 7, 36, 2, 2, 257, 258, 7, 104, 2, 2, 258, 259, 7, 116, 2, 2, 259, 260, 7, 113, 2, 2, 260, 261, 7, 111, 2, 2, 261, 262, 7, 36, 2, 2, 262, 48, 3, 2, 2, 2, 263, 264, 7, 36, 2, 2, 264, 265, 7, 118, 2, 2, 265, 266, 7, 113, 2, 2, 266, 267, 7, 36, 2, 2, 267, 50, 3, 2, 2, 2, 268, 269, 7, 36, 2, 2, 269, 270, 7, 102, 2, 2, 270, 271, 7, 107, 2, 2, 271, 272, 7, 117, 2, 2, 272, 273, 7, 118, 2, 2, 273, 274, 7, 107, 2, 2, 274, 275, 7, 112, 2, 2, 275, 276, 7, 101, 2, 2, 276, 277, 7, 118, 2, 2, 277, 278, 7, 36, 2, 2, 278, 52, 3, 2, 2, 2, 279, 280, 7, 118, 2, 2, 280, 281, 7, 116, 2, 2, 281, 282, 7, 119, 2, 2, 282, 283, 7, 103, 2, 2, 283, 54, 3, 2, 2, 2, 284, 285, 7, 104, 2, 2, 285, 286, 7, 99, 2, 2, 286, 287, 7, 110, 2, 2, 287, 288, 7, 117, 2, 2, 288, 289, 7, 103, 2, 2, 289, 56, 3, 2, 2, 2, 290, 291, 7, 36, 2, 2, 291, 292, 7, 105, 2, 2, 292, 293, 7, 116, 2, 2, 293, 294, 7, 113, 2, 2, 294, 295, 7, 119, 2, 2, 295, 296, 7, 114, 2, 2, 296, 297, 7, 36, 2, 2, 297, 58, 3, 2, 2, 2, 298, 299, 7, 36, 2, 2, 299, 300, 7, 101, 2, 2, 300, 301, 7, 113, 2, 2, 301, 302, 7, 112, 2, 2, 302, 303, 7, 102, 2, 2, 303, 304, 7, 107, 2, 2, 304, 305, 7, 118, 2, 2, 305, 306, 7, 107, 2, 2, 306, 307, 7, 113, 2, 2, 307, 308, 7, 112, 2, 2, 308, 309, 7, 36, 2, 2, 309, 60, 3, 2, 2, 2, 310, 311, 7, 36, 2, 2, 311, 312, 7, 101, 2, 2, 312, 313, 7, 113, 2, 2, 313, 314, 7, 110, 2, 2, 314, 315, 7, 117, 2, 2, 315, 316, 7, 36, 2, 2, 316, 62, 3, 2, 2, 2, 317, 318, 7, 36, 2, 2, 318, 319, 7, 117, 2, 2, 319, 320, 7, 99, 2, 2, 320, 321, 7, 120, 2, 2, 321, 322, 7, 103, 2, 2, 322, 323, 7, 36, 2, 2, 323, 64, 3, 2, 2, 2, 324, 325, 7, 36, 2, 2, 325, 326, 7, 124, 2, 2, 326, 327, 7, 109, 2, 2, 327, 328, 7, 36, 2, 2, 328, 66, 3, 2, 2, 2, 329, 330, 7, 36, 2, 2, 330, 331, 7, 100, 2, 2, 331, 332, 7, 118, 2, 2, 332, 333, 7, 85, 2, 2, 333, 334, 7, 103, 2, 2, 334, 335, 7, 116, 2, 2, 335, 336, 7, 120, 2, 2, 336, 337, 7, 103, 2, 2, 337, 338, 7, 116, 2, 2, 338, 339, 7, 117, 2, 2, 339, 340, 7, 36, 2, 2, 340, 68, 3, 2, 2, 2, 341, 342, 7, 36, 2, 2, 342, 343, 7, 118, 2, 2, 343, 344, 7, 113, 2, 2, 344, 345, 7, 114, 2, 2, 345, 346, 7, 107, 2, 2, 346, 347, 7, 101, 2, 2, 347, 348, 7, 36, 2, 2, 348, 70, 3, 2, 2, 2, 349, 350, 7, 36, 2, 2, 350, 351, 7, 118, 2, 2, 351, 352, 7, 123, 2, 2, 352, 353, 7, 114, 2, 2, 353, 354, 7, 103, 2, 2, 354, 355, 7, 117, 2, 2, 355, 356, 7, 36, 2, 2, 356, 72, 3, 2, 2, 2, 357, 358, 7, 36, 2, 2, 358, 359, 7, 107, 2, 2, 359, 360, 7, 112, 2, 2, 360, 361, 7, 114, 2, 2, 361, 362, 7, 119, 2, 2, 362, 363, 7, 118, 2, 2, 363, 364, 7, 86, 2, 2, 364, 365, 7, 36, 2, 2, 365, 74, 3, 2, 2, 2, 366, 367, 7, 36, 2, 2, 367, 368, 7, 101, 2, 2, 368, 369, 7, 113, 2, 2, 369, 370, 7, 112, 2, 2, 370, 371, 7, 102, 2, 2, 371, 372, 7, 107, 2, 2, 372, 373, 7, 118, 2, 2, 373, 374, 7, 107, 2, 2, 374, 375, 7, 113, 2, 2, 375, 376, 7, 112, 2, 2, 376, 377, 7, 86, 2, 2, 377, 378, 7, 36, 2, 2, 378, 76, 3, 2, 2, 2, 379, 380, 7, 36, 2, 2, 380, 381, 7, 113, 2, 2, 381, 382, 7, 119, 2, 2, 382, 383, 7, 118, 2, 2, 383, 384, 7, 114, 2, 2, 384, 385, 7, 119, 2, 2, 385, 386, 7, 118, 2, 2, 386, 387, 7, 86, 2, 2, 387, 388, 7, 36, 2, 2, 388, 78, 3, 2, 2, 2, 389, 390, 7, 36, 2, 2, 390, 391, 7, 105, 2, 2, 391, 392, 7, 116, 2, 2, 392, 393, 7, 113, 2, 2, 393, 394, 7, 119, 2, 2, 394, 395, 7, 114, 2, 2, 395, 396, 7, 75, 2, 2, 396, 397, 7, 102, 2, 2, 397, 398, 7, 36, 2, 2, 398, 80, 3, 2, 2, 2, 399, 400, 7, 36, 2, 2, 400, 401, 7, 112, 2, 2, 401, 402, 7, 99, 2, 2, 402, 403, 7, 111, 2, 2, 403, 404, 7, 103, 2, 2, 404, 405, 7, 75, 2, 2, 405, 406, 7, 36, 2, 2, 406, 82, 3, 2, 2, 2, 407, 408, 7, 36, 2, 2, 408, 409, 7, 99, 2, 2, 409, 410, 7, 110, 2, 2, 410, 411, 7, 107, 2, 2, 411, 412, 7, 99, 2, 2, 412, 413, 7, 117, 2, 2, 413, 414, 7, 75, 2, 2, 414, 415, 7, 36, 2, 2, 415, 84, 3, 2, 2, 2, 416, 421, 7, 36, 2, 2, 417, 420, 5, 91, 46, 2, 418, 420, 5, 97, 49, 2, 419, 417, 3, 2, 2, 2, 419, 418, 3, 2, 2, 2, 420, 423, 3, 2, 2, 2, 421, 419, 3, 2, 2, 2, 421, 422, 3, 2, 2, 2, 422, 424, 3, 2, 2, 2, 423, 421, 3, 2, 2, 2, 424, 425, 7, 36, 2, 2, 425, 86, 3, 2, 2, 2, 426, 428, 9, 2, 2, 2, 427, 426, 3, 2, 2, 2, 428, 431, 3, 2, 2, 2, 429, 427, 3, 2, 2, 2, 429, 430, 3, 2, 2, 2, 430, 88, 3, 2, 2, 2, 431, 429, 3, 2, 2, 2, 432, 433, 7, 41, 2, 2, 433, 434, 7, 41, 2, 2, 434, 435, 7, 41, 2, 2, 435, 436, 3, 2, 2, 2, 436, 440, 10, 3, 2, 2, 437, 439, 11, 2, 2, 2, 438, 437, 3, 2, 2, 2, 439, 442, 3, 2, 2, 2, 440, 441, 3, 2, 2, 2, 440, 438, 3, 2, 2, 2, 441, 443, 3, 2, 2, 2, 442, 440, 3, 2, 2, 2, 443, 444, 7, 41, 2, 2, 444, 445, 7, 41, 2, 2, 445, 446, 7, 41, 2, 2, 446, 90, 3, 2, 2, 2, 447, 450, 7, 94, 2, 2, 448, 451, 9, 4, 2, 2, 449, 451, 5, 93, 47, 2, 450, 448, 3, 2, 2, 2, 450, 449, 3, 2, 2, 2, 451, 92, 3, 2, 2, 2, 452, 453, 7, 119, 2, 2, 453, 454, 5, 95, 48, 2, 454, 455, 5, 95, 48, 2, 455, 456, 5, 95, 48, 2, 456, 457, 5, 95, 48, 2, 457, 94, 3, 2, 2, 2, 458, 459, 9, 2, 2, 2, 459, 96, 3, 2, 2, 2, 460, 461, 10, 5, 2, 2, 461, 98, 3, 2, 2, 2, 462, 464, 7, 47, 2, 2, 463, 462, 3, 2, 2, 2, 463, 464, 3, 2, 2, 2, 464, 465, 3, 2, 2, 2, 465, 472, 5, 101, 51, 2, 466, 468, 7, 48, 2, 2, 467, 469, 9, 6, 2, 2, 468, 467, 3, 2, 2, 2, 469, 470, 3, 2, 2, 2, 470, 468, 3, 2, 2, 2, 470, 471, 3, 2, 2, 2, 471, 473, 3, 2, 2, 2, 472, 466, 3, 2, 2, 2, 472, 473, 3, 2, 2, 2, 473, 475, 3, 2, 2, 2, 474, 476, 5, 103, 52, 2, 475, 474, 3, 2, 2, 2, 475, 476, 3, 2, 2, 2, 476, 100, 3, 2, 2, 2, 477, 486, 7, 50, 2, 2, 478, 482, 9, 7, 2, 2, 479, 481, 9, 6, 2, 2, 480, 479, 3, 2, 2, 2, 481, 484, 3, 2, 2, 2, 482, 480, 3, 2, 2, 2, 482, 483, 3, 2, 2, 2, 483, 486, 3, 2, 2, 2, 484, 482, 3, 2, 2, 2, 485, 477, 3, 2, 2, 2, 485, 478, 3, 2, 2, 2, 486, 102, 3, 2, 2, 2, 487, 489, 9, 8, 2, 2, 488, 490, 9, 9, 2, 2, 489, 488, 3, 2, 2, 2, 489, 490, 3, 2, 2, 2, 490, 491, 3, 2, 2, 2, 491, 492, 5, 101, 51, 2, 492, 104, 3, 2, 2, 2, 493, 495, 9, 10, 2, 2, 494, 493, 3, 2, 2, 2, 495, 496, 3, 2, 2, 2, 496, 494, 3, 2, 2, 2, 496, 497, 3, 2, 2, 2, 497, 498, 3, 2, 2, 2, 498, 499, 8, 53, 2, 2, 499, 106, 3, 2, 2, 2, 16, 2, 419, 421, 429, 440, 450, 463, 470, 472, 475, 482, 485, 489, 496, 3, 8, 2, 2] -------------------------------------------------------------------------------- /json-dsl/src/main/java/parse/MingBdJSONLexer.java: -------------------------------------------------------------------------------- 1 | // Generated from D:/MyWorkSpace/zrDSL-flink/json-dsl/src/main/resources\MingBdJSON.g4 by ANTLR 4.8 2 | package parse; 3 | import org.antlr.v4.runtime.Lexer; 4 | import org.antlr.v4.runtime.CharStream; 5 | import org.antlr.v4.runtime.Token; 6 | import org.antlr.v4.runtime.TokenStream; 7 | import org.antlr.v4.runtime.*; 8 | import org.antlr.v4.runtime.atn.*; 9 | import org.antlr.v4.runtime.dfa.DFA; 10 | import org.antlr.v4.runtime.misc.*; 11 | 12 | @SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) 13 | public class MingBdJSONLexer extends Lexer { 14 | static { RuntimeMetaData.checkVersion("4.8", RuntimeMetaData.VERSION); } 15 | 16 | protected static final DFA[] _decisionToDFA; 17 | protected static final PredictionContextCache _sharedContextCache = 18 | new PredictionContextCache(); 19 | public static final int 20 | T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, T__5=6, T__6=7, T__7=8, T__8=9, 21 | T__9=10, T__10=11, T__11=12, T__12=13, T__13=14, T__14=15, T__15=16, T__16=17, 22 | T__17=18, T__18=19, T__19=20, T__20=21, T__21=22, T__22=23, T__23=24, 23 | T__24=25, T__25=26, T__26=27, T__27=28, T__28=29, T__29=30, T__30=31, 24 | T__31=32, T__32=33, T__33=34, T__34=35, T__35=36, T__36=37, T__37=38, 25 | T__38=39, T__39=40, T__40=41, STRING=42, FUNCNAME=43, BLOCK_STRING=44, 26 | NUMBER=45, WS=46; 27 | public static String[] channelNames = { 28 | "DEFAULT_TOKEN_CHANNEL", "HIDDEN" 29 | }; 30 | 31 | public static String[] modeNames = { 32 | "DEFAULT_MODE" 33 | }; 34 | 35 | private static String[] makeRuleNames() { 36 | return new String[] { 37 | "T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6", "T__7", "T__8", 38 | "T__9", "T__10", "T__11", "T__12", "T__13", "T__14", "T__15", "T__16", 39 | "T__17", "T__18", "T__19", "T__20", "T__21", "T__22", "T__23", "T__24", 40 | "T__25", "T__26", "T__27", "T__28", "T__29", "T__30", "T__31", "T__32", 41 | "T__33", "T__34", "T__35", "T__36", "T__37", "T__38", "T__39", "T__40", 42 | "STRING", "FUNCNAME", "BLOCK_STRING", "ESC", "UNICODE", "HEX", "SAFECODEPOINT", 43 | "NUMBER", "INT", "EXP", "WS" 44 | }; 45 | } 46 | public static final String[] ruleNames = makeRuleNames(); 47 | 48 | private static String[] makeLiteralNames() { 49 | return new String[] { 50 | null, "'{'", "','", "'}'", "'\"runMode\"'", "':'", "'\"stream\"'", "'\"batch\"'", 51 | "'\"load\"'", "'['", "']'", "'\"join\"'", "'\"transform\"'", "'\"zkQuorum\"'", 52 | "'\"table\"'", "'\"info\"'", "'\"schema\"'", "'\"tableName\"'", "'\"driver\"'", 53 | "'\"url\"'", "'\"user\"'", "'\"pass\"'", "'\"query\"'", "'\"from\"'", 54 | "'\"to\"'", "'\"distinct\"'", "'true'", "'false'", "'\"group\"'", "'\"condition\"'", 55 | "'\"cols\"'", "'\"save\"'", "'\"zk\"'", "'\"btServers\"'", "'\"topic\"'", 56 | "'\"types\"'", "'\"inputT\"'", "'\"conditionT\"'", "'\"outputT\"'", "'\"groupId\"'", 57 | "'\"nameI\"'", "'\"aliasI\"'" 58 | }; 59 | } 60 | private static final String[] _LITERAL_NAMES = makeLiteralNames(); 61 | private static String[] makeSymbolicNames() { 62 | return new String[] { 63 | null, null, null, null, null, null, null, null, null, null, null, null, 64 | null, null, null, null, null, null, null, null, null, null, null, null, 65 | null, null, null, null, null, null, null, null, null, null, null, null, 66 | null, null, null, null, null, null, "STRING", "FUNCNAME", "BLOCK_STRING", 67 | "NUMBER", "WS" 68 | }; 69 | } 70 | private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames(); 71 | public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); 72 | 73 | /** 74 | * @deprecated Use {@link #VOCABULARY} instead. 75 | */ 76 | @Deprecated 77 | public static final String[] tokenNames; 78 | static { 79 | tokenNames = new String[_SYMBOLIC_NAMES.length]; 80 | for (int i = 0; i < tokenNames.length; i++) { 81 | tokenNames[i] = VOCABULARY.getLiteralName(i); 82 | if (tokenNames[i] == null) { 83 | tokenNames[i] = VOCABULARY.getSymbolicName(i); 84 | } 85 | 86 | if (tokenNames[i] == null) { 87 | tokenNames[i] = ""; 88 | } 89 | } 90 | } 91 | 92 | @Override 93 | @Deprecated 94 | public String[] getTokenNames() { 95 | return tokenNames; 96 | } 97 | 98 | @Override 99 | 100 | public Vocabulary getVocabulary() { 101 | return VOCABULARY; 102 | } 103 | 104 | 105 | public MingBdJSONLexer(CharStream input) { 106 | super(input); 107 | _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); 108 | } 109 | 110 | @Override 111 | public String getGrammarFileName() { return "MingBdJSON.g4"; } 112 | 113 | @Override 114 | public String[] getRuleNames() { return ruleNames; } 115 | 116 | @Override 117 | public String getSerializedATN() { return _serializedATN; } 118 | 119 | @Override 120 | public String[] getChannelNames() { return channelNames; } 121 | 122 | @Override 123 | public String[] getModeNames() { return modeNames; } 124 | 125 | @Override 126 | public ATN getATN() { return _ATN; } 127 | 128 | public static final String _serializedATN = 129 | "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2\60\u01f4\b\1\4\2"+ 130 | "\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4"+ 131 | "\13\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22"+ 132 | "\t\22\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31"+ 133 | "\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t"+ 134 | " \4!\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t"+ 135 | "+\4,\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64"+ 136 | "\t\64\4\65\t\65\3\2\3\2\3\3\3\3\3\4\3\4\3\5\3\5\3\5\3\5\3\5\3\5\3\5\3"+ 137 | "\5\3\5\3\5\3\6\3\6\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\b\3\b\3\b\3\b"+ 138 | "\3\b\3\b\3\b\3\b\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\n\3\n\3\13\3\13\3\f\3\f"+ 139 | "\3\f\3\f\3\f\3\f\3\f\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3\r\3"+ 140 | "\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\17\3\17\3\17\3"+ 141 | "\17\3\17\3\17\3\17\3\17\3\20\3\20\3\20\3\20\3\20\3\20\3\20\3\21\3\21\3"+ 142 | "\21\3\21\3\21\3\21\3\21\3\21\3\21\3\22\3\22\3\22\3\22\3\22\3\22\3\22\3"+ 143 | "\22\3\22\3\22\3\22\3\22\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3"+ 144 | "\24\3\24\3\24\3\24\3\24\3\24\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\26\3"+ 145 | "\26\3\26\3\26\3\26\3\26\3\26\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3"+ 146 | "\30\3\30\3\30\3\30\3\30\3\30\3\30\3\31\3\31\3\31\3\31\3\31\3\32\3\32\3"+ 147 | "\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\33\3\33\3\33\3\33\3\33\3"+ 148 | "\34\3\34\3\34\3\34\3\34\3\34\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3"+ 149 | "\36\3\36\3\36\3\36\3\36\3\36\3\36\3\36\3\36\3\36\3\36\3\36\3\37\3\37\3"+ 150 | "\37\3\37\3\37\3\37\3\37\3 \3 \3 \3 \3 \3 \3 \3!\3!\3!\3!\3!\3\"\3\"\3"+ 151 | "\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3\"\3#\3#\3#\3#\3#\3#\3#\3#\3$\3$\3"+ 152 | "$\3$\3$\3$\3$\3$\3%\3%\3%\3%\3%\3%\3%\3%\3%\3&\3&\3&\3&\3&\3&\3&\3&\3"+ 153 | "&\3&\3&\3&\3&\3\'\3\'\3\'\3\'\3\'\3\'\3\'\3\'\3\'\3\'\3(\3(\3(\3(\3(\3"+ 154 | "(\3(\3(\3(\3(\3)\3)\3)\3)\3)\3)\3)\3)\3*\3*\3*\3*\3*\3*\3*\3*\3*\3+\3"+ 155 | "+\3+\7+\u01a4\n+\f+\16+\u01a7\13+\3+\3+\3,\7,\u01ac\n,\f,\16,\u01af\13"+ 156 | ",\3-\3-\3-\3-\3-\3-\7-\u01b7\n-\f-\16-\u01ba\13-\3-\3-\3-\3-\3.\3.\3."+ 157 | "\5.\u01c3\n.\3/\3/\3/\3/\3/\3/\3\60\3\60\3\61\3\61\3\62\5\62\u01d0\n\62"+ 158 | "\3\62\3\62\3\62\6\62\u01d5\n\62\r\62\16\62\u01d6\5\62\u01d9\n\62\3\62"+ 159 | "\5\62\u01dc\n\62\3\63\3\63\3\63\7\63\u01e1\n\63\f\63\16\63\u01e4\13\63"+ 160 | "\5\63\u01e6\n\63\3\64\3\64\5\64\u01ea\n\64\3\64\3\64\3\65\6\65\u01ef\n"+ 161 | "\65\r\65\16\65\u01f0\3\65\3\65\3\u01b8\2\66\3\3\5\4\7\5\t\6\13\7\r\b\17"+ 162 | "\t\21\n\23\13\25\f\27\r\31\16\33\17\35\20\37\21!\22#\23%\24\'\25)\26+"+ 163 | "\27-\30/\31\61\32\63\33\65\34\67\359\36;\37= ?!A\"C#E$G%I&K\'M(O)Q*S+"+ 164 | "U,W-Y.[\2]\2_\2a\2c/e\2g\2i\60\3\2\13\5\2\62;CHch\3\2--\n\2$$\61\61^^"+ 165 | "ddhhppttvv\5\2\2!$$^^\3\2\62;\3\2\63;\4\2GGgg\4\2--//\5\2\13\f\17\17\""+ 166 | "\"\2\u01fa\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2"+ 167 | "\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27"+ 168 | "\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2\2\2!\3\2\2"+ 169 | "\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2\2\2\2)\3\2\2\2\2+\3\2\2\2\2-\3\2\2\2"+ 170 | "\2/\3\2\2\2\2\61\3\2\2\2\2\63\3\2\2\2\2\65\3\2\2\2\2\67\3\2\2\2\29\3\2"+ 171 | "\2\2\2;\3\2\2\2\2=\3\2\2\2\2?\3\2\2\2\2A\3\2\2\2\2C\3\2\2\2\2E\3\2\2\2"+ 172 | "\2G\3\2\2\2\2I\3\2\2\2\2K\3\2\2\2\2M\3\2\2\2\2O\3\2\2\2\2Q\3\2\2\2\2S"+ 173 | "\3\2\2\2\2U\3\2\2\2\2W\3\2\2\2\2Y\3\2\2\2\2c\3\2\2\2\2i\3\2\2\2\3k\3\2"+ 174 | "\2\2\5m\3\2\2\2\7o\3\2\2\2\tq\3\2\2\2\13{\3\2\2\2\r}\3\2\2\2\17\u0086"+ 175 | "\3\2\2\2\21\u008e\3\2\2\2\23\u0095\3\2\2\2\25\u0097\3\2\2\2\27\u0099\3"+ 176 | "\2\2\2\31\u00a0\3\2\2\2\33\u00ac\3\2\2\2\35\u00b7\3\2\2\2\37\u00bf\3\2"+ 177 | "\2\2!\u00c6\3\2\2\2#\u00cf\3\2\2\2%\u00db\3\2\2\2\'\u00e4\3\2\2\2)\u00ea"+ 178 | "\3\2\2\2+\u00f1\3\2\2\2-\u00f8\3\2\2\2/\u0100\3\2\2\2\61\u0107\3\2\2\2"+ 179 | "\63\u010c\3\2\2\2\65\u0117\3\2\2\2\67\u011c\3\2\2\29\u0122\3\2\2\2;\u012a"+ 180 | "\3\2\2\2=\u0136\3\2\2\2?\u013d\3\2\2\2A\u0144\3\2\2\2C\u0149\3\2\2\2E"+ 181 | "\u0155\3\2\2\2G\u015d\3\2\2\2I\u0165\3\2\2\2K\u016e\3\2\2\2M\u017b\3\2"+ 182 | "\2\2O\u0185\3\2\2\2Q\u018f\3\2\2\2S\u0197\3\2\2\2U\u01a0\3\2\2\2W\u01ad"+ 183 | "\3\2\2\2Y\u01b0\3\2\2\2[\u01bf\3\2\2\2]\u01c4\3\2\2\2_\u01ca\3\2\2\2a"+ 184 | "\u01cc\3\2\2\2c\u01cf\3\2\2\2e\u01e5\3\2\2\2g\u01e7\3\2\2\2i\u01ee\3\2"+ 185 | "\2\2kl\7}\2\2l\4\3\2\2\2mn\7.\2\2n\6\3\2\2\2op\7\177\2\2p\b\3\2\2\2qr"+ 186 | "\7$\2\2rs\7t\2\2st\7w\2\2tu\7p\2\2uv\7O\2\2vw\7q\2\2wx\7f\2\2xy\7g\2\2"+ 187 | "yz\7$\2\2z\n\3\2\2\2{|\7<\2\2|\f\3\2\2\2}~\7$\2\2~\177\7u\2\2\177\u0080"+ 188 | "\7v\2\2\u0080\u0081\7t\2\2\u0081\u0082\7g\2\2\u0082\u0083\7c\2\2\u0083"+ 189 | "\u0084\7o\2\2\u0084\u0085\7$\2\2\u0085\16\3\2\2\2\u0086\u0087\7$\2\2\u0087"+ 190 | "\u0088\7d\2\2\u0088\u0089\7c\2\2\u0089\u008a\7v\2\2\u008a\u008b\7e\2\2"+ 191 | "\u008b\u008c\7j\2\2\u008c\u008d\7$\2\2\u008d\20\3\2\2\2\u008e\u008f\7"+ 192 | "$\2\2\u008f\u0090\7n\2\2\u0090\u0091\7q\2\2\u0091\u0092\7c\2\2\u0092\u0093"+ 193 | "\7f\2\2\u0093\u0094\7$\2\2\u0094\22\3\2\2\2\u0095\u0096\7]\2\2\u0096\24"+ 194 | "\3\2\2\2\u0097\u0098\7_\2\2\u0098\26\3\2\2\2\u0099\u009a\7$\2\2\u009a"+ 195 | "\u009b\7l\2\2\u009b\u009c\7q\2\2\u009c\u009d\7k\2\2\u009d\u009e\7p\2\2"+ 196 | "\u009e\u009f\7$\2\2\u009f\30\3\2\2\2\u00a0\u00a1\7$\2\2\u00a1\u00a2\7"+ 197 | "v\2\2\u00a2\u00a3\7t\2\2\u00a3\u00a4\7c\2\2\u00a4\u00a5\7p\2\2\u00a5\u00a6"+ 198 | "\7u\2\2\u00a6\u00a7\7h\2\2\u00a7\u00a8\7q\2\2\u00a8\u00a9\7t\2\2\u00a9"+ 199 | "\u00aa\7o\2\2\u00aa\u00ab\7$\2\2\u00ab\32\3\2\2\2\u00ac\u00ad\7$\2\2\u00ad"+ 200 | "\u00ae\7|\2\2\u00ae\u00af\7m\2\2\u00af\u00b0\7S\2\2\u00b0\u00b1\7w\2\2"+ 201 | "\u00b1\u00b2\7q\2\2\u00b2\u00b3\7t\2\2\u00b3\u00b4\7w\2\2\u00b4\u00b5"+ 202 | "\7o\2\2\u00b5\u00b6\7$\2\2\u00b6\34\3\2\2\2\u00b7\u00b8\7$\2\2\u00b8\u00b9"+ 203 | "\7v\2\2\u00b9\u00ba\7c\2\2\u00ba\u00bb\7d\2\2\u00bb\u00bc\7n\2\2\u00bc"+ 204 | "\u00bd\7g\2\2\u00bd\u00be\7$\2\2\u00be\36\3\2\2\2\u00bf\u00c0\7$\2\2\u00c0"+ 205 | "\u00c1\7k\2\2\u00c1\u00c2\7p\2\2\u00c2\u00c3\7h\2\2\u00c3\u00c4\7q\2\2"+ 206 | "\u00c4\u00c5\7$\2\2\u00c5 \3\2\2\2\u00c6\u00c7\7$\2\2\u00c7\u00c8\7u\2"+ 207 | "\2\u00c8\u00c9\7e\2\2\u00c9\u00ca\7j\2\2\u00ca\u00cb\7g\2\2\u00cb\u00cc"+ 208 | "\7o\2\2\u00cc\u00cd\7c\2\2\u00cd\u00ce\7$\2\2\u00ce\"\3\2\2\2\u00cf\u00d0"+ 209 | "\7$\2\2\u00d0\u00d1\7v\2\2\u00d1\u00d2\7c\2\2\u00d2\u00d3\7d\2\2\u00d3"+ 210 | "\u00d4\7n\2\2\u00d4\u00d5\7g\2\2\u00d5\u00d6\7P\2\2\u00d6\u00d7\7c\2\2"+ 211 | "\u00d7\u00d8\7o\2\2\u00d8\u00d9\7g\2\2\u00d9\u00da\7$\2\2\u00da$\3\2\2"+ 212 | "\2\u00db\u00dc\7$\2\2\u00dc\u00dd\7f\2\2\u00dd\u00de\7t\2\2\u00de\u00df"+ 213 | "\7k\2\2\u00df\u00e0\7x\2\2\u00e0\u00e1\7g\2\2\u00e1\u00e2\7t\2\2\u00e2"+ 214 | "\u00e3\7$\2\2\u00e3&\3\2\2\2\u00e4\u00e5\7$\2\2\u00e5\u00e6\7w\2\2\u00e6"+ 215 | "\u00e7\7t\2\2\u00e7\u00e8\7n\2\2\u00e8\u00e9\7$\2\2\u00e9(\3\2\2\2\u00ea"+ 216 | "\u00eb\7$\2\2\u00eb\u00ec\7w\2\2\u00ec\u00ed\7u\2\2\u00ed\u00ee\7g\2\2"+ 217 | "\u00ee\u00ef\7t\2\2\u00ef\u00f0\7$\2\2\u00f0*\3\2\2\2\u00f1\u00f2\7$\2"+ 218 | "\2\u00f2\u00f3\7r\2\2\u00f3\u00f4\7c\2\2\u00f4\u00f5\7u\2\2\u00f5\u00f6"+ 219 | "\7u\2\2\u00f6\u00f7\7$\2\2\u00f7,\3\2\2\2\u00f8\u00f9\7$\2\2\u00f9\u00fa"+ 220 | "\7s\2\2\u00fa\u00fb\7w\2\2\u00fb\u00fc\7g\2\2\u00fc\u00fd\7t\2\2\u00fd"+ 221 | "\u00fe\7{\2\2\u00fe\u00ff\7$\2\2\u00ff.\3\2\2\2\u0100\u0101\7$\2\2\u0101"+ 222 | "\u0102\7h\2\2\u0102\u0103\7t\2\2\u0103\u0104\7q\2\2\u0104\u0105\7o\2\2"+ 223 | "\u0105\u0106\7$\2\2\u0106\60\3\2\2\2\u0107\u0108\7$\2\2\u0108\u0109\7"+ 224 | "v\2\2\u0109\u010a\7q\2\2\u010a\u010b\7$\2\2\u010b\62\3\2\2\2\u010c\u010d"+ 225 | "\7$\2\2\u010d\u010e\7f\2\2\u010e\u010f\7k\2\2\u010f\u0110\7u\2\2\u0110"+ 226 | "\u0111\7v\2\2\u0111\u0112\7k\2\2\u0112\u0113\7p\2\2\u0113\u0114\7e\2\2"+ 227 | "\u0114\u0115\7v\2\2\u0115\u0116\7$\2\2\u0116\64\3\2\2\2\u0117\u0118\7"+ 228 | "v\2\2\u0118\u0119\7t\2\2\u0119\u011a\7w\2\2\u011a\u011b\7g\2\2\u011b\66"+ 229 | "\3\2\2\2\u011c\u011d\7h\2\2\u011d\u011e\7c\2\2\u011e\u011f\7n\2\2\u011f"+ 230 | "\u0120\7u\2\2\u0120\u0121\7g\2\2\u01218\3\2\2\2\u0122\u0123\7$\2\2\u0123"+ 231 | "\u0124\7i\2\2\u0124\u0125\7t\2\2\u0125\u0126\7q\2\2\u0126\u0127\7w\2\2"+ 232 | "\u0127\u0128\7r\2\2\u0128\u0129\7$\2\2\u0129:\3\2\2\2\u012a\u012b\7$\2"+ 233 | "\2\u012b\u012c\7e\2\2\u012c\u012d\7q\2\2\u012d\u012e\7p\2\2\u012e\u012f"+ 234 | "\7f\2\2\u012f\u0130\7k\2\2\u0130\u0131\7v\2\2\u0131\u0132\7k\2\2\u0132"+ 235 | "\u0133\7q\2\2\u0133\u0134\7p\2\2\u0134\u0135\7$\2\2\u0135<\3\2\2\2\u0136"+ 236 | "\u0137\7$\2\2\u0137\u0138\7e\2\2\u0138\u0139\7q\2\2\u0139\u013a\7n\2\2"+ 237 | "\u013a\u013b\7u\2\2\u013b\u013c\7$\2\2\u013c>\3\2\2\2\u013d\u013e\7$\2"+ 238 | "\2\u013e\u013f\7u\2\2\u013f\u0140\7c\2\2\u0140\u0141\7x\2\2\u0141\u0142"+ 239 | "\7g\2\2\u0142\u0143\7$\2\2\u0143@\3\2\2\2\u0144\u0145\7$\2\2\u0145\u0146"+ 240 | "\7|\2\2\u0146\u0147\7m\2\2\u0147\u0148\7$\2\2\u0148B\3\2\2\2\u0149\u014a"+ 241 | "\7$\2\2\u014a\u014b\7d\2\2\u014b\u014c\7v\2\2\u014c\u014d\7U\2\2\u014d"+ 242 | "\u014e\7g\2\2\u014e\u014f\7t\2\2\u014f\u0150\7x\2\2\u0150\u0151\7g\2\2"+ 243 | "\u0151\u0152\7t\2\2\u0152\u0153\7u\2\2\u0153\u0154\7$\2\2\u0154D\3\2\2"+ 244 | "\2\u0155\u0156\7$\2\2\u0156\u0157\7v\2\2\u0157\u0158\7q\2\2\u0158\u0159"+ 245 | "\7r\2\2\u0159\u015a\7k\2\2\u015a\u015b\7e\2\2\u015b\u015c\7$\2\2\u015c"+ 246 | "F\3\2\2\2\u015d\u015e\7$\2\2\u015e\u015f\7v\2\2\u015f\u0160\7{\2\2\u0160"+ 247 | "\u0161\7r\2\2\u0161\u0162\7g\2\2\u0162\u0163\7u\2\2\u0163\u0164\7$\2\2"+ 248 | "\u0164H\3\2\2\2\u0165\u0166\7$\2\2\u0166\u0167\7k\2\2\u0167\u0168\7p\2"+ 249 | "\2\u0168\u0169\7r\2\2\u0169\u016a\7w\2\2\u016a\u016b\7v\2\2\u016b\u016c"+ 250 | "\7V\2\2\u016c\u016d\7$\2\2\u016dJ\3\2\2\2\u016e\u016f\7$\2\2\u016f\u0170"+ 251 | "\7e\2\2\u0170\u0171\7q\2\2\u0171\u0172\7p\2\2\u0172\u0173\7f\2\2\u0173"+ 252 | "\u0174\7k\2\2\u0174\u0175\7v\2\2\u0175\u0176\7k\2\2\u0176\u0177\7q\2\2"+ 253 | "\u0177\u0178\7p\2\2\u0178\u0179\7V\2\2\u0179\u017a\7$\2\2\u017aL\3\2\2"+ 254 | "\2\u017b\u017c\7$\2\2\u017c\u017d\7q\2\2\u017d\u017e\7w\2\2\u017e\u017f"+ 255 | "\7v\2\2\u017f\u0180\7r\2\2\u0180\u0181\7w\2\2\u0181\u0182\7v\2\2\u0182"+ 256 | "\u0183\7V\2\2\u0183\u0184\7$\2\2\u0184N\3\2\2\2\u0185\u0186\7$\2\2\u0186"+ 257 | "\u0187\7i\2\2\u0187\u0188\7t\2\2\u0188\u0189\7q\2\2\u0189\u018a\7w\2\2"+ 258 | "\u018a\u018b\7r\2\2\u018b\u018c\7K\2\2\u018c\u018d\7f\2\2\u018d\u018e"+ 259 | "\7$\2\2\u018eP\3\2\2\2\u018f\u0190\7$\2\2\u0190\u0191\7p\2\2\u0191\u0192"+ 260 | "\7c\2\2\u0192\u0193\7o\2\2\u0193\u0194\7g\2\2\u0194\u0195\7K\2\2\u0195"+ 261 | "\u0196\7$\2\2\u0196R\3\2\2\2\u0197\u0198\7$\2\2\u0198\u0199\7c\2\2\u0199"+ 262 | "\u019a\7n\2\2\u019a\u019b\7k\2\2\u019b\u019c\7c\2\2\u019c\u019d\7u\2\2"+ 263 | "\u019d\u019e\7K\2\2\u019e\u019f\7$\2\2\u019fT\3\2\2\2\u01a0\u01a5\7$\2"+ 264 | "\2\u01a1\u01a4\5[.\2\u01a2\u01a4\5a\61\2\u01a3\u01a1\3\2\2\2\u01a3\u01a2"+ 265 | "\3\2\2\2\u01a4\u01a7\3\2\2\2\u01a5\u01a3\3\2\2\2\u01a5\u01a6\3\2\2\2\u01a6"+ 266 | "\u01a8\3\2\2\2\u01a7\u01a5\3\2\2\2\u01a8\u01a9\7$\2\2\u01a9V\3\2\2\2\u01aa"+ 267 | "\u01ac\t\2\2\2\u01ab\u01aa\3\2\2\2\u01ac\u01af\3\2\2\2\u01ad\u01ab\3\2"+ 268 | "\2\2\u01ad\u01ae\3\2\2\2\u01aeX\3\2\2\2\u01af\u01ad\3\2\2\2\u01b0\u01b1"+ 269 | "\7)\2\2\u01b1\u01b2\7)\2\2\u01b2\u01b3\7)\2\2\u01b3\u01b4\3\2\2\2\u01b4"+ 270 | "\u01b8\n\3\2\2\u01b5\u01b7\13\2\2\2\u01b6\u01b5\3\2\2\2\u01b7\u01ba\3"+ 271 | "\2\2\2\u01b8\u01b9\3\2\2\2\u01b8\u01b6\3\2\2\2\u01b9\u01bb\3\2\2\2\u01ba"+ 272 | "\u01b8\3\2\2\2\u01bb\u01bc\7)\2\2\u01bc\u01bd\7)\2\2\u01bd\u01be\7)\2"+ 273 | "\2\u01beZ\3\2\2\2\u01bf\u01c2\7^\2\2\u01c0\u01c3\t\4\2\2\u01c1\u01c3\5"+ 274 | "]/\2\u01c2\u01c0\3\2\2\2\u01c2\u01c1\3\2\2\2\u01c3\\\3\2\2\2\u01c4\u01c5"+ 275 | "\7w\2\2\u01c5\u01c6\5_\60\2\u01c6\u01c7\5_\60\2\u01c7\u01c8\5_\60\2\u01c8"+ 276 | "\u01c9\5_\60\2\u01c9^\3\2\2\2\u01ca\u01cb\t\2\2\2\u01cb`\3\2\2\2\u01cc"+ 277 | "\u01cd\n\5\2\2\u01cdb\3\2\2\2\u01ce\u01d0\7/\2\2\u01cf\u01ce\3\2\2\2\u01cf"+ 278 | "\u01d0\3\2\2\2\u01d0\u01d1\3\2\2\2\u01d1\u01d8\5e\63\2\u01d2\u01d4\7\60"+ 279 | "\2\2\u01d3\u01d5\t\6\2\2\u01d4\u01d3\3\2\2\2\u01d5\u01d6\3\2\2\2\u01d6"+ 280 | "\u01d4\3\2\2\2\u01d6\u01d7\3\2\2\2\u01d7\u01d9\3\2\2\2\u01d8\u01d2\3\2"+ 281 | "\2\2\u01d8\u01d9\3\2\2\2\u01d9\u01db\3\2\2\2\u01da\u01dc\5g\64\2\u01db"+ 282 | "\u01da\3\2\2\2\u01db\u01dc\3\2\2\2\u01dcd\3\2\2\2\u01dd\u01e6\7\62\2\2"+ 283 | "\u01de\u01e2\t\7\2\2\u01df\u01e1\t\6\2\2\u01e0\u01df\3\2\2\2\u01e1\u01e4"+ 284 | "\3\2\2\2\u01e2\u01e0\3\2\2\2\u01e2\u01e3\3\2\2\2\u01e3\u01e6\3\2\2\2\u01e4"+ 285 | "\u01e2\3\2\2\2\u01e5\u01dd\3\2\2\2\u01e5\u01de\3\2\2\2\u01e6f\3\2\2\2"+ 286 | "\u01e7\u01e9\t\b\2\2\u01e8\u01ea\t\t\2\2\u01e9\u01e8\3\2\2\2\u01e9\u01ea"+ 287 | "\3\2\2\2\u01ea\u01eb\3\2\2\2\u01eb\u01ec\5e\63\2\u01ech\3\2\2\2\u01ed"+ 288 | "\u01ef\t\n\2\2\u01ee\u01ed\3\2\2\2\u01ef\u01f0\3\2\2\2\u01f0\u01ee\3\2"+ 289 | "\2\2\u01f0\u01f1\3\2\2\2\u01f1\u01f2\3\2\2\2\u01f2\u01f3\b\65\2\2\u01f3"+ 290 | "j\3\2\2\2\20\2\u01a3\u01a5\u01ad\u01b8\u01c2\u01cf\u01d6\u01d8\u01db\u01e2"+ 291 | "\u01e5\u01e9\u01f0\3\b\2\2"; 292 | public static final ATN _ATN = 293 | new ATNDeserializer().deserialize(_serializedATN.toCharArray()); 294 | static { 295 | _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; 296 | for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { 297 | _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); 298 | } 299 | } 300 | } -------------------------------------------------------------------------------- /json-dsl/src/main/java/parse/MingBdJSONParser.java: -------------------------------------------------------------------------------- 1 | // Generated from D:/MyWorkSpace/zrDSL-flink/json-dsl/src/main/resources\MingBdJSON.g4 by ANTLR 4.8 2 | package parse; 3 | import org.antlr.v4.runtime.atn.*; 4 | import org.antlr.v4.runtime.dfa.DFA; 5 | import org.antlr.v4.runtime.*; 6 | import org.antlr.v4.runtime.misc.*; 7 | import org.antlr.v4.runtime.tree.*; 8 | import java.util.List; 9 | import java.util.Iterator; 10 | import java.util.ArrayList; 11 | 12 | @SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) 13 | public class MingBdJSONParser extends Parser { 14 | static { RuntimeMetaData.checkVersion("4.8", RuntimeMetaData.VERSION); } 15 | 16 | protected static final DFA[] _decisionToDFA; 17 | protected static final PredictionContextCache _sharedContextCache = 18 | new PredictionContextCache(); 19 | public static final int 20 | T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, T__5=6, T__6=7, T__7=8, T__8=9, 21 | T__9=10, T__10=11, T__11=12, T__12=13, T__13=14, T__14=15, T__15=16, T__16=17, 22 | T__17=18, T__18=19, T__19=20, T__20=21, T__21=22, T__22=23, T__23=24, 23 | T__24=25, T__25=26, T__26=27, T__27=28, T__28=29, T__29=30, T__30=31, 24 | T__31=32, T__32=33, T__33=34, T__34=35, T__35=36, T__36=37, T__37=38, 25 | T__38=39, T__39=40, T__40=41, STRING=42, FUNCNAME=43, BLOCK_STRING=44, 26 | NUMBER=45, WS=46; 27 | public static final int 28 | RULE_json = 0, RULE_value = 1, RULE_pair = 2, RULE_runtype = 3, RULE_load = 4, 29 | RULE_join = 5, RULE_trans = 6, RULE_dataSource = 7, RULE_hbaseSource = 8, 30 | RULE_mysqlSource = 9, RULE_mysqlInfo = 10, RULE_mysqlSchema = 11, RULE_transinfo = 12, 31 | RULE_select = 13, RULE_groupBy = 14, RULE_filter = 15, RULE_cols = 16, 32 | RULE_col = 17, RULE_save = 18, RULE_saveInfo = 19, RULE_kafkaSave = 20, 33 | RULE_mysqlSave = 21, RULE_joinpair = 22, RULE_kafkaSource = 23, RULE_field = 24; 34 | private static String[] makeRuleNames() { 35 | return new String[] { 36 | "json", "value", "pair", "runtype", "load", "join", "trans", "dataSource", 37 | "hbaseSource", "mysqlSource", "mysqlInfo", "mysqlSchema", "transinfo", 38 | "select", "groupBy", "filter", "cols", "col", "save", "saveInfo", "kafkaSave", 39 | "mysqlSave", "joinpair", "kafkaSource", "field" 40 | }; 41 | } 42 | public static final String[] ruleNames = makeRuleNames(); 43 | 44 | private static String[] makeLiteralNames() { 45 | return new String[] { 46 | null, "'{'", "','", "'}'", "'\"runMode\"'", "':'", "'\"stream\"'", "'\"batch\"'", 47 | "'\"load\"'", "'['", "']'", "'\"join\"'", "'\"transform\"'", "'\"zkQuorum\"'", 48 | "'\"table\"'", "'\"info\"'", "'\"schema\"'", "'\"tableName\"'", "'\"driver\"'", 49 | "'\"url\"'", "'\"user\"'", "'\"pass\"'", "'\"query\"'", "'\"from\"'", 50 | "'\"to\"'", "'\"distinct\"'", "'true'", "'false'", "'\"group\"'", "'\"condition\"'", 51 | "'\"cols\"'", "'\"save\"'", "'\"zk\"'", "'\"btServers\"'", "'\"topic\"'", 52 | "'\"types\"'", "'\"inputT\"'", "'\"conditionT\"'", "'\"outputT\"'", "'\"groupId\"'", 53 | "'\"nameI\"'", "'\"aliasI\"'" 54 | }; 55 | } 56 | private static final String[] _LITERAL_NAMES = makeLiteralNames(); 57 | private static String[] makeSymbolicNames() { 58 | return new String[] { 59 | null, null, null, null, null, null, null, null, null, null, null, null, 60 | null, null, null, null, null, null, null, null, null, null, null, null, 61 | null, null, null, null, null, null, null, null, null, null, null, null, 62 | null, null, null, null, null, null, "STRING", "FUNCNAME", "BLOCK_STRING", 63 | "NUMBER", "WS" 64 | }; 65 | } 66 | private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames(); 67 | public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); 68 | 69 | /** 70 | * @deprecated Use {@link #VOCABULARY} instead. 71 | */ 72 | @Deprecated 73 | public static final String[] tokenNames; 74 | static { 75 | tokenNames = new String[_SYMBOLIC_NAMES.length]; 76 | for (int i = 0; i < tokenNames.length; i++) { 77 | tokenNames[i] = VOCABULARY.getLiteralName(i); 78 | if (tokenNames[i] == null) { 79 | tokenNames[i] = VOCABULARY.getSymbolicName(i); 80 | } 81 | 82 | if (tokenNames[i] == null) { 83 | tokenNames[i] = ""; 84 | } 85 | } 86 | } 87 | 88 | @Override 89 | @Deprecated 90 | public String[] getTokenNames() { 91 | return tokenNames; 92 | } 93 | 94 | @Override 95 | 96 | public Vocabulary getVocabulary() { 97 | return VOCABULARY; 98 | } 99 | 100 | @Override 101 | public String getGrammarFileName() { return "MingBdJSON.g4"; } 102 | 103 | @Override 104 | public String[] getRuleNames() { return ruleNames; } 105 | 106 | @Override 107 | public String getSerializedATN() { return _serializedATN; } 108 | 109 | @Override 110 | public ATN getATN() { return _ATN; } 111 | 112 | public MingBdJSONParser(TokenStream input) { 113 | super(input); 114 | _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); 115 | } 116 | 117 | public static class JsonContext extends ParserRuleContext { 118 | public ValueContext value() { 119 | return getRuleContext(ValueContext.class,0); 120 | } 121 | public JsonContext(ParserRuleContext parent, int invokingState) { 122 | super(parent, invokingState); 123 | } 124 | @Override public int getRuleIndex() { return RULE_json; } 125 | @Override 126 | public void enterRule(ParseTreeListener listener) { 127 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).enterJson(this); 128 | } 129 | @Override 130 | public void exitRule(ParseTreeListener listener) { 131 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).exitJson(this); 132 | } 133 | @Override 134 | public T accept(ParseTreeVisitor visitor) { 135 | if ( visitor instanceof MingBdJSONVisitor ) return ((MingBdJSONVisitor)visitor).visitJson(this); 136 | else return visitor.visitChildren(this); 137 | } 138 | } 139 | 140 | public final JsonContext json() throws RecognitionException { 141 | JsonContext _localctx = new JsonContext(_ctx, getState()); 142 | enterRule(_localctx, 0, RULE_json); 143 | try { 144 | enterOuterAlt(_localctx, 1); 145 | { 146 | setState(50); 147 | value(); 148 | } 149 | } 150 | catch (RecognitionException re) { 151 | _localctx.exception = re; 152 | _errHandler.reportError(this, re); 153 | _errHandler.recover(this, re); 154 | } 155 | finally { 156 | exitRule(); 157 | } 158 | return _localctx; 159 | } 160 | 161 | public static class ValueContext extends ParserRuleContext { 162 | public List pair() { 163 | return getRuleContexts(PairContext.class); 164 | } 165 | public PairContext pair(int i) { 166 | return getRuleContext(PairContext.class,i); 167 | } 168 | public ValueContext(ParserRuleContext parent, int invokingState) { 169 | super(parent, invokingState); 170 | } 171 | @Override public int getRuleIndex() { return RULE_value; } 172 | @Override 173 | public void enterRule(ParseTreeListener listener) { 174 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).enterValue(this); 175 | } 176 | @Override 177 | public void exitRule(ParseTreeListener listener) { 178 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).exitValue(this); 179 | } 180 | @Override 181 | public T accept(ParseTreeVisitor visitor) { 182 | if ( visitor instanceof MingBdJSONVisitor ) return ((MingBdJSONVisitor)visitor).visitValue(this); 183 | else return visitor.visitChildren(this); 184 | } 185 | } 186 | 187 | public final ValueContext value() throws RecognitionException { 188 | ValueContext _localctx = new ValueContext(_ctx, getState()); 189 | enterRule(_localctx, 2, RULE_value); 190 | int _la; 191 | try { 192 | enterOuterAlt(_localctx, 1); 193 | { 194 | setState(52); 195 | match(T__0); 196 | setState(53); 197 | pair(); 198 | setState(58); 199 | _errHandler.sync(this); 200 | _la = _input.LA(1); 201 | while (_la==T__1) { 202 | { 203 | { 204 | setState(54); 205 | match(T__1); 206 | setState(55); 207 | pair(); 208 | } 209 | } 210 | setState(60); 211 | _errHandler.sync(this); 212 | _la = _input.LA(1); 213 | } 214 | setState(61); 215 | match(T__2); 216 | } 217 | } 218 | catch (RecognitionException re) { 219 | _localctx.exception = re; 220 | _errHandler.reportError(this, re); 221 | _errHandler.recover(this, re); 222 | } 223 | finally { 224 | exitRule(); 225 | } 226 | return _localctx; 227 | } 228 | 229 | public static class PairContext extends ParserRuleContext { 230 | public RuntypeContext runtype() { 231 | return getRuleContext(RuntypeContext.class,0); 232 | } 233 | public LoadContext load() { 234 | return getRuleContext(LoadContext.class,0); 235 | } 236 | public JoinContext join() { 237 | return getRuleContext(JoinContext.class,0); 238 | } 239 | public TransContext trans() { 240 | return getRuleContext(TransContext.class,0); 241 | } 242 | public SaveContext save() { 243 | return getRuleContext(SaveContext.class,0); 244 | } 245 | public PairContext(ParserRuleContext parent, int invokingState) { 246 | super(parent, invokingState); 247 | } 248 | @Override public int getRuleIndex() { return RULE_pair; } 249 | @Override 250 | public void enterRule(ParseTreeListener listener) { 251 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).enterPair(this); 252 | } 253 | @Override 254 | public void exitRule(ParseTreeListener listener) { 255 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).exitPair(this); 256 | } 257 | @Override 258 | public T accept(ParseTreeVisitor visitor) { 259 | if ( visitor instanceof MingBdJSONVisitor ) return ((MingBdJSONVisitor)visitor).visitPair(this); 260 | else return visitor.visitChildren(this); 261 | } 262 | } 263 | 264 | public final PairContext pair() throws RecognitionException { 265 | PairContext _localctx = new PairContext(_ctx, getState()); 266 | enterRule(_localctx, 4, RULE_pair); 267 | try { 268 | setState(68); 269 | _errHandler.sync(this); 270 | switch (_input.LA(1)) { 271 | case T__3: 272 | enterOuterAlt(_localctx, 1); 273 | { 274 | setState(63); 275 | runtype(); 276 | } 277 | break; 278 | case T__7: 279 | enterOuterAlt(_localctx, 2); 280 | { 281 | setState(64); 282 | load(); 283 | } 284 | break; 285 | case T__10: 286 | enterOuterAlt(_localctx, 3); 287 | { 288 | setState(65); 289 | join(); 290 | } 291 | break; 292 | case T__11: 293 | enterOuterAlt(_localctx, 4); 294 | { 295 | setState(66); 296 | trans(); 297 | } 298 | break; 299 | case T__30: 300 | enterOuterAlt(_localctx, 5); 301 | { 302 | setState(67); 303 | save(); 304 | } 305 | break; 306 | default: 307 | throw new NoViableAltException(this); 308 | } 309 | } 310 | catch (RecognitionException re) { 311 | _localctx.exception = re; 312 | _errHandler.reportError(this, re); 313 | _errHandler.recover(this, re); 314 | } 315 | finally { 316 | exitRule(); 317 | } 318 | return _localctx; 319 | } 320 | 321 | public static class RuntypeContext extends ParserRuleContext { 322 | public RuntypeContext(ParserRuleContext parent, int invokingState) { 323 | super(parent, invokingState); 324 | } 325 | @Override public int getRuleIndex() { return RULE_runtype; } 326 | @Override 327 | public void enterRule(ParseTreeListener listener) { 328 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).enterRuntype(this); 329 | } 330 | @Override 331 | public void exitRule(ParseTreeListener listener) { 332 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).exitRuntype(this); 333 | } 334 | @Override 335 | public T accept(ParseTreeVisitor visitor) { 336 | if ( visitor instanceof MingBdJSONVisitor ) return ((MingBdJSONVisitor)visitor).visitRuntype(this); 337 | else return visitor.visitChildren(this); 338 | } 339 | } 340 | 341 | public final RuntypeContext runtype() throws RecognitionException { 342 | RuntypeContext _localctx = new RuntypeContext(_ctx, getState()); 343 | enterRule(_localctx, 6, RULE_runtype); 344 | int _la; 345 | try { 346 | enterOuterAlt(_localctx, 1); 347 | { 348 | setState(70); 349 | match(T__3); 350 | setState(71); 351 | match(T__4); 352 | setState(72); 353 | _la = _input.LA(1); 354 | if ( !(_la==T__5 || _la==T__6) ) { 355 | _errHandler.recoverInline(this); 356 | } 357 | else { 358 | if ( _input.LA(1)==Token.EOF ) matchedEOF = true; 359 | _errHandler.reportMatch(this); 360 | consume(); 361 | } 362 | } 363 | } 364 | catch (RecognitionException re) { 365 | _localctx.exception = re; 366 | _errHandler.reportError(this, re); 367 | _errHandler.recover(this, re); 368 | } 369 | finally { 370 | exitRule(); 371 | } 372 | return _localctx; 373 | } 374 | 375 | public static class LoadContext extends ParserRuleContext { 376 | public List dataSource() { 377 | return getRuleContexts(DataSourceContext.class); 378 | } 379 | public DataSourceContext dataSource(int i) { 380 | return getRuleContext(DataSourceContext.class,i); 381 | } 382 | public LoadContext(ParserRuleContext parent, int invokingState) { 383 | super(parent, invokingState); 384 | } 385 | @Override public int getRuleIndex() { return RULE_load; } 386 | @Override 387 | public void enterRule(ParseTreeListener listener) { 388 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).enterLoad(this); 389 | } 390 | @Override 391 | public void exitRule(ParseTreeListener listener) { 392 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).exitLoad(this); 393 | } 394 | @Override 395 | public T accept(ParseTreeVisitor visitor) { 396 | if ( visitor instanceof MingBdJSONVisitor ) return ((MingBdJSONVisitor)visitor).visitLoad(this); 397 | else return visitor.visitChildren(this); 398 | } 399 | } 400 | 401 | public final LoadContext load() throws RecognitionException { 402 | LoadContext _localctx = new LoadContext(_ctx, getState()); 403 | enterRule(_localctx, 8, RULE_load); 404 | int _la; 405 | try { 406 | enterOuterAlt(_localctx, 1); 407 | { 408 | setState(74); 409 | match(T__7); 410 | setState(75); 411 | match(T__4); 412 | setState(76); 413 | match(T__8); 414 | setState(77); 415 | dataSource(); 416 | setState(82); 417 | _errHandler.sync(this); 418 | _la = _input.LA(1); 419 | while (_la==T__1) { 420 | { 421 | { 422 | setState(78); 423 | match(T__1); 424 | setState(79); 425 | dataSource(); 426 | } 427 | } 428 | setState(84); 429 | _errHandler.sync(this); 430 | _la = _input.LA(1); 431 | } 432 | setState(85); 433 | match(T__9); 434 | } 435 | } 436 | catch (RecognitionException re) { 437 | _localctx.exception = re; 438 | _errHandler.reportError(this, re); 439 | _errHandler.recover(this, re); 440 | } 441 | finally { 442 | exitRule(); 443 | } 444 | return _localctx; 445 | } 446 | 447 | public static class JoinContext extends ParserRuleContext { 448 | public List joinpair() { 449 | return getRuleContexts(JoinpairContext.class); 450 | } 451 | public JoinpairContext joinpair(int i) { 452 | return getRuleContext(JoinpairContext.class,i); 453 | } 454 | public JoinContext(ParserRuleContext parent, int invokingState) { 455 | super(parent, invokingState); 456 | } 457 | @Override public int getRuleIndex() { return RULE_join; } 458 | @Override 459 | public void enterRule(ParseTreeListener listener) { 460 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).enterJoin(this); 461 | } 462 | @Override 463 | public void exitRule(ParseTreeListener listener) { 464 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).exitJoin(this); 465 | } 466 | @Override 467 | public T accept(ParseTreeVisitor visitor) { 468 | if ( visitor instanceof MingBdJSONVisitor ) return ((MingBdJSONVisitor)visitor).visitJoin(this); 469 | else return visitor.visitChildren(this); 470 | } 471 | } 472 | 473 | public final JoinContext join() throws RecognitionException { 474 | JoinContext _localctx = new JoinContext(_ctx, getState()); 475 | enterRule(_localctx, 10, RULE_join); 476 | int _la; 477 | try { 478 | enterOuterAlt(_localctx, 1); 479 | { 480 | setState(87); 481 | match(T__10); 482 | setState(88); 483 | match(T__4); 484 | setState(89); 485 | match(T__8); 486 | setState(90); 487 | joinpair(); 488 | setState(95); 489 | _errHandler.sync(this); 490 | _la = _input.LA(1); 491 | while (_la==T__1) { 492 | { 493 | { 494 | setState(91); 495 | match(T__1); 496 | setState(92); 497 | joinpair(); 498 | } 499 | } 500 | setState(97); 501 | _errHandler.sync(this); 502 | _la = _input.LA(1); 503 | } 504 | setState(98); 505 | match(T__9); 506 | } 507 | } 508 | catch (RecognitionException re) { 509 | _localctx.exception = re; 510 | _errHandler.reportError(this, re); 511 | _errHandler.recover(this, re); 512 | } 513 | finally { 514 | exitRule(); 515 | } 516 | return _localctx; 517 | } 518 | 519 | public static class TransContext extends ParserRuleContext { 520 | public List transinfo() { 521 | return getRuleContexts(TransinfoContext.class); 522 | } 523 | public TransinfoContext transinfo(int i) { 524 | return getRuleContext(TransinfoContext.class,i); 525 | } 526 | public TransContext(ParserRuleContext parent, int invokingState) { 527 | super(parent, invokingState); 528 | } 529 | @Override public int getRuleIndex() { return RULE_trans; } 530 | @Override 531 | public void enterRule(ParseTreeListener listener) { 532 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).enterTrans(this); 533 | } 534 | @Override 535 | public void exitRule(ParseTreeListener listener) { 536 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).exitTrans(this); 537 | } 538 | @Override 539 | public T accept(ParseTreeVisitor visitor) { 540 | if ( visitor instanceof MingBdJSONVisitor ) return ((MingBdJSONVisitor)visitor).visitTrans(this); 541 | else return visitor.visitChildren(this); 542 | } 543 | } 544 | 545 | public final TransContext trans() throws RecognitionException { 546 | TransContext _localctx = new TransContext(_ctx, getState()); 547 | enterRule(_localctx, 12, RULE_trans); 548 | int _la; 549 | try { 550 | enterOuterAlt(_localctx, 1); 551 | { 552 | setState(100); 553 | match(T__11); 554 | setState(101); 555 | match(T__4); 556 | setState(102); 557 | match(T__8); 558 | setState(103); 559 | transinfo(); 560 | setState(108); 561 | _errHandler.sync(this); 562 | _la = _input.LA(1); 563 | while (_la==T__1) { 564 | { 565 | { 566 | setState(104); 567 | match(T__1); 568 | setState(105); 569 | transinfo(); 570 | } 571 | } 572 | setState(110); 573 | _errHandler.sync(this); 574 | _la = _input.LA(1); 575 | } 576 | setState(111); 577 | match(T__9); 578 | } 579 | } 580 | catch (RecognitionException re) { 581 | _localctx.exception = re; 582 | _errHandler.reportError(this, re); 583 | _errHandler.recover(this, re); 584 | } 585 | finally { 586 | exitRule(); 587 | } 588 | return _localctx; 589 | } 590 | 591 | public static class DataSourceContext extends ParserRuleContext { 592 | public KafkaSourceContext kafkaSource() { 593 | return getRuleContext(KafkaSourceContext.class,0); 594 | } 595 | public HbaseSourceContext hbaseSource() { 596 | return getRuleContext(HbaseSourceContext.class,0); 597 | } 598 | public MysqlSourceContext mysqlSource() { 599 | return getRuleContext(MysqlSourceContext.class,0); 600 | } 601 | public DataSourceContext(ParserRuleContext parent, int invokingState) { 602 | super(parent, invokingState); 603 | } 604 | @Override public int getRuleIndex() { return RULE_dataSource; } 605 | @Override 606 | public void enterRule(ParseTreeListener listener) { 607 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).enterDataSource(this); 608 | } 609 | @Override 610 | public void exitRule(ParseTreeListener listener) { 611 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).exitDataSource(this); 612 | } 613 | @Override 614 | public T accept(ParseTreeVisitor visitor) { 615 | if ( visitor instanceof MingBdJSONVisitor ) return ((MingBdJSONVisitor)visitor).visitDataSource(this); 616 | else return visitor.visitChildren(this); 617 | } 618 | } 619 | 620 | public final DataSourceContext dataSource() throws RecognitionException { 621 | DataSourceContext _localctx = new DataSourceContext(_ctx, getState()); 622 | enterRule(_localctx, 14, RULE_dataSource); 623 | try { 624 | setState(116); 625 | _errHandler.sync(this); 626 | switch ( getInterpreter().adaptivePredict(_input,5,_ctx) ) { 627 | case 1: 628 | enterOuterAlt(_localctx, 1); 629 | { 630 | setState(113); 631 | kafkaSource(); 632 | } 633 | break; 634 | case 2: 635 | enterOuterAlt(_localctx, 2); 636 | { 637 | setState(114); 638 | hbaseSource(); 639 | } 640 | break; 641 | case 3: 642 | enterOuterAlt(_localctx, 3); 643 | { 644 | setState(115); 645 | mysqlSource(); 646 | } 647 | break; 648 | } 649 | } 650 | catch (RecognitionException re) { 651 | _localctx.exception = re; 652 | _errHandler.reportError(this, re); 653 | _errHandler.recover(this, re); 654 | } 655 | finally { 656 | exitRule(); 657 | } 658 | return _localctx; 659 | } 660 | 661 | public static class HbaseSourceContext extends ParserRuleContext { 662 | public List STRING() { return getTokens(MingBdJSONParser.STRING); } 663 | public TerminalNode STRING(int i) { 664 | return getToken(MingBdJSONParser.STRING, i); 665 | } 666 | public HbaseSourceContext(ParserRuleContext parent, int invokingState) { 667 | super(parent, invokingState); 668 | } 669 | @Override public int getRuleIndex() { return RULE_hbaseSource; } 670 | @Override 671 | public void enterRule(ParseTreeListener listener) { 672 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).enterHbaseSource(this); 673 | } 674 | @Override 675 | public void exitRule(ParseTreeListener listener) { 676 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).exitHbaseSource(this); 677 | } 678 | @Override 679 | public T accept(ParseTreeVisitor visitor) { 680 | if ( visitor instanceof MingBdJSONVisitor ) return ((MingBdJSONVisitor)visitor).visitHbaseSource(this); 681 | else return visitor.visitChildren(this); 682 | } 683 | } 684 | 685 | public final HbaseSourceContext hbaseSource() throws RecognitionException { 686 | HbaseSourceContext _localctx = new HbaseSourceContext(_ctx, getState()); 687 | enterRule(_localctx, 16, RULE_hbaseSource); 688 | try { 689 | enterOuterAlt(_localctx, 1); 690 | { 691 | setState(118); 692 | match(T__0); 693 | setState(119); 694 | match(T__12); 695 | setState(120); 696 | match(T__4); 697 | setState(121); 698 | match(STRING); 699 | setState(122); 700 | match(T__1); 701 | setState(123); 702 | match(T__13); 703 | setState(124); 704 | match(T__4); 705 | setState(125); 706 | match(STRING); 707 | setState(126); 708 | match(T__2); 709 | } 710 | } 711 | catch (RecognitionException re) { 712 | _localctx.exception = re; 713 | _errHandler.reportError(this, re); 714 | _errHandler.recover(this, re); 715 | } 716 | finally { 717 | exitRule(); 718 | } 719 | return _localctx; 720 | } 721 | 722 | public static class MysqlSourceContext extends ParserRuleContext { 723 | public MysqlInfoContext mysqlInfo() { 724 | return getRuleContext(MysqlInfoContext.class,0); 725 | } 726 | public MysqlSchemaContext mysqlSchema() { 727 | return getRuleContext(MysqlSchemaContext.class,0); 728 | } 729 | public TerminalNode STRING() { return getToken(MingBdJSONParser.STRING, 0); } 730 | public MysqlSourceContext(ParserRuleContext parent, int invokingState) { 731 | super(parent, invokingState); 732 | } 733 | @Override public int getRuleIndex() { return RULE_mysqlSource; } 734 | @Override 735 | public void enterRule(ParseTreeListener listener) { 736 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).enterMysqlSource(this); 737 | } 738 | @Override 739 | public void exitRule(ParseTreeListener listener) { 740 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).exitMysqlSource(this); 741 | } 742 | @Override 743 | public T accept(ParseTreeVisitor visitor) { 744 | if ( visitor instanceof MingBdJSONVisitor ) return ((MingBdJSONVisitor)visitor).visitMysqlSource(this); 745 | else return visitor.visitChildren(this); 746 | } 747 | } 748 | 749 | public final MysqlSourceContext mysqlSource() throws RecognitionException { 750 | MysqlSourceContext _localctx = new MysqlSourceContext(_ctx, getState()); 751 | enterRule(_localctx, 18, RULE_mysqlSource); 752 | try { 753 | enterOuterAlt(_localctx, 1); 754 | { 755 | setState(128); 756 | match(T__0); 757 | setState(129); 758 | match(T__14); 759 | setState(130); 760 | match(T__4); 761 | setState(131); 762 | mysqlInfo(); 763 | setState(132); 764 | match(T__1); 765 | setState(133); 766 | match(T__15); 767 | setState(134); 768 | match(T__4); 769 | setState(135); 770 | mysqlSchema(); 771 | setState(136); 772 | match(T__1); 773 | setState(137); 774 | match(T__16); 775 | setState(138); 776 | match(T__4); 777 | setState(139); 778 | match(STRING); 779 | setState(140); 780 | match(T__2); 781 | } 782 | } 783 | catch (RecognitionException re) { 784 | _localctx.exception = re; 785 | _errHandler.reportError(this, re); 786 | _errHandler.recover(this, re); 787 | } 788 | finally { 789 | exitRule(); 790 | } 791 | return _localctx; 792 | } 793 | 794 | public static class MysqlInfoContext extends ParserRuleContext { 795 | public List STRING() { return getTokens(MingBdJSONParser.STRING); } 796 | public TerminalNode STRING(int i) { 797 | return getToken(MingBdJSONParser.STRING, i); 798 | } 799 | public MysqlInfoContext(ParserRuleContext parent, int invokingState) { 800 | super(parent, invokingState); 801 | } 802 | @Override public int getRuleIndex() { return RULE_mysqlInfo; } 803 | @Override 804 | public void enterRule(ParseTreeListener listener) { 805 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).enterMysqlInfo(this); 806 | } 807 | @Override 808 | public void exitRule(ParseTreeListener listener) { 809 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).exitMysqlInfo(this); 810 | } 811 | @Override 812 | public T accept(ParseTreeVisitor visitor) { 813 | if ( visitor instanceof MingBdJSONVisitor ) return ((MingBdJSONVisitor)visitor).visitMysqlInfo(this); 814 | else return visitor.visitChildren(this); 815 | } 816 | } 817 | 818 | public final MysqlInfoContext mysqlInfo() throws RecognitionException { 819 | MysqlInfoContext _localctx = new MysqlInfoContext(_ctx, getState()); 820 | enterRule(_localctx, 20, RULE_mysqlInfo); 821 | try { 822 | enterOuterAlt(_localctx, 1); 823 | { 824 | setState(142); 825 | match(T__0); 826 | setState(143); 827 | match(T__17); 828 | setState(144); 829 | match(T__4); 830 | setState(145); 831 | match(STRING); 832 | setState(146); 833 | match(T__1); 834 | setState(147); 835 | match(T__18); 836 | setState(148); 837 | match(T__4); 838 | setState(149); 839 | match(STRING); 840 | setState(150); 841 | match(T__1); 842 | setState(151); 843 | match(T__19); 844 | setState(152); 845 | match(T__4); 846 | setState(153); 847 | match(STRING); 848 | setState(154); 849 | match(T__1); 850 | setState(155); 851 | match(T__20); 852 | setState(156); 853 | match(T__4); 854 | setState(157); 855 | match(STRING); 856 | setState(158); 857 | match(T__1); 858 | setState(159); 859 | match(T__21); 860 | setState(160); 861 | match(T__4); 862 | setState(161); 863 | match(STRING); 864 | setState(162); 865 | match(T__2); 866 | } 867 | } 868 | catch (RecognitionException re) { 869 | _localctx.exception = re; 870 | _errHandler.reportError(this, re); 871 | _errHandler.recover(this, re); 872 | } 873 | finally { 874 | exitRule(); 875 | } 876 | return _localctx; 877 | } 878 | 879 | public static class MysqlSchemaContext extends ParserRuleContext { 880 | public List STRING() { return getTokens(MingBdJSONParser.STRING); } 881 | public TerminalNode STRING(int i) { 882 | return getToken(MingBdJSONParser.STRING, i); 883 | } 884 | public MysqlSchemaContext(ParserRuleContext parent, int invokingState) { 885 | super(parent, invokingState); 886 | } 887 | @Override public int getRuleIndex() { return RULE_mysqlSchema; } 888 | @Override 889 | public void enterRule(ParseTreeListener listener) { 890 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).enterMysqlSchema(this); 891 | } 892 | @Override 893 | public void exitRule(ParseTreeListener listener) { 894 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).exitMysqlSchema(this); 895 | } 896 | @Override 897 | public T accept(ParseTreeVisitor visitor) { 898 | if ( visitor instanceof MingBdJSONVisitor ) return ((MingBdJSONVisitor)visitor).visitMysqlSchema(this); 899 | else return visitor.visitChildren(this); 900 | } 901 | } 902 | 903 | public final MysqlSchemaContext mysqlSchema() throws RecognitionException { 904 | MysqlSchemaContext _localctx = new MysqlSchemaContext(_ctx, getState()); 905 | enterRule(_localctx, 22, RULE_mysqlSchema); 906 | int _la; 907 | try { 908 | enterOuterAlt(_localctx, 1); 909 | { 910 | setState(164); 911 | match(T__8); 912 | setState(165); 913 | match(STRING); 914 | setState(170); 915 | _errHandler.sync(this); 916 | _la = _input.LA(1); 917 | while (_la==T__1) { 918 | { 919 | { 920 | setState(166); 921 | match(T__1); 922 | setState(167); 923 | match(STRING); 924 | } 925 | } 926 | setState(172); 927 | _errHandler.sync(this); 928 | _la = _input.LA(1); 929 | } 930 | setState(173); 931 | match(T__9); 932 | } 933 | } 934 | catch (RecognitionException re) { 935 | _localctx.exception = re; 936 | _errHandler.reportError(this, re); 937 | _errHandler.recover(this, re); 938 | } 939 | finally { 940 | exitRule(); 941 | } 942 | return _localctx; 943 | } 944 | 945 | public static class TransinfoContext extends ParserRuleContext { 946 | public SelectContext select() { 947 | return getRuleContext(SelectContext.class,0); 948 | } 949 | public TransinfoContext(ParserRuleContext parent, int invokingState) { 950 | super(parent, invokingState); 951 | } 952 | @Override public int getRuleIndex() { return RULE_transinfo; } 953 | @Override 954 | public void enterRule(ParseTreeListener listener) { 955 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).enterTransinfo(this); 956 | } 957 | @Override 958 | public void exitRule(ParseTreeListener listener) { 959 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).exitTransinfo(this); 960 | } 961 | @Override 962 | public T accept(ParseTreeVisitor visitor) { 963 | if ( visitor instanceof MingBdJSONVisitor ) return ((MingBdJSONVisitor)visitor).visitTransinfo(this); 964 | else return visitor.visitChildren(this); 965 | } 966 | } 967 | 968 | public final TransinfoContext transinfo() throws RecognitionException { 969 | TransinfoContext _localctx = new TransinfoContext(_ctx, getState()); 970 | enterRule(_localctx, 24, RULE_transinfo); 971 | try { 972 | enterOuterAlt(_localctx, 1); 973 | { 974 | setState(175); 975 | select(); 976 | } 977 | } 978 | catch (RecognitionException re) { 979 | _localctx.exception = re; 980 | _errHandler.reportError(this, re); 981 | _errHandler.recover(this, re); 982 | } 983 | finally { 984 | exitRule(); 985 | } 986 | return _localctx; 987 | } 988 | 989 | public static class SelectContext extends ParserRuleContext { 990 | public ColsContext cols() { 991 | return getRuleContext(ColsContext.class,0); 992 | } 993 | public List STRING() { return getTokens(MingBdJSONParser.STRING); } 994 | public TerminalNode STRING(int i) { 995 | return getToken(MingBdJSONParser.STRING, i); 996 | } 997 | public GroupByContext groupBy() { 998 | return getRuleContext(GroupByContext.class,0); 999 | } 1000 | public List filter() { 1001 | return getRuleContexts(FilterContext.class); 1002 | } 1003 | public FilterContext filter(int i) { 1004 | return getRuleContext(FilterContext.class,i); 1005 | } 1006 | public SelectContext(ParserRuleContext parent, int invokingState) { 1007 | super(parent, invokingState); 1008 | } 1009 | @Override public int getRuleIndex() { return RULE_select; } 1010 | @Override 1011 | public void enterRule(ParseTreeListener listener) { 1012 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).enterSelect(this); 1013 | } 1014 | @Override 1015 | public void exitRule(ParseTreeListener listener) { 1016 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).exitSelect(this); 1017 | } 1018 | @Override 1019 | public T accept(ParseTreeVisitor visitor) { 1020 | if ( visitor instanceof MingBdJSONVisitor ) return ((MingBdJSONVisitor)visitor).visitSelect(this); 1021 | else return visitor.visitChildren(this); 1022 | } 1023 | } 1024 | 1025 | public final SelectContext select() throws RecognitionException { 1026 | SelectContext _localctx = new SelectContext(_ctx, getState()); 1027 | enterRule(_localctx, 26, RULE_select); 1028 | int _la; 1029 | try { 1030 | enterOuterAlt(_localctx, 1); 1031 | { 1032 | setState(177); 1033 | match(T__0); 1034 | setState(181); 1035 | _errHandler.sync(this); 1036 | _la = _input.LA(1); 1037 | if (_la==T__27) { 1038 | { 1039 | setState(178); 1040 | groupBy(); 1041 | setState(179); 1042 | match(T__1); 1043 | } 1044 | } 1045 | 1046 | setState(183); 1047 | cols(); 1048 | setState(184); 1049 | match(T__1); 1050 | setState(185); 1051 | match(T__22); 1052 | setState(186); 1053 | match(T__4); 1054 | setState(187); 1055 | match(STRING); 1056 | setState(188); 1057 | match(T__1); 1058 | setState(189); 1059 | match(T__23); 1060 | setState(190); 1061 | match(T__4); 1062 | setState(191); 1063 | match(STRING); 1064 | setState(192); 1065 | match(T__1); 1066 | setState(193); 1067 | match(T__24); 1068 | setState(194); 1069 | match(T__4); 1070 | setState(195); 1071 | _la = _input.LA(1); 1072 | if ( !(_la==T__25 || _la==T__26) ) { 1073 | _errHandler.recoverInline(this); 1074 | } 1075 | else { 1076 | if ( _input.LA(1)==Token.EOF ) matchedEOF = true; 1077 | _errHandler.reportMatch(this); 1078 | consume(); 1079 | } 1080 | setState(200); 1081 | _errHandler.sync(this); 1082 | _la = _input.LA(1); 1083 | while (_la==T__1) { 1084 | { 1085 | { 1086 | setState(196); 1087 | match(T__1); 1088 | setState(197); 1089 | filter(); 1090 | } 1091 | } 1092 | setState(202); 1093 | _errHandler.sync(this); 1094 | _la = _input.LA(1); 1095 | } 1096 | setState(203); 1097 | match(T__2); 1098 | } 1099 | } 1100 | catch (RecognitionException re) { 1101 | _localctx.exception = re; 1102 | _errHandler.reportError(this, re); 1103 | _errHandler.recover(this, re); 1104 | } 1105 | finally { 1106 | exitRule(); 1107 | } 1108 | return _localctx; 1109 | } 1110 | 1111 | public static class GroupByContext extends ParserRuleContext { 1112 | public List col() { 1113 | return getRuleContexts(ColContext.class); 1114 | } 1115 | public ColContext col(int i) { 1116 | return getRuleContext(ColContext.class,i); 1117 | } 1118 | public GroupByContext(ParserRuleContext parent, int invokingState) { 1119 | super(parent, invokingState); 1120 | } 1121 | @Override public int getRuleIndex() { return RULE_groupBy; } 1122 | @Override 1123 | public void enterRule(ParseTreeListener listener) { 1124 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).enterGroupBy(this); 1125 | } 1126 | @Override 1127 | public void exitRule(ParseTreeListener listener) { 1128 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).exitGroupBy(this); 1129 | } 1130 | @Override 1131 | public T accept(ParseTreeVisitor visitor) { 1132 | if ( visitor instanceof MingBdJSONVisitor ) return ((MingBdJSONVisitor)visitor).visitGroupBy(this); 1133 | else return visitor.visitChildren(this); 1134 | } 1135 | } 1136 | 1137 | public final GroupByContext groupBy() throws RecognitionException { 1138 | GroupByContext _localctx = new GroupByContext(_ctx, getState()); 1139 | enterRule(_localctx, 28, RULE_groupBy); 1140 | int _la; 1141 | try { 1142 | enterOuterAlt(_localctx, 1); 1143 | { 1144 | setState(205); 1145 | match(T__27); 1146 | setState(206); 1147 | match(T__4); 1148 | setState(207); 1149 | match(T__8); 1150 | setState(208); 1151 | col(); 1152 | setState(213); 1153 | _errHandler.sync(this); 1154 | _la = _input.LA(1); 1155 | while (_la==T__1) { 1156 | { 1157 | { 1158 | setState(209); 1159 | match(T__1); 1160 | setState(210); 1161 | col(); 1162 | } 1163 | } 1164 | setState(215); 1165 | _errHandler.sync(this); 1166 | _la = _input.LA(1); 1167 | } 1168 | setState(216); 1169 | match(T__9); 1170 | } 1171 | } 1172 | catch (RecognitionException re) { 1173 | _localctx.exception = re; 1174 | _errHandler.reportError(this, re); 1175 | _errHandler.recover(this, re); 1176 | } 1177 | finally { 1178 | exitRule(); 1179 | } 1180 | return _localctx; 1181 | } 1182 | 1183 | public static class FilterContext extends ParserRuleContext { 1184 | public TerminalNode STRING() { return getToken(MingBdJSONParser.STRING, 0); } 1185 | public FilterContext(ParserRuleContext parent, int invokingState) { 1186 | super(parent, invokingState); 1187 | } 1188 | @Override public int getRuleIndex() { return RULE_filter; } 1189 | @Override 1190 | public void enterRule(ParseTreeListener listener) { 1191 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).enterFilter(this); 1192 | } 1193 | @Override 1194 | public void exitRule(ParseTreeListener listener) { 1195 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).exitFilter(this); 1196 | } 1197 | @Override 1198 | public T accept(ParseTreeVisitor visitor) { 1199 | if ( visitor instanceof MingBdJSONVisitor ) return ((MingBdJSONVisitor)visitor).visitFilter(this); 1200 | else return visitor.visitChildren(this); 1201 | } 1202 | } 1203 | 1204 | public final FilterContext filter() throws RecognitionException { 1205 | FilterContext _localctx = new FilterContext(_ctx, getState()); 1206 | enterRule(_localctx, 30, RULE_filter); 1207 | try { 1208 | enterOuterAlt(_localctx, 1); 1209 | { 1210 | setState(218); 1211 | match(T__28); 1212 | setState(219); 1213 | match(T__4); 1214 | setState(220); 1215 | match(STRING); 1216 | } 1217 | } 1218 | catch (RecognitionException re) { 1219 | _localctx.exception = re; 1220 | _errHandler.reportError(this, re); 1221 | _errHandler.recover(this, re); 1222 | } 1223 | finally { 1224 | exitRule(); 1225 | } 1226 | return _localctx; 1227 | } 1228 | 1229 | public static class ColsContext extends ParserRuleContext { 1230 | public List col() { 1231 | return getRuleContexts(ColContext.class); 1232 | } 1233 | public ColContext col(int i) { 1234 | return getRuleContext(ColContext.class,i); 1235 | } 1236 | public ColsContext(ParserRuleContext parent, int invokingState) { 1237 | super(parent, invokingState); 1238 | } 1239 | @Override public int getRuleIndex() { return RULE_cols; } 1240 | @Override 1241 | public void enterRule(ParseTreeListener listener) { 1242 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).enterCols(this); 1243 | } 1244 | @Override 1245 | public void exitRule(ParseTreeListener listener) { 1246 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).exitCols(this); 1247 | } 1248 | @Override 1249 | public T accept(ParseTreeVisitor visitor) { 1250 | if ( visitor instanceof MingBdJSONVisitor ) return ((MingBdJSONVisitor)visitor).visitCols(this); 1251 | else return visitor.visitChildren(this); 1252 | } 1253 | } 1254 | 1255 | public final ColsContext cols() throws RecognitionException { 1256 | ColsContext _localctx = new ColsContext(_ctx, getState()); 1257 | enterRule(_localctx, 32, RULE_cols); 1258 | int _la; 1259 | try { 1260 | enterOuterAlt(_localctx, 1); 1261 | { 1262 | setState(222); 1263 | match(T__29); 1264 | setState(223); 1265 | match(T__4); 1266 | setState(224); 1267 | match(T__8); 1268 | setState(225); 1269 | col(); 1270 | setState(230); 1271 | _errHandler.sync(this); 1272 | _la = _input.LA(1); 1273 | while (_la==T__1) { 1274 | { 1275 | { 1276 | setState(226); 1277 | match(T__1); 1278 | setState(227); 1279 | col(); 1280 | } 1281 | } 1282 | setState(232); 1283 | _errHandler.sync(this); 1284 | _la = _input.LA(1); 1285 | } 1286 | setState(233); 1287 | match(T__9); 1288 | } 1289 | } 1290 | catch (RecognitionException re) { 1291 | _localctx.exception = re; 1292 | _errHandler.reportError(this, re); 1293 | _errHandler.recover(this, re); 1294 | } 1295 | finally { 1296 | exitRule(); 1297 | } 1298 | return _localctx; 1299 | } 1300 | 1301 | public static class ColContext extends ParserRuleContext { 1302 | public TerminalNode STRING() { return getToken(MingBdJSONParser.STRING, 0); } 1303 | public ColContext(ParserRuleContext parent, int invokingState) { 1304 | super(parent, invokingState); 1305 | } 1306 | @Override public int getRuleIndex() { return RULE_col; } 1307 | @Override 1308 | public void enterRule(ParseTreeListener listener) { 1309 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).enterCol(this); 1310 | } 1311 | @Override 1312 | public void exitRule(ParseTreeListener listener) { 1313 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).exitCol(this); 1314 | } 1315 | @Override 1316 | public T accept(ParseTreeVisitor visitor) { 1317 | if ( visitor instanceof MingBdJSONVisitor ) return ((MingBdJSONVisitor)visitor).visitCol(this); 1318 | else return visitor.visitChildren(this); 1319 | } 1320 | } 1321 | 1322 | public final ColContext col() throws RecognitionException { 1323 | ColContext _localctx = new ColContext(_ctx, getState()); 1324 | enterRule(_localctx, 34, RULE_col); 1325 | try { 1326 | enterOuterAlt(_localctx, 1); 1327 | { 1328 | setState(235); 1329 | match(STRING); 1330 | } 1331 | } 1332 | catch (RecognitionException re) { 1333 | _localctx.exception = re; 1334 | _errHandler.reportError(this, re); 1335 | _errHandler.recover(this, re); 1336 | } 1337 | finally { 1338 | exitRule(); 1339 | } 1340 | return _localctx; 1341 | } 1342 | 1343 | public static class SaveContext extends ParserRuleContext { 1344 | public List saveInfo() { 1345 | return getRuleContexts(SaveInfoContext.class); 1346 | } 1347 | public SaveInfoContext saveInfo(int i) { 1348 | return getRuleContext(SaveInfoContext.class,i); 1349 | } 1350 | public SaveContext(ParserRuleContext parent, int invokingState) { 1351 | super(parent, invokingState); 1352 | } 1353 | @Override public int getRuleIndex() { return RULE_save; } 1354 | @Override 1355 | public void enterRule(ParseTreeListener listener) { 1356 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).enterSave(this); 1357 | } 1358 | @Override 1359 | public void exitRule(ParseTreeListener listener) { 1360 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).exitSave(this); 1361 | } 1362 | @Override 1363 | public T accept(ParseTreeVisitor visitor) { 1364 | if ( visitor instanceof MingBdJSONVisitor ) return ((MingBdJSONVisitor)visitor).visitSave(this); 1365 | else return visitor.visitChildren(this); 1366 | } 1367 | } 1368 | 1369 | public final SaveContext save() throws RecognitionException { 1370 | SaveContext _localctx = new SaveContext(_ctx, getState()); 1371 | enterRule(_localctx, 36, RULE_save); 1372 | int _la; 1373 | try { 1374 | enterOuterAlt(_localctx, 1); 1375 | { 1376 | setState(237); 1377 | match(T__30); 1378 | setState(238); 1379 | match(T__4); 1380 | setState(239); 1381 | match(T__8); 1382 | setState(240); 1383 | saveInfo(); 1384 | setState(245); 1385 | _errHandler.sync(this); 1386 | _la = _input.LA(1); 1387 | while (_la==T__1) { 1388 | { 1389 | { 1390 | setState(241); 1391 | match(T__1); 1392 | setState(242); 1393 | saveInfo(); 1394 | } 1395 | } 1396 | setState(247); 1397 | _errHandler.sync(this); 1398 | _la = _input.LA(1); 1399 | } 1400 | setState(248); 1401 | match(T__9); 1402 | } 1403 | } 1404 | catch (RecognitionException re) { 1405 | _localctx.exception = re; 1406 | _errHandler.reportError(this, re); 1407 | _errHandler.recover(this, re); 1408 | } 1409 | finally { 1410 | exitRule(); 1411 | } 1412 | return _localctx; 1413 | } 1414 | 1415 | public static class SaveInfoContext extends ParserRuleContext { 1416 | public KafkaSaveContext kafkaSave() { 1417 | return getRuleContext(KafkaSaveContext.class,0); 1418 | } 1419 | public MysqlSaveContext mysqlSave() { 1420 | return getRuleContext(MysqlSaveContext.class,0); 1421 | } 1422 | public SaveInfoContext(ParserRuleContext parent, int invokingState) { 1423 | super(parent, invokingState); 1424 | } 1425 | @Override public int getRuleIndex() { return RULE_saveInfo; } 1426 | @Override 1427 | public void enterRule(ParseTreeListener listener) { 1428 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).enterSaveInfo(this); 1429 | } 1430 | @Override 1431 | public void exitRule(ParseTreeListener listener) { 1432 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).exitSaveInfo(this); 1433 | } 1434 | @Override 1435 | public T accept(ParseTreeVisitor visitor) { 1436 | if ( visitor instanceof MingBdJSONVisitor ) return ((MingBdJSONVisitor)visitor).visitSaveInfo(this); 1437 | else return visitor.visitChildren(this); 1438 | } 1439 | } 1440 | 1441 | public final SaveInfoContext saveInfo() throws RecognitionException { 1442 | SaveInfoContext _localctx = new SaveInfoContext(_ctx, getState()); 1443 | enterRule(_localctx, 38, RULE_saveInfo); 1444 | try { 1445 | setState(252); 1446 | _errHandler.sync(this); 1447 | switch ( getInterpreter().adaptivePredict(_input,12,_ctx) ) { 1448 | case 1: 1449 | enterOuterAlt(_localctx, 1); 1450 | { 1451 | setState(250); 1452 | kafkaSave(); 1453 | } 1454 | break; 1455 | case 2: 1456 | enterOuterAlt(_localctx, 2); 1457 | { 1458 | setState(251); 1459 | mysqlSave(); 1460 | } 1461 | break; 1462 | } 1463 | } 1464 | catch (RecognitionException re) { 1465 | _localctx.exception = re; 1466 | _errHandler.reportError(this, re); 1467 | _errHandler.recover(this, re); 1468 | } 1469 | finally { 1470 | exitRule(); 1471 | } 1472 | return _localctx; 1473 | } 1474 | 1475 | public static class KafkaSaveContext extends ParserRuleContext { 1476 | public List STRING() { return getTokens(MingBdJSONParser.STRING); } 1477 | public TerminalNode STRING(int i) { 1478 | return getToken(MingBdJSONParser.STRING, i); 1479 | } 1480 | public ColsContext cols() { 1481 | return getRuleContext(ColsContext.class,0); 1482 | } 1483 | public List col() { 1484 | return getRuleContexts(ColContext.class); 1485 | } 1486 | public ColContext col(int i) { 1487 | return getRuleContext(ColContext.class,i); 1488 | } 1489 | public KafkaSaveContext(ParserRuleContext parent, int invokingState) { 1490 | super(parent, invokingState); 1491 | } 1492 | @Override public int getRuleIndex() { return RULE_kafkaSave; } 1493 | @Override 1494 | public void enterRule(ParseTreeListener listener) { 1495 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).enterKafkaSave(this); 1496 | } 1497 | @Override 1498 | public void exitRule(ParseTreeListener listener) { 1499 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).exitKafkaSave(this); 1500 | } 1501 | @Override 1502 | public T accept(ParseTreeVisitor visitor) { 1503 | if ( visitor instanceof MingBdJSONVisitor ) return ((MingBdJSONVisitor)visitor).visitKafkaSave(this); 1504 | else return visitor.visitChildren(this); 1505 | } 1506 | } 1507 | 1508 | public final KafkaSaveContext kafkaSave() throws RecognitionException { 1509 | KafkaSaveContext _localctx = new KafkaSaveContext(_ctx, getState()); 1510 | enterRule(_localctx, 40, RULE_kafkaSave); 1511 | int _la; 1512 | try { 1513 | enterOuterAlt(_localctx, 1); 1514 | { 1515 | setState(254); 1516 | match(T__0); 1517 | setState(255); 1518 | match(T__31); 1519 | setState(256); 1520 | match(T__4); 1521 | setState(257); 1522 | match(STRING); 1523 | setState(258); 1524 | match(T__1); 1525 | setState(259); 1526 | match(T__32); 1527 | setState(260); 1528 | match(T__4); 1529 | setState(261); 1530 | match(STRING); 1531 | setState(262); 1532 | match(T__1); 1533 | setState(263); 1534 | match(T__33); 1535 | setState(264); 1536 | match(T__4); 1537 | setState(265); 1538 | match(STRING); 1539 | setState(266); 1540 | match(T__1); 1541 | setState(267); 1542 | match(T__22); 1543 | setState(268); 1544 | match(T__4); 1545 | setState(269); 1546 | match(STRING); 1547 | setState(270); 1548 | match(T__1); 1549 | setState(271); 1550 | cols(); 1551 | setState(272); 1552 | match(T__1); 1553 | setState(273); 1554 | match(T__34); 1555 | setState(274); 1556 | match(T__4); 1557 | setState(275); 1558 | match(T__8); 1559 | setState(276); 1560 | col(); 1561 | setState(281); 1562 | _errHandler.sync(this); 1563 | _la = _input.LA(1); 1564 | while (_la==T__1) { 1565 | { 1566 | { 1567 | setState(277); 1568 | match(T__1); 1569 | setState(278); 1570 | col(); 1571 | } 1572 | } 1573 | setState(283); 1574 | _errHandler.sync(this); 1575 | _la = _input.LA(1); 1576 | } 1577 | setState(284); 1578 | match(T__9); 1579 | setState(285); 1580 | match(T__2); 1581 | } 1582 | } 1583 | catch (RecognitionException re) { 1584 | _localctx.exception = re; 1585 | _errHandler.reportError(this, re); 1586 | _errHandler.recover(this, re); 1587 | } 1588 | finally { 1589 | exitRule(); 1590 | } 1591 | return _localctx; 1592 | } 1593 | 1594 | public static class MysqlSaveContext extends ParserRuleContext { 1595 | public MysqlInfoContext mysqlInfo() { 1596 | return getRuleContext(MysqlInfoContext.class,0); 1597 | } 1598 | public MysqlSchemaContext mysqlSchema() { 1599 | return getRuleContext(MysqlSchemaContext.class,0); 1600 | } 1601 | public List STRING() { return getTokens(MingBdJSONParser.STRING); } 1602 | public TerminalNode STRING(int i) { 1603 | return getToken(MingBdJSONParser.STRING, i); 1604 | } 1605 | public MysqlSaveContext(ParserRuleContext parent, int invokingState) { 1606 | super(parent, invokingState); 1607 | } 1608 | @Override public int getRuleIndex() { return RULE_mysqlSave; } 1609 | @Override 1610 | public void enterRule(ParseTreeListener listener) { 1611 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).enterMysqlSave(this); 1612 | } 1613 | @Override 1614 | public void exitRule(ParseTreeListener listener) { 1615 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).exitMysqlSave(this); 1616 | } 1617 | @Override 1618 | public T accept(ParseTreeVisitor visitor) { 1619 | if ( visitor instanceof MingBdJSONVisitor ) return ((MingBdJSONVisitor)visitor).visitMysqlSave(this); 1620 | else return visitor.visitChildren(this); 1621 | } 1622 | } 1623 | 1624 | public final MysqlSaveContext mysqlSave() throws RecognitionException { 1625 | MysqlSaveContext _localctx = new MysqlSaveContext(_ctx, getState()); 1626 | enterRule(_localctx, 42, RULE_mysqlSave); 1627 | try { 1628 | enterOuterAlt(_localctx, 1); 1629 | { 1630 | setState(287); 1631 | match(T__0); 1632 | setState(288); 1633 | match(T__14); 1634 | setState(289); 1635 | match(T__4); 1636 | setState(290); 1637 | mysqlInfo(); 1638 | setState(291); 1639 | match(T__1); 1640 | setState(292); 1641 | match(T__15); 1642 | setState(293); 1643 | match(T__4); 1644 | setState(294); 1645 | mysqlSchema(); 1646 | setState(295); 1647 | match(T__1); 1648 | setState(296); 1649 | match(T__22); 1650 | setState(297); 1651 | match(T__4); 1652 | setState(298); 1653 | match(STRING); 1654 | setState(299); 1655 | match(T__1); 1656 | setState(300); 1657 | match(T__23); 1658 | setState(301); 1659 | match(T__4); 1660 | setState(302); 1661 | match(STRING); 1662 | setState(303); 1663 | match(T__2); 1664 | } 1665 | } 1666 | catch (RecognitionException re) { 1667 | _localctx.exception = re; 1668 | _errHandler.reportError(this, re); 1669 | _errHandler.recover(this, re); 1670 | } 1671 | finally { 1672 | exitRule(); 1673 | } 1674 | return _localctx; 1675 | } 1676 | 1677 | public static class JoinpairContext extends ParserRuleContext { 1678 | public List STRING() { return getTokens(MingBdJSONParser.STRING); } 1679 | public TerminalNode STRING(int i) { 1680 | return getToken(MingBdJSONParser.STRING, i); 1681 | } 1682 | public JoinpairContext(ParserRuleContext parent, int invokingState) { 1683 | super(parent, invokingState); 1684 | } 1685 | @Override public int getRuleIndex() { return RULE_joinpair; } 1686 | @Override 1687 | public void enterRule(ParseTreeListener listener) { 1688 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).enterJoinpair(this); 1689 | } 1690 | @Override 1691 | public void exitRule(ParseTreeListener listener) { 1692 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).exitJoinpair(this); 1693 | } 1694 | @Override 1695 | public T accept(ParseTreeVisitor visitor) { 1696 | if ( visitor instanceof MingBdJSONVisitor ) return ((MingBdJSONVisitor)visitor).visitJoinpair(this); 1697 | else return visitor.visitChildren(this); 1698 | } 1699 | } 1700 | 1701 | public final JoinpairContext joinpair() throws RecognitionException { 1702 | JoinpairContext _localctx = new JoinpairContext(_ctx, getState()); 1703 | enterRule(_localctx, 44, RULE_joinpair); 1704 | try { 1705 | enterOuterAlt(_localctx, 1); 1706 | { 1707 | setState(305); 1708 | match(T__0); 1709 | setState(306); 1710 | match(T__35); 1711 | setState(307); 1712 | match(T__4); 1713 | setState(308); 1714 | match(T__8); 1715 | setState(309); 1716 | match(STRING); 1717 | setState(310); 1718 | match(T__1); 1719 | setState(311); 1720 | match(STRING); 1721 | setState(312); 1722 | match(T__9); 1723 | setState(313); 1724 | match(T__1); 1725 | setState(314); 1726 | match(T__36); 1727 | setState(315); 1728 | match(T__4); 1729 | setState(316); 1730 | match(T__8); 1731 | setState(317); 1732 | match(STRING); 1733 | setState(318); 1734 | match(T__9); 1735 | setState(319); 1736 | match(T__1); 1737 | setState(320); 1738 | match(T__37); 1739 | setState(321); 1740 | match(T__4); 1741 | setState(322); 1742 | match(STRING); 1743 | setState(323); 1744 | match(T__2); 1745 | } 1746 | } 1747 | catch (RecognitionException re) { 1748 | _localctx.exception = re; 1749 | _errHandler.reportError(this, re); 1750 | _errHandler.recover(this, re); 1751 | } 1752 | finally { 1753 | exitRule(); 1754 | } 1755 | return _localctx; 1756 | } 1757 | 1758 | public static class KafkaSourceContext extends ParserRuleContext { 1759 | public List STRING() { return getTokens(MingBdJSONParser.STRING); } 1760 | public TerminalNode STRING(int i) { 1761 | return getToken(MingBdJSONParser.STRING, i); 1762 | } 1763 | public List field() { 1764 | return getRuleContexts(FieldContext.class); 1765 | } 1766 | public FieldContext field(int i) { 1767 | return getRuleContext(FieldContext.class,i); 1768 | } 1769 | public KafkaSourceContext(ParserRuleContext parent, int invokingState) { 1770 | super(parent, invokingState); 1771 | } 1772 | @Override public int getRuleIndex() { return RULE_kafkaSource; } 1773 | @Override 1774 | public void enterRule(ParseTreeListener listener) { 1775 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).enterKafkaSource(this); 1776 | } 1777 | @Override 1778 | public void exitRule(ParseTreeListener listener) { 1779 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).exitKafkaSource(this); 1780 | } 1781 | @Override 1782 | public T accept(ParseTreeVisitor visitor) { 1783 | if ( visitor instanceof MingBdJSONVisitor ) return ((MingBdJSONVisitor)visitor).visitKafkaSource(this); 1784 | else return visitor.visitChildren(this); 1785 | } 1786 | } 1787 | 1788 | public final KafkaSourceContext kafkaSource() throws RecognitionException { 1789 | KafkaSourceContext _localctx = new KafkaSourceContext(_ctx, getState()); 1790 | enterRule(_localctx, 46, RULE_kafkaSource); 1791 | int _la; 1792 | try { 1793 | enterOuterAlt(_localctx, 1); 1794 | { 1795 | setState(325); 1796 | match(T__0); 1797 | setState(326); 1798 | match(T__31); 1799 | setState(327); 1800 | match(T__4); 1801 | setState(328); 1802 | match(STRING); 1803 | setState(329); 1804 | match(T__1); 1805 | setState(330); 1806 | match(T__32); 1807 | setState(331); 1808 | match(T__4); 1809 | setState(332); 1810 | match(STRING); 1811 | setState(333); 1812 | match(T__1); 1813 | setState(334); 1814 | match(T__33); 1815 | setState(335); 1816 | match(T__4); 1817 | setState(336); 1818 | match(STRING); 1819 | setState(337); 1820 | match(T__1); 1821 | setState(338); 1822 | match(T__38); 1823 | setState(339); 1824 | match(T__4); 1825 | setState(340); 1826 | match(STRING); 1827 | setState(341); 1828 | match(T__1); 1829 | setState(342); 1830 | match(T__15); 1831 | setState(343); 1832 | match(T__4); 1833 | setState(344); 1834 | match(T__8); 1835 | setState(345); 1836 | field(); 1837 | setState(350); 1838 | _errHandler.sync(this); 1839 | _la = _input.LA(1); 1840 | while (_la==T__1) { 1841 | { 1842 | { 1843 | setState(346); 1844 | match(T__1); 1845 | setState(347); 1846 | field(); 1847 | } 1848 | } 1849 | setState(352); 1850 | _errHandler.sync(this); 1851 | _la = _input.LA(1); 1852 | } 1853 | setState(353); 1854 | match(T__9); 1855 | setState(354); 1856 | match(T__1); 1857 | setState(355); 1858 | match(T__16); 1859 | setState(356); 1860 | match(T__4); 1861 | setState(357); 1862 | match(STRING); 1863 | setState(358); 1864 | match(T__2); 1865 | } 1866 | } 1867 | catch (RecognitionException re) { 1868 | _localctx.exception = re; 1869 | _errHandler.reportError(this, re); 1870 | _errHandler.recover(this, re); 1871 | } 1872 | finally { 1873 | exitRule(); 1874 | } 1875 | return _localctx; 1876 | } 1877 | 1878 | public static class FieldContext extends ParserRuleContext { 1879 | public List STRING() { return getTokens(MingBdJSONParser.STRING); } 1880 | public TerminalNode STRING(int i) { 1881 | return getToken(MingBdJSONParser.STRING, i); 1882 | } 1883 | public FieldContext(ParserRuleContext parent, int invokingState) { 1884 | super(parent, invokingState); 1885 | } 1886 | @Override public int getRuleIndex() { return RULE_field; } 1887 | @Override 1888 | public void enterRule(ParseTreeListener listener) { 1889 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).enterField(this); 1890 | } 1891 | @Override 1892 | public void exitRule(ParseTreeListener listener) { 1893 | if ( listener instanceof MingBdJSONListener ) ((MingBdJSONListener)listener).exitField(this); 1894 | } 1895 | @Override 1896 | public T accept(ParseTreeVisitor visitor) { 1897 | if ( visitor instanceof MingBdJSONVisitor ) return ((MingBdJSONVisitor)visitor).visitField(this); 1898 | else return visitor.visitChildren(this); 1899 | } 1900 | } 1901 | 1902 | public final FieldContext field() throws RecognitionException { 1903 | FieldContext _localctx = new FieldContext(_ctx, getState()); 1904 | enterRule(_localctx, 48, RULE_field); 1905 | try { 1906 | enterOuterAlt(_localctx, 1); 1907 | { 1908 | setState(360); 1909 | match(T__0); 1910 | setState(361); 1911 | match(T__39); 1912 | setState(362); 1913 | match(T__4); 1914 | setState(363); 1915 | match(STRING); 1916 | setState(364); 1917 | match(T__1); 1918 | setState(365); 1919 | match(T__40); 1920 | setState(366); 1921 | match(T__4); 1922 | setState(367); 1923 | match(STRING); 1924 | setState(368); 1925 | match(T__2); 1926 | } 1927 | } 1928 | catch (RecognitionException re) { 1929 | _localctx.exception = re; 1930 | _errHandler.reportError(this, re); 1931 | _errHandler.recover(this, re); 1932 | } 1933 | finally { 1934 | exitRule(); 1935 | } 1936 | return _localctx; 1937 | } 1938 | 1939 | public static final String _serializedATN = 1940 | "\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\60\u0175\4\2\t\2"+ 1941 | "\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13"+ 1942 | "\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+ 1943 | "\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+ 1944 | "\4\32\t\32\3\2\3\2\3\3\3\3\3\3\3\3\7\3;\n\3\f\3\16\3>\13\3\3\3\3\3\3\4"+ 1945 | "\3\4\3\4\3\4\3\4\5\4G\n\4\3\5\3\5\3\5\3\5\3\6\3\6\3\6\3\6\3\6\3\6\7\6"+ 1946 | "S\n\6\f\6\16\6V\13\6\3\6\3\6\3\7\3\7\3\7\3\7\3\7\3\7\7\7`\n\7\f\7\16\7"+ 1947 | "c\13\7\3\7\3\7\3\b\3\b\3\b\3\b\3\b\3\b\7\bm\n\b\f\b\16\bp\13\b\3\b\3\b"+ 1948 | "\3\t\3\t\3\t\5\tw\n\t\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\13\3\13"+ 1949 | "\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\f\3\f\3"+ 1950 | "\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f"+ 1951 | "\3\f\3\f\3\r\3\r\3\r\3\r\7\r\u00ab\n\r\f\r\16\r\u00ae\13\r\3\r\3\r\3\16"+ 1952 | "\3\16\3\17\3\17\3\17\3\17\5\17\u00b8\n\17\3\17\3\17\3\17\3\17\3\17\3\17"+ 1953 | "\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\3\17\7\17\u00c9\n\17\f\17\16"+ 1954 | "\17\u00cc\13\17\3\17\3\17\3\20\3\20\3\20\3\20\3\20\3\20\7\20\u00d6\n\20"+ 1955 | "\f\20\16\20\u00d9\13\20\3\20\3\20\3\21\3\21\3\21\3\21\3\22\3\22\3\22\3"+ 1956 | "\22\3\22\3\22\7\22\u00e7\n\22\f\22\16\22\u00ea\13\22\3\22\3\22\3\23\3"+ 1957 | "\23\3\24\3\24\3\24\3\24\3\24\3\24\7\24\u00f6\n\24\f\24\16\24\u00f9\13"+ 1958 | "\24\3\24\3\24\3\25\3\25\5\25\u00ff\n\25\3\26\3\26\3\26\3\26\3\26\3\26"+ 1959 | "\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26"+ 1960 | "\3\26\3\26\3\26\3\26\3\26\7\26\u011a\n\26\f\26\16\26\u011d\13\26\3\26"+ 1961 | "\3\26\3\26\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27"+ 1962 | "\3\27\3\27\3\27\3\27\3\27\3\27\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30"+ 1963 | "\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\31\3\31"+ 1964 | "\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31"+ 1965 | "\3\31\3\31\3\31\3\31\3\31\3\31\3\31\7\31\u015f\n\31\f\31\16\31\u0162\13"+ 1966 | "\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\32\3\32\3\32\3\32\3\32\3\32\3"+ 1967 | "\32\3\32\3\32\3\32\3\32\2\2\33\2\4\6\b\n\f\16\20\22\24\26\30\32\34\36"+ 1968 | " \"$&(*,.\60\62\2\4\3\2\b\t\3\2\34\35\2\u016e\2\64\3\2\2\2\4\66\3\2\2"+ 1969 | "\2\6F\3\2\2\2\bH\3\2\2\2\nL\3\2\2\2\fY\3\2\2\2\16f\3\2\2\2\20v\3\2\2\2"+ 1970 | "\22x\3\2\2\2\24\u0082\3\2\2\2\26\u0090\3\2\2\2\30\u00a6\3\2\2\2\32\u00b1"+ 1971 | "\3\2\2\2\34\u00b3\3\2\2\2\36\u00cf\3\2\2\2 \u00dc\3\2\2\2\"\u00e0\3\2"+ 1972 | "\2\2$\u00ed\3\2\2\2&\u00ef\3\2\2\2(\u00fe\3\2\2\2*\u0100\3\2\2\2,\u0121"+ 1973 | "\3\2\2\2.\u0133\3\2\2\2\60\u0147\3\2\2\2\62\u016a\3\2\2\2\64\65\5\4\3"+ 1974 | "\2\65\3\3\2\2\2\66\67\7\3\2\2\67<\5\6\4\289\7\4\2\29;\5\6\4\2:8\3\2\2"+ 1975 | "\2;>\3\2\2\2<:\3\2\2\2<=\3\2\2\2=?\3\2\2\2><\3\2\2\2?@\7\5\2\2@\5\3\2"+ 1976 | "\2\2AG\5\b\5\2BG\5\n\6\2CG\5\f\7\2DG\5\16\b\2EG\5&\24\2FA\3\2\2\2FB\3"+ 1977 | "\2\2\2FC\3\2\2\2FD\3\2\2\2FE\3\2\2\2G\7\3\2\2\2HI\7\6\2\2IJ\7\7\2\2JK"+ 1978 | "\t\2\2\2K\t\3\2\2\2LM\7\n\2\2MN\7\7\2\2NO\7\13\2\2OT\5\20\t\2PQ\7\4\2"+ 1979 | "\2QS\5\20\t\2RP\3\2\2\2SV\3\2\2\2TR\3\2\2\2TU\3\2\2\2UW\3\2\2\2VT\3\2"+ 1980 | "\2\2WX\7\f\2\2X\13\3\2\2\2YZ\7\r\2\2Z[\7\7\2\2[\\\7\13\2\2\\a\5.\30\2"+ 1981 | "]^\7\4\2\2^`\5.\30\2_]\3\2\2\2`c\3\2\2\2a_\3\2\2\2ab\3\2\2\2bd\3\2\2\2"+ 1982 | "ca\3\2\2\2de\7\f\2\2e\r\3\2\2\2fg\7\16\2\2gh\7\7\2\2hi\7\13\2\2in\5\32"+ 1983 | "\16\2jk\7\4\2\2km\5\32\16\2lj\3\2\2\2mp\3\2\2\2nl\3\2\2\2no\3\2\2\2oq"+ 1984 | "\3\2\2\2pn\3\2\2\2qr\7\f\2\2r\17\3\2\2\2sw\5\60\31\2tw\5\22\n\2uw\5\24"+ 1985 | "\13\2vs\3\2\2\2vt\3\2\2\2vu\3\2\2\2w\21\3\2\2\2xy\7\3\2\2yz\7\17\2\2z"+ 1986 | "{\7\7\2\2{|\7,\2\2|}\7\4\2\2}~\7\20\2\2~\177\7\7\2\2\177\u0080\7,\2\2"+ 1987 | "\u0080\u0081\7\5\2\2\u0081\23\3\2\2\2\u0082\u0083\7\3\2\2\u0083\u0084"+ 1988 | "\7\21\2\2\u0084\u0085\7\7\2\2\u0085\u0086\5\26\f\2\u0086\u0087\7\4\2\2"+ 1989 | "\u0087\u0088\7\22\2\2\u0088\u0089\7\7\2\2\u0089\u008a\5\30\r\2\u008a\u008b"+ 1990 | "\7\4\2\2\u008b\u008c\7\23\2\2\u008c\u008d\7\7\2\2\u008d\u008e\7,\2\2\u008e"+ 1991 | "\u008f\7\5\2\2\u008f\25\3\2\2\2\u0090\u0091\7\3\2\2\u0091\u0092\7\24\2"+ 1992 | "\2\u0092\u0093\7\7\2\2\u0093\u0094\7,\2\2\u0094\u0095\7\4\2\2\u0095\u0096"+ 1993 | "\7\25\2\2\u0096\u0097\7\7\2\2\u0097\u0098\7,\2\2\u0098\u0099\7\4\2\2\u0099"+ 1994 | "\u009a\7\26\2\2\u009a\u009b\7\7\2\2\u009b\u009c\7,\2\2\u009c\u009d\7\4"+ 1995 | "\2\2\u009d\u009e\7\27\2\2\u009e\u009f\7\7\2\2\u009f\u00a0\7,\2\2\u00a0"+ 1996 | "\u00a1\7\4\2\2\u00a1\u00a2\7\30\2\2\u00a2\u00a3\7\7\2\2\u00a3\u00a4\7"+ 1997 | ",\2\2\u00a4\u00a5\7\5\2\2\u00a5\27\3\2\2\2\u00a6\u00a7\7\13\2\2\u00a7"+ 1998 | "\u00ac\7,\2\2\u00a8\u00a9\7\4\2\2\u00a9\u00ab\7,\2\2\u00aa\u00a8\3\2\2"+ 1999 | "\2\u00ab\u00ae\3\2\2\2\u00ac\u00aa\3\2\2\2\u00ac\u00ad\3\2\2\2\u00ad\u00af"+ 2000 | "\3\2\2\2\u00ae\u00ac\3\2\2\2\u00af\u00b0\7\f\2\2\u00b0\31\3\2\2\2\u00b1"+ 2001 | "\u00b2\5\34\17\2\u00b2\33\3\2\2\2\u00b3\u00b7\7\3\2\2\u00b4\u00b5\5\36"+ 2002 | "\20\2\u00b5\u00b6\7\4\2\2\u00b6\u00b8\3\2\2\2\u00b7\u00b4\3\2\2\2\u00b7"+ 2003 | "\u00b8\3\2\2\2\u00b8\u00b9\3\2\2\2\u00b9\u00ba\5\"\22\2\u00ba\u00bb\7"+ 2004 | "\4\2\2\u00bb\u00bc\7\31\2\2\u00bc\u00bd\7\7\2\2\u00bd\u00be\7,\2\2\u00be"+ 2005 | "\u00bf\7\4\2\2\u00bf\u00c0\7\32\2\2\u00c0\u00c1\7\7\2\2\u00c1\u00c2\7"+ 2006 | ",\2\2\u00c2\u00c3\7\4\2\2\u00c3\u00c4\7\33\2\2\u00c4\u00c5\7\7\2\2\u00c5"+ 2007 | "\u00ca\t\3\2\2\u00c6\u00c7\7\4\2\2\u00c7\u00c9\5 \21\2\u00c8\u00c6\3\2"+ 2008 | "\2\2\u00c9\u00cc\3\2\2\2\u00ca\u00c8\3\2\2\2\u00ca\u00cb\3\2\2\2\u00cb"+ 2009 | "\u00cd\3\2\2\2\u00cc\u00ca\3\2\2\2\u00cd\u00ce\7\5\2\2\u00ce\35\3\2\2"+ 2010 | "\2\u00cf\u00d0\7\36\2\2\u00d0\u00d1\7\7\2\2\u00d1\u00d2\7\13\2\2\u00d2"+ 2011 | "\u00d7\5$\23\2\u00d3\u00d4\7\4\2\2\u00d4\u00d6\5$\23\2\u00d5\u00d3\3\2"+ 2012 | "\2\2\u00d6\u00d9\3\2\2\2\u00d7\u00d5\3\2\2\2\u00d7\u00d8\3\2\2\2\u00d8"+ 2013 | "\u00da\3\2\2\2\u00d9\u00d7\3\2\2\2\u00da\u00db\7\f\2\2\u00db\37\3\2\2"+ 2014 | "\2\u00dc\u00dd\7\37\2\2\u00dd\u00de\7\7\2\2\u00de\u00df\7,\2\2\u00df!"+ 2015 | "\3\2\2\2\u00e0\u00e1\7 \2\2\u00e1\u00e2\7\7\2\2\u00e2\u00e3\7\13\2\2\u00e3"+ 2016 | "\u00e8\5$\23\2\u00e4\u00e5\7\4\2\2\u00e5\u00e7\5$\23\2\u00e6\u00e4\3\2"+ 2017 | "\2\2\u00e7\u00ea\3\2\2\2\u00e8\u00e6\3\2\2\2\u00e8\u00e9\3\2\2\2\u00e9"+ 2018 | "\u00eb\3\2\2\2\u00ea\u00e8\3\2\2\2\u00eb\u00ec\7\f\2\2\u00ec#\3\2\2\2"+ 2019 | "\u00ed\u00ee\7,\2\2\u00ee%\3\2\2\2\u00ef\u00f0\7!\2\2\u00f0\u00f1\7\7"+ 2020 | "\2\2\u00f1\u00f2\7\13\2\2\u00f2\u00f7\5(\25\2\u00f3\u00f4\7\4\2\2\u00f4"+ 2021 | "\u00f6\5(\25\2\u00f5\u00f3\3\2\2\2\u00f6\u00f9\3\2\2\2\u00f7\u00f5\3\2"+ 2022 | "\2\2\u00f7\u00f8\3\2\2\2\u00f8\u00fa\3\2\2\2\u00f9\u00f7\3\2\2\2\u00fa"+ 2023 | "\u00fb\7\f\2\2\u00fb\'\3\2\2\2\u00fc\u00ff\5*\26\2\u00fd\u00ff\5,\27\2"+ 2024 | "\u00fe\u00fc\3\2\2\2\u00fe\u00fd\3\2\2\2\u00ff)\3\2\2\2\u0100\u0101\7"+ 2025 | "\3\2\2\u0101\u0102\7\"\2\2\u0102\u0103\7\7\2\2\u0103\u0104\7,\2\2\u0104"+ 2026 | "\u0105\7\4\2\2\u0105\u0106\7#\2\2\u0106\u0107\7\7\2\2\u0107\u0108\7,\2"+ 2027 | "\2\u0108\u0109\7\4\2\2\u0109\u010a\7$\2\2\u010a\u010b\7\7\2\2\u010b\u010c"+ 2028 | "\7,\2\2\u010c\u010d\7\4\2\2\u010d\u010e\7\31\2\2\u010e\u010f\7\7\2\2\u010f"+ 2029 | "\u0110\7,\2\2\u0110\u0111\7\4\2\2\u0111\u0112\5\"\22\2\u0112\u0113\7\4"+ 2030 | "\2\2\u0113\u0114\7%\2\2\u0114\u0115\7\7\2\2\u0115\u0116\7\13\2\2\u0116"+ 2031 | "\u011b\5$\23\2\u0117\u0118\7\4\2\2\u0118\u011a\5$\23\2\u0119\u0117\3\2"+ 2032 | "\2\2\u011a\u011d\3\2\2\2\u011b\u0119\3\2\2\2\u011b\u011c\3\2\2\2\u011c"+ 2033 | "\u011e\3\2\2\2\u011d\u011b\3\2\2\2\u011e\u011f\7\f\2\2\u011f\u0120\7\5"+ 2034 | "\2\2\u0120+\3\2\2\2\u0121\u0122\7\3\2\2\u0122\u0123\7\21\2\2\u0123\u0124"+ 2035 | "\7\7\2\2\u0124\u0125\5\26\f\2\u0125\u0126\7\4\2\2\u0126\u0127\7\22\2\2"+ 2036 | "\u0127\u0128\7\7\2\2\u0128\u0129\5\30\r\2\u0129\u012a\7\4\2\2\u012a\u012b"+ 2037 | "\7\31\2\2\u012b\u012c\7\7\2\2\u012c\u012d\7,\2\2\u012d\u012e\7\4\2\2\u012e"+ 2038 | "\u012f\7\32\2\2\u012f\u0130\7\7\2\2\u0130\u0131\7,\2\2\u0131\u0132\7\5"+ 2039 | "\2\2\u0132-\3\2\2\2\u0133\u0134\7\3\2\2\u0134\u0135\7&\2\2\u0135\u0136"+ 2040 | "\7\7\2\2\u0136\u0137\7\13\2\2\u0137\u0138\7,\2\2\u0138\u0139\7\4\2\2\u0139"+ 2041 | "\u013a\7,\2\2\u013a\u013b\7\f\2\2\u013b\u013c\7\4\2\2\u013c\u013d\7\'"+ 2042 | "\2\2\u013d\u013e\7\7\2\2\u013e\u013f\7\13\2\2\u013f\u0140\7,\2\2\u0140"+ 2043 | "\u0141\7\f\2\2\u0141\u0142\7\4\2\2\u0142\u0143\7(\2\2\u0143\u0144\7\7"+ 2044 | "\2\2\u0144\u0145\7,\2\2\u0145\u0146\7\5\2\2\u0146/\3\2\2\2\u0147\u0148"+ 2045 | "\7\3\2\2\u0148\u0149\7\"\2\2\u0149\u014a\7\7\2\2\u014a\u014b\7,\2\2\u014b"+ 2046 | "\u014c\7\4\2\2\u014c\u014d\7#\2\2\u014d\u014e\7\7\2\2\u014e\u014f\7,\2"+ 2047 | "\2\u014f\u0150\7\4\2\2\u0150\u0151\7$\2\2\u0151\u0152\7\7\2\2\u0152\u0153"+ 2048 | "\7,\2\2\u0153\u0154\7\4\2\2\u0154\u0155\7)\2\2\u0155\u0156\7\7\2\2\u0156"+ 2049 | "\u0157\7,\2\2\u0157\u0158\7\4\2\2\u0158\u0159\7\22\2\2\u0159\u015a\7\7"+ 2050 | "\2\2\u015a\u015b\7\13\2\2\u015b\u0160\5\62\32\2\u015c\u015d\7\4\2\2\u015d"+ 2051 | "\u015f\5\62\32\2\u015e\u015c\3\2\2\2\u015f\u0162\3\2\2\2\u0160\u015e\3"+ 2052 | "\2\2\2\u0160\u0161\3\2\2\2\u0161\u0163\3\2\2\2\u0162\u0160\3\2\2\2\u0163"+ 2053 | "\u0164\7\f\2\2\u0164\u0165\7\4\2\2\u0165\u0166\7\23\2\2\u0166\u0167\7"+ 2054 | "\7\2\2\u0167\u0168\7,\2\2\u0168\u0169\7\5\2\2\u0169\61\3\2\2\2\u016a\u016b"+ 2055 | "\7\3\2\2\u016b\u016c\7*\2\2\u016c\u016d\7\7\2\2\u016d\u016e\7,\2\2\u016e"+ 2056 | "\u016f\7\4\2\2\u016f\u0170\7+\2\2\u0170\u0171\7\7\2\2\u0171\u0172\7,\2"+ 2057 | "\2\u0172\u0173\7\5\2\2\u0173\63\3\2\2\2\21