Skip to content

Commit

Permalink
Starting the logical generator refactoring
Browse files Browse the repository at this point in the history
- Visual update of the generated file (html/css)
  • Loading branch information
JonnathanRiquelmo committed Jun 13, 2020
1 parent be4eff3 commit 4b0c36e
Show file tree
Hide file tree
Showing 139 changed files with 4,568 additions and 3,808 deletions.
Empty file added .Rhistory
Empty file.
17 changes: 17 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>ERDSL</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
</natures>
</projectDescription>
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ERtext Tool
# ERtext
![](https://img.shields.io/badge/Eclipse%20IDE-2020‑03-blue) ![](https://img.shields.io/badge/Xtext-2.18.0-lightgrey)
____________________________
ERtext tool repository for Modeling and Database Design with textual approach.
Domain-Specific Language for Conceptual Models of Relational Databases

![](https://img.shields.io/github/last-commit/ProjetoDSL/ERDSL?style=for-the-badge)
____________________________
Expand Down
Binary file not shown.
Binary file not shown.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* generated by Xtext 2.18.0.M3
* generated by Xtext 2.21.0
*/
grammar InternalErDsl;

Expand Down Expand Up @@ -199,6 +199,22 @@ finally {
restoreStackSize(stackSize);
}

// Rule DataType
ruleDataType
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getDataTypeAccess().getAlternatives()); }
(rule__DataType__Alternatives)
{ after(grammarAccess.getDataTypeAccess().getAlternatives()); }
)
;
finally {
restoreStackSize(stackSize);
}

rule__RelationSide__Alternatives
@init {
int stackSize = keepStackSize();
Expand Down Expand Up @@ -253,6 +269,57 @@ finally {
restoreStackSize(stackSize);
}

rule__DataType__Alternatives
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getDataTypeAccess().getINTEnumLiteralDeclaration_0()); }
('int')
{ after(grammarAccess.getDataTypeAccess().getINTEnumLiteralDeclaration_0()); }
)
|
(
{ before(grammarAccess.getDataTypeAccess().getDOUBLEEnumLiteralDeclaration_1()); }
('double')
{ after(grammarAccess.getDataTypeAccess().getDOUBLEEnumLiteralDeclaration_1()); }
)
|
(
{ before(grammarAccess.getDataTypeAccess().getMONEYEnumLiteralDeclaration_2()); }
('money')
{ after(grammarAccess.getDataTypeAccess().getMONEYEnumLiteralDeclaration_2()); }
)
|
(
{ before(grammarAccess.getDataTypeAccess().getSTRINGEnumLiteralDeclaration_3()); }
('string')
{ after(grammarAccess.getDataTypeAccess().getSTRINGEnumLiteralDeclaration_3()); }
)
|
(
{ before(grammarAccess.getDataTypeAccess().getBOOLEANEnumLiteralDeclaration_4()); }
('boolean')
{ after(grammarAccess.getDataTypeAccess().getBOOLEANEnumLiteralDeclaration_4()); }
)
|
(
{ before(grammarAccess.getDataTypeAccess().getDATETIMEEnumLiteralDeclaration_5()); }
('datetime')
{ after(grammarAccess.getDataTypeAccess().getDATETIMEEnumLiteralDeclaration_5()); }
)
|
(
{ before(grammarAccess.getDataTypeAccess().getBLOBEnumLiteralDeclaration_6()); }
('file')
{ after(grammarAccess.getDataTypeAccess().getBLOBEnumLiteralDeclaration_6()); }
)
;
finally {
restoreStackSize(stackSize);
}

rule__ERModel__Group__0
@init {
int stackSize = keepStackSize();
Expand Down Expand Up @@ -779,6 +846,7 @@ rule__Attribute__Group__1
}
:
rule__Attribute__Group__1__Impl
rule__Attribute__Group__2
;
finally {
restoreStackSize(stackSize);
Expand All @@ -790,9 +858,35 @@ rule__Attribute__Group__1__Impl
}
:
(
{ before(grammarAccess.getAttributeAccess().getIsKeyAssignment_1()); }
(rule__Attribute__IsKeyAssignment_1)?
{ after(grammarAccess.getAttributeAccess().getIsKeyAssignment_1()); }
{ before(grammarAccess.getAttributeAccess().getTypeAssignment_1()); }
(rule__Attribute__TypeAssignment_1)
{ after(grammarAccess.getAttributeAccess().getTypeAssignment_1()); }
)
;
finally {
restoreStackSize(stackSize);
}

rule__Attribute__Group__2
@init {
int stackSize = keepStackSize();
}
:
rule__Attribute__Group__2__Impl
;
finally {
restoreStackSize(stackSize);
}

rule__Attribute__Group__2__Impl
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getAttributeAccess().getIsKeyAssignment_2()); }
(rule__Attribute__IsKeyAssignment_2)?
{ after(grammarAccess.getAttributeAccess().getIsKeyAssignment_2()); }
)
;
finally {
Expand Down Expand Up @@ -1604,19 +1698,34 @@ finally {
restoreStackSize(stackSize);
}

rule__Attribute__IsKeyAssignment_1
rule__Attribute__TypeAssignment_1
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getAttributeAccess().getTypeDataTypeEnumRuleCall_1_0()); }
ruleDataType
{ after(grammarAccess.getAttributeAccess().getTypeDataTypeEnumRuleCall_1_0()); }
)
;
finally {
restoreStackSize(stackSize);
}

rule__Attribute__IsKeyAssignment_2
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getAttributeAccess().getIsKeyIsIdentifierKeyword_1_0()); }
{ before(grammarAccess.getAttributeAccess().getIsKeyIsIdentifierKeyword_2_0()); }
(
{ before(grammarAccess.getAttributeAccess().getIsKeyIsIdentifierKeyword_1_0()); }
{ before(grammarAccess.getAttributeAccess().getIsKeyIsIdentifierKeyword_2_0()); }
'isIdentifier'
{ after(grammarAccess.getAttributeAccess().getIsKeyIsIdentifierKeyword_1_0()); }
{ after(grammarAccess.getAttributeAccess().getIsKeyIsIdentifierKeyword_2_0()); }
)
{ after(grammarAccess.getAttributeAccess().getIsKeyIsIdentifierKeyword_1_0()); }
{ after(grammarAccess.getAttributeAccess().getIsKeyIsIdentifierKeyword_2_0()); }
)
;
finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,25 @@
'(0:N)'=13
'(1:1)'=12
'(1:N)'=14
','=22
';'=15
'Domain'=20
'Entities'=16
'Relationships'=19
'['=23
']'=25
'is'=21
'isIdentifier'=26
'relates'=24
'{'=17
'}'=18
','=29
';'=22
'Domain'=27
'Entities'=23
'Relationships'=26
'['=30
']'=32
'boolean'=19
'datetime'=20
'double'=16
'file'=21
'int'=15
'is'=28
'isIdentifier'=33
'money'=17
'relates'=31
'string'=18
'{'=24
'}'=25
RULE_ANY_OTHER=10
RULE_ID=4
RULE_INT=5
Expand All @@ -37,3 +44,10 @@ T__23=23
T__24=24
T__25=25
T__26=26
T__27=27
T__28=28
T__29=29
T__30=30
T__31=31
T__32=32
T__33=33
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* generated by Xtext 2.18.0.M3
* generated by Xtext 2.21.0
*/
package org.xtext.unipampa.erdsl.ide;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* generated by Xtext 2.18.0.M3
* generated by Xtext 2.21.0
*/
package org.xtext.unipampa.erdsl.ide.contentassist.antlr;

Expand Down Expand Up @@ -33,6 +33,7 @@ public String getRuleName(AbstractElement element) {
private static void init(ImmutableMap.Builder<AbstractElement, String> builder, ErDslGrammarAccess grammarAccess) {
builder.put(grammarAccess.getRelationSideAccess().getAlternatives(), "rule__RelationSide__Alternatives");
builder.put(grammarAccess.getRelationSideAccess().getCardinalityAlternatives_0_0_0(), "rule__RelationSide__CardinalityAlternatives_0_0_0");
builder.put(grammarAccess.getDataTypeAccess().getAlternatives(), "rule__DataType__Alternatives");
builder.put(grammarAccess.getERModelAccess().getGroup(), "rule__ERModel__Group__0");
builder.put(grammarAccess.getERModelAccess().getGroup_2(), "rule__ERModel__Group_2__0");
builder.put(grammarAccess.getERModelAccess().getGroup_4(), "rule__ERModel__Group_4__0");
Expand All @@ -54,7 +55,8 @@ private static void init(ImmutableMap.Builder<AbstractElement, String> builder,
builder.put(grammarAccess.getERModelAccess().getRelationsAssignment_6(), "rule__ERModel__RelationsAssignment_6");
builder.put(grammarAccess.getDomainAccess().getNameAssignment_1(), "rule__Domain__NameAssignment_1");
builder.put(grammarAccess.getAttributeAccess().getNameAssignment_0(), "rule__Attribute__NameAssignment_0");
builder.put(grammarAccess.getAttributeAccess().getIsKeyAssignment_1(), "rule__Attribute__IsKeyAssignment_1");
builder.put(grammarAccess.getAttributeAccess().getTypeAssignment_1(), "rule__Attribute__TypeAssignment_1");
builder.put(grammarAccess.getAttributeAccess().getIsKeyAssignment_2(), "rule__Attribute__IsKeyAssignment_2");
builder.put(grammarAccess.getEntityAccess().getNameAssignment_0(), "rule__Entity__NameAssignment_0");
builder.put(grammarAccess.getEntityAccess().getIsAssignment_1_1(), "rule__Entity__IsAssignment_1_1");
builder.put(grammarAccess.getEntityAccess().getAttributesAssignment_2_1(), "rule__Entity__AttributesAssignment_2_1");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* generated by Xtext 2.18.0.M3
* generated by Xtext 2.21.0
*/
package org.xtext.unipampa.erdsl.ide.contentassist.antlr;

Expand Down
Loading

0 comments on commit 4b0c36e

Please sign in to comment.