eclipse plugin: Work a bit on the grammar and make it...

...take in account proper IFDEF format and also the order of the macro
calls
This commit is contained in:
Timotei Dolean 2011-07-15 21:05:34 +00:00
parent b75beee2c6
commit d9044c7a9e
30 changed files with 3935 additions and 2694 deletions

View file

@ -51,10 +51,7 @@ public class AbstractWMLProposalProvider extends AbstractJavaBasedContentProposa
public void completeWMLMacroCall_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeWMLMacroCall_Params(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeWMLMacroCall_ExtraMacros(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
public void completeWMLMacroCall_Parameters(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeWMLArrayCall_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
@ -81,6 +78,9 @@ public class AbstractWMLProposalProvider extends AbstractJavaBasedContentProposa
public void completeWMLPreprocIF_Elses(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeWMLPreprocIF_ElseExpressions(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeWMLPreprocIF_EndName(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
@ -106,6 +106,9 @@ public class AbstractWMLProposalProvider extends AbstractJavaBasedContentProposa
public void complete_WMLMacroCall(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_WMLMacroCallParameter(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_WMLArrayCall(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}

View file

@ -39,9 +39,8 @@ public class WMLParser extends AbstractContentAssistParser {
{
put(grammarAccess.getWMLKeyAccess().getEolAlternatives_4_0(), "rule__WMLKey__EolAlternatives_4_0");
put(grammarAccess.getWMLKeyValueAccess().getAlternatives(), "rule__WMLKeyValue__Alternatives");
put(grammarAccess.getWMLMacroCallAccess().getAlternatives_4(), "rule__WMLMacroCall__Alternatives_4");
put(grammarAccess.getWMLMacroCallParameterAccess().getAlternatives(), "rule__WMLMacroCallParameter__Alternatives");
put(grammarAccess.getWMLPreprocIFAccess().getNameAlternatives_0_0(), "rule__WMLPreprocIF__NameAlternatives_0_0");
put(grammarAccess.getWMLPreprocIFAccess().getAlternatives_1(), "rule__WMLPreprocIF__Alternatives_1");
put(grammarAccess.getWMLRootExpressionAccess().getAlternatives(), "rule__WMLRootExpression__Alternatives");
put(grammarAccess.getWMLExpressionAccess().getAlternatives(), "rule__WMLExpression__Alternatives");
put(grammarAccess.getWMLValuedExpressionAccess().getAlternatives(), "rule__WMLValuedExpression__Alternatives");
@ -53,9 +52,11 @@ public class WMLParser extends AbstractContentAssistParser {
put(grammarAccess.getWMLKeyAccess().getGroup_3(), "rule__WMLKey__Group_3__0");
put(grammarAccess.getWMLKeyValueAccess().getGroup_0(), "rule__WMLKeyValue__Group_0__0");
put(grammarAccess.getWMLMacroCallAccess().getGroup(), "rule__WMLMacroCall__Group__0");
put(grammarAccess.getWMLMacroCallParameterAccess().getGroup_0(), "rule__WMLMacroCallParameter__Group_0__0");
put(grammarAccess.getWMLArrayCallAccess().getGroup(), "rule__WMLArrayCall__Group__0");
put(grammarAccess.getWMLMacroDefineAccess().getGroup(), "rule__WMLMacroDefine__Group__0");
put(grammarAccess.getWMLPreprocIFAccess().getGroup(), "rule__WMLPreprocIF__Group__0");
put(grammarAccess.getWMLPreprocIFAccess().getGroup_2(), "rule__WMLPreprocIF__Group_2__0");
put(grammarAccess.getWMLValuedExpressionAccess().getGroup_1(), "rule__WMLValuedExpression__Group_1__0");
put(grammarAccess.getWMLRootAccess().getExpressionsAssignment(), "rule__WMLRoot__ExpressionsAssignment");
put(grammarAccess.getWMLTagAccess().getPlusAssignment_1(), "rule__WMLTag__PlusAssignment_1");
@ -69,16 +70,16 @@ public class WMLParser extends AbstractContentAssistParser {
put(grammarAccess.getWMLMacroCallAccess().getPointAssignment_1(), "rule__WMLMacroCall__PointAssignment_1");
put(grammarAccess.getWMLMacroCallAccess().getRelativeAssignment_2(), "rule__WMLMacroCall__RelativeAssignment_2");
put(grammarAccess.getWMLMacroCallAccess().getNameAssignment_3(), "rule__WMLMacroCall__NameAssignment_3");
put(grammarAccess.getWMLMacroCallAccess().getParamsAssignment_4_0(), "rule__WMLMacroCall__ParamsAssignment_4_0");
put(grammarAccess.getWMLMacroCallAccess().getExtraMacrosAssignment_4_1(), "rule__WMLMacroCall__ExtraMacrosAssignment_4_1");
put(grammarAccess.getWMLMacroCallAccess().getParametersAssignment_4(), "rule__WMLMacroCall__ParametersAssignment_4");
put(grammarAccess.getWMLArrayCallAccess().getValueAssignment_1(), "rule__WMLArrayCall__ValueAssignment_1");
put(grammarAccess.getWMLMacroDefineAccess().getNameAssignment_0(), "rule__WMLMacroDefine__NameAssignment_0");
put(grammarAccess.getWMLMacroDefineAccess().getExpressionsAssignment_1(), "rule__WMLMacroDefine__ExpressionsAssignment_1");
put(grammarAccess.getWMLMacroDefineAccess().getEndNameAssignment_2(), "rule__WMLMacroDefine__EndNameAssignment_2");
put(grammarAccess.getWMLPreprocIFAccess().getNameAssignment_0(), "rule__WMLPreprocIF__NameAssignment_0");
put(grammarAccess.getWMLPreprocIFAccess().getExpressionsAssignment_1_0(), "rule__WMLPreprocIF__ExpressionsAssignment_1_0");
put(grammarAccess.getWMLPreprocIFAccess().getElsesAssignment_1_1(), "rule__WMLPreprocIF__ElsesAssignment_1_1");
put(grammarAccess.getWMLPreprocIFAccess().getEndNameAssignment_2(), "rule__WMLPreprocIF__EndNameAssignment_2");
put(grammarAccess.getWMLPreprocIFAccess().getExpressionsAssignment_1(), "rule__WMLPreprocIF__ExpressionsAssignment_1");
put(grammarAccess.getWMLPreprocIFAccess().getElsesAssignment_2_0(), "rule__WMLPreprocIF__ElsesAssignment_2_0");
put(grammarAccess.getWMLPreprocIFAccess().getElseExpressionsAssignment_2_1(), "rule__WMLPreprocIF__ElseExpressionsAssignment_2_1");
put(grammarAccess.getWMLPreprocIFAccess().getEndNameAssignment_3(), "rule__WMLPreprocIF__EndNameAssignment_3");
put(grammarAccess.getWMLTextdomainAccess().getNameAssignment(), "rule__WMLTextdomain__NameAssignment");
put(grammarAccess.getWMLLuaCodeAccess().getValueAssignment(), "rule__WMLLuaCode__ValueAssignment");
}

View file

@ -205,6 +205,34 @@ finally {
// Entry rule entryRuleWMLMacroCallParameter
entryRuleWMLMacroCallParameter
:
{ before(grammarAccess.getWMLMacroCallParameterRule()); }
ruleWMLMacroCallParameter
{ after(grammarAccess.getWMLMacroCallParameterRule()); }
EOF
;
// Rule WMLMacroCallParameter
ruleWMLMacroCallParameter
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getWMLMacroCallParameterAccess().getAlternatives()); }
(rule__WMLMacroCallParameter__Alternatives)
{ after(grammarAccess.getWMLMacroCallParameterAccess().getAlternatives()); }
)
;
finally {
restoreStackSize(stackSize);
}
// Entry rule entryRuleWMLArrayCall
entryRuleWMLArrayCall
:
@ -570,21 +598,21 @@ finally {
restoreStackSize(stackSize);
}
rule__WMLMacroCall__Alternatives_4
rule__WMLMacroCallParameter__Alternatives
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getWMLMacroCallAccess().getParamsAssignment_4_0()); }
(rule__WMLMacroCall__ParamsAssignment_4_0)
{ after(grammarAccess.getWMLMacroCallAccess().getParamsAssignment_4_0()); }
{ before(grammarAccess.getWMLMacroCallParameterAccess().getGroup_0()); }
(rule__WMLMacroCallParameter__Group_0__0)
{ after(grammarAccess.getWMLMacroCallParameterAccess().getGroup_0()); }
)
|(
{ before(grammarAccess.getWMLMacroCallAccess().getExtraMacrosAssignment_4_1()); }
(rule__WMLMacroCall__ExtraMacrosAssignment_4_1)
{ after(grammarAccess.getWMLMacroCallAccess().getExtraMacrosAssignment_4_1()); }
{ before(grammarAccess.getWMLMacroCallParameterAccess().getWMLMacroCallParserRuleCall_1()); }
ruleWMLMacroCall
{ after(grammarAccess.getWMLMacroCallParameterAccess().getWMLMacroCallParserRuleCall_1()); }
)
;
@ -626,28 +654,6 @@ finally {
restoreStackSize(stackSize);
}
rule__WMLPreprocIF__Alternatives_1
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getWMLPreprocIFAccess().getExpressionsAssignment_1_0()); }
(rule__WMLPreprocIF__ExpressionsAssignment_1_0)
{ after(grammarAccess.getWMLPreprocIFAccess().getExpressionsAssignment_1_0()); }
)
|(
{ before(grammarAccess.getWMLPreprocIFAccess().getElsesAssignment_1_1()); }
(rule__WMLPreprocIF__ElsesAssignment_1_1)
{ after(grammarAccess.getWMLPreprocIFAccess().getElsesAssignment_1_1()); }
)
;
finally {
restoreStackSize(stackSize);
}
rule__WMLRootExpression__Alternatives
@init {
int stackSize = keepStackSize();
@ -1640,9 +1646,9 @@ rule__WMLMacroCall__Group__4__Impl
}
:
(
{ before(grammarAccess.getWMLMacroCallAccess().getAlternatives_4()); }
(rule__WMLMacroCall__Alternatives_4)*
{ after(grammarAccess.getWMLMacroCallAccess().getAlternatives_4()); }
{ before(grammarAccess.getWMLMacroCallAccess().getParametersAssignment_4()); }
(rule__WMLMacroCall__ParametersAssignment_4)*
{ after(grammarAccess.getWMLMacroCallAccess().getParametersAssignment_4()); }
)
;
@ -1693,6 +1699,69 @@ finally {
rule__WMLMacroCallParameter__Group_0__0
@init {
int stackSize = keepStackSize();
}
:
rule__WMLMacroCallParameter__Group_0__0__Impl
rule__WMLMacroCallParameter__Group_0__1
;
finally {
restoreStackSize(stackSize);
}
rule__WMLMacroCallParameter__Group_0__0__Impl
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getWMLMacroCallParameterAccess().getWMLMacroCallParameterAction_0_0()); }
(
)
{ after(grammarAccess.getWMLMacroCallParameterAccess().getWMLMacroCallParameterAction_0_0()); }
)
;
finally {
restoreStackSize(stackSize);
}
rule__WMLMacroCallParameter__Group_0__1
@init {
int stackSize = keepStackSize();
}
:
rule__WMLMacroCallParameter__Group_0__1__Impl
;
finally {
restoreStackSize(stackSize);
}
rule__WMLMacroCallParameter__Group_0__1__Impl
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getWMLMacroCallParameterAccess().getWMLMacroParameterParserRuleCall_0_1()); }
ruleWMLMacroParameter
{ after(grammarAccess.getWMLMacroCallParameterAccess().getWMLMacroParameterParserRuleCall_0_1()); }
)
;
finally {
restoreStackSize(stackSize);
}
rule__WMLArrayCall__Group__0
@init {
int stackSize = keepStackSize();
@ -1935,9 +2004,9 @@ rule__WMLPreprocIF__Group__1__Impl
}
:
(
{ before(grammarAccess.getWMLPreprocIFAccess().getAlternatives_1()); }
(rule__WMLPreprocIF__Alternatives_1)*
{ after(grammarAccess.getWMLPreprocIFAccess().getAlternatives_1()); }
{ before(grammarAccess.getWMLPreprocIFAccess().getExpressionsAssignment_1()); }
(rule__WMLPreprocIF__ExpressionsAssignment_1)*
{ after(grammarAccess.getWMLPreprocIFAccess().getExpressionsAssignment_1()); }
)
;
@ -1952,6 +2021,7 @@ rule__WMLPreprocIF__Group__2
}
:
rule__WMLPreprocIF__Group__2__Impl
rule__WMLPreprocIF__Group__3
;
finally {
restoreStackSize(stackSize);
@ -1963,9 +2033,9 @@ rule__WMLPreprocIF__Group__2__Impl
}
:
(
{ before(grammarAccess.getWMLPreprocIFAccess().getEndNameAssignment_2()); }
(rule__WMLPreprocIF__EndNameAssignment_2)
{ after(grammarAccess.getWMLPreprocIFAccess().getEndNameAssignment_2()); }
{ before(grammarAccess.getWMLPreprocIFAccess().getGroup_2()); }
(rule__WMLPreprocIF__Group_2__0)?
{ after(grammarAccess.getWMLPreprocIFAccess().getGroup_2()); }
)
;
@ -1974,6 +2044,104 @@ finally {
}
rule__WMLPreprocIF__Group__3
@init {
int stackSize = keepStackSize();
}
:
rule__WMLPreprocIF__Group__3__Impl
;
finally {
restoreStackSize(stackSize);
}
rule__WMLPreprocIF__Group__3__Impl
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getWMLPreprocIFAccess().getEndNameAssignment_3()); }
(rule__WMLPreprocIF__EndNameAssignment_3)
{ after(grammarAccess.getWMLPreprocIFAccess().getEndNameAssignment_3()); }
)
;
finally {
restoreStackSize(stackSize);
}
rule__WMLPreprocIF__Group_2__0
@init {
int stackSize = keepStackSize();
}
:
rule__WMLPreprocIF__Group_2__0__Impl
rule__WMLPreprocIF__Group_2__1
;
finally {
restoreStackSize(stackSize);
}
rule__WMLPreprocIF__Group_2__0__Impl
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getWMLPreprocIFAccess().getElsesAssignment_2_0()); }
(rule__WMLPreprocIF__ElsesAssignment_2_0)
{ after(grammarAccess.getWMLPreprocIFAccess().getElsesAssignment_2_0()); }
)
;
finally {
restoreStackSize(stackSize);
}
rule__WMLPreprocIF__Group_2__1
@init {
int stackSize = keepStackSize();
}
:
rule__WMLPreprocIF__Group_2__1__Impl
;
finally {
restoreStackSize(stackSize);
}
rule__WMLPreprocIF__Group_2__1__Impl
@init {
int stackSize = keepStackSize();
}
:
(
(
{ before(grammarAccess.getWMLPreprocIFAccess().getElseExpressionsAssignment_2_1()); }
(rule__WMLPreprocIF__ElseExpressionsAssignment_2_1)
{ after(grammarAccess.getWMLPreprocIFAccess().getElseExpressionsAssignment_2_1()); }
)
(
{ before(grammarAccess.getWMLPreprocIFAccess().getElseExpressionsAssignment_2_1()); }
(rule__WMLPreprocIF__ElseExpressionsAssignment_2_1)*
{ after(grammarAccess.getWMLPreprocIFAccess().getElseExpressionsAssignment_2_1()); }
)
)
;
finally {
restoreStackSize(stackSize);
}
@ -2249,29 +2417,14 @@ finally {
restoreStackSize(stackSize);
}
rule__WMLMacroCall__ParamsAssignment_4_0
rule__WMLMacroCall__ParametersAssignment_4
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getWMLMacroCallAccess().getParamsWMLMacroParameterParserRuleCall_4_0_0()); }
ruleWMLMacroParameter{ after(grammarAccess.getWMLMacroCallAccess().getParamsWMLMacroParameterParserRuleCall_4_0_0()); }
)
;
finally {
restoreStackSize(stackSize);
}
rule__WMLMacroCall__ExtraMacrosAssignment_4_1
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getWMLMacroCallAccess().getExtraMacrosWMLMacroCallParserRuleCall_4_1_0()); }
ruleWMLMacroCall{ after(grammarAccess.getWMLMacroCallAccess().getExtraMacrosWMLMacroCallParserRuleCall_4_1_0()); }
{ before(grammarAccess.getWMLMacroCallAccess().getParametersWMLMacroCallParameterParserRuleCall_4_0()); }
ruleWMLMacroCallParameter{ after(grammarAccess.getWMLMacroCallAccess().getParametersWMLMacroCallParameterParserRuleCall_4_0()); }
)
;
@ -2355,14 +2508,14 @@ finally {
restoreStackSize(stackSize);
}
rule__WMLPreprocIF__ExpressionsAssignment_1_0
rule__WMLPreprocIF__ExpressionsAssignment_1
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getWMLPreprocIFAccess().getExpressionsWMLValuedExpressionParserRuleCall_1_0_0()); }
ruleWMLValuedExpression{ after(grammarAccess.getWMLPreprocIFAccess().getExpressionsWMLValuedExpressionParserRuleCall_1_0_0()); }
{ before(grammarAccess.getWMLPreprocIFAccess().getExpressionsWMLValuedExpressionParserRuleCall_1_0()); }
ruleWMLValuedExpression{ after(grammarAccess.getWMLPreprocIFAccess().getExpressionsWMLValuedExpressionParserRuleCall_1_0()); }
)
;
@ -2370,14 +2523,14 @@ finally {
restoreStackSize(stackSize);
}
rule__WMLPreprocIF__ElsesAssignment_1_1
rule__WMLPreprocIF__ElsesAssignment_2_0
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getWMLPreprocIFAccess().getElsesELSETerminalRuleCall_1_1_0()); }
RULE_ELSE{ after(grammarAccess.getWMLPreprocIFAccess().getElsesELSETerminalRuleCall_1_1_0()); }
{ before(grammarAccess.getWMLPreprocIFAccess().getElsesELSETerminalRuleCall_2_0_0()); }
RULE_ELSE{ after(grammarAccess.getWMLPreprocIFAccess().getElsesELSETerminalRuleCall_2_0_0()); }
)
;
@ -2385,14 +2538,29 @@ finally {
restoreStackSize(stackSize);
}
rule__WMLPreprocIF__EndNameAssignment_2
rule__WMLPreprocIF__ElseExpressionsAssignment_2_1
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getWMLPreprocIFAccess().getEndNameENDIFTerminalRuleCall_2_0()); }
RULE_ENDIF{ after(grammarAccess.getWMLPreprocIFAccess().getEndNameENDIFTerminalRuleCall_2_0()); }
{ before(grammarAccess.getWMLPreprocIFAccess().getElseExpressionsWMLValuedExpressionParserRuleCall_2_1_0()); }
ruleWMLValuedExpression{ after(grammarAccess.getWMLPreprocIFAccess().getElseExpressionsWMLValuedExpressionParserRuleCall_2_1_0()); }
)
;
finally {
restoreStackSize(stackSize);
}
rule__WMLPreprocIF__EndNameAssignment_3
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getWMLPreprocIFAccess().getEndNameENDIFTerminalRuleCall_3_0()); }
RULE_ENDIF{ after(grammarAccess.getWMLPreprocIFAccess().getEndNameENDIFTerminalRuleCall_3_0()); }
)
;

View file

@ -327,12 +327,12 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_LUA_CODE() throws RecognitionException {
try {
int _type = RULE_LUA_CODE;
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2434:15: ( '<<' ( options {greedy=false; } : . )* '>>' )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2434:17: '<<' ( options {greedy=false; } : . )* '>>'
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2602:15: ( '<<' ( options {greedy=false; } : . )* '>>' )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2602:17: '<<' ( options {greedy=false; } : . )* '>>'
{
match("<<");
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2434:22: ( options {greedy=false; } : . )*
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2602:22: ( options {greedy=false; } : . )*
loop1:
do {
int alt1=2;
@ -357,7 +357,7 @@ public class InternalWMLLexer extends Lexer {
switch (alt1) {
case 1 :
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2434:50: .
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2602:50: .
{
matchAny();
@ -385,12 +385,12 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_IFHAVE() throws RecognitionException {
try {
int _type = RULE_IFHAVE;
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2436:13: ( '#ifhave' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2436:15: '#ifhave' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2604:13: ( '#ifhave' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2604:15: '#ifhave' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
{
match("#ifhave");
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2436:25: (~ ( ( '\\n' | '\\r' ) ) )*
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2604:25: (~ ( ( '\\n' | '\\r' ) ) )*
loop2:
do {
int alt2=2;
@ -403,7 +403,7 @@ public class InternalWMLLexer extends Lexer {
switch (alt2) {
case 1 :
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2436:25: ~ ( ( '\\n' | '\\r' ) )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2604:25: ~ ( ( '\\n' | '\\r' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFE') ) {
input.consume();
@ -424,7 +424,7 @@ public class InternalWMLLexer extends Lexer {
}
} while (true);
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2436:41: ( ( '\\r' )? '\\n' )?
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2604:41: ( ( '\\r' )? '\\n' )?
int alt4=2;
int LA4_0 = input.LA(1);
@ -433,9 +433,9 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt4) {
case 1 :
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2436:42: ( '\\r' )? '\\n'
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2604:42: ( '\\r' )? '\\n'
{
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2436:42: ( '\\r' )?
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2604:42: ( '\\r' )?
int alt3=2;
int LA3_0 = input.LA(1);
@ -444,7 +444,7 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt3) {
case 1 :
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2436:42: '\\r'
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2604:42: '\\r'
{
match('\r');
@ -474,12 +474,12 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_IFNHAVE() throws RecognitionException {
try {
int _type = RULE_IFNHAVE;
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2438:14: ( '#ifnhave' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2438:16: '#ifnhave' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2606:14: ( '#ifnhave' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2606:16: '#ifnhave' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
{
match("#ifnhave");
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2438:27: (~ ( ( '\\n' | '\\r' ) ) )*
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2606:27: (~ ( ( '\\n' | '\\r' ) ) )*
loop5:
do {
int alt5=2;
@ -492,7 +492,7 @@ public class InternalWMLLexer extends Lexer {
switch (alt5) {
case 1 :
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2438:27: ~ ( ( '\\n' | '\\r' ) )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2606:27: ~ ( ( '\\n' | '\\r' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFE') ) {
input.consume();
@ -513,7 +513,7 @@ public class InternalWMLLexer extends Lexer {
}
} while (true);
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2438:43: ( ( '\\r' )? '\\n' )?
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2606:43: ( ( '\\r' )? '\\n' )?
int alt7=2;
int LA7_0 = input.LA(1);
@ -522,9 +522,9 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt7) {
case 1 :
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2438:44: ( '\\r' )? '\\n'
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2606:44: ( '\\r' )? '\\n'
{
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2438:44: ( '\\r' )?
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2606:44: ( '\\r' )?
int alt6=2;
int LA6_0 = input.LA(1);
@ -533,7 +533,7 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt6) {
case 1 :
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2438:44: '\\r'
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2606:44: '\\r'
{
match('\r');
@ -563,12 +563,12 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_IFDEF() throws RecognitionException {
try {
int _type = RULE_IFDEF;
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2440:12: ( '#ifdef' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2440:14: '#ifdef' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2608:12: ( '#ifdef' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2608:14: '#ifdef' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
{
match("#ifdef");
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2440:23: (~ ( ( '\\n' | '\\r' ) ) )*
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2608:23: (~ ( ( '\\n' | '\\r' ) ) )*
loop8:
do {
int alt8=2;
@ -581,7 +581,7 @@ public class InternalWMLLexer extends Lexer {
switch (alt8) {
case 1 :
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2440:23: ~ ( ( '\\n' | '\\r' ) )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2608:23: ~ ( ( '\\n' | '\\r' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFE') ) {
input.consume();
@ -602,7 +602,7 @@ public class InternalWMLLexer extends Lexer {
}
} while (true);
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2440:39: ( ( '\\r' )? '\\n' )?
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2608:39: ( ( '\\r' )? '\\n' )?
int alt10=2;
int LA10_0 = input.LA(1);
@ -611,9 +611,9 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt10) {
case 1 :
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2440:40: ( '\\r' )? '\\n'
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2608:40: ( '\\r' )? '\\n'
{
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2440:40: ( '\\r' )?
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2608:40: ( '\\r' )?
int alt9=2;
int LA9_0 = input.LA(1);
@ -622,7 +622,7 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt9) {
case 1 :
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2440:40: '\\r'
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2608:40: '\\r'
{
match('\r');
@ -652,12 +652,12 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_IFNDEF() throws RecognitionException {
try {
int _type = RULE_IFNDEF;
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2442:13: ( '#ifndef' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2442:15: '#ifndef' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2610:13: ( '#ifndef' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2610:15: '#ifndef' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
{
match("#ifndef");
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2442:25: (~ ( ( '\\n' | '\\r' ) ) )*
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2610:25: (~ ( ( '\\n' | '\\r' ) ) )*
loop11:
do {
int alt11=2;
@ -670,7 +670,7 @@ public class InternalWMLLexer extends Lexer {
switch (alt11) {
case 1 :
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2442:25: ~ ( ( '\\n' | '\\r' ) )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2610:25: ~ ( ( '\\n' | '\\r' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFE') ) {
input.consume();
@ -691,7 +691,7 @@ public class InternalWMLLexer extends Lexer {
}
} while (true);
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2442:41: ( ( '\\r' )? '\\n' )?
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2610:41: ( ( '\\r' )? '\\n' )?
int alt13=2;
int LA13_0 = input.LA(1);
@ -700,9 +700,9 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt13) {
case 1 :
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2442:42: ( '\\r' )? '\\n'
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2610:42: ( '\\r' )? '\\n'
{
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2442:42: ( '\\r' )?
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2610:42: ( '\\r' )?
int alt12=2;
int LA12_0 = input.LA(1);
@ -711,7 +711,7 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt12) {
case 1 :
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2442:42: '\\r'
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2610:42: '\\r'
{
match('\r');
@ -741,12 +741,12 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_ELSE() throws RecognitionException {
try {
int _type = RULE_ELSE;
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2444:11: ( '#else' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2444:13: '#else' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2612:11: ( '#else' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2612:13: '#else' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
{
match("#else");
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2444:21: (~ ( ( '\\n' | '\\r' ) ) )*
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2612:21: (~ ( ( '\\n' | '\\r' ) ) )*
loop14:
do {
int alt14=2;
@ -759,7 +759,7 @@ public class InternalWMLLexer extends Lexer {
switch (alt14) {
case 1 :
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2444:21: ~ ( ( '\\n' | '\\r' ) )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2612:21: ~ ( ( '\\n' | '\\r' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFE') ) {
input.consume();
@ -780,7 +780,7 @@ public class InternalWMLLexer extends Lexer {
}
} while (true);
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2444:37: ( ( '\\r' )? '\\n' )?
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2612:37: ( ( '\\r' )? '\\n' )?
int alt16=2;
int LA16_0 = input.LA(1);
@ -789,9 +789,9 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt16) {
case 1 :
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2444:38: ( '\\r' )? '\\n'
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2612:38: ( '\\r' )? '\\n'
{
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2444:38: ( '\\r' )?
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2612:38: ( '\\r' )?
int alt15=2;
int LA15_0 = input.LA(1);
@ -800,7 +800,7 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt15) {
case 1 :
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2444:38: '\\r'
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2612:38: '\\r'
{
match('\r');
@ -830,12 +830,12 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_ENDIF() throws RecognitionException {
try {
int _type = RULE_ENDIF;
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2446:12: ( '#endif' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2446:14: '#endif' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2614:12: ( '#endif' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2614:14: '#endif' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
{
match("#endif");
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2446:23: (~ ( ( '\\n' | '\\r' ) ) )*
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2614:23: (~ ( ( '\\n' | '\\r' ) ) )*
loop17:
do {
int alt17=2;
@ -848,7 +848,7 @@ public class InternalWMLLexer extends Lexer {
switch (alt17) {
case 1 :
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2446:23: ~ ( ( '\\n' | '\\r' ) )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2614:23: ~ ( ( '\\n' | '\\r' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFE') ) {
input.consume();
@ -869,7 +869,7 @@ public class InternalWMLLexer extends Lexer {
}
} while (true);
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2446:39: ( ( '\\r' )? '\\n' )?
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2614:39: ( ( '\\r' )? '\\n' )?
int alt19=2;
int LA19_0 = input.LA(1);
@ -878,9 +878,9 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt19) {
case 1 :
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2446:40: ( '\\r' )? '\\n'
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2614:40: ( '\\r' )? '\\n'
{
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2446:40: ( '\\r' )?
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2614:40: ( '\\r' )?
int alt18=2;
int LA18_0 = input.LA(1);
@ -889,7 +889,7 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt18) {
case 1 :
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2446:40: '\\r'
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2614:40: '\\r'
{
match('\r');
@ -919,12 +919,12 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_DEFINE() throws RecognitionException {
try {
int _type = RULE_DEFINE;
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2448:13: ( '#define' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2448:15: '#define' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2616:13: ( '#define' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2616:15: '#define' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
{
match("#define");
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2448:25: (~ ( ( '\\n' | '\\r' ) ) )*
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2616:25: (~ ( ( '\\n' | '\\r' ) ) )*
loop20:
do {
int alt20=2;
@ -937,7 +937,7 @@ public class InternalWMLLexer extends Lexer {
switch (alt20) {
case 1 :
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2448:25: ~ ( ( '\\n' | '\\r' ) )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2616:25: ~ ( ( '\\n' | '\\r' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFE') ) {
input.consume();
@ -958,7 +958,7 @@ public class InternalWMLLexer extends Lexer {
}
} while (true);
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2448:41: ( ( '\\r' )? '\\n' )?
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2616:41: ( ( '\\r' )? '\\n' )?
int alt22=2;
int LA22_0 = input.LA(1);
@ -967,9 +967,9 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt22) {
case 1 :
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2448:42: ( '\\r' )? '\\n'
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2616:42: ( '\\r' )? '\\n'
{
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2448:42: ( '\\r' )?
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2616:42: ( '\\r' )?
int alt21=2;
int LA21_0 = input.LA(1);
@ -978,7 +978,7 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt21) {
case 1 :
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2448:42: '\\r'
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2616:42: '\\r'
{
match('\r');
@ -1008,12 +1008,12 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_ENDDEF() throws RecognitionException {
try {
int _type = RULE_ENDDEF;
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2450:13: ( '#enddef' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2450:15: '#enddef' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2618:13: ( '#enddef' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2618:15: '#enddef' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
{
match("#enddef");
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2450:25: (~ ( ( '\\n' | '\\r' ) ) )*
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2618:25: (~ ( ( '\\n' | '\\r' ) ) )*
loop23:
do {
int alt23=2;
@ -1026,7 +1026,7 @@ public class InternalWMLLexer extends Lexer {
switch (alt23) {
case 1 :
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2450:25: ~ ( ( '\\n' | '\\r' ) )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2618:25: ~ ( ( '\\n' | '\\r' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFE') ) {
input.consume();
@ -1047,7 +1047,7 @@ public class InternalWMLLexer extends Lexer {
}
} while (true);
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2450:41: ( ( '\\r' )? '\\n' )?
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2618:41: ( ( '\\r' )? '\\n' )?
int alt25=2;
int LA25_0 = input.LA(1);
@ -1056,9 +1056,9 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt25) {
case 1 :
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2450:42: ( '\\r' )? '\\n'
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2618:42: ( '\\r' )? '\\n'
{
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2450:42: ( '\\r' )?
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2618:42: ( '\\r' )?
int alt24=2;
int LA24_0 = input.LA(1);
@ -1067,7 +1067,7 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt24) {
case 1 :
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2450:42: '\\r'
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2618:42: '\\r'
{
match('\r');
@ -1097,12 +1097,12 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_TEXTDOMAIN() throws RecognitionException {
try {
int _type = RULE_TEXTDOMAIN;
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2452:17: ( '#textdomain' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2452:19: '#textdomain' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2620:17: ( '#textdomain' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2620:19: '#textdomain' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
{
match("#textdomain");
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2452:33: (~ ( ( '\\n' | '\\r' ) ) )*
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2620:33: (~ ( ( '\\n' | '\\r' ) ) )*
loop26:
do {
int alt26=2;
@ -1115,7 +1115,7 @@ public class InternalWMLLexer extends Lexer {
switch (alt26) {
case 1 :
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2452:33: ~ ( ( '\\n' | '\\r' ) )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2620:33: ~ ( ( '\\n' | '\\r' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFE') ) {
input.consume();
@ -1136,7 +1136,7 @@ public class InternalWMLLexer extends Lexer {
}
} while (true);
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2452:49: ( ( '\\r' )? '\\n' )?
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2620:49: ( ( '\\r' )? '\\n' )?
int alt28=2;
int LA28_0 = input.LA(1);
@ -1145,9 +1145,9 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt28) {
case 1 :
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2452:50: ( '\\r' )? '\\n'
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2620:50: ( '\\r' )? '\\n'
{
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2452:50: ( '\\r' )?
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2620:50: ( '\\r' )?
int alt27=2;
int LA27_0 = input.LA(1);
@ -1156,7 +1156,7 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt27) {
case 1 :
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2452:50: '\\r'
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2620:50: '\\r'
{
match('\r');
@ -1186,11 +1186,11 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_STRING() throws RecognitionException {
try {
int _type = RULE_STRING;
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2454:13: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2454:15: '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"'
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2622:13: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2622:15: '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"'
{
match('\"');
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2454:19: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )*
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2622:19: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )*
loop29:
do {
int alt29=3;
@ -1206,7 +1206,7 @@ public class InternalWMLLexer extends Lexer {
switch (alt29) {
case 1 :
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2454:20: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2622:20: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' )
{
match('\\');
if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||input.LA(1)=='t' ) {
@ -1223,7 +1223,7 @@ public class InternalWMLLexer extends Lexer {
}
break;
case 2 :
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2454:61: ~ ( ( '\\\\' | '\"' ) )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2622:61: ~ ( ( '\\\\' | '\"' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
input.consume();
@ -1259,10 +1259,10 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_ID() throws RecognitionException {
try {
int _type = RULE_ID;
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2456:9: ( ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' | '-' | ',' )+ )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2456:11: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' | '-' | ',' )+
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2624:9: ( ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' | '-' | ',' )+ )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2624:11: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' | '-' | ',' )+
{
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2456:11: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' | '-' | ',' )+
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2624:11: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' | '-' | ',' )+
int cnt30=0;
loop30:
do {
@ -1315,8 +1315,8 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_EOL() throws RecognitionException {
try {
int _type = RULE_EOL;
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2458:10: ( ( '\\r' | '\\n' ) )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2458:12: ( '\\r' | '\\n' )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2626:10: ( ( '\\r' | '\\n' ) )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2626:12: ( '\\r' | '\\n' )
{
if ( input.LA(1)=='\n'||input.LA(1)=='\r' ) {
input.consume();
@ -1342,10 +1342,10 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_WS() throws RecognitionException {
try {
int _type = RULE_WS;
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2460:9: ( ( ' ' | '\\t' )+ )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2460:11: ( ' ' | '\\t' )+
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2628:9: ( ( ' ' | '\\t' )+ )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2628:11: ( ' ' | '\\t' )+
{
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2460:11: ( ' ' | '\\t' )+
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2628:11: ( ' ' | '\\t' )+
int cnt31=0;
loop31:
do {
@ -1398,8 +1398,8 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_ANY_OTHER() throws RecognitionException {
try {
int _type = RULE_ANY_OTHER;
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2462:16: ( . )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2462:18: .
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2630:16: ( . )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2630:18: .
{
matchAny();
@ -1416,11 +1416,11 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_SL_COMMENT() throws RecognitionException {
try {
int _type = RULE_SL_COMMENT;
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2464:17: ( '#' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2464:19: '#' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2632:17: ( '#' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2632:19: '#' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
{
match('#');
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2464:23: (~ ( ( '\\n' | '\\r' ) ) )*
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2632:23: (~ ( ( '\\n' | '\\r' ) ) )*
loop32:
do {
int alt32=2;
@ -1433,7 +1433,7 @@ public class InternalWMLLexer extends Lexer {
switch (alt32) {
case 1 :
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2464:23: ~ ( ( '\\n' | '\\r' ) )
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2632:23: ~ ( ( '\\n' | '\\r' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFE') ) {
input.consume();
@ -1454,7 +1454,7 @@ public class InternalWMLLexer extends Lexer {
}
} while (true);
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2464:39: ( ( '\\r' )? '\\n' )?
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2632:39: ( ( '\\r' )? '\\n' )?
int alt34=2;
int LA34_0 = input.LA(1);
@ -1463,9 +1463,9 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt34) {
case 1 :
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2464:40: ( '\\r' )? '\\n'
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2632:40: ( '\\r' )? '\\n'
{
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2464:40: ( '\\r' )?
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2632:40: ( '\\r' )?
int alt33=2;
int LA33_0 = input.LA(1);
@ -1474,7 +1474,7 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt33) {
case 1 :
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2464:40: '\\r'
// ../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:2632:40: '\\r'
{
match('\r');

View file

@ -23,52 +23,52 @@ T32 : '[/' ;
T33 : '{' ;
T34 : '}' ;
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2434
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2602
RULE_LUA_CODE : '<<' ( options {greedy=false;} : . )*'>>';
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2436
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2604
RULE_IFHAVE : '#ifhave' ~(('\n'|'\r'))* ('\r'? '\n')?;
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2438
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2606
RULE_IFNHAVE : '#ifnhave' ~(('\n'|'\r'))* ('\r'? '\n')?;
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2440
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2608
RULE_IFDEF : '#ifdef' ~(('\n'|'\r'))* ('\r'? '\n')?;
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2442
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2610
RULE_IFNDEF : '#ifndef' ~(('\n'|'\r'))* ('\r'? '\n')?;
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2444
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2612
RULE_ELSE : '#else' ~(('\n'|'\r'))* ('\r'? '\n')?;
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2446
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2614
RULE_ENDIF : '#endif' ~(('\n'|'\r'))* ('\r'? '\n')?;
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2448
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2616
RULE_DEFINE : '#define' ~(('\n'|'\r'))* ('\r'? '\n')?;
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2450
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2618
RULE_ENDDEF : '#enddef' ~(('\n'|'\r'))* ('\r'? '\n')?;
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2452
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2620
RULE_TEXTDOMAIN : '#textdomain' ~(('\n'|'\r'))* ('\r'? '\n')?;
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2454
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2622
RULE_STRING : '"' ('\\' ('b'|'t'|'n'|'f'|'r'|'"'|'\''|'\\')|~(('\\'|'"')))* '"';
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2456
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2624
RULE_ID : ('a'..'z'|'A'..'Z'|'0'..'9'|'_'|'-'|',')+;
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2458
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2626
RULE_EOL : ('\r'|'\n');
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2460
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2628
RULE_WS : (' '|'\t')+;
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2462
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2630
RULE_ANY_OTHER : .;
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2464
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2632
RULE_SL_COMMENT : '#' ~(('\n'|'\r'))* ('\r'? '\n')?;

View file

@ -20,16 +20,15 @@
<eStructuralFeatures xsi:type="ecore:EAttribute" name="eol" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="WMLKeyValue"/>
<eClassifiers xsi:type="ecore:EClass" name="WMLMacroCall" eSuperTypes="#//WMLKeyValue #//WMLRootExpression">
<eClassifiers xsi:type="ecore:EClass" name="WMLMacroCall" eSuperTypes="#//WMLKeyValue #//WMLMacroCallParameter #//WMLRootExpression">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="point" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
defaultValueLiteral=""/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="relative" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
defaultValueLiteral=""/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="params" unique="false"
upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="extraMacros" upperBound="-1"
eType="#//WMLMacroCall" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="Parameters" upperBound="-1"
eType="#//WMLMacroCallParameter" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="WMLMacroCallParameter"/>
<eClassifiers xsi:type="ecore:EClass" name="WMLArrayCall" eSuperTypes="#//WMLKeyValue">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="value" unique="false" upperBound="-1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
@ -42,8 +41,9 @@
<eClassifiers xsi:type="ecore:EClass" name="WMLPreprocIF" eSuperTypes="#//WMLRootExpression">
<eStructuralFeatures xsi:type="ecore:EReference" name="Expressions" upperBound="-1"
eType="#//WMLValuedExpression" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="Elses" unique="false" upperBound="-1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="Elses" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="ElseExpressions" upperBound="-1"
eType="#//WMLValuedExpression" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="endName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="WMLRootExpression" eSuperTypes="#//WMLExpression"/>

View file

@ -24,9 +24,9 @@
<genClasses ecoreClass="WML.ecore#//WMLMacroCall">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute WML.ecore#//WMLMacroCall/point"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute WML.ecore#//WMLMacroCall/relative"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute WML.ecore#//WMLMacroCall/params"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference WML.ecore#//WMLMacroCall/extraMacros"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference WML.ecore#//WMLMacroCall/Parameters"/>
</genClasses>
<genClasses ecoreClass="WML.ecore#//WMLMacroCallParameter"/>
<genClasses ecoreClass="WML.ecore#//WMLArrayCall">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute WML.ecore#//WMLArrayCall/value"/>
</genClasses>
@ -37,6 +37,7 @@
<genClasses ecoreClass="WML.ecore#//WMLPreprocIF">
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference WML.ecore#//WMLPreprocIF/Expressions"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute WML.ecore#//WMLPreprocIF/Elses"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference WML.ecore#//WMLPreprocIF/ElseExpressions"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute WML.ecore#//WMLPreprocIF/endName"/>
</genClasses>
<genClasses ecoreClass="WML.ecore#//WMLRootExpression"/>

View file

@ -1,20 +1,17 @@
<?xml version="1.0" encoding="ASCII"?>
<xtext:Grammar xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:xtext="http://www.eclipse.org/2008/Xtext" name="org.wesnoth.WML" definesHiddenTokens="true" hiddenTokens="//@rules.28 //@rules.29 //@rules.31">
<xtext:Grammar xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:xtext="http://www.eclipse.org/2008/Xtext" name="org.wesnoth.WML" definesHiddenTokens="true" hiddenTokens="//@rules.29 //@rules.30 //@rules.32">
<metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="wml">
<ePackage href="http://www.wesnoth.org/WML#/"/>
</metamodelDeclarations>
<metamodelDeclarations xsi:type="xtext:ReferencedMetamodel" alias="ecore">
<ePackage href="http://www.eclipse.org/emf/2002/Ecore#/"/>
</metamodelDeclarations>
<metamodelDeclarations xsi:type="xtext:ReferencedMetamodel" alias="jvmTypes">
<ePackage href="http://www.eclipse.org/xtext/common/JavaVMTypes#/"/>
</metamodelDeclarations>
<rules xsi:type="xtext:ParserRule" name="WMLRoot">
<type metamodel="//@metamodelDeclarations.0">
<classifier xsi:type="ecore:EClass" href="http://www.wesnoth.org/WML#//WMLRoot"/>
</type>
<alternatives xsi:type="xtext:Assignment" cardinality="*" feature="Expressions" operator="+=">
<terminal xsi:type="xtext:RuleCall" rule="//@rules.8"/>
<terminal xsi:type="xtext:RuleCall" rule="//@rules.9"/>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="WMLTag">
@ -27,43 +24,43 @@
<terminal xsi:type="xtext:Keyword" value="+"/>
</elements>
<elements xsi:type="xtext:Assignment" feature="name" operator="=">
<terminal xsi:type="xtext:RuleCall" rule="//@rules.27"/>
<terminal xsi:type="xtext:RuleCall" rule="//@rules.28"/>
</elements>
<elements xsi:type="xtext:Keyword" value="]"/>
<elements xsi:type="xtext:Assignment" cardinality="*" feature="Expressions" operator="+=">
<terminal xsi:type="xtext:RuleCall" rule="//@rules.9"/>
<terminal xsi:type="xtext:RuleCall" rule="//@rules.10"/>
</elements>
<elements xsi:type="xtext:Keyword" value="[/"/>
<elements xsi:type="xtext:Assignment" feature="endName" operator="=">
<terminal xsi:type="xtext:RuleCall" rule="//@rules.27"/>
<terminal xsi:type="xtext:RuleCall" rule="//@rules.28"/>
</elements>
<elements xsi:type="xtext:Keyword" value="]"/>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="WMLKey" definesHiddenTokens="true" hiddenTokens="//@rules.29">
<rules xsi:type="xtext:ParserRule" name="WMLKey" definesHiddenTokens="true" hiddenTokens="//@rules.30">
<type metamodel="//@metamodelDeclarations.0">
<classifier xsi:type="ecore:EClass" href="http://www.wesnoth.org/WML#//WMLKey"/>
</type>
<alternatives xsi:type="xtext:Group">
<elements xsi:type="xtext:Assignment" feature="name" operator="=">
<terminal xsi:type="xtext:RuleCall" rule="//@rules.27"/>
<terminal xsi:type="xtext:RuleCall" rule="//@rules.28"/>
</elements>
<elements xsi:type="xtext:Keyword" value="="/>
<elements xsi:type="xtext:Assignment" cardinality="*" feature="value" operator="+=">
<terminal xsi:type="xtext:RuleCall" rule="//@rules.3"/>
</elements>
<elements xsi:type="xtext:Group" cardinality="*">
<elements xsi:type="xtext:RuleCall" cardinality="?" rule="//@rules.28"/>
<elements xsi:type="xtext:RuleCall" cardinality="?" rule="//@rules.29"/>
<elements xsi:type="xtext:Keyword" value="+"/>
<elements xsi:type="xtext:RuleCall" cardinality="?" rule="//@rules.28"/>
<elements xsi:type="xtext:RuleCall" cardinality="?" rule="//@rules.29"/>
<elements xsi:type="xtext:Assignment" cardinality="+" feature="value" operator="+=">
<terminal xsi:type="xtext:RuleCall" rule="//@rules.3"/>
</elements>
</elements>
<elements xsi:type="xtext:Assignment" feature="eol" operator="=">
<terminal xsi:type="xtext:Alternatives">
<elements xsi:type="xtext:RuleCall" rule="//@rules.28"/>
<elements xsi:type="xtext:RuleCall" rule="//@rules.31"/>
<elements xsi:type="xtext:RuleCall" rule="//@rules.29"/>
<elements xsi:type="xtext:RuleCall" rule="//@rules.32"/>
</terminal>
</elements>
</alternatives>
@ -79,11 +76,11 @@
<classifier xsi:type="ecore:EClass" href="http://www.wesnoth.org/WML#//WMLKeyValue"/>
</type>
</elements>
<elements xsi:type="xtext:RuleCall" rule="//@rules.14"/>
<elements xsi:type="xtext:RuleCall" rule="//@rules.15"/>
</elements>
<elements xsi:type="xtext:RuleCall" rule="//@rules.4"/>
<elements xsi:type="xtext:RuleCall" rule="//@rules.12"/>
<elements xsi:type="xtext:RuleCall" rule="//@rules.5"/>
<elements xsi:type="xtext:RuleCall" rule="//@rules.13"/>
<elements xsi:type="xtext:RuleCall" rule="//@rules.6"/>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="WMLMacroCall">
@ -99,19 +96,30 @@
<terminal xsi:type="xtext:Keyword" value="~"/>
</elements>
<elements xsi:type="xtext:Assignment" feature="name" operator="=">
<terminal xsi:type="xtext:RuleCall" rule="//@rules.27"/>
<terminal xsi:type="xtext:RuleCall" rule="//@rules.28"/>
</elements>
<elements xsi:type="xtext:Alternatives" cardinality="*">
<elements xsi:type="xtext:Assignment" feature="params" operator="+=">
<terminal xsi:type="xtext:RuleCall" rule="//@rules.13"/>
</elements>
<elements xsi:type="xtext:Assignment" feature="extraMacros" operator="+=">
<terminal xsi:type="xtext:RuleCall" rule="//@rules.4"/>
</elements>
<elements xsi:type="xtext:Assignment" cardinality="*" feature="Parameters" operator="+=">
<terminal xsi:type="xtext:RuleCall" rule="//@rules.5"/>
</elements>
<elements xsi:type="xtext:Keyword" value="}"/>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="WMLMacroCallParameter">
<type metamodel="//@metamodelDeclarations.0">
<classifier xsi:type="ecore:EClass" href="http://www.wesnoth.org/WML#//WMLMacroCallParameter"/>
</type>
<alternatives xsi:type="xtext:Alternatives">
<elements xsi:type="xtext:Group">
<elements xsi:type="xtext:Action">
<type metamodel="//@metamodelDeclarations.0">
<classifier xsi:type="ecore:EClass" href="http://www.wesnoth.org/WML#//WMLMacroCallParameter"/>
</type>
</elements>
<elements xsi:type="xtext:RuleCall" rule="//@rules.14"/>
</elements>
<elements xsi:type="xtext:RuleCall" rule="//@rules.4"/>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="WMLArrayCall">
<type metamodel="//@metamodelDeclarations.0">
<classifier xsi:type="ecore:EClass" href="http://www.wesnoth.org/WML#//WMLArrayCall"/>
@ -119,7 +127,7 @@
<alternatives xsi:type="xtext:Group">
<elements xsi:type="xtext:Keyword" value="["/>
<elements xsi:type="xtext:Assignment" cardinality="+" feature="value" operator="+=">
<terminal xsi:type="xtext:RuleCall" rule="//@rules.14"/>
<terminal xsi:type="xtext:RuleCall" rule="//@rules.15"/>
</elements>
<elements xsi:type="xtext:Keyword" value="]"/>
</alternatives>
@ -130,13 +138,13 @@
</type>
<alternatives xsi:type="xtext:Group">
<elements xsi:type="xtext:Assignment" feature="name" operator="=">
<terminal xsi:type="xtext:RuleCall" rule="//@rules.23"/>
<terminal xsi:type="xtext:RuleCall" rule="//@rules.24"/>
</elements>
<elements xsi:type="xtext:Assignment" cardinality="*" feature="Expressions" operator="+=">
<terminal xsi:type="xtext:RuleCall" rule="//@rules.10"/>
<terminal xsi:type="xtext:RuleCall" rule="//@rules.11"/>
</elements>
<elements xsi:type="xtext:Assignment" feature="endName" operator="=">
<terminal xsi:type="xtext:RuleCall" rule="//@rules.24"/>
<terminal xsi:type="xtext:RuleCall" rule="//@rules.25"/>
</elements>
</alternatives>
</rules>
@ -147,22 +155,25 @@
<alternatives xsi:type="xtext:Group">
<elements xsi:type="xtext:Assignment" feature="name" operator="=">
<terminal xsi:type="xtext:Alternatives">
<elements xsi:type="xtext:RuleCall" rule="//@rules.19"/>
<elements xsi:type="xtext:RuleCall" rule="//@rules.20"/>
<elements xsi:type="xtext:RuleCall" rule="//@rules.17"/>
<elements xsi:type="xtext:RuleCall" rule="//@rules.21"/>
<elements xsi:type="xtext:RuleCall" rule="//@rules.18"/>
<elements xsi:type="xtext:RuleCall" rule="//@rules.19"/>
</terminal>
</elements>
<elements xsi:type="xtext:Alternatives" cardinality="*">
<elements xsi:type="xtext:Assignment" feature="Expressions" operator="+=">
<terminal xsi:type="xtext:RuleCall" rule="//@rules.10"/>
<elements xsi:type="xtext:Assignment" cardinality="*" feature="Expressions" operator="+=">
<terminal xsi:type="xtext:RuleCall" rule="//@rules.11"/>
</elements>
<elements xsi:type="xtext:Group" cardinality="?">
<elements xsi:type="xtext:Assignment" feature="Elses" operator="=">
<terminal xsi:type="xtext:RuleCall" rule="//@rules.22"/>
</elements>
<elements xsi:type="xtext:Assignment" feature="Elses" operator="+=">
<terminal xsi:type="xtext:RuleCall" rule="//@rules.21"/>
<elements xsi:type="xtext:Assignment" cardinality="+" feature="ElseExpressions" operator="+=">
<terminal xsi:type="xtext:RuleCall" rule="//@rules.11"/>
</elements>
</elements>
<elements xsi:type="xtext:Assignment" feature="endName" operator="=">
<terminal xsi:type="xtext:RuleCall" rule="//@rules.22"/>
<terminal xsi:type="xtext:RuleCall" rule="//@rules.23"/>
</elements>
</alternatives>
</rules>
@ -173,9 +184,9 @@
<alternatives xsi:type="xtext:Alternatives">
<elements xsi:type="xtext:RuleCall" rule="//@rules.1"/>
<elements xsi:type="xtext:RuleCall" rule="//@rules.4"/>
<elements xsi:type="xtext:RuleCall" rule="//@rules.6"/>
<elements xsi:type="xtext:RuleCall" rule="//@rules.11"/>
<elements xsi:type="xtext:RuleCall" rule="//@rules.7"/>
<elements xsi:type="xtext:RuleCall" rule="//@rules.12"/>
<elements xsi:type="xtext:RuleCall" rule="//@rules.8"/>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="WMLExpression">
@ -183,7 +194,7 @@
<classifier xsi:type="ecore:EClass" href="http://www.wesnoth.org/WML#//WMLExpression"/>
</type>
<alternatives xsi:type="xtext:Alternatives">
<elements xsi:type="xtext:RuleCall" rule="//@rules.8"/>
<elements xsi:type="xtext:RuleCall" rule="//@rules.9"/>
<elements xsi:type="xtext:RuleCall" rule="//@rules.2"/>
</alternatives>
</rules>
@ -192,14 +203,14 @@
<classifier xsi:type="ecore:EClass" href="http://www.wesnoth.org/WML#//WMLValuedExpression"/>
</type>
<alternatives xsi:type="xtext:Alternatives">
<elements xsi:type="xtext:RuleCall" rule="//@rules.9"/>
<elements xsi:type="xtext:RuleCall" rule="//@rules.10"/>
<elements xsi:type="xtext:Group">
<elements xsi:type="xtext:Action">
<type metamodel="//@metamodelDeclarations.0">
<classifier xsi:type="ecore:EClass" href="http://www.wesnoth.org/WML#//WMLValuedExpression"/>
</type>
</elements>
<elements xsi:type="xtext:RuleCall" rule="//@rules.14"/>
<elements xsi:type="xtext:RuleCall" rule="//@rules.15"/>
</elements>
</alternatives>
</rules>
@ -208,7 +219,7 @@
<classifier xsi:type="ecore:EClass" href="http://www.wesnoth.org/WML#//WMLTextdomain"/>
</type>
<alternatives xsi:type="xtext:Assignment" feature="name" operator="=">
<terminal xsi:type="xtext:RuleCall" rule="//@rules.25"/>
<terminal xsi:type="xtext:RuleCall" rule="//@rules.26"/>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="WMLLuaCode">
@ -216,7 +227,7 @@
<classifier xsi:type="ecore:EClass" href="http://www.wesnoth.org/WML#//WMLLuaCode"/>
</type>
<alternatives xsi:type="xtext:Assignment" feature="value" operator="=">
<terminal xsi:type="xtext:RuleCall" rule="//@rules.16"/>
<terminal xsi:type="xtext:RuleCall" rule="//@rules.17"/>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="WMLMacroParameter">
@ -224,8 +235,8 @@
<classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</type>
<alternatives xsi:type="xtext:Alternatives">
<elements xsi:type="xtext:RuleCall" rule="//@rules.14"/>
<elements xsi:type="xtext:RuleCall" rule="//@rules.15"/>
<elements xsi:type="xtext:RuleCall" rule="//@rules.16"/>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="WMLValue">
@ -233,8 +244,8 @@
<classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</type>
<alternatives xsi:type="xtext:Alternatives">
<elements xsi:type="xtext:RuleCall" rule="//@rules.28"/>
<elements xsi:type="xtext:RuleCall" rule="//@rules.27"/>
<elements xsi:type="xtext:RuleCall" rule="//@rules.26"/>
<elements xsi:type="xtext:Keyword" value="_"/>
<elements xsi:type="xtext:Keyword" value="~"/>
<elements xsi:type="xtext:Keyword" value="."/>
@ -243,7 +254,7 @@
<elements xsi:type="xtext:Keyword" value="/"/>
<elements xsi:type="xtext:Keyword" value="("/>
<elements xsi:type="xtext:Keyword" value=")"/>
<elements xsi:type="xtext:RuleCall" rule="//@rules.30"/>
<elements xsi:type="xtext:RuleCall" rule="//@rules.31"/>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="MacroTokens">

View file

@ -36,14 +36,15 @@ protected class ThisRootNode extends RootToken {
case 2: return new WMLKey_Group(this, this, 2, inst);
case 3: return new WMLKeyValue_Alternatives(this, this, 3, inst);
case 4: return new WMLMacroCall_Group(this, this, 4, inst);
case 5: return new WMLArrayCall_Group(this, this, 5, inst);
case 6: return new WMLMacroDefine_Group(this, this, 6, inst);
case 7: return new WMLPreprocIF_Group(this, this, 7, inst);
case 8: return new WMLRootExpression_Alternatives(this, this, 8, inst);
case 9: return new WMLExpression_Alternatives(this, this, 9, inst);
case 10: return new WMLValuedExpression_Alternatives(this, this, 10, inst);
case 11: return new WMLTextdomain_NameAssignment(this, this, 11, inst);
case 12: return new WMLLuaCode_ValueAssignment(this, this, 12, inst);
case 5: return new WMLMacroCallParameter_Alternatives(this, this, 5, inst);
case 6: return new WMLArrayCall_Group(this, this, 6, inst);
case 7: return new WMLMacroDefine_Group(this, this, 7, inst);
case 8: return new WMLPreprocIF_Group(this, this, 8, inst);
case 9: return new WMLRootExpression_Alternatives(this, this, 9, inst);
case 10: return new WMLExpression_Alternatives(this, this, 10, inst);
case 11: return new WMLValuedExpression_Alternatives(this, this, 11, inst);
case 12: return new WMLTextdomain_NameAssignment(this, this, 12, inst);
case 13: return new WMLLuaCode_ValueAssignment(this, this, 13, inst);
default: return null;
}
}
@ -895,11 +896,11 @@ protected class WMLKeyValue_WMLArrayCallParserRuleCall_3 extends RuleCallToken {
/************ begin Rule WMLMacroCall ****************
*
* WMLMacroCall:
* "{" point="./"? relative="~"? name=ID (params+=WMLMacroParameter | extraMacros+=WMLMacroCall)* "}";
* "{" point="./"? relative="~"? name=ID Parameters+=WMLMacroCallParameter* "}";
*
**/
// "{" point="./"? relative="~"? name=ID (params+=WMLMacroParameter | extraMacros+=WMLMacroCall)* "}"
// "{" point="./"? relative="~"? name=ID Parameters+=WMLMacroCallParameter* "}"
protected class WMLMacroCall_Group extends GroupToken {
public WMLMacroCall_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
@ -1054,93 +1055,35 @@ protected class WMLMacroCall_NameAssignment_3 extends AssignmentToken {
}
// (params+=WMLMacroParameter | extraMacros+=WMLMacroCall)*
protected class WMLMacroCall_Alternatives_4 extends AlternativesToken {
public WMLMacroCall_Alternatives_4(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
}
// Parameters+=WMLMacroCallParameter*
protected class WMLMacroCall_ParametersAssignment_4 extends AssignmentToken {
@Override
public Alternatives getGrammarElement() {
return grammarAccess.getWMLMacroCallAccess().getAlternatives_4();
}
@Override
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
switch(index) {
case 0: return new WMLMacroCall_ParamsAssignment_4_0(lastRuleCallOrigin, this, 0, inst);
case 1: return new WMLMacroCall_ExtraMacrosAssignment_4_1(lastRuleCallOrigin, this, 1, inst);
default: return null;
}
}
}
// params+=WMLMacroParameter
protected class WMLMacroCall_ParamsAssignment_4_0 extends AssignmentToken {
public WMLMacroCall_ParamsAssignment_4_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
public WMLMacroCall_ParametersAssignment_4(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
}
@Override
public Assignment getGrammarElement() {
return grammarAccess.getWMLMacroCallAccess().getParamsAssignment_4_0();
return grammarAccess.getWMLMacroCallAccess().getParametersAssignment_4();
}
@Override
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
switch(index) {
case 0: return new WMLMacroCall_Alternatives_4(lastRuleCallOrigin, this, 0, inst);
case 1: return new WMLMacroCall_NameAssignment_3(lastRuleCallOrigin, this, 1, inst);
case 0: return new WMLMacroCallParameter_Alternatives(this, this, 0, inst);
default: return null;
}
}
@Override
public IEObjectConsumer tryConsume() {
if((value = eObjectConsumer.getConsumable("params",true)) == null) return null;
IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("params");
if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getWMLMacroCallAccess().getParamsWMLMacroParameterParserRuleCall_4_0_0(), value, null)) {
type = AssignmentType.DATATYPE_RULE_CALL;
element = grammarAccess.getWMLMacroCallAccess().getParamsWMLMacroParameterParserRuleCall_4_0_0();
return obj;
}
return null;
}
}
// extraMacros+=WMLMacroCall
protected class WMLMacroCall_ExtraMacrosAssignment_4_1 extends AssignmentToken {
public WMLMacroCall_ExtraMacrosAssignment_4_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
}
@Override
public Assignment getGrammarElement() {
return grammarAccess.getWMLMacroCallAccess().getExtraMacrosAssignment_4_1();
}
@Override
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
switch(index) {
case 0: return new WMLMacroCall_Group(this, this, 0, inst);
default: return null;
}
}
@Override
public IEObjectConsumer tryConsume() {
if((value = eObjectConsumer.getConsumable("extraMacros",true)) == null) return null;
IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("extraMacros");
if((value = eObjectConsumer.getConsumable("Parameters",false)) == null) return null;
IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("Parameters");
if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
IEObjectConsumer param = createEObjectConsumer((EObject)value);
if(param.isInstanceOf(grammarAccess.getWMLMacroCallRule().getType().getClassifier())) {
if(param.isInstanceOf(grammarAccess.getWMLMacroCallParameterRule().getType().getClassifier())) {
type = AssignmentType.PARSER_RULE_CALL;
element = grammarAccess.getWMLMacroCallAccess().getExtraMacrosWMLMacroCallParserRuleCall_4_1_0();
element = grammarAccess.getWMLMacroCallAccess().getParametersWMLMacroCallParameterParserRuleCall_4_0();
consumed = obj;
return param;
}
@ -1152,14 +1095,13 @@ protected class WMLMacroCall_ExtraMacrosAssignment_4_1 extends AssignmentToken
public AbstractToken createFollowerAfterReturn(AbstractToken next, int actIndex, int index, IEObjectConsumer inst) {
if(value == inst.getEObject() && !inst.isConsumed()) return null;
switch(index) {
case 0: return new WMLMacroCall_Alternatives_4(lastRuleCallOrigin, next, actIndex, consumed);
case 0: return new WMLMacroCall_ParametersAssignment_4(lastRuleCallOrigin, next, actIndex, consumed);
case 1: return new WMLMacroCall_NameAssignment_3(lastRuleCallOrigin, next, actIndex, consumed);
default: return null;
}
}
}
// "}"
protected class WMLMacroCall_RightCurlyBracketKeyword_5 extends KeywordToken {
@ -1175,7 +1117,7 @@ protected class WMLMacroCall_RightCurlyBracketKeyword_5 extends KeywordToken {
@Override
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
switch(index) {
case 0: return new WMLMacroCall_Alternatives_4(lastRuleCallOrigin, this, 0, inst);
case 0: return new WMLMacroCall_ParametersAssignment_4(lastRuleCallOrigin, this, 0, inst);
case 1: return new WMLMacroCall_NameAssignment_3(lastRuleCallOrigin, this, 1, inst);
default: return null;
}
@ -1187,6 +1129,162 @@ protected class WMLMacroCall_RightCurlyBracketKeyword_5 extends KeywordToken {
/************ end Rule WMLMacroCall ****************/
/************ begin Rule WMLMacroCallParameter ****************
*
* WMLMacroCallParameter:
* {WMLMacroCallParameter} WMLMacroParameter | WMLMacroCall;
*
**/
// {WMLMacroCallParameter} WMLMacroParameter | WMLMacroCall
protected class WMLMacroCallParameter_Alternatives extends AlternativesToken {
public WMLMacroCallParameter_Alternatives(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
}
@Override
public Alternatives getGrammarElement() {
return grammarAccess.getWMLMacroCallParameterAccess().getAlternatives();
}
@Override
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
switch(index) {
case 0: return new WMLMacroCallParameter_Group_0(lastRuleCallOrigin, this, 0, inst);
case 1: return new WMLMacroCallParameter_WMLMacroCallParserRuleCall_1(lastRuleCallOrigin, this, 1, inst);
default: return null;
}
}
@Override
public IEObjectConsumer tryConsume() {
if(getEObject().eClass() != grammarAccess.getWMLMacroCallRule().getType().getClassifier() &&
getEObject().eClass() != grammarAccess.getWMLMacroCallParameterAccess().getWMLMacroCallParameterAction_0_0().getType().getClassifier())
return null;
return eObjectConsumer;
}
}
// {WMLMacroCallParameter} WMLMacroParameter
protected class WMLMacroCallParameter_Group_0 extends GroupToken {
public WMLMacroCallParameter_Group_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
}
@Override
public Group getGrammarElement() {
return grammarAccess.getWMLMacroCallParameterAccess().getGroup_0();
}
@Override
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
switch(index) {
case 0: return new WMLMacroCallParameter_WMLMacroParameterParserRuleCall_0_1(lastRuleCallOrigin, this, 0, inst);
default: return null;
}
}
@Override
public IEObjectConsumer tryConsume() {
if(getEObject().eClass() != grammarAccess.getWMLMacroCallParameterAccess().getWMLMacroCallParameterAction_0_0().getType().getClassifier())
return null;
return eObjectConsumer;
}
}
// {WMLMacroCallParameter}
protected class WMLMacroCallParameter_WMLMacroCallParameterAction_0_0 extends ActionToken {
public WMLMacroCallParameter_WMLMacroCallParameterAction_0_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
}
@Override
public Action getGrammarElement() {
return grammarAccess.getWMLMacroCallParameterAccess().getWMLMacroCallParameterAction_0_0();
}
@Override
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
switch(index) {
default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst);
}
}
@Override
public IEObjectConsumer tryConsume() {
if(!eObjectConsumer.isConsumed()) return null;
return eObjectConsumer;
}
}
// WMLMacroParameter
protected class WMLMacroCallParameter_WMLMacroParameterParserRuleCall_0_1 extends UnassignedTextToken {
public WMLMacroCallParameter_WMLMacroParameterParserRuleCall_0_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
}
@Override
public RuleCall getGrammarElement() {
return grammarAccess.getWMLMacroCallParameterAccess().getWMLMacroParameterParserRuleCall_0_1();
}
@Override
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
switch(index) {
case 0: return new WMLMacroCallParameter_WMLMacroCallParameterAction_0_0(lastRuleCallOrigin, this, 0, inst);
default: return null;
}
}
}
// WMLMacroCall
protected class WMLMacroCallParameter_WMLMacroCallParserRuleCall_1 extends RuleCallToken {
public WMLMacroCallParameter_WMLMacroCallParserRuleCall_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
}
@Override
public RuleCall getGrammarElement() {
return grammarAccess.getWMLMacroCallParameterAccess().getWMLMacroCallParserRuleCall_1();
}
@Override
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
switch(index) {
case 0: return new WMLMacroCall_Group(this, this, 0, inst);
default: return null;
}
}
@Override
public IEObjectConsumer tryConsume() {
if(getEObject().eClass() != grammarAccess.getWMLMacroCallRule().getType().getClassifier())
return null;
if(checkForRecursion(WMLMacroCall_Group.class, eObjectConsumer)) return null;
return eObjectConsumer;
}
@Override
public AbstractToken createFollowerAfterReturn(AbstractToken next, int actIndex, int index, IEObjectConsumer inst) {
switch(index) {
default: return lastRuleCallOrigin.createFollowerAfterReturn(next, actIndex , index, inst);
}
}
}
/************ end Rule WMLMacroCallParameter ****************/
/************ begin Rule WMLArrayCall ****************
*
* WMLArrayCall:
@ -1463,11 +1561,13 @@ protected class WMLMacroDefine_EndNameAssignment_2 extends AssignmentToken {
/************ begin Rule WMLPreprocIF ****************
*
* WMLPreprocIF:
* name=(IFDEF | IFNDEF | IFHAVE | IFNHAVE) (Expressions+=WMLValuedExpression | Elses+=ELSE)* endName=ENDIF;
* name=(IFDEF | IFNDEF | IFHAVE | IFNHAVE) Expressions+=WMLValuedExpression* (Elses=ELSE
* ElseExpressions+=WMLValuedExpression+)? endName=ENDIF;
*
**/
// name=(IFDEF | IFNDEF | IFHAVE | IFNHAVE) (Expressions+=WMLValuedExpression | Elses+=ELSE)* endName=ENDIF
// name=(IFDEF | IFNDEF | IFHAVE | IFNHAVE) Expressions+=WMLValuedExpression* (Elses=ELSE
// ElseExpressions+=WMLValuedExpression+)? endName=ENDIF
protected class WMLPreprocIF_Group extends GroupToken {
public WMLPreprocIF_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
@ -1482,7 +1582,7 @@ protected class WMLPreprocIF_Group extends GroupToken {
@Override
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
switch(index) {
case 0: return new WMLPreprocIF_EndNameAssignment_2(lastRuleCallOrigin, this, 0, inst);
case 0: return new WMLPreprocIF_EndNameAssignment_3(lastRuleCallOrigin, this, 0, inst);
default: return null;
}
}
@ -1544,39 +1644,16 @@ protected class WMLPreprocIF_NameAssignment_0 extends AssignmentToken {
}
// (Expressions+=WMLValuedExpression | Elses+=ELSE)*
protected class WMLPreprocIF_Alternatives_1 extends AlternativesToken {
public WMLPreprocIF_Alternatives_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
}
// Expressions+=WMLValuedExpression*
protected class WMLPreprocIF_ExpressionsAssignment_1 extends AssignmentToken {
@Override
public Alternatives getGrammarElement() {
return grammarAccess.getWMLPreprocIFAccess().getAlternatives_1();
}
@Override
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
switch(index) {
case 0: return new WMLPreprocIF_ExpressionsAssignment_1_0(lastRuleCallOrigin, this, 0, inst);
case 1: return new WMLPreprocIF_ElsesAssignment_1_1(lastRuleCallOrigin, this, 1, inst);
default: return null;
}
}
}
// Expressions+=WMLValuedExpression
protected class WMLPreprocIF_ExpressionsAssignment_1_0 extends AssignmentToken {
public WMLPreprocIF_ExpressionsAssignment_1_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
public WMLPreprocIF_ExpressionsAssignment_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
}
@Override
public Assignment getGrammarElement() {
return grammarAccess.getWMLPreprocIFAccess().getExpressionsAssignment_1_0();
return grammarAccess.getWMLPreprocIFAccess().getExpressionsAssignment_1();
}
@Override
@ -1589,13 +1666,13 @@ protected class WMLPreprocIF_ExpressionsAssignment_1_0 extends AssignmentToken
@Override
public IEObjectConsumer tryConsume() {
if((value = eObjectConsumer.getConsumable("Expressions",true)) == null) return null;
if((value = eObjectConsumer.getConsumable("Expressions",false)) == null) return null;
IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("Expressions");
if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
IEObjectConsumer param = createEObjectConsumer((EObject)value);
if(param.isInstanceOf(grammarAccess.getWMLValuedExpressionRule().getType().getClassifier())) {
type = AssignmentType.PARSER_RULE_CALL;
element = grammarAccess.getWMLPreprocIFAccess().getExpressionsWMLValuedExpressionParserRuleCall_1_0_0();
element = grammarAccess.getWMLPreprocIFAccess().getExpressionsWMLValuedExpressionParserRuleCall_1_0();
consumed = obj;
return param;
}
@ -1607,29 +1684,51 @@ protected class WMLPreprocIF_ExpressionsAssignment_1_0 extends AssignmentToken
public AbstractToken createFollowerAfterReturn(AbstractToken next, int actIndex, int index, IEObjectConsumer inst) {
if(value == inst.getEObject() && !inst.isConsumed()) return null;
switch(index) {
case 0: return new WMLPreprocIF_Alternatives_1(lastRuleCallOrigin, next, actIndex, consumed);
case 0: return new WMLPreprocIF_ExpressionsAssignment_1(lastRuleCallOrigin, next, actIndex, consumed);
case 1: return new WMLPreprocIF_NameAssignment_0(lastRuleCallOrigin, next, actIndex, consumed);
default: return null;
}
}
}
// Elses+=ELSE
protected class WMLPreprocIF_ElsesAssignment_1_1 extends AssignmentToken {
// (Elses=ELSE ElseExpressions+=WMLValuedExpression+)?
protected class WMLPreprocIF_Group_2 extends GroupToken {
public WMLPreprocIF_ElsesAssignment_1_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
public WMLPreprocIF_Group_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
}
@Override
public Assignment getGrammarElement() {
return grammarAccess.getWMLPreprocIFAccess().getElsesAssignment_1_1();
public Group getGrammarElement() {
return grammarAccess.getWMLPreprocIFAccess().getGroup_2();
}
@Override
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
switch(index) {
case 0: return new WMLPreprocIF_Alternatives_1(lastRuleCallOrigin, this, 0, inst);
case 0: return new WMLPreprocIF_ElseExpressionsAssignment_2_1(lastRuleCallOrigin, this, 0, inst);
default: return null;
}
}
}
// Elses=ELSE
protected class WMLPreprocIF_ElsesAssignment_2_0 extends AssignmentToken {
public WMLPreprocIF_ElsesAssignment_2_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
}
@Override
public Assignment getGrammarElement() {
return grammarAccess.getWMLPreprocIFAccess().getElsesAssignment_2_0();
}
@Override
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
switch(index) {
case 0: return new WMLPreprocIF_ExpressionsAssignment_1(lastRuleCallOrigin, this, 0, inst);
case 1: return new WMLPreprocIF_NameAssignment_0(lastRuleCallOrigin, this, 1, inst);
default: return null;
}
@ -1639,9 +1738,9 @@ protected class WMLPreprocIF_ElsesAssignment_1_1 extends AssignmentToken {
public IEObjectConsumer tryConsume() {
if((value = eObjectConsumer.getConsumable("Elses",true)) == null) return null;
IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("Elses");
if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getWMLPreprocIFAccess().getElsesELSETerminalRuleCall_1_1_0(), value, null)) {
if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getWMLPreprocIFAccess().getElsesELSETerminalRuleCall_2_0_0(), value, null)) {
type = AssignmentType.TERMINAL_RULE_CALL;
element = grammarAccess.getWMLPreprocIFAccess().getElsesELSETerminalRuleCall_1_1_0();
element = grammarAccess.getWMLPreprocIFAccess().getElsesELSETerminalRuleCall_2_0_0();
return obj;
}
return null;
@ -1649,24 +1748,72 @@ protected class WMLPreprocIF_ElsesAssignment_1_1 extends AssignmentToken {
}
// endName=ENDIF
protected class WMLPreprocIF_EndNameAssignment_2 extends AssignmentToken {
// ElseExpressions+=WMLValuedExpression+
protected class WMLPreprocIF_ElseExpressionsAssignment_2_1 extends AssignmentToken {
public WMLPreprocIF_EndNameAssignment_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
public WMLPreprocIF_ElseExpressionsAssignment_2_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
}
@Override
public Assignment getGrammarElement() {
return grammarAccess.getWMLPreprocIFAccess().getEndNameAssignment_2();
return grammarAccess.getWMLPreprocIFAccess().getElseExpressionsAssignment_2_1();
}
@Override
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
switch(index) {
case 0: return new WMLPreprocIF_Alternatives_1(lastRuleCallOrigin, this, 0, inst);
case 1: return new WMLPreprocIF_NameAssignment_0(lastRuleCallOrigin, this, 1, inst);
case 0: return new WMLValuedExpression_Alternatives(this, this, 0, inst);
default: return null;
}
}
@Override
public IEObjectConsumer tryConsume() {
if((value = eObjectConsumer.getConsumable("ElseExpressions",true)) == null) return null;
IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("ElseExpressions");
if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
IEObjectConsumer param = createEObjectConsumer((EObject)value);
if(param.isInstanceOf(grammarAccess.getWMLValuedExpressionRule().getType().getClassifier())) {
type = AssignmentType.PARSER_RULE_CALL;
element = grammarAccess.getWMLPreprocIFAccess().getElseExpressionsWMLValuedExpressionParserRuleCall_2_1_0();
consumed = obj;
return param;
}
}
return null;
}
@Override
public AbstractToken createFollowerAfterReturn(AbstractToken next, int actIndex, int index, IEObjectConsumer inst) {
if(value == inst.getEObject() && !inst.isConsumed()) return null;
switch(index) {
case 0: return new WMLPreprocIF_ElseExpressionsAssignment_2_1(lastRuleCallOrigin, next, actIndex, consumed);
case 1: return new WMLPreprocIF_ElsesAssignment_2_0(lastRuleCallOrigin, next, actIndex, consumed);
default: return null;
}
}
}
// endName=ENDIF
protected class WMLPreprocIF_EndNameAssignment_3 extends AssignmentToken {
public WMLPreprocIF_EndNameAssignment_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
}
@Override
public Assignment getGrammarElement() {
return grammarAccess.getWMLPreprocIFAccess().getEndNameAssignment_3();
}
@Override
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
switch(index) {
case 0: return new WMLPreprocIF_Group_2(lastRuleCallOrigin, this, 0, inst);
case 1: return new WMLPreprocIF_ExpressionsAssignment_1(lastRuleCallOrigin, this, 1, inst);
case 2: return new WMLPreprocIF_NameAssignment_0(lastRuleCallOrigin, this, 2, inst);
default: return null;
}
}
@ -1675,9 +1822,9 @@ protected class WMLPreprocIF_EndNameAssignment_2 extends AssignmentToken {
public IEObjectConsumer tryConsume() {
if((value = eObjectConsumer.getConsumable("endName",true)) == null) return null;
IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("endName");
if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getWMLPreprocIFAccess().getEndNameENDIFTerminalRuleCall_2_0(), value, null)) {
if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getWMLPreprocIFAccess().getEndNameENDIFTerminalRuleCall_3_0(), value, null)) {
type = AssignmentType.TERMINAL_RULE_CALL;
element = grammarAccess.getWMLPreprocIFAccess().getEndNameENDIFTerminalRuleCall_2_0();
element = grammarAccess.getWMLPreprocIFAccess().getEndNameENDIFTerminalRuleCall_3_0();
return obj;
}
return null;

View file

@ -579,12 +579,12 @@ ruleWMLMacroCall returns [EObject current=null]
}
)
)((
)(
(
{
currentNode=createCompositeNode(grammarAccess.getWMLMacroCallAccess().getParamsWMLMacroParameterParserRuleCall_4_0_0(), currentNode);
currentNode=createCompositeNode(grammarAccess.getWMLMacroCallAccess().getParametersWMLMacroCallParameterParserRuleCall_4_0(), currentNode);
}
lv_params_4_0=ruleWMLMacroParameter {
lv_Parameters_4_0=ruleWMLMacroCallParameter {
if ($current==null) {
$current = factory.create(grammarAccess.getWMLMacroCallRule().getType().getClassifier());
associateNodeWithAstElement(currentNode.getParent(), $current);
@ -592,9 +592,9 @@ ruleWMLMacroCall returns [EObject current=null]
try {
add(
$current,
"params",
lv_params_4_0,
"WMLMacroParameter",
"Parameters",
lv_Parameters_4_0,
"WMLMacroCallParameter",
currentNode);
} catch (ValueConverterException vce) {
handleValueConverterException(vce);
@ -603,32 +603,7 @@ ruleWMLMacroCall returns [EObject current=null]
}
)
)
|(
(
{
currentNode=createCompositeNode(grammarAccess.getWMLMacroCallAccess().getExtraMacrosWMLMacroCallParserRuleCall_4_1_0(), currentNode);
}
lv_extraMacros_5_0=ruleWMLMacroCall {
if ($current==null) {
$current = factory.create(grammarAccess.getWMLMacroCallRule().getType().getClassifier());
associateNodeWithAstElement(currentNode.getParent(), $current);
}
try {
add(
$current,
"extraMacros",
lv_extraMacros_5_0,
"WMLMacroCall",
currentNode);
} catch (ValueConverterException vce) {
handleValueConverterException(vce);
}
currentNode = currentNode.getParent();
}
)
))* '}'
)* '}'
{
createLeafNode(grammarAccess.getWMLMacroCallAccess().getRightCurlyBracketKeyword_5(), null);
}
@ -639,6 +614,58 @@ ruleWMLMacroCall returns [EObject current=null]
// Entry rule entryRuleWMLMacroCallParameter
entryRuleWMLMacroCallParameter returns [EObject current=null]
:
{ currentNode = createCompositeNode(grammarAccess.getWMLMacroCallParameterRule(), currentNode); }
iv_ruleWMLMacroCallParameter=ruleWMLMacroCallParameter
{ $current=$iv_ruleWMLMacroCallParameter.current; }
EOF
;
// Rule WMLMacroCallParameter
ruleWMLMacroCallParameter returns [EObject current=null]
@init { EObject temp=null; setCurrentLookahead(); resetLookahead();
}
@after { resetLookahead();
lastConsumedNode = currentNode;
}:
(((
{
temp=factory.create(grammarAccess.getWMLMacroCallParameterAccess().getWMLMacroCallParameterAction_0_0().getType().getClassifier());
$current = temp;
temp = null;
CompositeNode newNode = createCompositeNode(grammarAccess.getWMLMacroCallParameterAccess().getWMLMacroCallParameterAction_0_0(), currentNode.getParent());
newNode.getChildren().add(currentNode);
moveLookaheadInfo(currentNode, newNode);
currentNode = newNode;
associateNodeWithAstElement(currentNode, $current);
}
)
{
currentNode=createCompositeNode(grammarAccess.getWMLMacroCallParameterAccess().getWMLMacroParameterParserRuleCall_0_1(), currentNode);
}
ruleWMLMacroParameter
{
currentNode = currentNode.getParent();
}
)
|
{
currentNode=createCompositeNode(grammarAccess.getWMLMacroCallParameterAccess().getWMLMacroCallParserRuleCall_1(), currentNode);
}
this_WMLMacroCall_2=ruleWMLMacroCall
{
$current = $this_WMLMacroCall_2.current;
currentNode = currentNode.getParent();
}
)
;
// Entry rule entryRuleWMLArrayCall
entryRuleWMLArrayCall returns [EObject current=null]
:
@ -895,10 +922,10 @@ ruleWMLPreprocIF returns [EObject current=null]
)
)
)((
)(
(
{
currentNode=createCompositeNode(grammarAccess.getWMLPreprocIFAccess().getExpressionsWMLValuedExpressionParserRuleCall_1_0_0(), currentNode);
currentNode=createCompositeNode(grammarAccess.getWMLPreprocIFAccess().getExpressionsWMLValuedExpressionParserRuleCall_1_0(), currentNode);
}
lv_Expressions_1_0=ruleWMLValuedExpression {
if ($current==null) {
@ -919,12 +946,11 @@ ruleWMLPreprocIF returns [EObject current=null]
}
)
)
|(
)*((
(
lv_Elses_2_0=RULE_ELSE
{
createLeafNode(grammarAccess.getWMLPreprocIFAccess().getElsesELSETerminalRuleCall_1_1_0(), "Elses");
createLeafNode(grammarAccess.getWMLPreprocIFAccess().getElsesELSETerminalRuleCall_2_0_0(), "Elses");
}
{
if ($current==null) {
@ -932,7 +958,7 @@ ruleWMLPreprocIF returns [EObject current=null]
associateNodeWithAstElement(currentNode, $current);
}
try {
add(
set(
$current,
"Elses",
lv_Elses_2_0,
@ -944,11 +970,35 @@ ruleWMLPreprocIF returns [EObject current=null]
}
)
))*(
)(
(
lv_endName_3_0=RULE_ENDIF
{
currentNode=createCompositeNode(grammarAccess.getWMLPreprocIFAccess().getElseExpressionsWMLValuedExpressionParserRuleCall_2_1_0(), currentNode);
}
lv_ElseExpressions_3_0=ruleWMLValuedExpression {
if ($current==null) {
$current = factory.create(grammarAccess.getWMLPreprocIFRule().getType().getClassifier());
associateNodeWithAstElement(currentNode.getParent(), $current);
}
try {
add(
$current,
"ElseExpressions",
lv_ElseExpressions_3_0,
"WMLValuedExpression",
currentNode);
} catch (ValueConverterException vce) {
handleValueConverterException(vce);
}
currentNode = currentNode.getParent();
}
)
)+)?(
(
lv_endName_4_0=RULE_ENDIF
{
createLeafNode(grammarAccess.getWMLPreprocIFAccess().getEndNameENDIFTerminalRuleCall_2_0(), "endName");
createLeafNode(grammarAccess.getWMLPreprocIFAccess().getEndNameENDIFTerminalRuleCall_3_0(), "endName");
}
{
if ($current==null) {
@ -959,7 +1009,7 @@ ruleWMLPreprocIF returns [EObject current=null]
set(
$current,
"endName",
lv_endName_3_0,
lv_endName_4_0,
"ENDIF",
lastConsumedNode);
} catch (ValueConverterException vce) {

View file

@ -327,12 +327,12 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_LUA_CODE() throws RecognitionException {
try {
int _type = RULE_LUA_CODE;
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1443:15: ( '<<' ( options {greedy=false; } : . )* '>>' )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1443:17: '<<' ( options {greedy=false; } : . )* '>>'
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1493:15: ( '<<' ( options {greedy=false; } : . )* '>>' )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1493:17: '<<' ( options {greedy=false; } : . )* '>>'
{
match("<<");
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1443:22: ( options {greedy=false; } : . )*
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1493:22: ( options {greedy=false; } : . )*
loop1:
do {
int alt1=2;
@ -357,7 +357,7 @@ public class InternalWMLLexer extends Lexer {
switch (alt1) {
case 1 :
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1443:50: .
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1493:50: .
{
matchAny();
@ -385,12 +385,12 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_IFHAVE() throws RecognitionException {
try {
int _type = RULE_IFHAVE;
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1445:13: ( '#ifhave' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1445:15: '#ifhave' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1495:13: ( '#ifhave' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1495:15: '#ifhave' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
{
match("#ifhave");
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1445:25: (~ ( ( '\\n' | '\\r' ) ) )*
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1495:25: (~ ( ( '\\n' | '\\r' ) ) )*
loop2:
do {
int alt2=2;
@ -403,7 +403,7 @@ public class InternalWMLLexer extends Lexer {
switch (alt2) {
case 1 :
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1445:25: ~ ( ( '\\n' | '\\r' ) )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1495:25: ~ ( ( '\\n' | '\\r' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFE') ) {
input.consume();
@ -424,7 +424,7 @@ public class InternalWMLLexer extends Lexer {
}
} while (true);
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1445:41: ( ( '\\r' )? '\\n' )?
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1495:41: ( ( '\\r' )? '\\n' )?
int alt4=2;
int LA4_0 = input.LA(1);
@ -433,9 +433,9 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt4) {
case 1 :
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1445:42: ( '\\r' )? '\\n'
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1495:42: ( '\\r' )? '\\n'
{
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1445:42: ( '\\r' )?
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1495:42: ( '\\r' )?
int alt3=2;
int LA3_0 = input.LA(1);
@ -444,7 +444,7 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt3) {
case 1 :
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1445:42: '\\r'
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1495:42: '\\r'
{
match('\r');
@ -474,12 +474,12 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_IFNHAVE() throws RecognitionException {
try {
int _type = RULE_IFNHAVE;
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1447:14: ( '#ifnhave' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1447:16: '#ifnhave' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1497:14: ( '#ifnhave' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1497:16: '#ifnhave' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
{
match("#ifnhave");
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1447:27: (~ ( ( '\\n' | '\\r' ) ) )*
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1497:27: (~ ( ( '\\n' | '\\r' ) ) )*
loop5:
do {
int alt5=2;
@ -492,7 +492,7 @@ public class InternalWMLLexer extends Lexer {
switch (alt5) {
case 1 :
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1447:27: ~ ( ( '\\n' | '\\r' ) )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1497:27: ~ ( ( '\\n' | '\\r' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFE') ) {
input.consume();
@ -513,7 +513,7 @@ public class InternalWMLLexer extends Lexer {
}
} while (true);
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1447:43: ( ( '\\r' )? '\\n' )?
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1497:43: ( ( '\\r' )? '\\n' )?
int alt7=2;
int LA7_0 = input.LA(1);
@ -522,9 +522,9 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt7) {
case 1 :
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1447:44: ( '\\r' )? '\\n'
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1497:44: ( '\\r' )? '\\n'
{
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1447:44: ( '\\r' )?
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1497:44: ( '\\r' )?
int alt6=2;
int LA6_0 = input.LA(1);
@ -533,7 +533,7 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt6) {
case 1 :
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1447:44: '\\r'
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1497:44: '\\r'
{
match('\r');
@ -563,12 +563,12 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_IFDEF() throws RecognitionException {
try {
int _type = RULE_IFDEF;
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1449:12: ( '#ifdef' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1449:14: '#ifdef' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1499:12: ( '#ifdef' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1499:14: '#ifdef' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
{
match("#ifdef");
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1449:23: (~ ( ( '\\n' | '\\r' ) ) )*
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1499:23: (~ ( ( '\\n' | '\\r' ) ) )*
loop8:
do {
int alt8=2;
@ -581,7 +581,7 @@ public class InternalWMLLexer extends Lexer {
switch (alt8) {
case 1 :
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1449:23: ~ ( ( '\\n' | '\\r' ) )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1499:23: ~ ( ( '\\n' | '\\r' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFE') ) {
input.consume();
@ -602,7 +602,7 @@ public class InternalWMLLexer extends Lexer {
}
} while (true);
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1449:39: ( ( '\\r' )? '\\n' )?
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1499:39: ( ( '\\r' )? '\\n' )?
int alt10=2;
int LA10_0 = input.LA(1);
@ -611,9 +611,9 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt10) {
case 1 :
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1449:40: ( '\\r' )? '\\n'
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1499:40: ( '\\r' )? '\\n'
{
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1449:40: ( '\\r' )?
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1499:40: ( '\\r' )?
int alt9=2;
int LA9_0 = input.LA(1);
@ -622,7 +622,7 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt9) {
case 1 :
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1449:40: '\\r'
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1499:40: '\\r'
{
match('\r');
@ -652,12 +652,12 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_IFNDEF() throws RecognitionException {
try {
int _type = RULE_IFNDEF;
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1451:13: ( '#ifndef' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1451:15: '#ifndef' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1501:13: ( '#ifndef' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1501:15: '#ifndef' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
{
match("#ifndef");
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1451:25: (~ ( ( '\\n' | '\\r' ) ) )*
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1501:25: (~ ( ( '\\n' | '\\r' ) ) )*
loop11:
do {
int alt11=2;
@ -670,7 +670,7 @@ public class InternalWMLLexer extends Lexer {
switch (alt11) {
case 1 :
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1451:25: ~ ( ( '\\n' | '\\r' ) )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1501:25: ~ ( ( '\\n' | '\\r' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFE') ) {
input.consume();
@ -691,7 +691,7 @@ public class InternalWMLLexer extends Lexer {
}
} while (true);
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1451:41: ( ( '\\r' )? '\\n' )?
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1501:41: ( ( '\\r' )? '\\n' )?
int alt13=2;
int LA13_0 = input.LA(1);
@ -700,9 +700,9 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt13) {
case 1 :
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1451:42: ( '\\r' )? '\\n'
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1501:42: ( '\\r' )? '\\n'
{
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1451:42: ( '\\r' )?
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1501:42: ( '\\r' )?
int alt12=2;
int LA12_0 = input.LA(1);
@ -711,7 +711,7 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt12) {
case 1 :
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1451:42: '\\r'
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1501:42: '\\r'
{
match('\r');
@ -741,12 +741,12 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_ELSE() throws RecognitionException {
try {
int _type = RULE_ELSE;
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1453:11: ( '#else' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1453:13: '#else' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1503:11: ( '#else' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1503:13: '#else' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
{
match("#else");
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1453:21: (~ ( ( '\\n' | '\\r' ) ) )*
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1503:21: (~ ( ( '\\n' | '\\r' ) ) )*
loop14:
do {
int alt14=2;
@ -759,7 +759,7 @@ public class InternalWMLLexer extends Lexer {
switch (alt14) {
case 1 :
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1453:21: ~ ( ( '\\n' | '\\r' ) )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1503:21: ~ ( ( '\\n' | '\\r' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFE') ) {
input.consume();
@ -780,7 +780,7 @@ public class InternalWMLLexer extends Lexer {
}
} while (true);
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1453:37: ( ( '\\r' )? '\\n' )?
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1503:37: ( ( '\\r' )? '\\n' )?
int alt16=2;
int LA16_0 = input.LA(1);
@ -789,9 +789,9 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt16) {
case 1 :
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1453:38: ( '\\r' )? '\\n'
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1503:38: ( '\\r' )? '\\n'
{
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1453:38: ( '\\r' )?
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1503:38: ( '\\r' )?
int alt15=2;
int LA15_0 = input.LA(1);
@ -800,7 +800,7 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt15) {
case 1 :
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1453:38: '\\r'
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1503:38: '\\r'
{
match('\r');
@ -830,12 +830,12 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_ENDIF() throws RecognitionException {
try {
int _type = RULE_ENDIF;
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1455:12: ( '#endif' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1455:14: '#endif' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1505:12: ( '#endif' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1505:14: '#endif' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
{
match("#endif");
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1455:23: (~ ( ( '\\n' | '\\r' ) ) )*
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1505:23: (~ ( ( '\\n' | '\\r' ) ) )*
loop17:
do {
int alt17=2;
@ -848,7 +848,7 @@ public class InternalWMLLexer extends Lexer {
switch (alt17) {
case 1 :
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1455:23: ~ ( ( '\\n' | '\\r' ) )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1505:23: ~ ( ( '\\n' | '\\r' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFE') ) {
input.consume();
@ -869,7 +869,7 @@ public class InternalWMLLexer extends Lexer {
}
} while (true);
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1455:39: ( ( '\\r' )? '\\n' )?
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1505:39: ( ( '\\r' )? '\\n' )?
int alt19=2;
int LA19_0 = input.LA(1);
@ -878,9 +878,9 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt19) {
case 1 :
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1455:40: ( '\\r' )? '\\n'
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1505:40: ( '\\r' )? '\\n'
{
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1455:40: ( '\\r' )?
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1505:40: ( '\\r' )?
int alt18=2;
int LA18_0 = input.LA(1);
@ -889,7 +889,7 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt18) {
case 1 :
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1455:40: '\\r'
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1505:40: '\\r'
{
match('\r');
@ -919,12 +919,12 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_DEFINE() throws RecognitionException {
try {
int _type = RULE_DEFINE;
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1457:13: ( '#define' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1457:15: '#define' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1507:13: ( '#define' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1507:15: '#define' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
{
match("#define");
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1457:25: (~ ( ( '\\n' | '\\r' ) ) )*
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1507:25: (~ ( ( '\\n' | '\\r' ) ) )*
loop20:
do {
int alt20=2;
@ -937,7 +937,7 @@ public class InternalWMLLexer extends Lexer {
switch (alt20) {
case 1 :
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1457:25: ~ ( ( '\\n' | '\\r' ) )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1507:25: ~ ( ( '\\n' | '\\r' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFE') ) {
input.consume();
@ -958,7 +958,7 @@ public class InternalWMLLexer extends Lexer {
}
} while (true);
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1457:41: ( ( '\\r' )? '\\n' )?
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1507:41: ( ( '\\r' )? '\\n' )?
int alt22=2;
int LA22_0 = input.LA(1);
@ -967,9 +967,9 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt22) {
case 1 :
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1457:42: ( '\\r' )? '\\n'
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1507:42: ( '\\r' )? '\\n'
{
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1457:42: ( '\\r' )?
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1507:42: ( '\\r' )?
int alt21=2;
int LA21_0 = input.LA(1);
@ -978,7 +978,7 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt21) {
case 1 :
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1457:42: '\\r'
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1507:42: '\\r'
{
match('\r');
@ -1008,12 +1008,12 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_ENDDEF() throws RecognitionException {
try {
int _type = RULE_ENDDEF;
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1459:13: ( '#enddef' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1459:15: '#enddef' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1509:13: ( '#enddef' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1509:15: '#enddef' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
{
match("#enddef");
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1459:25: (~ ( ( '\\n' | '\\r' ) ) )*
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1509:25: (~ ( ( '\\n' | '\\r' ) ) )*
loop23:
do {
int alt23=2;
@ -1026,7 +1026,7 @@ public class InternalWMLLexer extends Lexer {
switch (alt23) {
case 1 :
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1459:25: ~ ( ( '\\n' | '\\r' ) )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1509:25: ~ ( ( '\\n' | '\\r' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFE') ) {
input.consume();
@ -1047,7 +1047,7 @@ public class InternalWMLLexer extends Lexer {
}
} while (true);
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1459:41: ( ( '\\r' )? '\\n' )?
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1509:41: ( ( '\\r' )? '\\n' )?
int alt25=2;
int LA25_0 = input.LA(1);
@ -1056,9 +1056,9 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt25) {
case 1 :
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1459:42: ( '\\r' )? '\\n'
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1509:42: ( '\\r' )? '\\n'
{
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1459:42: ( '\\r' )?
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1509:42: ( '\\r' )?
int alt24=2;
int LA24_0 = input.LA(1);
@ -1067,7 +1067,7 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt24) {
case 1 :
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1459:42: '\\r'
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1509:42: '\\r'
{
match('\r');
@ -1097,12 +1097,12 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_TEXTDOMAIN() throws RecognitionException {
try {
int _type = RULE_TEXTDOMAIN;
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1461:17: ( '#textdomain' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1461:19: '#textdomain' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1511:17: ( '#textdomain' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1511:19: '#textdomain' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
{
match("#textdomain");
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1461:33: (~ ( ( '\\n' | '\\r' ) ) )*
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1511:33: (~ ( ( '\\n' | '\\r' ) ) )*
loop26:
do {
int alt26=2;
@ -1115,7 +1115,7 @@ public class InternalWMLLexer extends Lexer {
switch (alt26) {
case 1 :
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1461:33: ~ ( ( '\\n' | '\\r' ) )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1511:33: ~ ( ( '\\n' | '\\r' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFE') ) {
input.consume();
@ -1136,7 +1136,7 @@ public class InternalWMLLexer extends Lexer {
}
} while (true);
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1461:49: ( ( '\\r' )? '\\n' )?
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1511:49: ( ( '\\r' )? '\\n' )?
int alt28=2;
int LA28_0 = input.LA(1);
@ -1145,9 +1145,9 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt28) {
case 1 :
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1461:50: ( '\\r' )? '\\n'
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1511:50: ( '\\r' )? '\\n'
{
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1461:50: ( '\\r' )?
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1511:50: ( '\\r' )?
int alt27=2;
int LA27_0 = input.LA(1);
@ -1156,7 +1156,7 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt27) {
case 1 :
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1461:50: '\\r'
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1511:50: '\\r'
{
match('\r');
@ -1186,11 +1186,11 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_STRING() throws RecognitionException {
try {
int _type = RULE_STRING;
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1463:13: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1463:15: '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"'
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1513:13: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1513:15: '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"'
{
match('\"');
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1463:19: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )*
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1513:19: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )*
loop29:
do {
int alt29=3;
@ -1206,7 +1206,7 @@ public class InternalWMLLexer extends Lexer {
switch (alt29) {
case 1 :
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1463:20: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1513:20: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' )
{
match('\\');
if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||input.LA(1)=='t' ) {
@ -1223,7 +1223,7 @@ public class InternalWMLLexer extends Lexer {
}
break;
case 2 :
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1463:61: ~ ( ( '\\\\' | '\"' ) )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1513:61: ~ ( ( '\\\\' | '\"' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
input.consume();
@ -1259,10 +1259,10 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_ID() throws RecognitionException {
try {
int _type = RULE_ID;
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1465:9: ( ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' | '-' | ',' )+ )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1465:11: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' | '-' | ',' )+
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1515:9: ( ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' | '-' | ',' )+ )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1515:11: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' | '-' | ',' )+
{
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1465:11: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' | '-' | ',' )+
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1515:11: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' | '-' | ',' )+
int cnt30=0;
loop30:
do {
@ -1315,8 +1315,8 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_EOL() throws RecognitionException {
try {
int _type = RULE_EOL;
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1467:10: ( ( '\\r' | '\\n' ) )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1467:12: ( '\\r' | '\\n' )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1517:10: ( ( '\\r' | '\\n' ) )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1517:12: ( '\\r' | '\\n' )
{
if ( input.LA(1)=='\n'||input.LA(1)=='\r' ) {
input.consume();
@ -1342,10 +1342,10 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_WS() throws RecognitionException {
try {
int _type = RULE_WS;
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1469:9: ( ( ' ' | '\\t' )+ )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1469:11: ( ' ' | '\\t' )+
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1519:9: ( ( ' ' | '\\t' )+ )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1519:11: ( ' ' | '\\t' )+
{
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1469:11: ( ' ' | '\\t' )+
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1519:11: ( ' ' | '\\t' )+
int cnt31=0;
loop31:
do {
@ -1398,8 +1398,8 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_ANY_OTHER() throws RecognitionException {
try {
int _type = RULE_ANY_OTHER;
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1471:16: ( . )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1471:18: .
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1521:16: ( . )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1521:18: .
{
matchAny();
@ -1416,11 +1416,11 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_SL_COMMENT() throws RecognitionException {
try {
int _type = RULE_SL_COMMENT;
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1473:17: ( '#' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1473:19: '#' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1523:17: ( '#' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1523:19: '#' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
{
match('#');
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1473:23: (~ ( ( '\\n' | '\\r' ) ) )*
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1523:23: (~ ( ( '\\n' | '\\r' ) ) )*
loop32:
do {
int alt32=2;
@ -1433,7 +1433,7 @@ public class InternalWMLLexer extends Lexer {
switch (alt32) {
case 1 :
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1473:23: ~ ( ( '\\n' | '\\r' ) )
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1523:23: ~ ( ( '\\n' | '\\r' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFE') ) {
input.consume();
@ -1454,7 +1454,7 @@ public class InternalWMLLexer extends Lexer {
}
} while (true);
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1473:39: ( ( '\\r' )? '\\n' )?
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1523:39: ( ( '\\r' )? '\\n' )?
int alt34=2;
int LA34_0 = input.LA(1);
@ -1463,9 +1463,9 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt34) {
case 1 :
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1473:40: ( '\\r' )? '\\n'
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1523:40: ( '\\r' )? '\\n'
{
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1473:40: ( '\\r' )?
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1523:40: ( '\\r' )?
int alt33=2;
int LA33_0 = input.LA(1);
@ -1474,7 +1474,7 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt33) {
case 1 :
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1473:40: '\\r'
// ../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1523:40: '\\r'
{
match('\r');

View file

@ -23,52 +23,52 @@ T32 : '/' ;
T33 : '(' ;
T34 : ')' ;
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1443
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1493
RULE_LUA_CODE : '<<' ( options {greedy=false;} : . )*'>>';
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1445
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1495
RULE_IFHAVE : '#ifhave' ~(('\n'|'\r'))* ('\r'? '\n')?;
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1447
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1497
RULE_IFNHAVE : '#ifnhave' ~(('\n'|'\r'))* ('\r'? '\n')?;
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1449
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1499
RULE_IFDEF : '#ifdef' ~(('\n'|'\r'))* ('\r'? '\n')?;
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1451
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1501
RULE_IFNDEF : '#ifndef' ~(('\n'|'\r'))* ('\r'? '\n')?;
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1453
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1503
RULE_ELSE : '#else' ~(('\n'|'\r'))* ('\r'? '\n')?;
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1455
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1505
RULE_ENDIF : '#endif' ~(('\n'|'\r'))* ('\r'? '\n')?;
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1457
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1507
RULE_DEFINE : '#define' ~(('\n'|'\r'))* ('\r'? '\n')?;
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1459
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1509
RULE_ENDDEF : '#enddef' ~(('\n'|'\r'))* ('\r'? '\n')?;
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1461
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1511
RULE_TEXTDOMAIN : '#textdomain' ~(('\n'|'\r'))* ('\r'? '\n')?;
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1463
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1513
RULE_STRING : '"' ('\\' ('b'|'t'|'n'|'f'|'r'|'"'|'\''|'\\')|~(('\\'|'"')))* '"';
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1465
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1515
RULE_ID : ('a'..'z'|'A'..'Z'|'0'..'9'|'_'|'-'|',')+;
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1467
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1517
RULE_EOL : ('\r'|'\n');
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1469
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1519
RULE_WS : (' '|'\t')+;
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1471
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1521
RULE_ANY_OTHER : .;
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1473
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1523
RULE_SL_COMMENT : '#' ~(('\n'|'\r'))* ('\r'? '\n')?;

View file

@ -210,18 +210,15 @@ public class WMLGrammarAccess extends AbstractGrammarElementFinder {
private final Keyword cRelativeTildeKeyword_2_0 = (Keyword)cRelativeAssignment_2.eContents().get(0);
private final Assignment cNameAssignment_3 = (Assignment)cGroup.eContents().get(3);
private final RuleCall cNameIDTerminalRuleCall_3_0 = (RuleCall)cNameAssignment_3.eContents().get(0);
private final Alternatives cAlternatives_4 = (Alternatives)cGroup.eContents().get(4);
private final Assignment cParamsAssignment_4_0 = (Assignment)cAlternatives_4.eContents().get(0);
private final RuleCall cParamsWMLMacroParameterParserRuleCall_4_0_0 = (RuleCall)cParamsAssignment_4_0.eContents().get(0);
private final Assignment cExtraMacrosAssignment_4_1 = (Assignment)cAlternatives_4.eContents().get(1);
private final RuleCall cExtraMacrosWMLMacroCallParserRuleCall_4_1_0 = (RuleCall)cExtraMacrosAssignment_4_1.eContents().get(0);
private final Assignment cParametersAssignment_4 = (Assignment)cGroup.eContents().get(4);
private final RuleCall cParametersWMLMacroCallParameterParserRuleCall_4_0 = (RuleCall)cParametersAssignment_4.eContents().get(0);
private final Keyword cRightCurlyBracketKeyword_5 = (Keyword)cGroup.eContents().get(5);
//WMLMacroCall:
// "{" point="./"? relative="~"? name=ID (params+=WMLMacroParameter | extraMacros+=WMLMacroCall)* "}";
// "{" point="./"? relative="~"? name=ID Parameters+=WMLMacroCallParameter* "}";
public ParserRule getRule() { return rule; }
//"{" point="./"? relative="~"? name=ID (params+=WMLMacroParameter | extraMacros+=WMLMacroCall)* "}"
//"{" point="./"? relative="~"? name=ID Parameters+=WMLMacroCallParameter* "}"
public Group getGroup() { return cGroup; }
//"{"
@ -245,25 +242,44 @@ public class WMLGrammarAccess extends AbstractGrammarElementFinder {
//ID
public RuleCall getNameIDTerminalRuleCall_3_0() { return cNameIDTerminalRuleCall_3_0; }
//(params+=WMLMacroParameter | extraMacros+=WMLMacroCall)*
public Alternatives getAlternatives_4() { return cAlternatives_4; }
//Parameters+=WMLMacroCallParameter*
public Assignment getParametersAssignment_4() { return cParametersAssignment_4; }
//params+=WMLMacroParameter
public Assignment getParamsAssignment_4_0() { return cParamsAssignment_4_0; }
//WMLMacroParameter
public RuleCall getParamsWMLMacroParameterParserRuleCall_4_0_0() { return cParamsWMLMacroParameterParserRuleCall_4_0_0; }
//extraMacros+=WMLMacroCall
public Assignment getExtraMacrosAssignment_4_1() { return cExtraMacrosAssignment_4_1; }
//WMLMacroCall
public RuleCall getExtraMacrosWMLMacroCallParserRuleCall_4_1_0() { return cExtraMacrosWMLMacroCallParserRuleCall_4_1_0; }
//WMLMacroCallParameter
public RuleCall getParametersWMLMacroCallParameterParserRuleCall_4_0() { return cParametersWMLMacroCallParameterParserRuleCall_4_0; }
//"}"
public Keyword getRightCurlyBracketKeyword_5() { return cRightCurlyBracketKeyword_5; }
}
public class WMLMacroCallParameterElements extends AbstractParserRuleElementFinder {
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "WMLMacroCallParameter");
private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1);
private final Group cGroup_0 = (Group)cAlternatives.eContents().get(0);
private final Action cWMLMacroCallParameterAction_0_0 = (Action)cGroup_0.eContents().get(0);
private final RuleCall cWMLMacroParameterParserRuleCall_0_1 = (RuleCall)cGroup_0.eContents().get(1);
private final RuleCall cWMLMacroCallParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1);
//WMLMacroCallParameter:
// {WMLMacroCallParameter} WMLMacroParameter | WMLMacroCall;
public ParserRule getRule() { return rule; }
//{WMLMacroCallParameter} WMLMacroParameter | WMLMacroCall
public Alternatives getAlternatives() { return cAlternatives; }
//{WMLMacroCallParameter} WMLMacroParameter
public Group getGroup_0() { return cGroup_0; }
//{WMLMacroCallParameter}
public Action getWMLMacroCallParameterAction_0_0() { return cWMLMacroCallParameterAction_0_0; }
//WMLMacroParameter
public RuleCall getWMLMacroParameterParserRuleCall_0_1() { return cWMLMacroParameterParserRuleCall_0_1; }
//WMLMacroCall
public RuleCall getWMLMacroCallParserRuleCall_1() { return cWMLMacroCallParserRuleCall_1; }
}
public class WMLArrayCallElements extends AbstractParserRuleElementFinder {
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "WMLArrayCall");
private final Group cGroup = (Group)rule.eContents().get(1);
@ -337,19 +353,23 @@ public class WMLGrammarAccess extends AbstractGrammarElementFinder {
private final RuleCall cNameIFNDEFTerminalRuleCall_0_0_1 = (RuleCall)cNameAlternatives_0_0.eContents().get(1);
private final RuleCall cNameIFHAVETerminalRuleCall_0_0_2 = (RuleCall)cNameAlternatives_0_0.eContents().get(2);
private final RuleCall cNameIFNHAVETerminalRuleCall_0_0_3 = (RuleCall)cNameAlternatives_0_0.eContents().get(3);
private final Alternatives cAlternatives_1 = (Alternatives)cGroup.eContents().get(1);
private final Assignment cExpressionsAssignment_1_0 = (Assignment)cAlternatives_1.eContents().get(0);
private final RuleCall cExpressionsWMLValuedExpressionParserRuleCall_1_0_0 = (RuleCall)cExpressionsAssignment_1_0.eContents().get(0);
private final Assignment cElsesAssignment_1_1 = (Assignment)cAlternatives_1.eContents().get(1);
private final RuleCall cElsesELSETerminalRuleCall_1_1_0 = (RuleCall)cElsesAssignment_1_1.eContents().get(0);
private final Assignment cEndNameAssignment_2 = (Assignment)cGroup.eContents().get(2);
private final RuleCall cEndNameENDIFTerminalRuleCall_2_0 = (RuleCall)cEndNameAssignment_2.eContents().get(0);
private final Assignment cExpressionsAssignment_1 = (Assignment)cGroup.eContents().get(1);
private final RuleCall cExpressionsWMLValuedExpressionParserRuleCall_1_0 = (RuleCall)cExpressionsAssignment_1.eContents().get(0);
private final Group cGroup_2 = (Group)cGroup.eContents().get(2);
private final Assignment cElsesAssignment_2_0 = (Assignment)cGroup_2.eContents().get(0);
private final RuleCall cElsesELSETerminalRuleCall_2_0_0 = (RuleCall)cElsesAssignment_2_0.eContents().get(0);
private final Assignment cElseExpressionsAssignment_2_1 = (Assignment)cGroup_2.eContents().get(1);
private final RuleCall cElseExpressionsWMLValuedExpressionParserRuleCall_2_1_0 = (RuleCall)cElseExpressionsAssignment_2_1.eContents().get(0);
private final Assignment cEndNameAssignment_3 = (Assignment)cGroup.eContents().get(3);
private final RuleCall cEndNameENDIFTerminalRuleCall_3_0 = (RuleCall)cEndNameAssignment_3.eContents().get(0);
//WMLPreprocIF:
// name=(IFDEF | IFNDEF | IFHAVE | IFNHAVE) (Expressions+=WMLValuedExpression | Elses+=ELSE)* endName=ENDIF;
// name=(IFDEF | IFNDEF | IFHAVE | IFNHAVE) Expressions+=WMLValuedExpression* (Elses=ELSE
// ElseExpressions+=WMLValuedExpression+)? endName=ENDIF;
public ParserRule getRule() { return rule; }
//name=(IFDEF | IFNDEF | IFHAVE | IFNHAVE) (Expressions+=WMLValuedExpression | Elses+=ELSE)* endName=ENDIF
//name=(IFDEF | IFNDEF | IFHAVE | IFNHAVE) Expressions+=WMLValuedExpression* (Elses=ELSE
//ElseExpressions+=WMLValuedExpression+)? endName=ENDIF
public Group getGroup() { return cGroup; }
//name=(IFDEF | IFNDEF | IFHAVE | IFNHAVE)
@ -370,26 +390,32 @@ public class WMLGrammarAccess extends AbstractGrammarElementFinder {
//IFNHAVE
public RuleCall getNameIFNHAVETerminalRuleCall_0_0_3() { return cNameIFNHAVETerminalRuleCall_0_0_3; }
//(Expressions+=WMLValuedExpression | Elses+=ELSE)*
public Alternatives getAlternatives_1() { return cAlternatives_1; }
//Expressions+=WMLValuedExpression
public Assignment getExpressionsAssignment_1_0() { return cExpressionsAssignment_1_0; }
//Expressions+=WMLValuedExpression*
public Assignment getExpressionsAssignment_1() { return cExpressionsAssignment_1; }
//WMLValuedExpression
public RuleCall getExpressionsWMLValuedExpressionParserRuleCall_1_0_0() { return cExpressionsWMLValuedExpressionParserRuleCall_1_0_0; }
public RuleCall getExpressionsWMLValuedExpressionParserRuleCall_1_0() { return cExpressionsWMLValuedExpressionParserRuleCall_1_0; }
//Elses+=ELSE
public Assignment getElsesAssignment_1_1() { return cElsesAssignment_1_1; }
//(Elses=ELSE ElseExpressions+=WMLValuedExpression+)?
public Group getGroup_2() { return cGroup_2; }
//Elses=ELSE
public Assignment getElsesAssignment_2_0() { return cElsesAssignment_2_0; }
//ELSE
public RuleCall getElsesELSETerminalRuleCall_1_1_0() { return cElsesELSETerminalRuleCall_1_1_0; }
public RuleCall getElsesELSETerminalRuleCall_2_0_0() { return cElsesELSETerminalRuleCall_2_0_0; }
//ElseExpressions+=WMLValuedExpression+
public Assignment getElseExpressionsAssignment_2_1() { return cElseExpressionsAssignment_2_1; }
//WMLValuedExpression
public RuleCall getElseExpressionsWMLValuedExpressionParserRuleCall_2_1_0() { return cElseExpressionsWMLValuedExpressionParserRuleCall_2_1_0; }
//endName=ENDIF
public Assignment getEndNameAssignment_2() { return cEndNameAssignment_2; }
public Assignment getEndNameAssignment_3() { return cEndNameAssignment_3; }
//ENDIF
public RuleCall getEndNameENDIFTerminalRuleCall_2_0() { return cEndNameENDIFTerminalRuleCall_2_0; }
public RuleCall getEndNameENDIFTerminalRuleCall_3_0() { return cEndNameENDIFTerminalRuleCall_3_0; }
}
public class WMLRootExpressionElements extends AbstractParserRuleElementFinder {
@ -620,6 +646,7 @@ public class WMLGrammarAccess extends AbstractGrammarElementFinder {
private WMLKeyElements pWMLKey;
private WMLKeyValueElements pWMLKeyValue;
private WMLMacroCallElements pWMLMacroCall;
private WMLMacroCallParameterElements pWMLMacroCallParameter;
private WMLArrayCallElements pWMLArrayCall;
private WMLMacroDefineElements pWMLMacroDefine;
private WMLPreprocIFElements pWMLPreprocIF;
@ -702,7 +729,7 @@ public class WMLGrammarAccess extends AbstractGrammarElementFinder {
}
//WMLMacroCall:
// "{" point="./"? relative="~"? name=ID (params+=WMLMacroParameter | extraMacros+=WMLMacroCall)* "}";
// "{" point="./"? relative="~"? name=ID Parameters+=WMLMacroCallParameter* "}";
public WMLMacroCallElements getWMLMacroCallAccess() {
return (pWMLMacroCall != null) ? pWMLMacroCall : (pWMLMacroCall = new WMLMacroCallElements());
}
@ -711,6 +738,16 @@ public class WMLGrammarAccess extends AbstractGrammarElementFinder {
return getWMLMacroCallAccess().getRule();
}
//WMLMacroCallParameter:
// {WMLMacroCallParameter} WMLMacroParameter | WMLMacroCall;
public WMLMacroCallParameterElements getWMLMacroCallParameterAccess() {
return (pWMLMacroCallParameter != null) ? pWMLMacroCallParameter : (pWMLMacroCallParameter = new WMLMacroCallParameterElements());
}
public ParserRule getWMLMacroCallParameterRule() {
return getWMLMacroCallParameterAccess().getRule();
}
//WMLArrayCall:
// "[" value+=WMLValue+ "]";
public WMLArrayCallElements getWMLArrayCallAccess() {
@ -732,7 +769,8 @@ public class WMLGrammarAccess extends AbstractGrammarElementFinder {
}
//WMLPreprocIF:
// name=(IFDEF | IFNDEF | IFHAVE | IFNHAVE) (Expressions+=WMLValuedExpression | Elses+=ELSE)* endName=ENDIF;
// name=(IFDEF | IFNDEF | IFHAVE | IFNHAVE) Expressions+=WMLValuedExpression* (Elses=ELSE
// ElseExpressions+=WMLValuedExpression+)? endName=ENDIF;
public WMLPreprocIFElements getWMLPreprocIFAccess() {
return (pWMLPreprocIF != null) ? pWMLPreprocIF : (pWMLPreprocIF = new WMLPreprocIFElements());
}

View file

@ -18,8 +18,7 @@ import org.eclipse.emf.common.util.EList;
* <ul>
* <li>{@link org.wesnoth.wml.WMLMacroCall#getPoint <em>Point</em>}</li>
* <li>{@link org.wesnoth.wml.WMLMacroCall#getRelative <em>Relative</em>}</li>
* <li>{@link org.wesnoth.wml.WMLMacroCall#getParams <em>Params</em>}</li>
* <li>{@link org.wesnoth.wml.WMLMacroCall#getExtraMacros <em>Extra Macros</em>}</li>
* <li>{@link org.wesnoth.wml.WMLMacroCall#getParameters <em>Parameters</em>}</li>
* </ul>
* </p>
*
@ -27,7 +26,7 @@ import org.eclipse.emf.common.util.EList;
* @model
* @generated
*/
public interface WMLMacroCall extends WMLKeyValue, WMLRootExpression
public interface WMLMacroCall extends WMLKeyValue, WMLMacroCallParameter, WMLRootExpression
{
/**
* Returns the value of the '<em><b>Point</b></em>' attribute.
@ -84,35 +83,19 @@ public interface WMLMacroCall extends WMLKeyValue, WMLRootExpression
void setRelative(String value);
/**
* Returns the value of the '<em><b>Params</b></em>' attribute list.
* The list contents are of type {@link java.lang.String}.
* Returns the value of the '<em><b>Parameters</b></em>' containment reference list.
* The list contents are of type {@link org.wesnoth.wml.WMLMacroCallParameter}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Params</em>' attribute list isn't clear,
* If the meaning of the '<em>Parameters</em>' containment reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Params</em>' attribute list.
* @see org.wesnoth.wml.WmlPackage#getWMLMacroCall_Params()
* @model unique="false"
* @generated
*/
EList<String> getParams();
/**
* Returns the value of the '<em><b>Extra Macros</b></em>' containment reference list.
* The list contents are of type {@link org.wesnoth.wml.WMLMacroCall}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Extra Macros</em>' containment reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Extra Macros</em>' containment reference list.
* @see org.wesnoth.wml.WmlPackage#getWMLMacroCall_ExtraMacros()
* @return the value of the '<em>Parameters</em>' containment reference list.
* @see org.wesnoth.wml.WmlPackage#getWMLMacroCall_Parameters()
* @model containment="true"
* @generated
*/
EList<WMLMacroCall> getExtraMacros();
EList<WMLMacroCallParameter> getParameters();
} // WMLMacroCall

View file

@ -0,0 +1,23 @@
/**
* <copyright>
* </copyright>
*
*/
package org.wesnoth.wml;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>WML Macro Call Parameter</b></em>'.
* <!-- end-user-doc -->
*
*
* @see org.wesnoth.wml.WmlPackage#getWMLMacroCallParameter()
* @model
* @generated
*/
public interface WMLMacroCallParameter extends EObject
{
} // WMLMacroCallParameter

View file

@ -18,6 +18,7 @@ import org.eclipse.emf.common.util.EList;
* <ul>
* <li>{@link org.wesnoth.wml.WMLPreprocIF#getExpressions <em>Expressions</em>}</li>
* <li>{@link org.wesnoth.wml.WMLPreprocIF#getElses <em>Elses</em>}</li>
* <li>{@link org.wesnoth.wml.WMLPreprocIF#getElseExpressions <em>Else Expressions</em>}</li>
* <li>{@link org.wesnoth.wml.WMLPreprocIF#getEndName <em>End Name</em>}</li>
* </ul>
* </p>
@ -45,20 +46,46 @@ public interface WMLPreprocIF extends WMLRootExpression
EList<WMLValuedExpression> getExpressions();
/**
* Returns the value of the '<em><b>Elses</b></em>' attribute list.
* The list contents are of type {@link java.lang.String}.
* Returns the value of the '<em><b>Elses</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Elses</em>' attribute list isn't clear,
* If the meaning of the '<em>Elses</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Elses</em>' attribute list.
* @return the value of the '<em>Elses</em>' attribute.
* @see #setElses(String)
* @see org.wesnoth.wml.WmlPackage#getWMLPreprocIF_Elses()
* @model unique="false"
* @model
* @generated
*/
EList<String> getElses();
String getElses();
/**
* Sets the value of the '{@link org.wesnoth.wml.WMLPreprocIF#getElses <em>Elses</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Elses</em>' attribute.
* @see #getElses()
* @generated
*/
void setElses(String value);
/**
* Returns the value of the '<em><b>Else Expressions</b></em>' containment reference list.
* The list contents are of type {@link org.wesnoth.wml.WMLValuedExpression}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Else Expressions</em>' containment reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Else Expressions</em>' containment reference list.
* @see org.wesnoth.wml.WmlPackage#getWMLPreprocIF_ElseExpressions()
* @model containment="true"
* @generated
*/
EList<WMLValuedExpression> getElseExpressions();
/**
* Returns the value of the '<em><b>End Name</b></em>' attribute.

View file

@ -71,6 +71,15 @@ public interface WmlFactory extends EFactory
*/
WMLMacroCall createWMLMacroCall();
/**
* Returns a new object of class '<em>WML Macro Call Parameter</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>WML Macro Call Parameter</em>'.
* @generated
*/
WMLMacroCallParameter createWMLMacroCallParameter();
/**
* Returns a new object of class '<em>WML Array Call</em>'.
* <!-- begin-user-doc -->

View file

@ -96,7 +96,7 @@ public interface WmlPackage extends EPackage
* @see org.wesnoth.wml.impl.WmlPackageImpl#getWMLValuedExpression()
* @generated
*/
int WML_VALUED_EXPRESSION = 10;
int WML_VALUED_EXPRESSION = 11;
/**
* The number of structural features of the '<em>WML Valued Expression</em>' class.
@ -115,7 +115,7 @@ public interface WmlPackage extends EPackage
* @see org.wesnoth.wml.impl.WmlPackageImpl#getWMLExpression()
* @generated
*/
int WML_EXPRESSION = 9;
int WML_EXPRESSION = 10;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
@ -143,7 +143,7 @@ public interface WmlPackage extends EPackage
* @see org.wesnoth.wml.impl.WmlPackageImpl#getWMLRootExpression()
* @generated
*/
int WML_ROOT_EXPRESSION = 8;
int WML_ROOT_EXPRESSION = 9;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
@ -321,22 +321,13 @@ public interface WmlPackage extends EPackage
int WML_MACRO_CALL__RELATIVE = WML_KEY_VALUE_FEATURE_COUNT + 2;
/**
* The feature id for the '<em><b>Params</b></em>' attribute list.
* The feature id for the '<em><b>Parameters</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int WML_MACRO_CALL__PARAMS = WML_KEY_VALUE_FEATURE_COUNT + 3;
/**
* The feature id for the '<em><b>Extra Macros</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int WML_MACRO_CALL__EXTRA_MACROS = WML_KEY_VALUE_FEATURE_COUNT + 4;
int WML_MACRO_CALL__PARAMETERS = WML_KEY_VALUE_FEATURE_COUNT + 3;
/**
* The number of structural features of the '<em>WML Macro Call</em>' class.
@ -345,7 +336,26 @@ public interface WmlPackage extends EPackage
* @generated
* @ordered
*/
int WML_MACRO_CALL_FEATURE_COUNT = WML_KEY_VALUE_FEATURE_COUNT + 5;
int WML_MACRO_CALL_FEATURE_COUNT = WML_KEY_VALUE_FEATURE_COUNT + 4;
/**
* The meta object id for the '{@link org.wesnoth.wml.impl.WMLMacroCallParameterImpl <em>WML Macro Call Parameter</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.wesnoth.wml.impl.WMLMacroCallParameterImpl
* @see org.wesnoth.wml.impl.WmlPackageImpl#getWMLMacroCallParameter()
* @generated
*/
int WML_MACRO_CALL_PARAMETER = 5;
/**
* The number of structural features of the '<em>WML Macro Call Parameter</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int WML_MACRO_CALL_PARAMETER_FEATURE_COUNT = 0;
/**
* The meta object id for the '{@link org.wesnoth.wml.impl.WMLArrayCallImpl <em>WML Array Call</em>}' class.
@ -355,7 +365,7 @@ public interface WmlPackage extends EPackage
* @see org.wesnoth.wml.impl.WmlPackageImpl#getWMLArrayCall()
* @generated
*/
int WML_ARRAY_CALL = 5;
int WML_ARRAY_CALL = 6;
/**
* The feature id for the '<em><b>Value</b></em>' attribute list.
@ -383,7 +393,7 @@ public interface WmlPackage extends EPackage
* @see org.wesnoth.wml.impl.WmlPackageImpl#getWMLMacroDefine()
* @generated
*/
int WML_MACRO_DEFINE = 6;
int WML_MACRO_DEFINE = 7;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
@ -429,7 +439,7 @@ public interface WmlPackage extends EPackage
* @see org.wesnoth.wml.impl.WmlPackageImpl#getWMLPreprocIF()
* @generated
*/
int WML_PREPROC_IF = 7;
int WML_PREPROC_IF = 8;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
@ -450,7 +460,7 @@ public interface WmlPackage extends EPackage
int WML_PREPROC_IF__EXPRESSIONS = WML_ROOT_EXPRESSION_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Elses</b></em>' attribute list.
* The feature id for the '<em><b>Elses</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@ -458,6 +468,15 @@ public interface WmlPackage extends EPackage
*/
int WML_PREPROC_IF__ELSES = WML_ROOT_EXPRESSION_FEATURE_COUNT + 1;
/**
* The feature id for the '<em><b>Else Expressions</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int WML_PREPROC_IF__ELSE_EXPRESSIONS = WML_ROOT_EXPRESSION_FEATURE_COUNT + 2;
/**
* The feature id for the '<em><b>End Name</b></em>' attribute.
* <!-- begin-user-doc -->
@ -465,7 +484,7 @@ public interface WmlPackage extends EPackage
* @generated
* @ordered
*/
int WML_PREPROC_IF__END_NAME = WML_ROOT_EXPRESSION_FEATURE_COUNT + 2;
int WML_PREPROC_IF__END_NAME = WML_ROOT_EXPRESSION_FEATURE_COUNT + 3;
/**
* The number of structural features of the '<em>WML Preproc IF</em>' class.
@ -474,7 +493,7 @@ public interface WmlPackage extends EPackage
* @generated
* @ordered
*/
int WML_PREPROC_IF_FEATURE_COUNT = WML_ROOT_EXPRESSION_FEATURE_COUNT + 3;
int WML_PREPROC_IF_FEATURE_COUNT = WML_ROOT_EXPRESSION_FEATURE_COUNT + 4;
/**
* The meta object id for the '{@link org.wesnoth.wml.impl.WMLTextdomainImpl <em>WML Textdomain</em>}' class.
@ -484,7 +503,7 @@ public interface WmlPackage extends EPackage
* @see org.wesnoth.wml.impl.WmlPackageImpl#getWMLTextdomain()
* @generated
*/
int WML_TEXTDOMAIN = 11;
int WML_TEXTDOMAIN = 12;
/**
* The feature id for the '<em><b>Name</b></em>' attribute.
@ -512,7 +531,7 @@ public interface WmlPackage extends EPackage
* @see org.wesnoth.wml.impl.WmlPackageImpl#getWMLLuaCode()
* @generated
*/
int WML_LUA_CODE = 12;
int WML_LUA_CODE = 13;
/**
* The feature id for the '<em><b>Value</b></em>' attribute.
@ -672,26 +691,25 @@ public interface WmlPackage extends EPackage
EAttribute getWMLMacroCall_Relative();
/**
* Returns the meta object for the attribute list '{@link org.wesnoth.wml.WMLMacroCall#getParams <em>Params</em>}'.
* Returns the meta object for the containment reference list '{@link org.wesnoth.wml.WMLMacroCall#getParameters <em>Parameters</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute list '<em>Params</em>'.
* @see org.wesnoth.wml.WMLMacroCall#getParams()
* @return the meta object for the containment reference list '<em>Parameters</em>'.
* @see org.wesnoth.wml.WMLMacroCall#getParameters()
* @see #getWMLMacroCall()
* @generated
*/
EAttribute getWMLMacroCall_Params();
EReference getWMLMacroCall_Parameters();
/**
* Returns the meta object for the containment reference list '{@link org.wesnoth.wml.WMLMacroCall#getExtraMacros <em>Extra Macros</em>}'.
* Returns the meta object for class '{@link org.wesnoth.wml.WMLMacroCallParameter <em>WML Macro Call Parameter</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Extra Macros</em>'.
* @see org.wesnoth.wml.WMLMacroCall#getExtraMacros()
* @see #getWMLMacroCall()
* @return the meta object for class '<em>WML Macro Call Parameter</em>'.
* @see org.wesnoth.wml.WMLMacroCallParameter
* @generated
*/
EReference getWMLMacroCall_ExtraMacros();
EClass getWMLMacroCallParameter();
/**
* Returns the meta object for class '{@link org.wesnoth.wml.WMLArrayCall <em>WML Array Call</em>}'.
@ -768,16 +786,27 @@ public interface WmlPackage extends EPackage
EReference getWMLPreprocIF_Expressions();
/**
* Returns the meta object for the attribute list '{@link org.wesnoth.wml.WMLPreprocIF#getElses <em>Elses</em>}'.
* Returns the meta object for the attribute '{@link org.wesnoth.wml.WMLPreprocIF#getElses <em>Elses</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute list '<em>Elses</em>'.
* @return the meta object for the attribute '<em>Elses</em>'.
* @see org.wesnoth.wml.WMLPreprocIF#getElses()
* @see #getWMLPreprocIF()
* @generated
*/
EAttribute getWMLPreprocIF_Elses();
/**
* Returns the meta object for the containment reference list '{@link org.wesnoth.wml.WMLPreprocIF#getElseExpressions <em>Else Expressions</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Else Expressions</em>'.
* @see org.wesnoth.wml.WMLPreprocIF#getElseExpressions()
* @see #getWMLPreprocIF()
* @generated
*/
EReference getWMLPreprocIF_ElseExpressions();
/**
* Returns the meta object for the attribute '{@link org.wesnoth.wml.WMLPreprocIF#getEndName <em>End Name</em>}'.
* <!-- begin-user-doc -->
@ -999,20 +1028,22 @@ public interface WmlPackage extends EPackage
EAttribute WML_MACRO_CALL__RELATIVE = eINSTANCE.getWMLMacroCall_Relative();
/**
* The meta object literal for the '<em><b>Params</b></em>' attribute list feature.
* The meta object literal for the '<em><b>Parameters</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute WML_MACRO_CALL__PARAMS = eINSTANCE.getWMLMacroCall_Params();
EReference WML_MACRO_CALL__PARAMETERS = eINSTANCE.getWMLMacroCall_Parameters();
/**
* The meta object literal for the '<em><b>Extra Macros</b></em>' containment reference list feature.
* The meta object literal for the '{@link org.wesnoth.wml.impl.WMLMacroCallParameterImpl <em>WML Macro Call Parameter</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.wesnoth.wml.impl.WMLMacroCallParameterImpl
* @see org.wesnoth.wml.impl.WmlPackageImpl#getWMLMacroCallParameter()
* @generated
*/
EReference WML_MACRO_CALL__EXTRA_MACROS = eINSTANCE.getWMLMacroCall_ExtraMacros();
EClass WML_MACRO_CALL_PARAMETER = eINSTANCE.getWMLMacroCallParameter();
/**
* The meta object literal for the '{@link org.wesnoth.wml.impl.WMLArrayCallImpl <em>WML Array Call</em>}' class.
@ -1077,13 +1108,21 @@ public interface WmlPackage extends EPackage
EReference WML_PREPROC_IF__EXPRESSIONS = eINSTANCE.getWMLPreprocIF_Expressions();
/**
* The meta object literal for the '<em><b>Elses</b></em>' attribute list feature.
* The meta object literal for the '<em><b>Elses</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute WML_PREPROC_IF__ELSES = eINSTANCE.getWMLPreprocIF_Elses();
/**
* The meta object literal for the '<em><b>Else Expressions</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference WML_PREPROC_IF__ELSE_EXPRESSIONS = eINSTANCE.getWMLPreprocIF_ElseExpressions();
/**
* The meta object literal for the '<em><b>End Name</b></em>' attribute feature.
* <!-- begin-user-doc -->

View file

@ -18,12 +18,12 @@ import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.util.EDataTypeEList;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
import org.wesnoth.wml.WMLExpression;
import org.wesnoth.wml.WMLMacroCall;
import org.wesnoth.wml.WMLMacroCallParameter;
import org.wesnoth.wml.WMLRootExpression;
import org.wesnoth.wml.WMLValuedExpression;
import org.wesnoth.wml.WmlPackage;
@ -38,8 +38,7 @@ import org.wesnoth.wml.WmlPackage;
* <li>{@link org.wesnoth.wml.impl.WMLMacroCallImpl#getName <em>Name</em>}</li>
* <li>{@link org.wesnoth.wml.impl.WMLMacroCallImpl#getPoint <em>Point</em>}</li>
* <li>{@link org.wesnoth.wml.impl.WMLMacroCallImpl#getRelative <em>Relative</em>}</li>
* <li>{@link org.wesnoth.wml.impl.WMLMacroCallImpl#getParams <em>Params</em>}</li>
* <li>{@link org.wesnoth.wml.impl.WMLMacroCallImpl#getExtraMacros <em>Extra Macros</em>}</li>
* <li>{@link org.wesnoth.wml.impl.WMLMacroCallImpl#getParameters <em>Parameters</em>}</li>
* </ul>
* </p>
*
@ -108,24 +107,14 @@ public class WMLMacroCallImpl extends WMLKeyValueImpl implements WMLMacroCall
protected String relative = RELATIVE_EDEFAULT;
/**
* The cached value of the '{@link #getParams() <em>Params</em>}' attribute list.
* The cached value of the '{@link #getParameters() <em>Parameters</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getParams()
* @see #getParameters()
* @generated
* @ordered
*/
protected EList<String> params;
/**
* The cached value of the '{@link #getExtraMacros() <em>Extra Macros</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getExtraMacros()
* @generated
* @ordered
*/
protected EList<WMLMacroCall> extraMacros;
protected EList<WMLMacroCallParameter> parameters;
/**
* <!-- begin-user-doc -->
@ -222,27 +211,13 @@ public class WMLMacroCallImpl extends WMLKeyValueImpl implements WMLMacroCall
* <!-- end-user-doc -->
* @generated
*/
public EList<String> getParams()
public EList<WMLMacroCallParameter> getParameters()
{
if (params == null)
if (parameters == null)
{
params = new EDataTypeEList<String>(String.class, this, WmlPackage.WML_MACRO_CALL__PARAMS);
parameters = new EObjectContainmentEList<WMLMacroCallParameter>(WMLMacroCallParameter.class, this, WmlPackage.WML_MACRO_CALL__PARAMETERS);
}
return params;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<WMLMacroCall> getExtraMacros()
{
if (extraMacros == null)
{
extraMacros = new EObjectContainmentEList<WMLMacroCall>(WMLMacroCall.class, this, WmlPackage.WML_MACRO_CALL__EXTRA_MACROS);
}
return extraMacros;
return parameters;
}
/**
@ -255,8 +230,8 @@ public class WMLMacroCallImpl extends WMLKeyValueImpl implements WMLMacroCall
{
switch (featureID)
{
case WmlPackage.WML_MACRO_CALL__EXTRA_MACROS:
return ((InternalEList<?>)getExtraMacros()).basicRemove(otherEnd, msgs);
case WmlPackage.WML_MACRO_CALL__PARAMETERS:
return ((InternalEList<?>)getParameters()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@ -277,10 +252,8 @@ public class WMLMacroCallImpl extends WMLKeyValueImpl implements WMLMacroCall
return getPoint();
case WmlPackage.WML_MACRO_CALL__RELATIVE:
return getRelative();
case WmlPackage.WML_MACRO_CALL__PARAMS:
return getParams();
case WmlPackage.WML_MACRO_CALL__EXTRA_MACROS:
return getExtraMacros();
case WmlPackage.WML_MACRO_CALL__PARAMETERS:
return getParameters();
}
return super.eGet(featureID, resolve, coreType);
}
@ -305,13 +278,9 @@ public class WMLMacroCallImpl extends WMLKeyValueImpl implements WMLMacroCall
case WmlPackage.WML_MACRO_CALL__RELATIVE:
setRelative((String)newValue);
return;
case WmlPackage.WML_MACRO_CALL__PARAMS:
getParams().clear();
getParams().addAll((Collection<? extends String>)newValue);
return;
case WmlPackage.WML_MACRO_CALL__EXTRA_MACROS:
getExtraMacros().clear();
getExtraMacros().addAll((Collection<? extends WMLMacroCall>)newValue);
case WmlPackage.WML_MACRO_CALL__PARAMETERS:
getParameters().clear();
getParameters().addAll((Collection<? extends WMLMacroCallParameter>)newValue);
return;
}
super.eSet(featureID, newValue);
@ -336,11 +305,8 @@ public class WMLMacroCallImpl extends WMLKeyValueImpl implements WMLMacroCall
case WmlPackage.WML_MACRO_CALL__RELATIVE:
setRelative(RELATIVE_EDEFAULT);
return;
case WmlPackage.WML_MACRO_CALL__PARAMS:
getParams().clear();
return;
case WmlPackage.WML_MACRO_CALL__EXTRA_MACROS:
getExtraMacros().clear();
case WmlPackage.WML_MACRO_CALL__PARAMETERS:
getParameters().clear();
return;
}
super.eUnset(featureID);
@ -362,10 +328,8 @@ public class WMLMacroCallImpl extends WMLKeyValueImpl implements WMLMacroCall
return POINT_EDEFAULT == null ? point != null : !POINT_EDEFAULT.equals(point);
case WmlPackage.WML_MACRO_CALL__RELATIVE:
return RELATIVE_EDEFAULT == null ? relative != null : !RELATIVE_EDEFAULT.equals(relative);
case WmlPackage.WML_MACRO_CALL__PARAMS:
return params != null && !params.isEmpty();
case WmlPackage.WML_MACRO_CALL__EXTRA_MACROS:
return extraMacros != null && !extraMacros.isEmpty();
case WmlPackage.WML_MACRO_CALL__PARAMETERS:
return parameters != null && !parameters.isEmpty();
}
return super.eIsSet(featureID);
}
@ -378,6 +342,13 @@ public class WMLMacroCallImpl extends WMLKeyValueImpl implements WMLMacroCall
@Override
public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)
{
if (baseClass == WMLMacroCallParameter.class)
{
switch (derivedFeatureID)
{
default: return -1;
}
}
if (baseClass == WMLValuedExpression.class)
{
switch (derivedFeatureID)
@ -411,6 +382,13 @@ public class WMLMacroCallImpl extends WMLKeyValueImpl implements WMLMacroCall
@Override
public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)
{
if (baseClass == WMLMacroCallParameter.class)
{
switch (baseFeatureID)
{
default: return -1;
}
}
if (baseClass == WMLValuedExpression.class)
{
switch (baseFeatureID)
@ -453,8 +431,6 @@ public class WMLMacroCallImpl extends WMLKeyValueImpl implements WMLMacroCall
result.append(point);
result.append(", relative: ");
result.append(relative);
result.append(", params: ");
result.append(params);
result.append(')');
return result.toString();
}

View file

@ -0,0 +1,48 @@
/**
* <copyright>
* </copyright>
*
*/
package org.wesnoth.wml.impl;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
import org.wesnoth.wml.WMLMacroCallParameter;
import org.wesnoth.wml.WmlPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>WML Macro Call Parameter</b></em>'.
* <!-- end-user-doc -->
* <p>
* </p>
*
* @generated
*/
public class WMLMacroCallParameterImpl extends MinimalEObjectImpl.Container implements WMLMacroCallParameter
{
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected WMLMacroCallParameterImpl()
{
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass()
{
return WmlPackage.Literals.WML_MACRO_CALL_PARAMETER;
}
} //WMLMacroCallParameterImpl

View file

@ -18,7 +18,6 @@ import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.util.EDataTypeEList;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
@ -35,6 +34,7 @@ import org.wesnoth.wml.WmlPackage;
* <ul>
* <li>{@link org.wesnoth.wml.impl.WMLPreprocIFImpl#getExpressions <em>Expressions</em>}</li>
* <li>{@link org.wesnoth.wml.impl.WMLPreprocIFImpl#getElses <em>Elses</em>}</li>
* <li>{@link org.wesnoth.wml.impl.WMLPreprocIFImpl#getElseExpressions <em>Else Expressions</em>}</li>
* <li>{@link org.wesnoth.wml.impl.WMLPreprocIFImpl#getEndName <em>End Name</em>}</li>
* </ul>
* </p>
@ -54,14 +54,34 @@ public class WMLPreprocIFImpl extends WMLRootExpressionImpl implements WMLPrepro
protected EList<WMLValuedExpression> expressions;
/**
* The cached value of the '{@link #getElses() <em>Elses</em>}' attribute list.
* The default value of the '{@link #getElses() <em>Elses</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getElses()
* @generated
* @ordered
*/
protected EList<String> elses;
protected static final String ELSES_EDEFAULT = null;
/**
* The cached value of the '{@link #getElses() <em>Elses</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getElses()
* @generated
* @ordered
*/
protected String elses = ELSES_EDEFAULT;
/**
* The cached value of the '{@link #getElseExpressions() <em>Else Expressions</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getElseExpressions()
* @generated
* @ordered
*/
protected EList<WMLValuedExpression> elseExpressions;
/**
* The default value of the '{@link #getEndName() <em>End Name</em>}' attribute.
@ -123,15 +143,38 @@ public class WMLPreprocIFImpl extends WMLRootExpressionImpl implements WMLPrepro
* <!-- end-user-doc -->
* @generated
*/
public EList<String> getElses()
public String getElses()
{
if (elses == null)
{
elses = new EDataTypeEList<String>(String.class, this, WmlPackage.WML_PREPROC_IF__ELSES);
}
return elses;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setElses(String newElses)
{
String oldElses = elses;
elses = newElses;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, WmlPackage.WML_PREPROC_IF__ELSES, oldElses, elses));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<WMLValuedExpression> getElseExpressions()
{
if (elseExpressions == null)
{
elseExpressions = new EObjectContainmentEList<WMLValuedExpression>(WMLValuedExpression.class, this, WmlPackage.WML_PREPROC_IF__ELSE_EXPRESSIONS);
}
return elseExpressions;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@ -167,6 +210,8 @@ public class WMLPreprocIFImpl extends WMLRootExpressionImpl implements WMLPrepro
{
case WmlPackage.WML_PREPROC_IF__EXPRESSIONS:
return ((InternalEList<?>)getExpressions()).basicRemove(otherEnd, msgs);
case WmlPackage.WML_PREPROC_IF__ELSE_EXPRESSIONS:
return ((InternalEList<?>)getElseExpressions()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@ -185,6 +230,8 @@ public class WMLPreprocIFImpl extends WMLRootExpressionImpl implements WMLPrepro
return getExpressions();
case WmlPackage.WML_PREPROC_IF__ELSES:
return getElses();
case WmlPackage.WML_PREPROC_IF__ELSE_EXPRESSIONS:
return getElseExpressions();
case WmlPackage.WML_PREPROC_IF__END_NAME:
return getEndName();
}
@ -207,8 +254,11 @@ public class WMLPreprocIFImpl extends WMLRootExpressionImpl implements WMLPrepro
getExpressions().addAll((Collection<? extends WMLValuedExpression>)newValue);
return;
case WmlPackage.WML_PREPROC_IF__ELSES:
getElses().clear();
getElses().addAll((Collection<? extends String>)newValue);
setElses((String)newValue);
return;
case WmlPackage.WML_PREPROC_IF__ELSE_EXPRESSIONS:
getElseExpressions().clear();
getElseExpressions().addAll((Collection<? extends WMLValuedExpression>)newValue);
return;
case WmlPackage.WML_PREPROC_IF__END_NAME:
setEndName((String)newValue);
@ -231,7 +281,10 @@ public class WMLPreprocIFImpl extends WMLRootExpressionImpl implements WMLPrepro
getExpressions().clear();
return;
case WmlPackage.WML_PREPROC_IF__ELSES:
getElses().clear();
setElses(ELSES_EDEFAULT);
return;
case WmlPackage.WML_PREPROC_IF__ELSE_EXPRESSIONS:
getElseExpressions().clear();
return;
case WmlPackage.WML_PREPROC_IF__END_NAME:
setEndName(END_NAME_EDEFAULT);
@ -253,7 +306,9 @@ public class WMLPreprocIFImpl extends WMLRootExpressionImpl implements WMLPrepro
case WmlPackage.WML_PREPROC_IF__EXPRESSIONS:
return expressions != null && !expressions.isEmpty();
case WmlPackage.WML_PREPROC_IF__ELSES:
return elses != null && !elses.isEmpty();
return ELSES_EDEFAULT == null ? elses != null : !ELSES_EDEFAULT.equals(elses);
case WmlPackage.WML_PREPROC_IF__ELSE_EXPRESSIONS:
return elseExpressions != null && !elseExpressions.isEmpty();
case WmlPackage.WML_PREPROC_IF__END_NAME:
return END_NAME_EDEFAULT == null ? endName != null : !END_NAME_EDEFAULT.equals(endName);
}

View file

@ -73,6 +73,7 @@ public class WmlFactoryImpl extends EFactoryImpl implements WmlFactory
case WmlPackage.WML_KEY: return createWMLKey();
case WmlPackage.WML_KEY_VALUE: return createWMLKeyValue();
case WmlPackage.WML_MACRO_CALL: return createWMLMacroCall();
case WmlPackage.WML_MACRO_CALL_PARAMETER: return createWMLMacroCallParameter();
case WmlPackage.WML_ARRAY_CALL: return createWMLArrayCall();
case WmlPackage.WML_MACRO_DEFINE: return createWMLMacroDefine();
case WmlPackage.WML_PREPROC_IF: return createWMLPreprocIF();
@ -141,6 +142,17 @@ public class WmlFactoryImpl extends EFactoryImpl implements WmlFactory
return wmlMacroCall;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public WMLMacroCallParameter createWMLMacroCallParameter()
{
WMLMacroCallParameterImpl wmlMacroCallParameter = new WMLMacroCallParameterImpl();
return wmlMacroCallParameter;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->

View file

@ -19,6 +19,7 @@ import org.wesnoth.wml.WMLKey;
import org.wesnoth.wml.WMLKeyValue;
import org.wesnoth.wml.WMLLuaCode;
import org.wesnoth.wml.WMLMacroCall;
import org.wesnoth.wml.WMLMacroCallParameter;
import org.wesnoth.wml.WMLMacroDefine;
import org.wesnoth.wml.WMLPreprocIF;
import org.wesnoth.wml.WMLRoot;
@ -72,6 +73,13 @@ public class WmlPackageImpl extends EPackageImpl implements WmlPackage
*/
private EClass wmlMacroCallEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass wmlMacroCallParameterEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@ -326,9 +334,9 @@ public class WmlPackageImpl extends EPackageImpl implements WmlPackage
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getWMLMacroCall_Params()
public EReference getWMLMacroCall_Parameters()
{
return (EAttribute)wmlMacroCallEClass.getEStructuralFeatures().get(2);
return (EReference)wmlMacroCallEClass.getEStructuralFeatures().get(2);
}
/**
@ -336,9 +344,9 @@ public class WmlPackageImpl extends EPackageImpl implements WmlPackage
* <!-- end-user-doc -->
* @generated
*/
public EReference getWMLMacroCall_ExtraMacros()
public EClass getWMLMacroCallParameter()
{
return (EReference)wmlMacroCallEClass.getEStructuralFeatures().get(3);
return wmlMacroCallParameterEClass;
}
/**
@ -421,6 +429,16 @@ public class WmlPackageImpl extends EPackageImpl implements WmlPackage
return (EAttribute)wmlPreprocIFEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getWMLPreprocIF_ElseExpressions()
{
return (EReference)wmlPreprocIFEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@ -428,7 +446,7 @@ public class WmlPackageImpl extends EPackageImpl implements WmlPackage
*/
public EAttribute getWMLPreprocIF_EndName()
{
return (EAttribute)wmlPreprocIFEClass.getEStructuralFeatures().get(2);
return (EAttribute)wmlPreprocIFEClass.getEStructuralFeatures().get(3);
}
/**
@ -548,8 +566,9 @@ public class WmlPackageImpl extends EPackageImpl implements WmlPackage
wmlMacroCallEClass = createEClass(WML_MACRO_CALL);
createEAttribute(wmlMacroCallEClass, WML_MACRO_CALL__POINT);
createEAttribute(wmlMacroCallEClass, WML_MACRO_CALL__RELATIVE);
createEAttribute(wmlMacroCallEClass, WML_MACRO_CALL__PARAMS);
createEReference(wmlMacroCallEClass, WML_MACRO_CALL__EXTRA_MACROS);
createEReference(wmlMacroCallEClass, WML_MACRO_CALL__PARAMETERS);
wmlMacroCallParameterEClass = createEClass(WML_MACRO_CALL_PARAMETER);
wmlArrayCallEClass = createEClass(WML_ARRAY_CALL);
createEAttribute(wmlArrayCallEClass, WML_ARRAY_CALL__VALUE);
@ -561,6 +580,7 @@ public class WmlPackageImpl extends EPackageImpl implements WmlPackage
wmlPreprocIFEClass = createEClass(WML_PREPROC_IF);
createEReference(wmlPreprocIFEClass, WML_PREPROC_IF__EXPRESSIONS);
createEAttribute(wmlPreprocIFEClass, WML_PREPROC_IF__ELSES);
createEReference(wmlPreprocIFEClass, WML_PREPROC_IF__ELSE_EXPRESSIONS);
createEAttribute(wmlPreprocIFEClass, WML_PREPROC_IF__END_NAME);
wmlRootExpressionEClass = createEClass(WML_ROOT_EXPRESSION);
@ -608,6 +628,7 @@ public class WmlPackageImpl extends EPackageImpl implements WmlPackage
wmlTagEClass.getESuperTypes().add(this.getWMLRootExpression());
wmlKeyEClass.getESuperTypes().add(this.getWMLExpression());
wmlMacroCallEClass.getESuperTypes().add(this.getWMLKeyValue());
wmlMacroCallEClass.getESuperTypes().add(this.getWMLMacroCallParameter());
wmlMacroCallEClass.getESuperTypes().add(this.getWMLRootExpression());
wmlArrayCallEClass.getESuperTypes().add(this.getWMLKeyValue());
wmlMacroDefineEClass.getESuperTypes().add(this.getWMLRootExpression());
@ -635,8 +656,9 @@ public class WmlPackageImpl extends EPackageImpl implements WmlPackage
initEClass(wmlMacroCallEClass, WMLMacroCall.class, "WMLMacroCall", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getWMLMacroCall_Point(), ecorePackage.getEString(), "point", "", 0, 1, WMLMacroCall.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getWMLMacroCall_Relative(), ecorePackage.getEString(), "relative", "", 0, 1, WMLMacroCall.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getWMLMacroCall_Params(), ecorePackage.getEString(), "params", null, 0, -1, WMLMacroCall.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getWMLMacroCall_ExtraMacros(), this.getWMLMacroCall(), null, "extraMacros", null, 0, -1, WMLMacroCall.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getWMLMacroCall_Parameters(), this.getWMLMacroCallParameter(), null, "Parameters", null, 0, -1, WMLMacroCall.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(wmlMacroCallParameterEClass, WMLMacroCallParameter.class, "WMLMacroCallParameter", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(wmlArrayCallEClass, WMLArrayCall.class, "WMLArrayCall", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getWMLArrayCall_Value(), ecorePackage.getEString(), "value", null, 0, -1, WMLArrayCall.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@ -647,7 +669,8 @@ public class WmlPackageImpl extends EPackageImpl implements WmlPackage
initEClass(wmlPreprocIFEClass, WMLPreprocIF.class, "WMLPreprocIF", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getWMLPreprocIF_Expressions(), this.getWMLValuedExpression(), null, "Expressions", null, 0, -1, WMLPreprocIF.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getWMLPreprocIF_Elses(), ecorePackage.getEString(), "Elses", null, 0, -1, WMLPreprocIF.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getWMLPreprocIF_Elses(), ecorePackage.getEString(), "Elses", null, 0, 1, WMLPreprocIF.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getWMLPreprocIF_ElseExpressions(), this.getWMLValuedExpression(), null, "ElseExpressions", null, 0, -1, WMLPreprocIF.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getWMLPreprocIF_EndName(), ecorePackage.getEString(), "endName", null, 0, 1, WMLPreprocIF.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(wmlRootExpressionEClass, WMLRootExpression.class, "WMLRootExpression", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

View file

@ -104,6 +104,11 @@ public class WmlAdapterFactory extends AdapterFactoryImpl
return createWMLMacroCallAdapter();
}
@Override
public Adapter caseWMLMacroCallParameter(WMLMacroCallParameter object)
{
return createWMLMacroCallParameterAdapter();
}
@Override
public Adapter caseWMLArrayCall(WMLArrayCall object)
{
return createWMLArrayCallAdapter();
@ -240,6 +245,21 @@ public class WmlAdapterFactory extends AdapterFactoryImpl
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.wesnoth.wml.WMLMacroCallParameter <em>WML Macro Call Parameter</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see org.wesnoth.wml.WMLMacroCallParameter
* @generated
*/
public Adapter createWMLMacroCallParameterAdapter()
{
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.wesnoth.wml.WMLArrayCall <em>WML Array Call</em>}'.
* <!-- begin-user-doc -->

View file

@ -134,12 +134,20 @@ public class WmlSwitch<T>
WMLMacroCall wmlMacroCall = (WMLMacroCall)theEObject;
T result = caseWMLMacroCall(wmlMacroCall);
if (result == null) result = caseWMLKeyValue(wmlMacroCall);
if (result == null) result = caseWMLMacroCallParameter(wmlMacroCall);
if (result == null) result = caseWMLRootExpression(wmlMacroCall);
if (result == null) result = caseWMLExpression(wmlMacroCall);
if (result == null) result = caseWMLValuedExpression(wmlMacroCall);
if (result == null) result = defaultCase(theEObject);
return result;
}
case WmlPackage.WML_MACRO_CALL_PARAMETER:
{
WMLMacroCallParameter wmlMacroCallParameter = (WMLMacroCallParameter)theEObject;
T result = caseWMLMacroCallParameter(wmlMacroCallParameter);
if (result == null) result = defaultCase(theEObject);
return result;
}
case WmlPackage.WML_ARRAY_CALL:
{
WMLArrayCall wmlArrayCall = (WMLArrayCall)theEObject;
@ -294,6 +302,22 @@ public class WmlSwitch<T>
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>WML Macro Call Parameter</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>WML Macro Call Parameter</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseWMLMacroCallParameter(WMLMacroCallParameter object)
{
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>WML Array Call</em>'.
* <!-- begin-user-doc -->

View file

@ -1,47 +1,48 @@
/**
* @author Timotei Dolean
*/
//grammar org.wesnoth.WML with org.eclipse.xtext.common.Terminals
grammar org.wesnoth.WML hidden(EOL, WS, SL_COMMENT)
generate wml "http://www.wesnoth.org/WML"
import "http://www.eclipse.org/emf/2002/Ecore" as ecore
import "http://www.eclipse.org/xtext/common/JavaVMTypes" as jvmTypes
WMLRoot:
( Expressions += WMLRootExpression )*;
Expressions += WMLRootExpression*;
WMLTag:
'[' (plus='+')? name=ID ']'
( Expressions += WMLExpression )*
Expressions += WMLExpression*
'[/' endName = ID ']'
;
WMLKey hidden(WS):
name = ID '=' value += WMLKeyValue* (EOL? '+' EOL? value+=WMLKeyValue+)* eol=(EOL|SL_COMMENT);
name = ID '=' value += WMLKeyValue* (EOL? '+' EOL? value += WMLKeyValue+)* eol=(EOL|SL_COMMENT);
WMLKeyValue:
{WMLKeyValue} WMLValue | WMLMacroCall | WMLLuaCode | WMLArrayCall;
{WMLKeyValue} WMLValue | WMLMacroCall | WMLLuaCode | WMLArrayCall;
WMLMacroCall:
'{' (point='./')? (relative='~')? name=ID
( params += WMLMacroParameter
| extraMacros += WMLMacroCall
)*
Parameters += WMLMacroCallParameter*
'}';
WMLMacroCallParameter:
{WMLMacroCallParameter} WMLMacroParameter | WMLMacroCall;
WMLArrayCall:
'[' value += WMLValue+ ']' ;
WMLMacroDefine:
name = DEFINE
( Expressions += WMLValuedExpression )*
Expressions += WMLValuedExpression *
endName = ENDDEF;
WMLPreprocIF:
name=(IFDEF | IFNDEF | IFHAVE | IFNHAVE)
( Expressions += WMLValuedExpression
| Elses += ELSE
)*
Expressions += WMLValuedExpression *
(
Elses = ELSE
ElseExpressions += WMLValuedExpression +
)?
endName = ENDIF;
WMLRootExpression:
@ -49,7 +50,7 @@ WMLRootExpression:
WMLExpression:
WMLRootExpression | WMLKey ;
WMLValuedExpression:
WMLExpression | {WMLValuedExpression} WMLValue;

View file

@ -8,21 +8,23 @@
*******************************************************************************/
package org.wesnoth.utils;
import java.util.Arrays;
import java.util.List;
public class ListUtils
{
/**
* Concatenates the list of strings using the provided separator
* Concatenates the list of Objects using the provided separator
*
* @param list the list to concatenate
* @param separator the separator used to concatenate the elements of the list
* @return
* @return A string with the string representation of that objects
*/
public static String concatenateList(List<String> list, String separator)
public static String concatenateList(List<? extends Object> list, String separator)
{
if (list == null || list.isEmpty())
return ""; //$NON-NLS-1$
StringBuilder result = new StringBuilder();
for (int i = 0; i < list.size() - 1; i++)
{
@ -42,16 +44,6 @@ public class ListUtils
*/
public static String concatenateArray(String[] array, String separator)
{
if (array == null || array.length == 0)
return ""; //$NON-NLS-1$
StringBuilder result = new StringBuilder();
for (int i = 0; i < array.length - 1; i++)
{
result.append(array[i] + separator);
}
result.append(array[array.length - 1]);
return result.toString();
return concatenateList( Arrays.asList( array ), separator );
}
}

View file

@ -593,18 +593,17 @@ public class ResourceUtils
if ( ( name.equals( "campaigns" ) || //$NON-NLS-1$
name.equals( "add-ons" ) ) && //$NON-NLS-1$
// the call should contain just string values
macro.getExtraMacros( ).isEmpty( ) &&
macro.getParams( ).size( ) > 2 &&
macro.getParams( ).get( 0 ).equals( "/" ) ) //$NON-NLS-1$
macro.getParameters( ).size( ) > 2 &&
macro.getParameters( ).get( 0 ).equals( "/" ) ) //$NON-NLS-1$
{
// check if the macro includes directories local
// to this project
String projectPath = project.getLocation( ).toOSString( );
if ( projectPath.contains( macro.getParams( ).get( 1 ) ) ) {
if ( projectPath.contains( macro.getParameters( ).get( 1 ).toString( ) ) ) {
containersToAdd.add(
ListUtils.concatenateList(
macro.getParams( ).subList( 3, macro.getParams( ).size( ) ), "" ) ); //$NON-NLS-1$
macro.getParameters( ).subList( 3, macro.getParameters( ).size( ) ), "" ) ); //$NON-NLS-1$
}
}
}