mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-15 08:18:55 +00:00
added hoisting debug and tokenLimit settings to grammar definition
This commit is contained in:
parent
e317d65b45
commit
2deeea0bd5
16 changed files with 6769 additions and 5418 deletions
|
@ -61,38 +61,6 @@ public class TracingSugarTest {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IGeneratorNode _name(final Property target) {
|
|
||||||
EStructuralFeature feature = target.eClass().getEStructuralFeature("name");
|
|
||||||
ILocationData location = this.location(target, feature, -1);
|
|
||||||
CompositeGeneratorNode trace = this.trace(location);
|
|
||||||
this.append(trace, target.getName());
|
|
||||||
return trace;
|
|
||||||
}
|
|
||||||
|
|
||||||
public IGeneratorNode _name(final Property target, final boolean useForDebugging) {
|
|
||||||
EStructuralFeature feature = target.eClass().getEStructuralFeature("name");
|
|
||||||
ILocationData location = this.location(target, feature, -1);
|
|
||||||
CompositeGeneratorNode trace = this.trace(location, useForDebugging);
|
|
||||||
this.append(trace, target.getName());
|
|
||||||
return trace;
|
|
||||||
}
|
|
||||||
|
|
||||||
public IGeneratorNode _name(final Property target, final Function<String, String> stringProvider) {
|
|
||||||
EStructuralFeature feature = target.eClass().getEStructuralFeature("name");
|
|
||||||
ILocationData location = this.location(target, feature, -1);
|
|
||||||
CompositeGeneratorNode trace = this.trace(location);
|
|
||||||
this.append(trace, stringProvider.apply(target.getName()));
|
|
||||||
return trace;
|
|
||||||
}
|
|
||||||
|
|
||||||
public IGeneratorNode _extends(final Type target, final Function<Type, String> stringProvider) {
|
|
||||||
EStructuralFeature feature = target.eClass().getEStructuralFeature("extends");
|
|
||||||
ILocationData location = this.location(target, feature, -1);
|
|
||||||
CompositeGeneratorNode trace = this.trace(location);
|
|
||||||
this.append(trace, stringProvider.apply(target.getExtends()));
|
|
||||||
return trace;
|
|
||||||
}
|
|
||||||
|
|
||||||
public IGeneratorNode _name(final Type target) {
|
public IGeneratorNode _name(final Type target) {
|
||||||
EStructuralFeature feature = target.eClass().getEStructuralFeature("name");
|
EStructuralFeature feature = target.eClass().getEStructuralFeature("name");
|
||||||
ILocationData location = this.location(target, feature, -1);
|
ILocationData location = this.location(target, feature, -1);
|
||||||
|
@ -117,6 +85,14 @@ public class TracingSugarTest {
|
||||||
return trace;
|
return trace;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IGeneratorNode _extends(final Type target, final Function<Type, String> stringProvider) {
|
||||||
|
EStructuralFeature feature = target.eClass().getEStructuralFeature("extends");
|
||||||
|
ILocationData location = this.location(target, feature, -1);
|
||||||
|
CompositeGeneratorNode trace = this.trace(location);
|
||||||
|
this.append(trace, stringProvider.apply(target.getExtends()));
|
||||||
|
return trace;
|
||||||
|
}
|
||||||
|
|
||||||
public IGeneratorNode _parentId(final Type target, final Function<Property, String> stringProvider) {
|
public IGeneratorNode _parentId(final Type target, final Function<Property, String> stringProvider) {
|
||||||
EStructuralFeature feature = target.eClass().getEStructuralFeature("parentId");
|
EStructuralFeature feature = target.eClass().getEStructuralFeature("parentId");
|
||||||
ILocationData location = this.location(target, feature, -1);
|
ILocationData location = this.location(target, feature, -1);
|
||||||
|
@ -125,6 +101,30 @@ public class TracingSugarTest {
|
||||||
return trace;
|
return trace;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IGeneratorNode _name(final Property target) {
|
||||||
|
EStructuralFeature feature = target.eClass().getEStructuralFeature("name");
|
||||||
|
ILocationData location = this.location(target, feature, -1);
|
||||||
|
CompositeGeneratorNode trace = this.trace(location);
|
||||||
|
this.append(trace, target.getName());
|
||||||
|
return trace;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IGeneratorNode _name(final Property target, final boolean useForDebugging) {
|
||||||
|
EStructuralFeature feature = target.eClass().getEStructuralFeature("name");
|
||||||
|
ILocationData location = this.location(target, feature, -1);
|
||||||
|
CompositeGeneratorNode trace = this.trace(location, useForDebugging);
|
||||||
|
this.append(trace, target.getName());
|
||||||
|
return trace;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IGeneratorNode _name(final Property target, final Function<String, String> stringProvider) {
|
||||||
|
EStructuralFeature feature = target.eClass().getEStructuralFeature("name");
|
||||||
|
ILocationData location = this.location(target, feature, -1);
|
||||||
|
CompositeGeneratorNode trace = this.trace(location);
|
||||||
|
this.append(trace, stringProvider.apply(target.getName()));
|
||||||
|
return trace;
|
||||||
|
}
|
||||||
|
|
||||||
public IGeneratorNode _name(final UnresolvedProxyProperty target) {
|
public IGeneratorNode _name(final UnresolvedProxyProperty target) {
|
||||||
EStructuralFeature feature = target.eClass().getEStructuralFeature("name");
|
EStructuralFeature feature = target.eClass().getEStructuralFeature("name");
|
||||||
ILocationData location = this.location(target, feature, -1);
|
ILocationData location = this.location(target, feature, -1);
|
||||||
|
|
|
@ -63,6 +63,7 @@ public class XtextParser extends AbstractContentAssistParser {
|
||||||
builder.put(grammarAccess.getGrammarAccess().getGroup_3(), "rule__Grammar__Group_3__0");
|
builder.put(grammarAccess.getGrammarAccess().getGroup_3(), "rule__Grammar__Group_3__0");
|
||||||
builder.put(grammarAccess.getGrammarAccess().getGroup_3_2(), "rule__Grammar__Group_3_2__0");
|
builder.put(grammarAccess.getGrammarAccess().getGroup_3_2(), "rule__Grammar__Group_3_2__0");
|
||||||
builder.put(grammarAccess.getGrammarAccess().getGroup_3_2_1(), "rule__Grammar__Group_3_2_1__0");
|
builder.put(grammarAccess.getGrammarAccess().getGroup_3_2_1(), "rule__Grammar__Group_3_2_1__0");
|
||||||
|
builder.put(grammarAccess.getGrammarAccess().getGroup_5_0(), "rule__Grammar__Group_5_0__0");
|
||||||
builder.put(grammarAccess.getInitBlockAccess().getGroup(), "rule__InitBlock__Group__0");
|
builder.put(grammarAccess.getInitBlockAccess().getGroup(), "rule__InitBlock__Group__0");
|
||||||
builder.put(grammarAccess.getGrammarIDAccess().getGroup(), "rule__GrammarID__Group__0");
|
builder.put(grammarAccess.getGrammarIDAccess().getGroup(), "rule__GrammarID__Group__0");
|
||||||
builder.put(grammarAccess.getGrammarIDAccess().getGroup_1(), "rule__GrammarID__Group_1__0");
|
builder.put(grammarAccess.getGrammarIDAccess().getGroup_1(), "rule__GrammarID__Group_1__0");
|
||||||
|
@ -157,7 +158,9 @@ public class XtextParser extends AbstractContentAssistParser {
|
||||||
builder.put(grammarAccess.getGrammarAccess().getHiddenTokensAssignment_3_2_0(), "rule__Grammar__HiddenTokensAssignment_3_2_0");
|
builder.put(grammarAccess.getGrammarAccess().getHiddenTokensAssignment_3_2_0(), "rule__Grammar__HiddenTokensAssignment_3_2_0");
|
||||||
builder.put(grammarAccess.getGrammarAccess().getHiddenTokensAssignment_3_2_1_1(), "rule__Grammar__HiddenTokensAssignment_3_2_1_1");
|
builder.put(grammarAccess.getGrammarAccess().getHiddenTokensAssignment_3_2_1_1(), "rule__Grammar__HiddenTokensAssignment_3_2_1_1");
|
||||||
builder.put(grammarAccess.getGrammarAccess().getMetamodelDeclarationsAssignment_4(), "rule__Grammar__MetamodelDeclarationsAssignment_4");
|
builder.put(grammarAccess.getGrammarAccess().getMetamodelDeclarationsAssignment_4(), "rule__Grammar__MetamodelDeclarationsAssignment_4");
|
||||||
builder.put(grammarAccess.getGrammarAccess().getInitBlockAssignment_5(), "rule__Grammar__InitBlockAssignment_5");
|
builder.put(grammarAccess.getGrammarAccess().getTokenLimitAssignment_5_0_1(), "rule__Grammar__TokenLimitAssignment_5_0_1");
|
||||||
|
builder.put(grammarAccess.getGrammarAccess().getDebugAssignment_5_1(), "rule__Grammar__DebugAssignment_5_1");
|
||||||
|
builder.put(grammarAccess.getGrammarAccess().getInitBlockAssignment_5_2(), "rule__Grammar__InitBlockAssignment_5_2");
|
||||||
builder.put(grammarAccess.getGrammarAccess().getRulesAssignment_6(), "rule__Grammar__RulesAssignment_6");
|
builder.put(grammarAccess.getGrammarAccess().getRulesAssignment_6(), "rule__Grammar__RulesAssignment_6");
|
||||||
builder.put(grammarAccess.getInitBlockAccess().getCodeAssignment_1(), "rule__InitBlock__CodeAssignment_1");
|
builder.put(grammarAccess.getInitBlockAccess().getCodeAssignment_1(), "rule__InitBlock__CodeAssignment_1");
|
||||||
builder.put(grammarAccess.getGeneratedMetamodelAccess().getNameAssignment_1(), "rule__GeneratedMetamodel__NameAssignment_1");
|
builder.put(grammarAccess.getGeneratedMetamodelAccess().getNameAssignment_1(), "rule__GeneratedMetamodel__NameAssignment_1");
|
||||||
|
@ -245,6 +248,7 @@ public class XtextParser extends AbstractContentAssistParser {
|
||||||
builder.put(grammarAccess.getEnumLiteralsAccess().getElementsAssignment_1_1_1(), "rule__EnumLiterals__ElementsAssignment_1_1_1");
|
builder.put(grammarAccess.getEnumLiteralsAccess().getElementsAssignment_1_1_1(), "rule__EnumLiterals__ElementsAssignment_1_1_1");
|
||||||
builder.put(grammarAccess.getEnumLiteralDeclarationAccess().getEnumLiteralAssignment_0(), "rule__EnumLiteralDeclaration__EnumLiteralAssignment_0");
|
builder.put(grammarAccess.getEnumLiteralDeclarationAccess().getEnumLiteralAssignment_0(), "rule__EnumLiteralDeclaration__EnumLiteralAssignment_0");
|
||||||
builder.put(grammarAccess.getEnumLiteralDeclarationAccess().getLiteralAssignment_1_1(), "rule__EnumLiteralDeclaration__LiteralAssignment_1_1");
|
builder.put(grammarAccess.getEnumLiteralDeclarationAccess().getLiteralAssignment_1_1(), "rule__EnumLiteralDeclaration__LiteralAssignment_1_1");
|
||||||
|
builder.put(grammarAccess.getGrammarAccess().getUnorderedGroup_5(), "rule__Grammar__UnorderedGroup_5");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2423,9 +2423,9 @@ rule__Grammar__Group__5__Impl
|
||||||
}
|
}
|
||||||
:
|
:
|
||||||
(
|
(
|
||||||
{ before(grammarAccess.getGrammarAccess().getInitBlockAssignment_5()); }
|
{ before(grammarAccess.getGrammarAccess().getUnorderedGroup_5()); }
|
||||||
(rule__Grammar__InitBlockAssignment_5)?
|
(rule__Grammar__UnorderedGroup_5)
|
||||||
{ after(grammarAccess.getGrammarAccess().getInitBlockAssignment_5()); }
|
{ after(grammarAccess.getGrammarAccess().getUnorderedGroup_5()); }
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
finally {
|
finally {
|
||||||
|
@ -2817,6 +2817,60 @@ finally {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
rule__Grammar__Group_5_0__0
|
||||||
|
@init {
|
||||||
|
int stackSize = keepStackSize();
|
||||||
|
}
|
||||||
|
:
|
||||||
|
rule__Grammar__Group_5_0__0__Impl
|
||||||
|
rule__Grammar__Group_5_0__1
|
||||||
|
;
|
||||||
|
finally {
|
||||||
|
restoreStackSize(stackSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
rule__Grammar__Group_5_0__0__Impl
|
||||||
|
@init {
|
||||||
|
int stackSize = keepStackSize();
|
||||||
|
}
|
||||||
|
:
|
||||||
|
(
|
||||||
|
{ before(grammarAccess.getGrammarAccess().getTokenLimitKeyword_5_0_0()); }
|
||||||
|
'tokenLimit'
|
||||||
|
{ after(grammarAccess.getGrammarAccess().getTokenLimitKeyword_5_0_0()); }
|
||||||
|
)
|
||||||
|
;
|
||||||
|
finally {
|
||||||
|
restoreStackSize(stackSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
rule__Grammar__Group_5_0__1
|
||||||
|
@init {
|
||||||
|
int stackSize = keepStackSize();
|
||||||
|
}
|
||||||
|
:
|
||||||
|
rule__Grammar__Group_5_0__1__Impl
|
||||||
|
;
|
||||||
|
finally {
|
||||||
|
restoreStackSize(stackSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
rule__Grammar__Group_5_0__1__Impl
|
||||||
|
@init {
|
||||||
|
int stackSize = keepStackSize();
|
||||||
|
}
|
||||||
|
:
|
||||||
|
(
|
||||||
|
{ before(grammarAccess.getGrammarAccess().getTokenLimitAssignment_5_0_1()); }
|
||||||
|
(rule__Grammar__TokenLimitAssignment_5_0_1)
|
||||||
|
{ after(grammarAccess.getGrammarAccess().getTokenLimitAssignment_5_0_1()); }
|
||||||
|
)
|
||||||
|
;
|
||||||
|
finally {
|
||||||
|
restoreStackSize(stackSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
rule__InitBlock__Group__0
|
rule__InitBlock__Group__0
|
||||||
@init {
|
@init {
|
||||||
int stackSize = keepStackSize();
|
int stackSize = keepStackSize();
|
||||||
|
@ -2835,9 +2889,9 @@ rule__InitBlock__Group__0__Impl
|
||||||
}
|
}
|
||||||
:
|
:
|
||||||
(
|
(
|
||||||
{ before(grammarAccess.getInitBlockAccess().getInitKeyword_0()); }
|
{ before(grammarAccess.getInitBlockAccess().getStaticKeyword_0()); }
|
||||||
'@init'
|
'static'
|
||||||
{ after(grammarAccess.getInitBlockAccess().getInitKeyword_0()); }
|
{ after(grammarAccess.getInitBlockAccess().getStaticKeyword_0()); }
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
finally {
|
finally {
|
||||||
|
@ -8813,6 +8867,116 @@ finally {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
rule__Grammar__UnorderedGroup_5
|
||||||
|
@init {
|
||||||
|
int stackSize = keepStackSize();
|
||||||
|
getUnorderedGroupHelper().enter(grammarAccess.getGrammarAccess().getUnorderedGroup_5());
|
||||||
|
}
|
||||||
|
:
|
||||||
|
rule__Grammar__UnorderedGroup_5__0
|
||||||
|
?
|
||||||
|
;
|
||||||
|
finally {
|
||||||
|
getUnorderedGroupHelper().leave(grammarAccess.getGrammarAccess().getUnorderedGroup_5());
|
||||||
|
restoreStackSize(stackSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
rule__Grammar__UnorderedGroup_5__Impl
|
||||||
|
@init {
|
||||||
|
int stackSize = keepStackSize();
|
||||||
|
boolean selected = false;
|
||||||
|
}
|
||||||
|
:
|
||||||
|
(
|
||||||
|
(
|
||||||
|
{getUnorderedGroupHelper().canSelect(grammarAccess.getGrammarAccess().getUnorderedGroup_5(), 0)}?=>(
|
||||||
|
{
|
||||||
|
getUnorderedGroupHelper().select(grammarAccess.getGrammarAccess().getUnorderedGroup_5(), 0);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
selected = true;
|
||||||
|
}
|
||||||
|
(
|
||||||
|
{ before(grammarAccess.getGrammarAccess().getGroup_5_0()); }
|
||||||
|
(rule__Grammar__Group_5_0__0)
|
||||||
|
{ after(grammarAccess.getGrammarAccess().getGroup_5_0()); }
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)|
|
||||||
|
(
|
||||||
|
{getUnorderedGroupHelper().canSelect(grammarAccess.getGrammarAccess().getUnorderedGroup_5(), 1)}?=>(
|
||||||
|
{
|
||||||
|
getUnorderedGroupHelper().select(grammarAccess.getGrammarAccess().getUnorderedGroup_5(), 1);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
selected = true;
|
||||||
|
}
|
||||||
|
(
|
||||||
|
{ before(grammarAccess.getGrammarAccess().getDebugAssignment_5_1()); }
|
||||||
|
(rule__Grammar__DebugAssignment_5_1)
|
||||||
|
{ after(grammarAccess.getGrammarAccess().getDebugAssignment_5_1()); }
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)|
|
||||||
|
(
|
||||||
|
{getUnorderedGroupHelper().canSelect(grammarAccess.getGrammarAccess().getUnorderedGroup_5(), 2)}?=>(
|
||||||
|
{
|
||||||
|
getUnorderedGroupHelper().select(grammarAccess.getGrammarAccess().getUnorderedGroup_5(), 2);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
selected = true;
|
||||||
|
}
|
||||||
|
(
|
||||||
|
{ before(grammarAccess.getGrammarAccess().getInitBlockAssignment_5_2()); }
|
||||||
|
(rule__Grammar__InitBlockAssignment_5_2)
|
||||||
|
{ after(grammarAccess.getGrammarAccess().getInitBlockAssignment_5_2()); }
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
;
|
||||||
|
finally {
|
||||||
|
if (selected)
|
||||||
|
getUnorderedGroupHelper().returnFromSelection(grammarAccess.getGrammarAccess().getUnorderedGroup_5());
|
||||||
|
restoreStackSize(stackSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
rule__Grammar__UnorderedGroup_5__0
|
||||||
|
@init {
|
||||||
|
int stackSize = keepStackSize();
|
||||||
|
}
|
||||||
|
:
|
||||||
|
rule__Grammar__UnorderedGroup_5__Impl
|
||||||
|
rule__Grammar__UnorderedGroup_5__1?
|
||||||
|
;
|
||||||
|
finally {
|
||||||
|
restoreStackSize(stackSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
rule__Grammar__UnorderedGroup_5__1
|
||||||
|
@init {
|
||||||
|
int stackSize = keepStackSize();
|
||||||
|
}
|
||||||
|
:
|
||||||
|
rule__Grammar__UnorderedGroup_5__Impl
|
||||||
|
rule__Grammar__UnorderedGroup_5__2?
|
||||||
|
;
|
||||||
|
finally {
|
||||||
|
restoreStackSize(stackSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
rule__Grammar__UnorderedGroup_5__2
|
||||||
|
@init {
|
||||||
|
int stackSize = keepStackSize();
|
||||||
|
}
|
||||||
|
:
|
||||||
|
rule__Grammar__UnorderedGroup_5__Impl
|
||||||
|
;
|
||||||
|
finally {
|
||||||
|
restoreStackSize(stackSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
rule__Grammar__NameAssignment_1
|
rule__Grammar__NameAssignment_1
|
||||||
@init {
|
@init {
|
||||||
int stackSize = keepStackSize();
|
int stackSize = keepStackSize();
|
||||||
|
@ -8938,15 +9102,49 @@ finally {
|
||||||
restoreStackSize(stackSize);
|
restoreStackSize(stackSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
rule__Grammar__InitBlockAssignment_5
|
rule__Grammar__TokenLimitAssignment_5_0_1
|
||||||
@init {
|
@init {
|
||||||
int stackSize = keepStackSize();
|
int stackSize = keepStackSize();
|
||||||
}
|
}
|
||||||
:
|
:
|
||||||
(
|
(
|
||||||
{ before(grammarAccess.getGrammarAccess().getInitBlockInitBlockParserRuleCall_5_0()); }
|
{ before(grammarAccess.getGrammarAccess().getTokenLimitINTTerminalRuleCall_5_0_1_0()); }
|
||||||
|
RULE_INT
|
||||||
|
{ after(grammarAccess.getGrammarAccess().getTokenLimitINTTerminalRuleCall_5_0_1_0()); }
|
||||||
|
)
|
||||||
|
;
|
||||||
|
finally {
|
||||||
|
restoreStackSize(stackSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
rule__Grammar__DebugAssignment_5_1
|
||||||
|
@init {
|
||||||
|
int stackSize = keepStackSize();
|
||||||
|
}
|
||||||
|
:
|
||||||
|
(
|
||||||
|
{ before(grammarAccess.getGrammarAccess().getDebugHoistingDebugKeyword_5_1_0()); }
|
||||||
|
(
|
||||||
|
{ before(grammarAccess.getGrammarAccess().getDebugHoistingDebugKeyword_5_1_0()); }
|
||||||
|
'hoistingDebug'
|
||||||
|
{ after(grammarAccess.getGrammarAccess().getDebugHoistingDebugKeyword_5_1_0()); }
|
||||||
|
)
|
||||||
|
{ after(grammarAccess.getGrammarAccess().getDebugHoistingDebugKeyword_5_1_0()); }
|
||||||
|
)
|
||||||
|
;
|
||||||
|
finally {
|
||||||
|
restoreStackSize(stackSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
rule__Grammar__InitBlockAssignment_5_2
|
||||||
|
@init {
|
||||||
|
int stackSize = keepStackSize();
|
||||||
|
}
|
||||||
|
:
|
||||||
|
(
|
||||||
|
{ before(grammarAccess.getGrammarAccess().getInitBlockInitBlockParserRuleCall_5_2_0()); }
|
||||||
ruleInitBlock
|
ruleInitBlock
|
||||||
{ after(grammarAccess.getGrammarAccess().getInitBlockInitBlockParserRuleCall_5_0()); }
|
{ after(grammarAccess.getGrammarAccess().getInitBlockInitBlockParserRuleCall_5_2_0()); }
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
finally {
|
finally {
|
||||||
|
|
|
@ -1,52 +1,54 @@
|
||||||
'!'=43
|
'!'=44
|
||||||
'&'=38
|
'&'=39
|
||||||
'('=23
|
'('=23
|
||||||
')'=24
|
')'=24
|
||||||
'*'=13
|
'*'=13
|
||||||
'+'=14
|
'+'=14
|
||||||
'+='=16
|
'+='=16
|
||||||
','=22
|
','=22
|
||||||
'->'=47
|
'->'=48
|
||||||
'.'=26
|
'.'=27
|
||||||
'..'=49
|
'..'=50
|
||||||
':'=31
|
':'=32
|
||||||
'::'=36
|
'::'=37
|
||||||
';'=32
|
';'=33
|
||||||
'<'=34
|
'<'=35
|
||||||
'='=15
|
'='=15
|
||||||
'=>'=53
|
'=>'=55
|
||||||
'>'=35
|
'>'=36
|
||||||
'?'=12
|
'?'=12
|
||||||
'?='=19
|
'?='=19
|
||||||
'?=>'=39
|
'?=>'=40
|
||||||
'@'=30
|
'@'=31
|
||||||
'@init'=25
|
'EOF'=49
|
||||||
'EOF'=48
|
'['=45
|
||||||
'['=44
|
']'=46
|
||||||
']'=45
|
'as'=29
|
||||||
'as'=28
|
'current'=43
|
||||||
'current'=42
|
'enum'=51
|
||||||
'enum'=50
|
|
||||||
'false'=17
|
'false'=17
|
||||||
'fragment'=52
|
'fragment'=54
|
||||||
'generate'=27
|
'generate'=28
|
||||||
'grammar'=20
|
'grammar'=20
|
||||||
'hidden'=51
|
'hidden'=52
|
||||||
'import'=29
|
'hoistingDebug'=53
|
||||||
'returns'=33
|
'import'=30
|
||||||
'terminal'=46
|
'returns'=34
|
||||||
|
'static'=26
|
||||||
|
'terminal'=47
|
||||||
|
'tokenLimit'=25
|
||||||
'true'=18
|
'true'=18
|
||||||
'with'=21
|
'with'=21
|
||||||
'{'=40
|
'{'=41
|
||||||
'|'=37
|
'|'=38
|
||||||
'}'=41
|
'}'=42
|
||||||
RULE_ANY_OTHER=11
|
RULE_ANY_OTHER=11
|
||||||
RULE_ID=4
|
RULE_ID=4
|
||||||
RULE_INT=7
|
RULE_INT=5
|
||||||
RULE_JAVACODESTRING=6
|
RULE_JAVACODESTRING=7
|
||||||
RULE_ML_COMMENT=8
|
RULE_ML_COMMENT=8
|
||||||
RULE_SL_COMMENT=9
|
RULE_SL_COMMENT=9
|
||||||
RULE_STRING=5
|
RULE_STRING=6
|
||||||
RULE_WS=10
|
RULE_WS=10
|
||||||
T__12=12
|
T__12=12
|
||||||
T__13=13
|
T__13=13
|
||||||
|
@ -90,3 +92,5 @@ T__50=50
|
||||||
T__51=51
|
T__51=51
|
||||||
T__52=52
|
T__52=52
|
||||||
T__53=53
|
T__53=53
|
||||||
|
T__54=54
|
||||||
|
T__55=55
|
||||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -13,9 +13,11 @@ import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
|
||||||
import org.eclipse.xtext.parser.antlr.AntlrTokenToStringConverter;
|
import org.eclipse.xtext.parser.antlr.AntlrTokenToStringConverter;
|
||||||
import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider;
|
import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider;
|
||||||
import org.eclipse.xtext.parser.antlr.ITokenDefProvider;
|
import org.eclipse.xtext.parser.antlr.ITokenDefProvider;
|
||||||
|
import org.eclipse.xtext.parser.antlr.IUnorderedGroupHelper;
|
||||||
import org.eclipse.xtext.parser.antlr.Lexer;
|
import org.eclipse.xtext.parser.antlr.Lexer;
|
||||||
import org.eclipse.xtext.parser.antlr.LexerBindings;
|
import org.eclipse.xtext.parser.antlr.LexerBindings;
|
||||||
import org.eclipse.xtext.parser.antlr.LexerProvider;
|
import org.eclipse.xtext.parser.antlr.LexerProvider;
|
||||||
|
import org.eclipse.xtext.parser.antlr.UnorderedGroupHelper;
|
||||||
import org.eclipse.xtext.parser.antlr.XtextAntlrTokenFileProvider;
|
import org.eclipse.xtext.parser.antlr.XtextAntlrTokenFileProvider;
|
||||||
import org.eclipse.xtext.parser.antlr.XtextParser;
|
import org.eclipse.xtext.parser.antlr.XtextParser;
|
||||||
import org.eclipse.xtext.parser.antlr.internal.InternalXtextLexer;
|
import org.eclipse.xtext.parser.antlr.internal.InternalXtextLexer;
|
||||||
|
@ -98,6 +100,11 @@ public abstract class AbstractXtextRuntimeModule extends DefaultRuntimeModule {
|
||||||
.to(InternalXtextLexer.class);
|
.to(InternalXtextLexer.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
|
||||||
|
public Class<? extends IUnorderedGroupHelper> bindIUnorderedGroupHelper() {
|
||||||
|
return UnorderedGroupHelper.class;
|
||||||
|
}
|
||||||
|
|
||||||
// contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2
|
// contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2
|
||||||
public Class<? extends ISemanticSequencer> bindISemanticSequencer() {
|
public Class<? extends ISemanticSequencer> bindISemanticSequencer() {
|
||||||
return XtextSemanticSequencer.class;
|
return XtextSemanticSequencer.class;
|
||||||
|
|
Binary file not shown.
|
@ -228,29 +228,108 @@ ruleGrammar returns [EObject current=null]
|
||||||
)*
|
)*
|
||||||
(
|
(
|
||||||
(
|
(
|
||||||
{
|
{
|
||||||
newCompositeNode(grammarAccess.getGrammarAccess().getInitBlockInitBlockParserRuleCall_5_0());
|
getUnorderedGroupHelper().enter(grammarAccess.getGrammarAccess().getUnorderedGroup_5());
|
||||||
}
|
}
|
||||||
lv_initBlock_13_0=ruleInitBlock
|
(
|
||||||
{
|
(
|
||||||
if ($current==null) {
|
(
|
||||||
$current = createModelElementForParent(grammarAccess.getGrammarRule());
|
{getUnorderedGroupHelper().canSelect(grammarAccess.getGrammarAccess().getUnorderedGroup_5(), 0)}?=>(
|
||||||
|
{
|
||||||
|
getUnorderedGroupHelper().select(grammarAccess.getGrammarAccess().getUnorderedGroup_5(), 0);
|
||||||
}
|
}
|
||||||
set(
|
({true}?=>(otherlv_14='tokenLimit'
|
||||||
$current,
|
{
|
||||||
"initBlock",
|
newLeafNode(otherlv_14, grammarAccess.getGrammarAccess().getTokenLimitKeyword_5_0_0());
|
||||||
lv_initBlock_13_0,
|
}
|
||||||
"org.eclipse.xtext.Xtext.InitBlock");
|
(
|
||||||
afterParserOrEnumRuleCall();
|
(
|
||||||
}
|
lv_tokenLimit_15_0=RULE_INT
|
||||||
|
{
|
||||||
|
newLeafNode(lv_tokenLimit_15_0, grammarAccess.getGrammarAccess().getTokenLimitINTTerminalRuleCall_5_0_1_0());
|
||||||
|
}
|
||||||
|
{
|
||||||
|
if ($current==null) {
|
||||||
|
$current = createModelElement(grammarAccess.getGrammarRule());
|
||||||
|
}
|
||||||
|
setWithLastConsumed(
|
||||||
|
$current,
|
||||||
|
"tokenLimit",
|
||||||
|
lv_tokenLimit_15_0,
|
||||||
|
"org.eclipse.xtext.common.Terminals.INT");
|
||||||
|
}
|
||||||
|
)
|
||||||
|
)
|
||||||
|
))
|
||||||
|
{
|
||||||
|
getUnorderedGroupHelper().returnFromSelection(grammarAccess.getGrammarAccess().getUnorderedGroup_5());
|
||||||
|
}
|
||||||
|
)
|
||||||
|
)|
|
||||||
|
(
|
||||||
|
{getUnorderedGroupHelper().canSelect(grammarAccess.getGrammarAccess().getUnorderedGroup_5(), 1)}?=>(
|
||||||
|
{
|
||||||
|
getUnorderedGroupHelper().select(grammarAccess.getGrammarAccess().getUnorderedGroup_5(), 1);
|
||||||
|
}
|
||||||
|
({true}?=>((
|
||||||
|
lv_debug_16_0='hoistingDebug'
|
||||||
|
{
|
||||||
|
newLeafNode(lv_debug_16_0, grammarAccess.getGrammarAccess().getDebugHoistingDebugKeyword_5_1_0());
|
||||||
|
}
|
||||||
|
{
|
||||||
|
if ($current==null) {
|
||||||
|
$current = createModelElement(grammarAccess.getGrammarRule());
|
||||||
|
}
|
||||||
|
setWithLastConsumed($current, "debug", lv_debug_16_0 != null, "hoistingDebug");
|
||||||
|
}
|
||||||
|
)
|
||||||
|
))
|
||||||
|
{
|
||||||
|
getUnorderedGroupHelper().returnFromSelection(grammarAccess.getGrammarAccess().getUnorderedGroup_5());
|
||||||
|
}
|
||||||
|
)
|
||||||
|
)|
|
||||||
|
(
|
||||||
|
{getUnorderedGroupHelper().canSelect(grammarAccess.getGrammarAccess().getUnorderedGroup_5(), 2)}?=>(
|
||||||
|
{
|
||||||
|
getUnorderedGroupHelper().select(grammarAccess.getGrammarAccess().getUnorderedGroup_5(), 2);
|
||||||
|
}
|
||||||
|
({true}?=>((
|
||||||
|
{
|
||||||
|
newCompositeNode(grammarAccess.getGrammarAccess().getInitBlockInitBlockParserRuleCall_5_2_0());
|
||||||
|
}
|
||||||
|
lv_initBlock_17_0=ruleInitBlock
|
||||||
|
{
|
||||||
|
if ($current==null) {
|
||||||
|
$current = createModelElementForParent(grammarAccess.getGrammarRule());
|
||||||
|
}
|
||||||
|
set(
|
||||||
|
$current,
|
||||||
|
"initBlock",
|
||||||
|
lv_initBlock_17_0,
|
||||||
|
"org.eclipse.xtext.Xtext.InitBlock");
|
||||||
|
afterParserOrEnumRuleCall();
|
||||||
|
}
|
||||||
|
)
|
||||||
|
))
|
||||||
|
{
|
||||||
|
getUnorderedGroupHelper().returnFromSelection(grammarAccess.getGrammarAccess().getUnorderedGroup_5());
|
||||||
|
}
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)?
|
)*
|
||||||
|
)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
getUnorderedGroupHelper().leave(grammarAccess.getGrammarAccess().getUnorderedGroup_5());
|
||||||
|
}
|
||||||
|
)
|
||||||
(
|
(
|
||||||
(
|
(
|
||||||
{
|
{
|
||||||
newCompositeNode(grammarAccess.getGrammarAccess().getRulesAbstractRuleParserRuleCall_6_0());
|
newCompositeNode(grammarAccess.getGrammarAccess().getRulesAbstractRuleParserRuleCall_6_0());
|
||||||
}
|
}
|
||||||
lv_rules_14_0=ruleAbstractRule
|
lv_rules_18_0=ruleAbstractRule
|
||||||
{
|
{
|
||||||
if ($current==null) {
|
if ($current==null) {
|
||||||
$current = createModelElementForParent(grammarAccess.getGrammarRule());
|
$current = createModelElementForParent(grammarAccess.getGrammarRule());
|
||||||
|
@ -258,7 +337,7 @@ ruleGrammar returns [EObject current=null]
|
||||||
add(
|
add(
|
||||||
$current,
|
$current,
|
||||||
"rules",
|
"rules",
|
||||||
lv_rules_14_0,
|
lv_rules_18_0,
|
||||||
"org.eclipse.xtext.Xtext.AbstractRule");
|
"org.eclipse.xtext.Xtext.AbstractRule");
|
||||||
afterParserOrEnumRuleCall();
|
afterParserOrEnumRuleCall();
|
||||||
}
|
}
|
||||||
|
@ -283,9 +362,9 @@ ruleInitBlock returns [EObject current=null]
|
||||||
leaveRule();
|
leaveRule();
|
||||||
}:
|
}:
|
||||||
(
|
(
|
||||||
otherlv_0='@init'
|
otherlv_0='static'
|
||||||
{
|
{
|
||||||
newLeafNode(otherlv_0, grammarAccess.getInitBlockAccess().getInitKeyword_0());
|
newLeafNode(otherlv_0, grammarAccess.getInitBlockAccess().getStaticKeyword_0());
|
||||||
}
|
}
|
||||||
(
|
(
|
||||||
(
|
(
|
||||||
|
|
|
@ -1,52 +1,54 @@
|
||||||
'!'=44
|
'!'=46
|
||||||
'&'=33
|
'&'=35
|
||||||
'('=16
|
'('=16
|
||||||
')'=17
|
')'=17
|
||||||
'*'=25
|
'*'=27
|
||||||
'+'=36
|
'+'=38
|
||||||
'+='=39
|
'+='=41
|
||||||
','=14
|
','=14
|
||||||
'->'=46
|
'->'=48
|
||||||
'.'=19
|
'.'=21
|
||||||
'..'=52
|
'..'=54
|
||||||
':'=27
|
':'=29
|
||||||
'::'=31
|
'::'=33
|
||||||
';'=28
|
';'=30
|
||||||
'<'=29
|
'<'=31
|
||||||
'='=38
|
'='=40
|
||||||
'=>'=45
|
'=>'=47
|
||||||
'>'=30
|
'>'=32
|
||||||
'?'=35
|
'?'=37
|
||||||
'?='=47
|
'?='=49
|
||||||
'?=>'=34
|
'?=>'=36
|
||||||
'@'=23
|
'@'=25
|
||||||
'@init'=18
|
'EOF'=53
|
||||||
'EOF'=51
|
'['=50
|
||||||
'['=48
|
']'=51
|
||||||
']'=49
|
'as'=23
|
||||||
'as'=21
|
'current'=42
|
||||||
'current'=40
|
'enum'=55
|
||||||
'enum'=53
|
'false'=45
|
||||||
'false'=43
|
'fragment'=26
|
||||||
'fragment'=24
|
'generate'=22
|
||||||
'generate'=20
|
|
||||||
'grammar'=12
|
'grammar'=12
|
||||||
'hidden'=15
|
'hidden'=15
|
||||||
'import'=22
|
'hoistingDebug'=19
|
||||||
'returns'=26
|
'import'=24
|
||||||
'terminal'=50
|
'returns'=28
|
||||||
'true'=42
|
'static'=20
|
||||||
|
'terminal'=52
|
||||||
|
'tokenLimit'=18
|
||||||
|
'true'=44
|
||||||
'with'=13
|
'with'=13
|
||||||
'{'=37
|
'{'=39
|
||||||
'|'=32
|
'|'=34
|
||||||
'}'=41
|
'}'=43
|
||||||
RULE_ANY_OTHER=11
|
RULE_ANY_OTHER=11
|
||||||
RULE_ID=5
|
RULE_ID=6
|
||||||
RULE_INT=7
|
RULE_INT=4
|
||||||
RULE_JAVACODESTRING=6
|
RULE_JAVACODESTRING=7
|
||||||
RULE_ML_COMMENT=8
|
RULE_ML_COMMENT=8
|
||||||
RULE_SL_COMMENT=9
|
RULE_SL_COMMENT=9
|
||||||
RULE_STRING=4
|
RULE_STRING=5
|
||||||
RULE_WS=10
|
RULE_WS=10
|
||||||
T__12=12
|
T__12=12
|
||||||
T__13=13
|
T__13=13
|
||||||
|
@ -90,3 +92,5 @@ T__50=50
|
||||||
T__51=51
|
T__51=51
|
||||||
T__52=52
|
T__52=52
|
||||||
T__53=53
|
T__53=53
|
||||||
|
T__54=54
|
||||||
|
T__55=55
|
||||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -996,7 +996,7 @@ public class XtextSemanticSequencer extends AbstractDelegatingSemanticSequencer
|
||||||
* (usedGrammars+=[Grammar|GrammarID] usedGrammars+=[Grammar|GrammarID]*)?
|
* (usedGrammars+=[Grammar|GrammarID] usedGrammars+=[Grammar|GrammarID]*)?
|
||||||
* (definesHiddenTokens?='hidden' (hiddenTokens+=[AbstractRule|RuleID] hiddenTokens+=[AbstractRule|RuleID]*)?)?
|
* (definesHiddenTokens?='hidden' (hiddenTokens+=[AbstractRule|RuleID] hiddenTokens+=[AbstractRule|RuleID]*)?)?
|
||||||
* metamodelDeclarations+=AbstractMetamodelDeclaration*
|
* metamodelDeclarations+=AbstractMetamodelDeclaration*
|
||||||
* initBlock=InitBlock?
|
* (tokenLimit=INT | debug?='hoistingDebug' | initBlock=InitBlock)*
|
||||||
* rules+=AbstractRule+
|
* rules+=AbstractRule+
|
||||||
* )
|
* )
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -17,6 +17,7 @@ import org.eclipse.xtext.Keyword;
|
||||||
import org.eclipse.xtext.ParserRule;
|
import org.eclipse.xtext.ParserRule;
|
||||||
import org.eclipse.xtext.RuleCall;
|
import org.eclipse.xtext.RuleCall;
|
||||||
import org.eclipse.xtext.TerminalRule;
|
import org.eclipse.xtext.TerminalRule;
|
||||||
|
import org.eclipse.xtext.UnorderedGroup;
|
||||||
import org.eclipse.xtext.common.services.TerminalsGrammarAccess;
|
import org.eclipse.xtext.common.services.TerminalsGrammarAccess;
|
||||||
import org.eclipse.xtext.service.AbstractElementFinder;
|
import org.eclipse.xtext.service.AbstractElementFinder;
|
||||||
import org.eclipse.xtext.service.GrammarProvider;
|
import org.eclipse.xtext.service.GrammarProvider;
|
||||||
|
@ -56,8 +57,15 @@ public class XtextGrammarAccess extends AbstractElementFinder.AbstractGrammarEle
|
||||||
private final Keyword cRightParenthesisKeyword_3_3 = (Keyword)cGroup_3.eContents().get(3);
|
private final Keyword cRightParenthesisKeyword_3_3 = (Keyword)cGroup_3.eContents().get(3);
|
||||||
private final Assignment cMetamodelDeclarationsAssignment_4 = (Assignment)cGroup.eContents().get(4);
|
private final Assignment cMetamodelDeclarationsAssignment_4 = (Assignment)cGroup.eContents().get(4);
|
||||||
private final RuleCall cMetamodelDeclarationsAbstractMetamodelDeclarationParserRuleCall_4_0 = (RuleCall)cMetamodelDeclarationsAssignment_4.eContents().get(0);
|
private final RuleCall cMetamodelDeclarationsAbstractMetamodelDeclarationParserRuleCall_4_0 = (RuleCall)cMetamodelDeclarationsAssignment_4.eContents().get(0);
|
||||||
private final Assignment cInitBlockAssignment_5 = (Assignment)cGroup.eContents().get(5);
|
private final UnorderedGroup cUnorderedGroup_5 = (UnorderedGroup)cGroup.eContents().get(5);
|
||||||
private final RuleCall cInitBlockInitBlockParserRuleCall_5_0 = (RuleCall)cInitBlockAssignment_5.eContents().get(0);
|
private final Group cGroup_5_0 = (Group)cUnorderedGroup_5.eContents().get(0);
|
||||||
|
private final Keyword cTokenLimitKeyword_5_0_0 = (Keyword)cGroup_5_0.eContents().get(0);
|
||||||
|
private final Assignment cTokenLimitAssignment_5_0_1 = (Assignment)cGroup_5_0.eContents().get(1);
|
||||||
|
private final RuleCall cTokenLimitINTTerminalRuleCall_5_0_1_0 = (RuleCall)cTokenLimitAssignment_5_0_1.eContents().get(0);
|
||||||
|
private final Assignment cDebugAssignment_5_1 = (Assignment)cUnorderedGroup_5.eContents().get(1);
|
||||||
|
private final Keyword cDebugHoistingDebugKeyword_5_1_0 = (Keyword)cDebugAssignment_5_1.eContents().get(0);
|
||||||
|
private final Assignment cInitBlockAssignment_5_2 = (Assignment)cUnorderedGroup_5.eContents().get(2);
|
||||||
|
private final RuleCall cInitBlockInitBlockParserRuleCall_5_2_0 = (RuleCall)cInitBlockAssignment_5_2.eContents().get(0);
|
||||||
private final Assignment cRulesAssignment_6 = (Assignment)cGroup.eContents().get(6);
|
private final Assignment cRulesAssignment_6 = (Assignment)cGroup.eContents().get(6);
|
||||||
private final RuleCall cRulesAbstractRuleParserRuleCall_6_0 = (RuleCall)cRulesAssignment_6.eContents().get(0);
|
private final RuleCall cRulesAbstractRuleParserRuleCall_6_0 = (RuleCall)cRulesAssignment_6.eContents().get(0);
|
||||||
|
|
||||||
|
@ -65,14 +73,14 @@ public class XtextGrammarAccess extends AbstractElementFinder.AbstractGrammarEle
|
||||||
// 'grammar' name=GrammarID ('with' usedGrammars+=[Grammar|GrammarID] (',' usedGrammars+=[Grammar|GrammarID])*)?
|
// 'grammar' name=GrammarID ('with' usedGrammars+=[Grammar|GrammarID] (',' usedGrammars+=[Grammar|GrammarID])*)?
|
||||||
// (definesHiddenTokens?='hidden' '(' (hiddenTokens+=[AbstractRule|RuleID] (',' hiddenTokens+=[AbstractRule|RuleID])*)?
|
// (definesHiddenTokens?='hidden' '(' (hiddenTokens+=[AbstractRule|RuleID] (',' hiddenTokens+=[AbstractRule|RuleID])*)?
|
||||||
// ')')?
|
// ')')?
|
||||||
// metamodelDeclarations+=AbstractMetamodelDeclaration*
|
// metamodelDeclarations+=AbstractMetamodelDeclaration* (('tokenLimit' tokenLimit=INT)? & debug?='hoistingDebug'? &
|
||||||
// initBlock=InitBlock?
|
// initBlock=InitBlock?) rules+=AbstractRule+;
|
||||||
// rules+=AbstractRule+;
|
|
||||||
@Override public ParserRule getRule() { return rule; }
|
@Override public ParserRule getRule() { return rule; }
|
||||||
|
|
||||||
//'grammar' name=GrammarID ('with' usedGrammars+=[Grammar|GrammarID] (',' usedGrammars+=[Grammar|GrammarID])*)?
|
//'grammar' name=GrammarID ('with' usedGrammars+=[Grammar|GrammarID] (',' usedGrammars+=[Grammar|GrammarID])*)?
|
||||||
//(definesHiddenTokens?='hidden' '(' (hiddenTokens+=[AbstractRule|RuleID] (',' hiddenTokens+=[AbstractRule|RuleID])*)?
|
//(definesHiddenTokens?='hidden' '(' (hiddenTokens+=[AbstractRule|RuleID] (',' hiddenTokens+=[AbstractRule|RuleID])*)?
|
||||||
//')')? metamodelDeclarations+=AbstractMetamodelDeclaration* initBlock=InitBlock? rules+=AbstractRule+
|
//')')? metamodelDeclarations+=AbstractMetamodelDeclaration* (('tokenLimit' tokenLimit=INT)? & debug?='hoistingDebug'? &
|
||||||
|
//initBlock=InitBlock?) rules+=AbstractRule+
|
||||||
public Group getGroup() { return cGroup; }
|
public Group getGroup() { return cGroup; }
|
||||||
|
|
||||||
//'grammar'
|
//'grammar'
|
||||||
|
@ -163,11 +171,32 @@ public class XtextGrammarAccess extends AbstractElementFinder.AbstractGrammarEle
|
||||||
//AbstractMetamodelDeclaration
|
//AbstractMetamodelDeclaration
|
||||||
public RuleCall getMetamodelDeclarationsAbstractMetamodelDeclarationParserRuleCall_4_0() { return cMetamodelDeclarationsAbstractMetamodelDeclarationParserRuleCall_4_0; }
|
public RuleCall getMetamodelDeclarationsAbstractMetamodelDeclarationParserRuleCall_4_0() { return cMetamodelDeclarationsAbstractMetamodelDeclarationParserRuleCall_4_0; }
|
||||||
|
|
||||||
|
//(('tokenLimit' tokenLimit=INT)? & debug?='hoistingDebug'? & initBlock=InitBlock?)
|
||||||
|
public UnorderedGroup getUnorderedGroup_5() { return cUnorderedGroup_5; }
|
||||||
|
|
||||||
|
//('tokenLimit' tokenLimit=INT)?
|
||||||
|
public Group getGroup_5_0() { return cGroup_5_0; }
|
||||||
|
|
||||||
|
//'tokenLimit'
|
||||||
|
public Keyword getTokenLimitKeyword_5_0_0() { return cTokenLimitKeyword_5_0_0; }
|
||||||
|
|
||||||
|
//tokenLimit=INT
|
||||||
|
public Assignment getTokenLimitAssignment_5_0_1() { return cTokenLimitAssignment_5_0_1; }
|
||||||
|
|
||||||
|
//INT
|
||||||
|
public RuleCall getTokenLimitINTTerminalRuleCall_5_0_1_0() { return cTokenLimitINTTerminalRuleCall_5_0_1_0; }
|
||||||
|
|
||||||
|
//debug?='hoistingDebug'?
|
||||||
|
public Assignment getDebugAssignment_5_1() { return cDebugAssignment_5_1; }
|
||||||
|
|
||||||
|
//'hoistingDebug'
|
||||||
|
public Keyword getDebugHoistingDebugKeyword_5_1_0() { return cDebugHoistingDebugKeyword_5_1_0; }
|
||||||
|
|
||||||
//initBlock=InitBlock?
|
//initBlock=InitBlock?
|
||||||
public Assignment getInitBlockAssignment_5() { return cInitBlockAssignment_5; }
|
public Assignment getInitBlockAssignment_5_2() { return cInitBlockAssignment_5_2; }
|
||||||
|
|
||||||
//InitBlock
|
//InitBlock
|
||||||
public RuleCall getInitBlockInitBlockParserRuleCall_5_0() { return cInitBlockInitBlockParserRuleCall_5_0; }
|
public RuleCall getInitBlockInitBlockParserRuleCall_5_2_0() { return cInitBlockInitBlockParserRuleCall_5_2_0; }
|
||||||
|
|
||||||
//rules+=AbstractRule+
|
//rules+=AbstractRule+
|
||||||
public Assignment getRulesAssignment_6() { return cRulesAssignment_6; }
|
public Assignment getRulesAssignment_6() { return cRulesAssignment_6; }
|
||||||
|
@ -178,19 +207,19 @@ public class XtextGrammarAccess extends AbstractElementFinder.AbstractGrammarEle
|
||||||
public class InitBlockElements extends AbstractParserRuleElementFinder {
|
public class InitBlockElements extends AbstractParserRuleElementFinder {
|
||||||
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.Xtext.InitBlock");
|
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.Xtext.InitBlock");
|
||||||
private final Group cGroup = (Group)rule.eContents().get(1);
|
private final Group cGroup = (Group)rule.eContents().get(1);
|
||||||
private final Keyword cInitKeyword_0 = (Keyword)cGroup.eContents().get(0);
|
private final Keyword cStaticKeyword_0 = (Keyword)cGroup.eContents().get(0);
|
||||||
private final Assignment cCodeAssignment_1 = (Assignment)cGroup.eContents().get(1);
|
private final Assignment cCodeAssignment_1 = (Assignment)cGroup.eContents().get(1);
|
||||||
private final RuleCall cCodeJavaCodeParserRuleCall_1_0 = (RuleCall)cCodeAssignment_1.eContents().get(0);
|
private final RuleCall cCodeJavaCodeParserRuleCall_1_0 = (RuleCall)cCodeAssignment_1.eContents().get(0);
|
||||||
|
|
||||||
//InitBlock:
|
//InitBlock:
|
||||||
// '@init' code=JavaCode;
|
// 'static' code=JavaCode;
|
||||||
@Override public ParserRule getRule() { return rule; }
|
@Override public ParserRule getRule() { return rule; }
|
||||||
|
|
||||||
//'@init' code=JavaCode
|
//'static' code=JavaCode
|
||||||
public Group getGroup() { return cGroup; }
|
public Group getGroup() { return cGroup; }
|
||||||
|
|
||||||
//'@init'
|
//'static'
|
||||||
public Keyword getInitKeyword_0() { return cInitKeyword_0; }
|
public Keyword getStaticKeyword_0() { return cStaticKeyword_0; }
|
||||||
|
|
||||||
//code=JavaCode
|
//code=JavaCode
|
||||||
public Assignment getCodeAssignment_1() { return cCodeAssignment_1; }
|
public Assignment getCodeAssignment_1() { return cCodeAssignment_1; }
|
||||||
|
@ -2615,9 +2644,8 @@ public class XtextGrammarAccess extends AbstractElementFinder.AbstractGrammarEle
|
||||||
// 'grammar' name=GrammarID ('with' usedGrammars+=[Grammar|GrammarID] (',' usedGrammars+=[Grammar|GrammarID])*)?
|
// 'grammar' name=GrammarID ('with' usedGrammars+=[Grammar|GrammarID] (',' usedGrammars+=[Grammar|GrammarID])*)?
|
||||||
// (definesHiddenTokens?='hidden' '(' (hiddenTokens+=[AbstractRule|RuleID] (',' hiddenTokens+=[AbstractRule|RuleID])*)?
|
// (definesHiddenTokens?='hidden' '(' (hiddenTokens+=[AbstractRule|RuleID] (',' hiddenTokens+=[AbstractRule|RuleID])*)?
|
||||||
// ')')?
|
// ')')?
|
||||||
// metamodelDeclarations+=AbstractMetamodelDeclaration*
|
// metamodelDeclarations+=AbstractMetamodelDeclaration* (('tokenLimit' tokenLimit=INT)? & debug?='hoistingDebug'? &
|
||||||
// initBlock=InitBlock?
|
// initBlock=InitBlock?) rules+=AbstractRule+;
|
||||||
// rules+=AbstractRule+;
|
|
||||||
public GrammarElements getGrammarAccess() {
|
public GrammarElements getGrammarAccess() {
|
||||||
return pGrammar;
|
return pGrammar;
|
||||||
}
|
}
|
||||||
|
@ -2627,7 +2655,7 @@ public class XtextGrammarAccess extends AbstractElementFinder.AbstractGrammarEle
|
||||||
}
|
}
|
||||||
|
|
||||||
//InitBlock:
|
//InitBlock:
|
||||||
// '@init' code=JavaCode;
|
// 'static' code=JavaCode;
|
||||||
public InitBlockElements getInitBlockAccess() {
|
public InitBlockElements getInitBlockAccess() {
|
||||||
return pInitBlock;
|
return pInitBlock;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,12 +15,16 @@ Grammar:
|
||||||
'grammar' name=GrammarID ('with' usedGrammars+=[Grammar|GrammarID] (',' usedGrammars+=[Grammar|GrammarID])*)?
|
'grammar' name=GrammarID ('with' usedGrammars+=[Grammar|GrammarID] (',' usedGrammars+=[Grammar|GrammarID])*)?
|
||||||
(definesHiddenTokens?='hidden' '(' (hiddenTokens+=[AbstractRule|RuleID] (',' hiddenTokens+=[AbstractRule|RuleID])*)? ')')?
|
(definesHiddenTokens?='hidden' '(' (hiddenTokens+=[AbstractRule|RuleID] (',' hiddenTokens+=[AbstractRule|RuleID])*)? ')')?
|
||||||
metamodelDeclarations+=AbstractMetamodelDeclaration*
|
metamodelDeclarations+=AbstractMetamodelDeclaration*
|
||||||
(initBlock=InitBlock)?
|
(
|
||||||
|
('tokenLimit' tokenLimit=INT)? &
|
||||||
|
debug?='hoistingDebug'? &
|
||||||
|
initBlock=InitBlock?
|
||||||
|
)
|
||||||
(rules+=AbstractRule)+
|
(rules+=AbstractRule)+
|
||||||
;
|
;
|
||||||
|
|
||||||
InitBlock returns InitBlock:
|
InitBlock returns InitBlock:
|
||||||
'@init' code=JavaCode
|
'static' code=JavaCode
|
||||||
;
|
;
|
||||||
|
|
||||||
GrammarID returns ecore::EString:
|
GrammarID returns ecore::EString:
|
||||||
|
|
|
@ -255,12 +255,12 @@ public class GeneratorNodeProcessor {
|
||||||
return this.delegate;
|
return this.delegate;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean contains(final ITextRegion other) {
|
public boolean contains(final ITextRegion arg0) {
|
||||||
return this.getDelegate().contains(other);
|
return this.getDelegate().contains(arg0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean contains(final int offset) {
|
public boolean contains(final int arg0) {
|
||||||
return this.getDelegate().contains(offset);
|
return this.getDelegate().contains(arg0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getEndLineNumber() {
|
public int getEndLineNumber() {
|
||||||
|
@ -279,12 +279,12 @@ public class GeneratorNodeProcessor {
|
||||||
return this.getDelegate().getOffset();
|
return this.getDelegate().getOffset();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ITextRegion merge(final ITextRegion region) {
|
public ITextRegion merge(final ITextRegion arg0) {
|
||||||
return this.getDelegate().merge(region);
|
return this.getDelegate().merge(arg0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ITextRegionWithLineInformation merge(final ITextRegionWithLineInformation other) {
|
public ITextRegionWithLineInformation merge(final ITextRegionWithLineInformation arg0) {
|
||||||
return this.getDelegate().merge(other);
|
return this.getDelegate().merge(arg0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue