Skip to content

Commit

Permalink
Fixing the code for passing all the tests since the change of Xtext (…
Browse files Browse the repository at this point in the history
…issue #93).
  • Loading branch information
gallandarakhneorg committed May 23, 2014
1 parent a8dfcce commit d1236d7
Show file tree
Hide file tree
Showing 20 changed files with 18,774 additions and 18,591 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ protected String getRuleName(AbstractElement element) {
put(grammarAccess.getSkillFeatureAccess().getAlternatives(), "rule__SkillFeature__Alternatives");
put(grammarAccess.getAttributeAccess().getAlternatives_1(), "rule__Attribute__Alternatives_1");
put(grammarAccess.getAttributeAccess().getAlternatives_2(), "rule__Attribute__Alternatives_2");
put(grammarAccess.getDefaultParameterValueAccess().getAlternatives(), "rule__DefaultParameterValue__Alternatives");
put(grammarAccess.getXVariableDeclarationAccess().getAlternatives_1(), "rule__XVariableDeclaration__Alternatives_1");
put(grammarAccess.getXVariableDeclarationAccess().getAlternatives_2(), "rule__XVariableDeclaration__Alternatives_2");
put(grammarAccess.getXAssignmentAccess().getAlternatives(), "rule__XAssignment__Alternatives");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -675,9 +675,9 @@ ruleDefaultParameterValue
}
:
(
{ before(grammarAccess.getDefaultParameterValueAccess().getAlternatives()); }
(rule__DefaultParameterValue__Alternatives)
{ after(grammarAccess.getDefaultParameterValueAccess().getAlternatives()); }
{ before(grammarAccess.getDefaultParameterValueAccess().getXLiteralParserRuleCall()); }
ruleXLiteral
{ after(grammarAccess.getDefaultParameterValueAccess().getXLiteralParserRuleCall()); }
)

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

rule__DefaultParameterValue__Alternatives
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getDefaultParameterValueAccess().getXBooleanLiteralParserRuleCall_0()); }
ruleXBooleanLiteral
{ after(grammarAccess.getDefaultParameterValueAccess().getXBooleanLiteralParserRuleCall_0()); }
)

|(
{ before(grammarAccess.getDefaultParameterValueAccess().getXNumberLiteralParserRuleCall_1()); }
ruleXNumberLiteral
{ after(grammarAccess.getDefaultParameterValueAccess().getXNumberLiteralParserRuleCall_1()); }
)

|(
{ before(grammarAccess.getDefaultParameterValueAccess().getXNullLiteralParserRuleCall_2()); }
ruleXNullLiteral
{ after(grammarAccess.getDefaultParameterValueAccess().getXNullLiteralParserRuleCall_2()); }
)

|(
{ before(grammarAccess.getDefaultParameterValueAccess().getXStringLiteralParserRuleCall_3()); }
ruleXStringLiteral
{ after(grammarAccess.getDefaultParameterValueAccess().getXStringLiteralParserRuleCall_3()); }
)

|(
{ before(grammarAccess.getDefaultParameterValueAccess().getXTypeLiteralParserRuleCall_4()); }
ruleXTypeLiteral
{ after(grammarAccess.getDefaultParameterValueAccess().getXTypeLiteralParserRuleCall_4()); }
)

;
finally {
restoreStackSize(stackSize);
}

rule__XVariableDeclaration__Alternatives_1
@init {
int stackSize = keepStackSize();
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Binary file modified lang/plugins/io.sarl.lang/src-gen/io/sarl/lang/SARL.xtextbin
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -1874,56 +1874,16 @@ ruleDefaultParameterValue returns [EObject current=null]
@init { enterRule();
}
@after { leaveRule(); }:
(
{
newCompositeNode(grammarAccess.getDefaultParameterValueAccess().getXBooleanLiteralParserRuleCall_0());
}
this_XBooleanLiteral_0=ruleXBooleanLiteral
{
$current = $this_XBooleanLiteral_0.current;
afterParserOrEnumRuleCall();
}

|
{
newCompositeNode(grammarAccess.getDefaultParameterValueAccess().getXNumberLiteralParserRuleCall_1());
}
this_XNumberLiteral_1=ruleXNumberLiteral
{
$current = $this_XNumberLiteral_1.current;
afterParserOrEnumRuleCall();
}

|
{
newCompositeNode(grammarAccess.getDefaultParameterValueAccess().getXNullLiteralParserRuleCall_2());
}
this_XNullLiteral_2=ruleXNullLiteral
{
$current = $this_XNullLiteral_2.current;
afterParserOrEnumRuleCall();
}

|
{
newCompositeNode(grammarAccess.getDefaultParameterValueAccess().getXStringLiteralParserRuleCall_3());
newCompositeNode(grammarAccess.getDefaultParameterValueAccess().getXLiteralParserRuleCall());
}
this_XStringLiteral_3=ruleXStringLiteral
this_XLiteral_0=ruleXLiteral
{
$current = $this_XStringLiteral_3.current;
$current = $this_XLiteral_0.current;
afterParserOrEnumRuleCall();
}

|
{
newCompositeNode(grammarAccess.getDefaultParameterValueAccess().getXTypeLiteralParserRuleCall_4());
}
this_XTypeLiteral_4=ruleXTypeLiteral
{
$current = $this_XTypeLiteral_4.current;
afterParserOrEnumRuleCall();
}
)
;


Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,8 @@ else if(context == grammarAccess.getXExpressionInClosureRule()) {
}
else break;
case XbasePackage.XCLOSURE:
if(context == grammarAccess.getXAdditiveExpressionRule() ||
if(context == grammarAccess.getDefaultParameterValueRule() ||
context == grammarAccess.getXAdditiveExpressionRule() ||
context == grammarAccess.getXAdditiveExpressionAccess().getXBinaryOperationLeftOperandAction_1_0_0_0() ||
context == grammarAccess.getXAndExpressionRule() ||
context == grammarAccess.getXAndExpressionAccess().getXBinaryOperationLeftOperandAction_1_0_0_0() ||
Expand Down Expand Up @@ -770,7 +771,8 @@ else if(context == grammarAccess.getXShortClosureRule()) {
}
else break;
case XbasePackage.XLIST_LITERAL:
if(context == grammarAccess.getXAdditiveExpressionRule() ||
if(context == grammarAccess.getDefaultParameterValueRule() ||
context == grammarAccess.getXAdditiveExpressionRule() ||
context == grammarAccess.getXAdditiveExpressionAccess().getXBinaryOperationLeftOperandAction_1_0_0_0() ||
context == grammarAccess.getXAndExpressionRule() ||
context == grammarAccess.getXAndExpressionAccess().getXBinaryOperationLeftOperandAction_1_0_0_0() ||
Expand Down Expand Up @@ -984,7 +986,8 @@ else if(context == grammarAccess.getXShortClosureRule()) {
}
else break;
case XbasePackage.XSET_LITERAL:
if(context == grammarAccess.getXAdditiveExpressionRule() ||
if(context == grammarAccess.getDefaultParameterValueRule() ||
context == grammarAccess.getXAdditiveExpressionRule() ||
context == grammarAccess.getXAdditiveExpressionAccess().getXBinaryOperationLeftOperandAction_1_0_0_0() ||
context == grammarAccess.getXAndExpressionRule() ||
context == grammarAccess.getXAndExpressionAccess().getXBinaryOperationLeftOperandAction_1_0_0_0() ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1326,34 +1326,14 @@ public class FormalParameterElements extends AbstractParserRuleElementFinder {

public class DefaultParameterValueElements extends AbstractParserRuleElementFinder {
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "DefaultParameterValue");
private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1);
private final RuleCall cXBooleanLiteralParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0);
private final RuleCall cXNumberLiteralParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1);
private final RuleCall cXNullLiteralParserRuleCall_2 = (RuleCall)cAlternatives.eContents().get(2);
private final RuleCall cXStringLiteralParserRuleCall_3 = (RuleCall)cAlternatives.eContents().get(3);
private final RuleCall cXTypeLiteralParserRuleCall_4 = (RuleCall)cAlternatives.eContents().get(4);
private final RuleCall cXLiteralParserRuleCall = (RuleCall)rule.eContents().get(1);

//DefaultParameterValue returns xbase::XExpression:
// XBooleanLiteral | XNumberLiteral | XNullLiteral | XStringLiteral | XTypeLiteral;
// XLiteral;
public ParserRule getRule() { return rule; }

//XBooleanLiteral | XNumberLiteral | XNullLiteral | XStringLiteral | XTypeLiteral
public Alternatives getAlternatives() { return cAlternatives; }

//XBooleanLiteral
public RuleCall getXBooleanLiteralParserRuleCall_0() { return cXBooleanLiteralParserRuleCall_0; }

//XNumberLiteral
public RuleCall getXNumberLiteralParserRuleCall_1() { return cXNumberLiteralParserRuleCall_1; }

//XNullLiteral
public RuleCall getXNullLiteralParserRuleCall_2() { return cXNullLiteralParserRuleCall_2; }

//XStringLiteral
public RuleCall getXStringLiteralParserRuleCall_3() { return cXStringLiteralParserRuleCall_3; }

//XTypeLiteral
public RuleCall getXTypeLiteralParserRuleCall_4() { return cXTypeLiteralParserRuleCall_4; }
//XLiteral
public RuleCall getXLiteralParserRuleCall() { return cXLiteralParserRuleCall; }
}

public class XVariableDeclarationElements extends AbstractParserRuleElementFinder {
Expand Down Expand Up @@ -1998,7 +1978,7 @@ public ParserRule getFormalParameterRule() {
}

//DefaultParameterValue returns xbase::XExpression:
// XBooleanLiteral | XNumberLiteral | XNullLiteral | XStringLiteral | XTypeLiteral;
// XLiteral;
public DefaultParameterValueElements getDefaultParameterValueAccess() {
return (pDefaultParameterValue != null) ? pDefaultParameterValue : (pDefaultParameterValue = new DefaultParameterValueElements());
}
Expand Down
6 changes: 1 addition & 5 deletions lang/plugins/io.sarl.lang/src/io/sarl/lang/SARL.xtext
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,7 @@ FormalParameter:
;

DefaultParameterValue returns xbase::XExpression:
XBooleanLiteral |
XNumberLiteral |
XNullLiteral |
XStringLiteral |
XTypeLiteral
XLiteral
;

//-----------------------------------------------
Expand Down
Loading

0 comments on commit d1236d7

Please sign in to comment.