Commit a321f442 authored by Fred Eisele's avatar Fred Eisele
Browse files

Command loading and clean-up

parent f7faf0e1
This diff is collapsed.
This diff is collapsed.
// Generated from /home/fred/.boot/cache/tmp/home/fred/github/fql2/gen_src/catdata/aql/grammar/b61/-ru88jt/AqlParser.g4 by ANTLR 4.7
// Generated from /home/fred/.boot/cache/tmp/home/fred/github/fql2/gen_src/catdata/aql/grammar/eub/-ru88jt/AqlParser.g4 by ANTLR 4.7
package catdata.aql.grammar;
import org.antlr.v4.runtime.ParserRuleContext;
......@@ -3695,6 +3695,30 @@ public class AqlParserBaseListener implements AqlParserListener {
* <p>The default implementation does nothing.</p>
*/
@Override public void exitCommandExp_Check(AqlParser.CommandExp_CheckContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterCommandExp_LoadJars(AqlParser.CommandExp_LoadJarsContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitCommandExp_LoadJars(AqlParser.CommandExp_LoadJarsContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterCommandExp_Match(AqlParser.CommandExp_MatchContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitCommandExp_Match(AqlParser.CommandExp_MatchContext ctx) { }
/**
* {@inheritDoc}
*
......@@ -3851,6 +3875,30 @@ public class AqlParserBaseListener implements AqlParserListener {
* <p>The default implementation does nothing.</p>
*/
@Override public void exitCommandExecJdbcSection(AqlParser.CommandExecJdbcSectionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterCommandLoadJarsSection(AqlParser.CommandLoadJarsSectionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitCommandLoadJarsSection(AqlParser.CommandLoadJarsSectionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterCommandMatchSection(AqlParser.CommandMatchSectionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitCommandMatchSection(AqlParser.CommandMatchSectionContext ctx) { }
/**
* {@inheritDoc}
*
......@@ -3947,6 +3995,18 @@ public class AqlParserBaseListener implements AqlParserListener {
* <p>The default implementation does nothing.</p>
*/
@Override public void exitCommandPrefixDst(AqlParser.CommandPrefixDstContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterCommandMatchWhich(AqlParser.CommandMatchWhichContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitCommandMatchWhich(AqlParser.CommandMatchWhichContext ctx) { }
/**
* {@inheritDoc}
*
......
// Generated from /home/fred/.boot/cache/tmp/home/fred/github/fql2/gen_src/catdata/aql/grammar/b61/-ru88jt/AqlParser.g4 by ANTLR 4.7
// Generated from /home/fred/.boot/cache/tmp/home/fred/github/fql2/gen_src/catdata/aql/grammar/eub/-ru88jt/AqlParser.g4 by ANTLR 4.7
package catdata.aql.grammar;
import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor;
......@@ -2160,6 +2160,20 @@ public class AqlParserBaseVisitor<T> extends AbstractParseTreeVisitor<T> impleme
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitCommandExp_Check(AqlParser.CommandExp_CheckContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitCommandExp_LoadJars(AqlParser.CommandExp_LoadJarsContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitCommandExp_Match(AqlParser.CommandExp_MatchContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
......@@ -2251,6 +2265,20 @@ public class AqlParserBaseVisitor<T> extends AbstractParseTreeVisitor<T> impleme
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitCommandExecJdbcSection(AqlParser.CommandExecJdbcSectionContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitCommandLoadJarsSection(AqlParser.CommandLoadJarsSectionContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitCommandMatchSection(AqlParser.CommandMatchSectionContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
......@@ -2307,6 +2335,13 @@ public class AqlParserBaseVisitor<T> extends AbstractParseTreeVisitor<T> impleme
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitCommandPrefixDst(AqlParser.CommandPrefixDstContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitCommandMatchWhich(AqlParser.CommandMatchWhichContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
......
// Generated from /home/fred/.boot/cache/tmp/home/fred/github/fql2/gen_src/catdata/aql/grammar/b61/-ru88jt/AqlParser.g4 by ANTLR 4.7
// Generated from /home/fred/.boot/cache/tmp/home/fred/github/fql2/gen_src/catdata/aql/grammar/eub/-ru88jt/AqlParser.g4 by ANTLR 4.7
package catdata.aql.grammar;
import org.antlr.v4.runtime.tree.ParseTreeListener;
......@@ -3335,6 +3335,30 @@ public interface AqlParserListener extends ParseTreeListener {
* @param ctx the parse tree
*/
void exitCommandExp_Check(AqlParser.CommandExp_CheckContext ctx);
/**
* Enter a parse tree produced by the {@code CommandExp_LoadJars}
* labeled alternative in {@link AqlParser#commandExp}.
* @param ctx the parse tree
*/
void enterCommandExp_LoadJars(AqlParser.CommandExp_LoadJarsContext ctx);
/**
* Exit a parse tree produced by the {@code CommandExp_LoadJars}
* labeled alternative in {@link AqlParser#commandExp}.
* @param ctx the parse tree
*/
void exitCommandExp_LoadJars(AqlParser.CommandExp_LoadJarsContext ctx);
/**
* Enter a parse tree produced by the {@code CommandExp_Match}
* labeled alternative in {@link AqlParser#commandExp}.
* @param ctx the parse tree
*/
void enterCommandExp_Match(AqlParser.CommandExp_MatchContext ctx);
/**
* Exit a parse tree produced by the {@code CommandExp_Match}
* labeled alternative in {@link AqlParser#commandExp}.
* @param ctx the parse tree
*/
void exitCommandExp_Match(AqlParser.CommandExp_MatchContext ctx);
/**
* Enter a parse tree produced by the {@code CommandExp_AssertConsistent}
* labeled alternative in {@link AqlParser#commandExp}.
......@@ -3483,6 +3507,26 @@ public interface AqlParserListener extends ParseTreeListener {
* @param ctx the parse tree
*/
void exitCommandExecJdbcSection(AqlParser.CommandExecJdbcSectionContext ctx);
/**
* Enter a parse tree produced by {@link AqlParser#commandLoadJarsSection}.
* @param ctx the parse tree
*/
void enterCommandLoadJarsSection(AqlParser.CommandLoadJarsSectionContext ctx);
/**
* Exit a parse tree produced by {@link AqlParser#commandLoadJarsSection}.
* @param ctx the parse tree
*/
void exitCommandLoadJarsSection(AqlParser.CommandLoadJarsSectionContext ctx);
/**
* Enter a parse tree produced by {@link AqlParser#commandMatchSection}.
* @param ctx the parse tree
*/
void enterCommandMatchSection(AqlParser.CommandMatchSectionContext ctx);
/**
* Exit a parse tree produced by {@link AqlParser#commandMatchSection}.
* @param ctx the parse tree
*/
void exitCommandMatchSection(AqlParser.CommandMatchSectionContext ctx);
/**
* Enter a parse tree produced by {@link AqlParser#commandExportCsvSection}.
* @param ctx the parse tree
......@@ -3563,6 +3607,16 @@ public interface AqlParserListener extends ParseTreeListener {
* @param ctx the parse tree
*/
void exitCommandPrefixDst(AqlParser.CommandPrefixDstContext ctx);
/**
* Enter a parse tree produced by {@link AqlParser#commandMatchWhich}.
* @param ctx the parse tree
*/
void enterCommandMatchWhich(AqlParser.CommandMatchWhichContext ctx);
/**
* Exit a parse tree produced by {@link AqlParser#commandMatchWhich}.
* @param ctx the parse tree
*/
void exitCommandMatchWhich(AqlParser.CommandMatchWhichContext ctx);
/**
* Enter a parse tree produced by {@link AqlParser#schemaColimitId}.
* @param ctx the parse tree
......
// Generated from /home/fred/.boot/cache/tmp/home/fred/github/fql2/gen_src/catdata/aql/grammar/b61/-ru88jt/AqlParser.g4 by ANTLR 4.7
// Generated from /home/fred/.boot/cache/tmp/home/fred/github/fql2/gen_src/catdata/aql/grammar/eub/-ru88jt/AqlParser.g4 by ANTLR 4.7
package catdata.aql.grammar;
import org.antlr.v4.runtime.tree.ParseTreeVisitor;
......@@ -1981,6 +1981,20 @@ public interface AqlParserVisitor<T> extends ParseTreeVisitor<T> {
* @return the visitor result
*/
T visitCommandExp_Check(AqlParser.CommandExp_CheckContext ctx);
/**
* Visit a parse tree produced by the {@code CommandExp_LoadJars}
* labeled alternative in {@link AqlParser#commandExp}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitCommandExp_LoadJars(AqlParser.CommandExp_LoadJarsContext ctx);
/**
* Visit a parse tree produced by the {@code CommandExp_Match}
* labeled alternative in {@link AqlParser#commandExp}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitCommandExp_Match(AqlParser.CommandExp_MatchContext ctx);
/**
* Visit a parse tree produced by the {@code CommandExp_AssertConsistent}
* labeled alternative in {@link AqlParser#commandExp}.
......@@ -2068,6 +2082,18 @@ public interface AqlParserVisitor<T> extends ParseTreeVisitor<T> {
* @return the visitor result
*/
T visitCommandExecJdbcSection(AqlParser.CommandExecJdbcSectionContext ctx);
/**
* Visit a parse tree produced by {@link AqlParser#commandLoadJarsSection}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitCommandLoadJarsSection(AqlParser.CommandLoadJarsSectionContext ctx);
/**
* Visit a parse tree produced by {@link AqlParser#commandMatchSection}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitCommandMatchSection(AqlParser.CommandMatchSectionContext ctx);
/**
* Visit a parse tree produced by {@link AqlParser#commandExportCsvSection}.
* @param ctx the parse tree
......@@ -2116,6 +2142,12 @@ public interface AqlParserVisitor<T> extends ParseTreeVisitor<T> {
* @return the visitor result
*/
T visitCommandPrefixDst(AqlParser.CommandPrefixDstContext ctx);
/**
* Visit a parse tree produced by {@link AqlParser#commandMatchWhich}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitCommandMatchWhich(AqlParser.CommandMatchWhichContext ctx);
/**
* Visit a parse tree produced by {@link AqlParser#schemaColimitId}.
* @param ctx the parse tree
......
......@@ -22,6 +22,14 @@ commandExp
| CHECK constraintRef instanceRef
# CommandExp_Check
| LOAD_JARS
(LBRACE commandLoadJarsSection RBRACE)?
# CommandExp_LoadJars
| MATCH commandMatchWhich graphRef graphRef
(LBRACE commandMatchSection RBRACE)?
# CommandExp_Match
| ASSERT_CONSISTENT instanceRef
# CommandExp_AssertConsistent
......@@ -33,7 +41,7 @@ commandExp
(LBRACE commandExportCsvSection RBRACE)?
# CommandExp_ExportCsvTransform
| EXPORT_JDBC_INSTANCE instanceRef
| EXPORT_JDBC_INSTANCE transformRef
(commandJdbcClass (commandJdbcUri commandPrefixDst?)?)?
(LBRACE commandExportJdbcSection RBRACE)?
# CommandExp_ExportJdbcInstance
......@@ -41,21 +49,21 @@ commandExp
| EXPORT_JDBC_QUERY queryRef
(commandJdbcClass (commandJdbcUri (commandPrefixSrc commandPrefixDst?)?)?)?
(LBRACE commandExportJdbcSection RBRACE)?
#CommandExp_ExportJdbcQuery
# CommandExp_ExportJdbcQuery
| EXPORT_JDBC_TRANSFORM transformRef
(commandJdbcClass (commandJdbcUri commandPrefix?)?)?
(LBRACE commandExportJdbcSection RBRACE)?
(LBRACE commandExportJdbcSection RBRACE)?
#CommandExp_ExportJdbcTransform
# CommandExp_ExportJdbcTransform
| ADD_TO_CLASSPATH
(LBRACE commandAddClasspathSection RBRACE)?
#CommandExp_AddToClasspath
# CommandExp_AddToClasspath
;
commandKind
: commandRef # CommandKind_Ref
: commandRef # CommandKind_Ref
| LPAREN commandExp RPAREN # CommandKind_Exp
;
......@@ -67,6 +75,10 @@ commandExecJsSection : STRING* allOptions ;
commandExecJdbcSection : (STRING | MULTI_STRING)+ allOptions ;
commandLoadJarsSection : STRING* ;
commandMatchSection : allOptions ;
commandExportCsvSection : STRING* allOptions ;
commandExportJdbcSection : STRING* allOptions ;
......@@ -77,3 +89,4 @@ commandJdbcUri : STRING ;
commandPrefix : STRING ;
commandPrefixSrc : STRING ;
commandPrefixDst : STRING ;
commandMatchWhich : STRING ;
......@@ -223,6 +223,8 @@ COMMAND : 'command' ;
EXEC_CMDLINE : 'exec_cmdline' ;
EXEC_JS : 'exec_js' ;
EXEC_JDBC : 'exec_jdbc' ;
LOAD_JARS : 'load_jars' ;
MATCH : 'match' ;
CHECK : 'check' ;
ASSERT_CONSISTENT : 'assert_consistent' ;
EXPORT_CSV_INSTANCE : 'export_csv_instance' ;
......
......@@ -119,83 +119,85 @@ COMMAND=118
EXEC_CMDLINE=119
EXEC_JS=120
EXEC_JDBC=121
CHECK=122
ASSERT_CONSISTENT=123
EXPORT_CSV_INSTANCE=124
EXPORT_CSV_TRANSFORM=125
EXPORT_JDBC_INSTANCE=126
EXPORT_JDBC_QUERY=127
EXPORT_JDBC_TRANSFORM=128
ADD_TO_CLASSPATH=129
QUERY=130
SIMPLE=131
GET_MAPPING=132
FROM=133
RETURN=134
TO_QUERY=135
TO_COQUERY=136
SCHEMA=137
SCHEMA_OF=138
GET_SCHEMA=139
IMPORT_ALL=140
SCHEMA_COLIMIT=141
MODIFY=142
WRAP=143
ENTITY_EQUATIONS=144
PATH_EQUATIONS=145
OBSERVATION_EQUATIONS=146
RENAME=147
REMOVE=148
TRANSFORM=149
UNIT=150
COUNIT=151
UNIT_QUERY=152
COUNIT_QUERY=153
TYPESIDE=154
SQL=155
TYPESIDE_OF=156
TYPES=157
CONSTANTS=158
FUNCTIONS=159
JAVA_TYPES=160
JAVA_CONSTANTS=161
JAVA_FUNCTIONS=162
CONSTRAINTS=163
COLON=164
COLON_COLON=165
COMMA=166
SEMI=167
LPAREN=168
RPAREN=169
LBRACE=170
RBRACE=171
LBRACK=172
RBRACK=173
RARROW=174
LT=175
GT=176
EQUAL=177
QUESTION=178
STAR=179
PLUS_ASSIGN=180
PLUS=181
OR=182
DOLLAR=183
RANGE=184
DOT=185
AT=186
POUND=187
NOT=188
UNDERSCORE=189
UPPER_ID=190
LOWER_ID=191
SPECIAL_ID=192
WS=193
ERRCHAR=194
HTML_END=195
HTML_MULTI_STRING=196
MD_END=197
MD_MULTI_STRING=198
LOAD_JARS=122
MATCH=123
CHECK=124
ASSERT_CONSISTENT=125
EXPORT_CSV_INSTANCE=126
EXPORT_CSV_TRANSFORM=127
EXPORT_JDBC_INSTANCE=128
EXPORT_JDBC_QUERY=129
EXPORT_JDBC_TRANSFORM=130
ADD_TO_CLASSPATH=131
QUERY=132
SIMPLE=133
GET_MAPPING=134
FROM=135
RETURN=136
TO_QUERY=137
TO_COQUERY=138
SCHEMA=139
SCHEMA_OF=140
GET_SCHEMA=141
IMPORT_ALL=142
SCHEMA_COLIMIT=143
MODIFY=144
WRAP=145
ENTITY_EQUATIONS=146
PATH_EQUATIONS=147
OBSERVATION_EQUATIONS=148
RENAME=149
REMOVE=150
TRANSFORM=151
UNIT=152
COUNIT=153
UNIT_QUERY=154
COUNIT_QUERY=155
TYPESIDE=156
SQL=157
TYPESIDE_OF=158
TYPES=159
CONSTANTS=160
FUNCTIONS=161
JAVA_TYPES=162
JAVA_CONSTANTS=163
JAVA_FUNCTIONS=164
CONSTRAINTS=165
COLON=166
COLON_COLON=167
COMMA=168
SEMI=169
LPAREN=170
RPAREN=171
LBRACE=172
RBRACE=173
LBRACK=174
RBRACK=175
RARROW=176
LT=177
GT=178
EQUAL=179
QUESTION=180
STAR=181
PLUS_ASSIGN=182
PLUS=183
OR=184
DOLLAR=185
RANGE=186
DOT=187
AT=188
POUND=189
NOT=190
UNDERSCORE=191
UPPER_ID=192
LOWER_ID=193
SPECIAL_ID=194
WS=195
ERRCHAR=196
HTML_END=197
HTML_MULTI_STRING=198
MD_END=199
MD_MULTI_STRING=200
'options'=14
'literal'=15
'imports'=16
......@@ -304,45 +306,47 @@ MD_MULTI_STRING=198
'exec_cmdline'=119
'exec_js'=120
'exec_jdbc'=121
'check'=122
'assert_consistent'=123
'export_csv_instance'=124
'export_csv_transform'=125
'export_jdbc_instance'=126
'export_jdbc_query'=127
'export_jdbc_transform'=128
'add_to_classpath'=129
'query'=130
'simple'=131
'getMapping'=132
'from'=133
'return'=134
'toQuery'=135
'toCoQuery'=136
'schema'=137
'schemaOf'=138
'getSchema'=139
'import_all'=140
'schema_colimit'=141
'modify'=142
'wrap'=143
'entity_equations'=144
'path_equations'=145
'observation_equations'=146
'rename'=147
'remove'=148
'transform'=149
'unit'=150
'counit'=151
'unit_query'=152
'counit_query'=153
'typeside'=154
'sql'=155
'typesideOf'=156
'types'=157
'constants'=158
'functions'=159
'java_types'=160
'java_constants'=161
'java_functions'=162
'constraints'=163
'load_jars'=122
'match'=123
'check'=124
'assert_consistent'=125
'export_csv_instance'=126
'export_csv_transform'=127
'export_jdbc_instance'=128
'export_jdbc_query'=129
'export_jdbc_transform'=130
'add_to_classpath'=131
'query'=132
'simple'=133
'getMapping'=134
'from'=135
'return'=136
'toQuery'=137
'toCoQuery'=138
'schema'=139
'schemaOf'=140
'getSchema'=141
'import_all'=142
'schema_colimit'=143
'modify'=144
'wrap'=145
'entity_equations'=146
'path_equations'=147
'observation_equations'=148
'rename'=149
'remove'=150
'transform'=151
'unit'=152
'counit'=153
'unit_query'=154
'counit_query'=155
'typeside'=156
'sql'=157
'typesideOf'=158
'types'=159
'constants'=160
'functions'=161
'java_types'=162
'java_constants'=163
'java_functions'=164
'constraints'=165