Skip to content

Commit

Permalink
Fix #6
Browse files Browse the repository at this point in the history
  • Loading branch information
thSoft committed Nov 25, 2014
1 parent 9c7536c commit b1e6e4f
Show file tree
Hide file tree
Showing 22 changed files with 2,545 additions and 563 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ public void completeRelation_Columns(EObject model, Assignment assignment, Conte
public void completeColumn_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeColumn_Type(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}

public void complete_Schema(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
Expand All @@ -41,4 +44,7 @@ public void complete_Relation(EObject model, RuleCall ruleCall, ContentAssistCon
public void complete_Column(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_ColumnType(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,17 @@ protected String getRuleName(AbstractElement element) {
nameMappings = new HashMap<AbstractElement, String>() {
private static final long serialVersionUID = 1L;
{
put(grammarAccess.getColumnTypeAccess().getAlternatives(), "rule__ColumnType__Alternatives");
put(grammarAccess.getSchemaAccess().getGroup(), "rule__Schema__Group__0");
put(grammarAccess.getRelationAccess().getGroup(), "rule__Relation__Group__0");
put(grammarAccess.getColumnAccess().getGroup(), "rule__Column__Group__0");
put(grammarAccess.getColumnAccess().getGroup_3(), "rule__Column__Group_3__0");
put(grammarAccess.getSchemaAccess().getNameAssignment_2(), "rule__Schema__NameAssignment_2");
put(grammarAccess.getSchemaAccess().getRelationsAssignment_3(), "rule__Schema__RelationsAssignment_3");
put(grammarAccess.getRelationAccess().getNameAssignment_2(), "rule__Relation__NameAssignment_2");
put(grammarAccess.getRelationAccess().getColumnsAssignment_4(), "rule__Relation__ColumnsAssignment_4");
put(grammarAccess.getColumnAccess().getNameAssignment_2(), "rule__Column__NameAssignment_2");
put(grammarAccess.getColumnAccess().getTypeAssignment_3_1(), "rule__Column__TypeAssignment_3_1");
}
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,63 @@ finally {



// Rule ColumnType
ruleColumnType
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getColumnTypeAccess().getAlternatives()); }
(rule__ColumnType__Alternatives)
{ after(grammarAccess.getColumnTypeAccess().getAlternatives()); }
)

;
finally {
restoreStackSize(stackSize);
}



rule__ColumnType__Alternatives
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getColumnTypeAccess().getIdEnumLiteralDeclaration_0()); }
( 'ID'
)
{ after(grammarAccess.getColumnTypeAccess().getIdEnumLiteralDeclaration_0()); }
)

|(
{ before(grammarAccess.getColumnTypeAccess().getStringEnumLiteralDeclaration_1()); }
( 'STRING'
)
{ after(grammarAccess.getColumnTypeAccess().getStringEnumLiteralDeclaration_1()); }
)

|(
{ before(grammarAccess.getColumnTypeAccess().getNumberEnumLiteralDeclaration_2()); }
( 'NUMBER'
)
{ after(grammarAccess.getColumnTypeAccess().getNumberEnumLiteralDeclaration_2()); }
)

|(
{ before(grammarAccess.getColumnTypeAccess().getBooleanEnumLiteralDeclaration_3()); }
( 'BOOLEAN'
)
{ after(grammarAccess.getColumnTypeAccess().getBooleanEnumLiteralDeclaration_3()); }
)

;
finally {
restoreStackSize(stackSize);
}



rule__Schema__Group__0
Expand Down Expand Up @@ -531,6 +588,7 @@ rule__Column__Group__2
}
:
rule__Column__Group__2__Impl
rule__Column__Group__3
;
finally {
restoreStackSize(stackSize);
Expand All @@ -553,6 +611,99 @@ finally {
}


rule__Column__Group__3
@init {
int stackSize = keepStackSize();
}
:
rule__Column__Group__3__Impl
;
finally {
restoreStackSize(stackSize);
}

rule__Column__Group__3__Impl
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getColumnAccess().getGroup_3()); }
(rule__Column__Group_3__0)?
{ after(grammarAccess.getColumnAccess().getGroup_3()); }
)

;
finally {
restoreStackSize(stackSize);
}










rule__Column__Group_3__0
@init {
int stackSize = keepStackSize();
}
:
rule__Column__Group_3__0__Impl
rule__Column__Group_3__1
;
finally {
restoreStackSize(stackSize);
}

rule__Column__Group_3__0__Impl
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getColumnAccess().getColonKeyword_3_0()); }

':'

{ after(grammarAccess.getColumnAccess().getColonKeyword_3_0()); }
)

;
finally {
restoreStackSize(stackSize);
}


rule__Column__Group_3__1
@init {
int stackSize = keepStackSize();
}
:
rule__Column__Group_3__1__Impl
;
finally {
restoreStackSize(stackSize);
}

rule__Column__Group_3__1__Impl
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getColumnAccess().getTypeAssignment_3_1()); }
(rule__Column__TypeAssignment_3_1)
{ after(grammarAccess.getColumnAccess().getTypeAssignment_3_1()); }
)

;
finally {
restoreStackSize(stackSize);
}



Expand Down Expand Up @@ -635,6 +786,21 @@ finally {
restoreStackSize(stackSize);
}

rule__Column__TypeAssignment_3_1
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getColumnAccess().getTypeColumnTypeEnumRuleCall_3_1_0()); }
ruleColumnType{ after(grammarAccess.getColumnAccess().getTypeColumnTypeEnumRuleCall_3_1_0()); }
)

;
finally {
restoreStackSize(stackSize);
}


RULE_ID : '^'? ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
T__19=19
RULE_ID=4
RULE_STRING=6
T__16=16
T__15=15
T__18=18
T__17=17
T__12=12
T__11=11
T__14=14
T__13=13
RULE_ANY_OTHER=10
T__20=20
RULE_INT=5
RULE_WS=9
RULE_SL_COMMENT=8
RULE_ML_COMMENT=7
'}'=14
'{'=13
'column'=15
'relation'=12
'schema'=11
'NUMBER'=13
'}'=18
':'=20
'BOOLEAN'=14
'STRING'=12
'{'=17
'ID'=11
'column'=19
'relation'=16
'schema'=15
Loading

0 comments on commit b1e6e4f

Please sign in to comment.