Commit 8866b755 authored by Fred Eisele's avatar Fred Eisele
Browse files

refactor Def to Exp, implement identity and composition

Composition can be performed [ q1 ; q2 ; q3 ] with multiple objects
separated with semicolons. This is rather than [ q1 ; [ q2 ; q3 ] ]
parent 2c0dc18a
// Generated from /home/fred/.boot/cache/tmp/home/fred/github/fql2/gen_src/catdata/aql/grammar/p30/-ru88jt/AqlLexerRules.g4 by ANTLR 4.7
// Generated from /home/fred/.boot/cache/tmp/home/fred/github/fql2/gen_src/catdata/aql/grammar/f04/-ru88jt/AqlLexerRules.g4 by ANTLR 4.7
package catdata.aql.grammar;
import org.antlr.v4.runtime.Lexer;
import org.antlr.v4.runtime.CharStream;
......
This diff is collapsed.
// Generated from /home/fred/.boot/cache/tmp/home/fred/github/fql2/gen_src/catdata/aql/grammar/p30/-ru88jt/AqlParser.g4 by ANTLR 4.7
// Generated from /home/fred/.boot/cache/tmp/home/fred/github/fql2/gen_src/catdata/aql/grammar/f04/-ru88jt/AqlParser.g4 by ANTLR 4.7
package catdata.aql.grammar;
import org.antlr.v4.runtime.ParserRuleContext;
......@@ -736,13 +736,13 @@ public class AqlParserBaseListener implements AqlParserListener {
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterTypesideKind_Def(AqlParser.TypesideKind_DefContext ctx) { }
@Override public void enterTypesideKind_Exp(AqlParser.TypesideKind_ExpContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitTypesideKind_Def(AqlParser.TypesideKind_DefContext ctx) { }
@Override public void exitTypesideKind_Exp(AqlParser.TypesideKind_ExpContext ctx) { }
/**
* {@inheritDoc}
*
......@@ -1168,13 +1168,13 @@ public class AqlParserBaseListener implements AqlParserListener {
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterSchemaKind_Def(AqlParser.SchemaKind_DefContext ctx) { }
@Override public void enterSchemaKind_Exp(AqlParser.SchemaKind_ExpContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitSchemaKind_Def(AqlParser.SchemaKind_DefContext ctx) { }
@Override public void exitSchemaKind_Exp(AqlParser.SchemaKind_ExpContext ctx) { }
/**
* {@inheritDoc}
*
......@@ -1888,13 +1888,13 @@ public class AqlParserBaseListener implements AqlParserListener {
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterInstanceKind_Def(AqlParser.InstanceKind_DefContext ctx) { }
@Override public void enterInstanceKind_Exp(AqlParser.InstanceKind_ExpContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitInstanceKind_Def(AqlParser.InstanceKind_DefContext ctx) { }
@Override public void exitInstanceKind_Exp(AqlParser.InstanceKind_ExpContext ctx) { }
/**
* {@inheritDoc}
*
......@@ -2332,49 +2332,49 @@ public class AqlParserBaseListener implements AqlParserListener {
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterMapExp_Id(AqlParser.MapExp_IdContext ctx) { }
@Override public void enterMappingExp_Identity(AqlParser.MappingExp_IdentityContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitMapExp_Id(AqlParser.MapExp_IdContext ctx) { }
@Override public void exitMappingExp_Identity(AqlParser.MappingExp_IdentityContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterMapExp_Compose(AqlParser.MapExp_ComposeContext ctx) { }
@Override public void enterMappingExp_Compose(AqlParser.MappingExp_ComposeContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitMapExp_Compose(AqlParser.MapExp_ComposeContext ctx) { }
@Override public void exitMappingExp_Compose(AqlParser.MappingExp_ComposeContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterMapExp_Literal(AqlParser.MapExp_LiteralContext ctx) { }
@Override public void enterMappingExp_Literal(AqlParser.MappingExp_LiteralContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitMapExp_Literal(AqlParser.MapExp_LiteralContext ctx) { }
@Override public void exitMappingExp_Literal(AqlParser.MappingExp_LiteralContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterMapExp_Get(AqlParser.MapExp_GetContext ctx) { }
@Override public void enterMappingExp_Get(AqlParser.MappingExp_GetContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitMapExp_Get(AqlParser.MapExp_GetContext ctx) { }
@Override public void exitMappingExp_Get(AqlParser.MappingExp_GetContext ctx) { }
/**
* {@inheritDoc}
*
......@@ -2392,13 +2392,13 @@ public class AqlParserBaseListener implements AqlParserListener {
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterMappingKind_Def(AqlParser.MappingKind_DefContext ctx) { }
@Override public void enterMappingKind_Exp(AqlParser.MappingKind_ExpContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitMappingKind_Def(AqlParser.MappingKind_DefContext ctx) { }
@Override public void exitMappingKind_Exp(AqlParser.MappingKind_ExpContext ctx) { }
/**
* {@inheritDoc}
*
......@@ -2411,6 +2411,18 @@ public class AqlParserBaseListener implements AqlParserListener {
* <p>The default implementation does nothing.</p>
*/
@Override public void exitMappingLiteralSection(AqlParser.MappingLiteralSectionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterMappingLiteralSubsection(AqlParser.MappingLiteralSubsectionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitMappingLiteralSubsection(AqlParser.MappingLiteralSubsectionContext ctx) { }
/**
* {@inheritDoc}
*
......@@ -2548,13 +2560,13 @@ public class AqlParserBaseListener implements AqlParserListener {
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterTransform_Id(AqlParser.Transform_IdContext ctx) { }
@Override public void enterTransform_Identity(AqlParser.Transform_IdentityContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitTransform_Id(AqlParser.Transform_IdContext ctx) { }
@Override public void exitTransform_Identity(AqlParser.Transform_IdentityContext ctx) { }
/**
* {@inheritDoc}
*
......@@ -2716,13 +2728,13 @@ public class AqlParserBaseListener implements AqlParserListener {
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterTransformKind_Def(AqlParser.TransformKind_DefContext ctx) { }
@Override public void enterTransformKind_Exp(AqlParser.TransformKind_ExpContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitTransformKind_Def(AqlParser.TransformKind_DefContext ctx) { }
@Override public void exitTransformKind_Exp(AqlParser.TransformKind_ExpContext ctx) { }
/**
* {@inheritDoc}
*
......@@ -2956,13 +2968,13 @@ public class AqlParserBaseListener implements AqlParserListener {
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterQueryExp_Id(AqlParser.QueryExp_IdContext ctx) { }
@Override public void enterQueryExp_Identity(AqlParser.QueryExp_IdentityContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitQueryExp_Id(AqlParser.QueryExp_IdContext ctx) { }
@Override public void exitQueryExp_Identity(AqlParser.QueryExp_IdentityContext ctx) { }
/**
* {@inheritDoc}
*
......@@ -3040,13 +3052,13 @@ public class AqlParserBaseListener implements AqlParserListener {
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterQueryKind_Def(AqlParser.QueryKind_DefContext ctx) { }
@Override public void enterQueryKind_Exp(AqlParser.QueryKind_ExpContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitQueryKind_Def(AqlParser.QueryKind_DefContext ctx) { }
@Override public void exitQueryKind_Exp(AqlParser.QueryKind_ExpContext ctx) { }
/**
* {@inheritDoc}
*
......@@ -3244,13 +3256,13 @@ public class AqlParserBaseListener implements AqlParserListener {
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterGraphKind_Def(AqlParser.GraphKind_DefContext ctx) { }
@Override public void enterGraphKind_Exp(AqlParser.GraphKind_ExpContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitGraphKind_Def(AqlParser.GraphKind_DefContext ctx) { }
@Override public void exitGraphKind_Exp(AqlParser.GraphKind_ExpContext ctx) { }
/**
* {@inheritDoc}
*
......@@ -3508,13 +3520,13 @@ public class AqlParserBaseListener implements AqlParserListener {
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterCommandKind_Def(AqlParser.CommandKind_DefContext ctx) { }
@Override public void enterCommandKind_Exp(AqlParser.CommandKind_ExpContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitCommandKind_Def(AqlParser.CommandKind_DefContext ctx) { }
@Override public void exitCommandKind_Exp(AqlParser.CommandKind_ExpContext ctx) { }
/**
* {@inheritDoc}
*
......@@ -3748,13 +3760,13 @@ public class AqlParserBaseListener implements AqlParserListener {
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterSchemaColimitKind_Def(AqlParser.SchemaColimitKind_DefContext ctx) { }
@Override public void enterSchemaColimitKind_Exp(AqlParser.SchemaColimitKind_ExpContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitSchemaColimitKind_Def(AqlParser.SchemaColimitKind_DefContext ctx) { }
@Override public void exitSchemaColimitKind_Exp(AqlParser.SchemaColimitKind_ExpContext ctx) { }
/**
* {@inheritDoc}
*
......@@ -3904,13 +3916,13 @@ public class AqlParserBaseListener implements AqlParserListener {
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterConstraintKind_Def(AqlParser.ConstraintKind_DefContext ctx) { }
@Override public void enterConstraintKind_Exp(AqlParser.ConstraintKind_ExpContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitConstraintKind_Def(AqlParser.ConstraintKind_DefContext ctx) { }
@Override public void exitConstraintKind_Exp(AqlParser.ConstraintKind_ExpContext ctx) { }
/**
* {@inheritDoc}
*
......
// Generated from /home/fred/.boot/cache/tmp/home/fred/github/fql2/gen_src/catdata/aql/grammar/p30/-ru88jt/AqlParser.g4 by ANTLR 4.7
// Generated from /home/fred/.boot/cache/tmp/home/fred/github/fql2/gen_src/catdata/aql/grammar/f04/-ru88jt/AqlParser.g4 by ANTLR 4.7
package catdata.aql.grammar;
import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor;
......@@ -437,7 +437,7 @@ public class AqlParserBaseVisitor<T> extends AbstractParseTreeVisitor<T> impleme
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitTypesideKind_Def(AqlParser.TypesideKind_DefContext ctx) { return visitChildren(ctx); }
@Override public T visitTypesideKind_Exp(AqlParser.TypesideKind_ExpContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
......@@ -689,7 +689,7 @@ public class AqlParserBaseVisitor<T> extends AbstractParseTreeVisitor<T> impleme
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitSchemaKind_Def(AqlParser.SchemaKind_DefContext ctx) { return visitChildren(ctx); }
@Override public T visitSchemaKind_Exp(AqlParser.SchemaKind_ExpContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
......@@ -1109,7 +1109,7 @@ public class AqlParserBaseVisitor<T> extends AbstractParseTreeVisitor<T> impleme
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitInstanceKind_Def(AqlParser.InstanceKind_DefContext ctx) { return visitChildren(ctx); }
@Override public T visitInstanceKind_Exp(AqlParser.InstanceKind_ExpContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
......@@ -1368,28 +1368,28 @@ public class AqlParserBaseVisitor<T> extends AbstractParseTreeVisitor<T> impleme
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitMapExp_Id(AqlParser.MapExp_IdContext ctx) { return visitChildren(ctx); }
@Override public T visitMappingExp_Identity(AqlParser.MappingExp_IdentityContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitMapExp_Compose(AqlParser.MapExp_ComposeContext ctx) { return visitChildren(ctx); }
@Override public T visitMappingExp_Compose(AqlParser.MappingExp_ComposeContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitMapExp_Literal(AqlParser.MapExp_LiteralContext ctx) { return visitChildren(ctx); }
@Override public T visitMappingExp_Literal(AqlParser.MappingExp_LiteralContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitMapExp_Get(AqlParser.MapExp_GetContext ctx) { return visitChildren(ctx); }
@Override public T visitMappingExp_Get(AqlParser.MappingExp_GetContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
......@@ -1403,7 +1403,7 @@ public class AqlParserBaseVisitor<T> extends AbstractParseTreeVisitor<T> impleme
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitMappingKind_Def(AqlParser.MappingKind_DefContext ctx) { return visitChildren(ctx); }
@Override public T visitMappingKind_Exp(AqlParser.MappingKind_ExpContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
......@@ -1411,6 +1411,13 @@ public class AqlParserBaseVisitor<T> extends AbstractParseTreeVisitor<T> impleme
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitMappingLiteralSection(AqlParser.MappingLiteralSectionContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitMappingLiteralSubsection(AqlParser.MappingLiteralSubsectionContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
......@@ -1494,7 +1501,7 @@ public class AqlParserBaseVisitor<T> extends AbstractParseTreeVisitor<T> impleme
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitTransform_Id(AqlParser.Transform_IdContext ctx) { return visitChildren(ctx); }
@Override public T visitTransform_Identity(AqlParser.Transform_IdentityContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
......@@ -1592,7 +1599,7 @@ public class AqlParserBaseVisitor<T> extends AbstractParseTreeVisitor<T> impleme
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitTransformKind_Def(AqlParser.TransformKind_DefContext ctx) { return visitChildren(ctx); }
@Override public T visitTransformKind_Exp(AqlParser.TransformKind_ExpContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
......@@ -1732,7 +1739,7 @@ public class AqlParserBaseVisitor<T> extends AbstractParseTreeVisitor<T> impleme
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitQueryExp_Id(AqlParser.QueryExp_IdContext ctx) { return visitChildren(ctx); }
@Override public T visitQueryExp_Identity(AqlParser.QueryExp_IdentityContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
......@@ -1781,7 +1788,7 @@ public class AqlParserBaseVisitor<T> extends AbstractParseTreeVisitor<T> impleme
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitQueryKind_Def(AqlParser.QueryKind_DefContext ctx) { return visitChildren(ctx); }
@Override public T visitQueryKind_Exp(AqlParser.QueryKind_ExpContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
......@@ -1900,7 +1907,7 @@ public class AqlParserBaseVisitor<T> extends AbstractParseTreeVisitor<T> impleme
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitGraphKind_Def(AqlParser.GraphKind_DefContext ctx) { return visitChildren(ctx); }
@Override public T visitGraphKind_Exp(AqlParser.GraphKind_ExpContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
......@@ -2054,7 +2061,7 @@ public class AqlParserBaseVisitor<T> extends AbstractParseTreeVisitor<T> impleme
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitCommandKind_Def(AqlParser.CommandKind_DefContext ctx) { return visitChildren(ctx); }
@Override public T visitCommandKind_Exp(AqlParser.CommandKind_ExpContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
......@@ -2194,7 +2201,7 @@ public class AqlParserBaseVisitor<T> extends AbstractParseTreeVisitor<T> impleme
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitSchemaColimitKind_Def(AqlParser.SchemaColimitKind_DefContext ctx) { return visitChildren(ctx); }
@Override public T visitSchemaColimitKind_Exp(AqlParser.SchemaColimitKind_ExpContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
......@@ -2285,7 +2292,7 @@ public class AqlParserBaseVisitor<T> extends AbstractParseTreeVisitor<T> impleme
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitConstraintKind_Def(AqlParser.ConstraintKind_DefContext ctx) { return visitChildren(ctx); }
@Override public T visitConstraintKind_Exp(AqlParser.ConstraintKind_ExpContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
......
......@@ -4,9 +4,9 @@ options { tokenVocab=AqlLexerRules; }
commandId : symbol ;
commandRef : symbol ;
commandAssignment : COMMAND commandId EQUAL commandDef ;
commandAssignment : COMMAND commandId EQUAL commandExp ;
commandDef
commandExp
: EXEC_CMDLINE
(LBRACE commandCmdLineSection RBRACE)?
#Command_CmdLine
......@@ -56,7 +56,7 @@ commandDef
commandKind
: commandRef # CommandKind_Ref
| LPAREN commandDef RPAREN # CommandKind_Def
| LPAREN commandExp RPAREN # CommandKind_Exp
;
commandAddClasspathSection : STRING+ ;
......
......@@ -5,17 +5,17 @@ options { tokenVocab=AqlLexerRules; }
constraintId : symbol ;
constraintRef : symbol ;
constraintAssignment : CONSTRAINTS constraintId EQUAL constraintDef ;
constraintAssignment : CONSTRAINTS constraintId EQUAL constraintExp ;
constraintDef
constraintExp
: LITERAL COLON schemaRef
(LBRACE constraintLiteralSection? RBRACE)? #ConstraintExp_Literal
;
constraintKind
: constraintRef # ConstraintKind_Ref
| constraintDef # ConstraintKind_Def
| LPAREN constraintDef RPAREN # ConstraintKind_Def
| constraintExp # ConstraintKind_Exp
| LPAREN constraintExp RPAREN # ConstraintKind_Exp
;
constraintLiteralSection
......
......@@ -4,9 +4,9 @@ options { tokenVocab=AqlLexerRules; }
graphId : symbol ;
graphRef : symbol ;
graphAssignment : GRAPH graphId EQUAL graphDef ;
graphAssignment : GRAPH graphId EQUAL graphExp ;
graphDef
graphExp
: LITERAL
(LBRACE graphLiteralSection RBRACE)?
#Graph_Literal
......@@ -14,7 +14,7 @@ graphDef
graphKind
: graphRef # GraphKind_Ref
| LPAREN graphDef RPAREN # GraphKind_Def
| LPAREN graphExp RPAREN # GraphKind_Exp
;
graphLiteralSection
......
......@@ -4,9 +4,9 @@ options { tokenVocab=AqlLexerRules; }
instanceId : symbol ;
instanceRef : symbol ;
instanceAssignment : INSTANCE instanceId EQUAL instanceDef ;
instanceAssignment : INSTANCE instanceId EQUAL instanceExp ;
instanceDef
instanceExp
: EMPTY COLON schemaKind
#Instance_Empty
......@@ -66,7 +66,7 @@ instanceDef
(LBRACE instanceQuotientJdbcSection RBRACE)?
#Instance_QuotientJdbc
| QUOTIENT_CSV schemaDef
| QUOTIENT_CSV schemaExp
(LBRACE instanceQuotientCsvSection RBRACE)?
#Instance_QuotientCsv
......@@ -106,8 +106,8 @@ instanceDef
instanceKind
: instanceRef # InstanceKind_Ref
| instanceDef # InstanceKind_Def
| (LPAREN instanceDef RPAREN) # InstanceKind_Def
| instanceExp # InstanceKind_Exp
| (LPAREN instanceExp RPAREN) # InstanceKind_Exp
;
instanceImportJdbcAllSection : allOptions ;
......
......@@ -4,36 +4,39 @@ options { tokenVocab=AqlLexerRules; }
mappingId : symbol ;
mappingRef : symbol ;
mappingAssignment : MAPPING mappingId EQUAL mappingDef ;
mappingAssignment : MAPPING mappingId EQUAL mappingExp ;
mappingDef
mappingExp
: IDENTITY schemaRef
#MapExp_Id
# MappingExp_Identity
| LBRACK mappingRef SEMI mappingRef RBRACK
#MapExp_Compose
| LBRACK mappingRef (SEMI mappingRef)+ RBRACK
# MappingExp_Compose
| LITERAL COLON schemaRef RARROW schemaRef
LBRACE mappingLiteralSection RBRACE
#MapExp_Literal
# MappingExp_Literal
| GET_MAPPING schemaColimitRef schemaRef
#MapExp_Get
# MappingExp_Get
;
mappingKind
: mappingRef # MappingKind_Ref
| mappingDef # MappingKind_Def
| LPAREN mappingDef RPAREN # MappingKind_Def
| mappingExp # MappingKind_Exp
| LPAREN mappingExp RPAREN # MappingKind_Exp
;
mappingLiteralSection
: (IMPORTS mappingRef*)?
( ENTITY mappingEntitySig*
| FOREIGN_KEYS mappingForeignSig*
| ATTRIBUTES mappingAttributeSig* )*
mappingLiteralSubsection*
allOptions
;
mappingLiteralSubsection
: ENTITY mappingEntitySig*
(FOREIGN_KEYS mappingForeignSig*)?
(ATTRIBUTES mappingAttributeSig*)?
;
mappingEntitySig : schemaEntityId RARROW schemaEntityId ;
......
......@@ -6,11 +6,11 @@ queryRef : symbol ;
queryFromSchema : LPAREN IDENTITY schemaRef RPAREN ;
queryAssignment : QUERY queryId EQUAL queryDef ;
queryAssignment : QUERY queryId EQUAL queryExp ;
queryDef
queryExp
: IDENTITY schemaRef
#QueryExp_Id
#QueryExp_Identity
| LITERAL COLON schemaKind RARROW schemaRef
(LBRACE queryLiteralSection RBRACE)?
......@@ -37,8 +37,8 @@ queryDef
queryKind
: queryRef # QueryKind_Ref