mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-04 20:37:51 +00:00
eclipse plugin: update grammar
This commit is contained in:
parent
dee69baef0
commit
db67fb7677
@ -57,7 +57,7 @@ public class AddonUploadPreferencePage extends FieldEditorPreferencePage impleme
|
||||
portsRegex.deleteCharAt(portsRegex.length() - 1);
|
||||
portsRegex.append(")*");
|
||||
|
||||
System.out.println(portsRegex.toString());
|
||||
//System.out.println(portsRegex.toString());
|
||||
addField(new RegexStringFieldEditor(Constants.P_WAU_PORT,
|
||||
"Port", portsRegex.toString(),
|
||||
"Invalid port number", getFieldEditorParent()));
|
||||
|
@ -59,10 +59,6 @@ public class AbstractWMLProposalProvider extends AbstractJavaBasedContentProposa
|
||||
public void completeWMLKey_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
|
||||
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
|
||||
}
|
||||
public void completeWMLKey_Eol(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
|
||||
completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(0)), context, acceptor);
|
||||
completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(1)), context, acceptor);
|
||||
}
|
||||
public void completeWMLMacroCall_Relative(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
|
||||
// subclasses may override
|
||||
}
|
||||
@ -91,6 +87,21 @@ public class AbstractWMLProposalProvider extends AbstractJavaBasedContentProposa
|
||||
public void completeWMLMacroDefine_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
|
||||
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
|
||||
}
|
||||
public void completeWMLMacroDefine_Tags(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
|
||||
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
|
||||
}
|
||||
public void completeWMLMacroDefine_Keys(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
|
||||
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
|
||||
}
|
||||
public void completeWMLMacroDefine_MacroCalls(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
|
||||
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
|
||||
}
|
||||
public void completeWMLMacroDefine_MacroDefines(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
|
||||
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
|
||||
}
|
||||
public void completeWMLMacroDefine_Textdomains(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
|
||||
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
|
||||
}
|
||||
public void completeWMLTextdomain_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
|
||||
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
|
||||
}
|
||||
@ -141,6 +152,9 @@ public class AbstractWMLProposalProvider extends AbstractJavaBasedContentProposa
|
||||
public void complete_DEFINE(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
|
||||
// subclasses may override
|
||||
}
|
||||
public void complete_ENDDEF(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
|
||||
// subclasses may override
|
||||
}
|
||||
public void complete_TEXTDOMAIN(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
|
||||
// subclasses may override
|
||||
}
|
||||
|
@ -39,17 +39,18 @@ public class WMLParser extends AbstractContentAssistParser {
|
||||
{
|
||||
put(grammarAccess.getWMLRootAccess().getAlternatives(), "rule__WMLRoot__Alternatives");
|
||||
put(grammarAccess.getWMLTagAccess().getAlternatives_4(), "rule__WMLTag__Alternatives_4");
|
||||
put(grammarAccess.getWMLKeyAccess().getEolAlternatives_3_0(), "rule__WMLKey__EolAlternatives_3_0");
|
||||
put(grammarAccess.getWMLKeyValueAccess().getAlternatives(), "rule__WMLKeyValue__Alternatives");
|
||||
put(grammarAccess.getWMLMacroCallAccess().getAlternatives_3(), "rule__WMLMacroCall__Alternatives_3");
|
||||
put(grammarAccess.getWMLMacroCallAccess().getParamsAlternatives_3_0_0(), "rule__WMLMacroCall__ParamsAlternatives_3_0_0");
|
||||
put(grammarAccess.getWMLMacroParameterAccess().getParamAlternatives_2_0(), "rule__WMLMacroParameter__ParamAlternatives_2_0");
|
||||
put(grammarAccess.getWMLMacroDefineAccess().getAlternatives_1(), "rule__WMLMacroDefine__Alternatives_1");
|
||||
put(grammarAccess.getWMLValueAccess().getValueAlternatives_0(), "rule__WMLValue__ValueAlternatives_0");
|
||||
put(grammarAccess.getWMLTagAccess().getGroup(), "rule__WMLTag__Group__0");
|
||||
put(grammarAccess.getWMLKeyAccess().getGroup(), "rule__WMLKey__Group__0");
|
||||
put(grammarAccess.getWMLMacroCallAccess().getGroup(), "rule__WMLMacroCall__Group__0");
|
||||
put(grammarAccess.getWMLMacroParameterAccess().getGroup(), "rule__WMLMacroParameter__Group__0");
|
||||
put(grammarAccess.getWMLArrayCallAccess().getGroup(), "rule__WMLArrayCall__Group__0");
|
||||
put(grammarAccess.getWMLMacroDefineAccess().getGroup(), "rule__WMLMacroDefine__Group__0");
|
||||
put(grammarAccess.getWMLRootAccess().getTagsAssignment_0(), "rule__WMLRoot__TagsAssignment_0");
|
||||
put(grammarAccess.getWMLRootAccess().getMacroCallsAssignment_1(), "rule__WMLRoot__MacroCallsAssignment_1");
|
||||
put(grammarAccess.getWMLRootAccess().getMacroDefinesAssignment_2(), "rule__WMLRoot__MacroDefinesAssignment_2");
|
||||
@ -64,7 +65,6 @@ public class WMLParser extends AbstractContentAssistParser {
|
||||
put(grammarAccess.getWMLTagAccess().getEndNameAssignment_6(), "rule__WMLTag__EndNameAssignment_6");
|
||||
put(grammarAccess.getWMLKeyAccess().getNameAssignment_0(), "rule__WMLKey__NameAssignment_0");
|
||||
put(grammarAccess.getWMLKeyAccess().getValueAssignment_2(), "rule__WMLKey__ValueAssignment_2");
|
||||
put(grammarAccess.getWMLKeyAccess().getEolAssignment_3(), "rule__WMLKey__EolAssignment_3");
|
||||
put(grammarAccess.getWMLMacroCallAccess().getRelativeAssignment_1(), "rule__WMLMacroCall__RelativeAssignment_1");
|
||||
put(grammarAccess.getWMLMacroCallAccess().getNameAssignment_2(), "rule__WMLMacroCall__NameAssignment_2");
|
||||
put(grammarAccess.getWMLMacroCallAccess().getParamsAssignment_3_0(), "rule__WMLMacroCall__ParamsAssignment_3_0");
|
||||
@ -72,7 +72,12 @@ public class WMLParser extends AbstractContentAssistParser {
|
||||
put(grammarAccess.getWMLMacroParameterAccess().getParamAssignment_2(), "rule__WMLMacroParameter__ParamAssignment_2");
|
||||
put(grammarAccess.getWMLLuaCodeAccess().getValueAssignment(), "rule__WMLLuaCode__ValueAssignment");
|
||||
put(grammarAccess.getWMLArrayCallAccess().getValueAssignment_1(), "rule__WMLArrayCall__ValueAssignment_1");
|
||||
put(grammarAccess.getWMLMacroDefineAccess().getNameAssignment(), "rule__WMLMacroDefine__NameAssignment");
|
||||
put(grammarAccess.getWMLMacroDefineAccess().getNameAssignment_0(), "rule__WMLMacroDefine__NameAssignment_0");
|
||||
put(grammarAccess.getWMLMacroDefineAccess().getTagsAssignment_1_0(), "rule__WMLMacroDefine__TagsAssignment_1_0");
|
||||
put(grammarAccess.getWMLMacroDefineAccess().getKeysAssignment_1_1(), "rule__WMLMacroDefine__KeysAssignment_1_1");
|
||||
put(grammarAccess.getWMLMacroDefineAccess().getMacroCallsAssignment_1_2(), "rule__WMLMacroDefine__MacroCallsAssignment_1_2");
|
||||
put(grammarAccess.getWMLMacroDefineAccess().getMacroDefinesAssignment_1_3(), "rule__WMLMacroDefine__MacroDefinesAssignment_1_3");
|
||||
put(grammarAccess.getWMLMacroDefineAccess().getTextdomainsAssignment_1_4(), "rule__WMLMacroDefine__TextdomainsAssignment_1_4");
|
||||
put(grammarAccess.getWMLTextdomainAccess().getNameAssignment(), "rule__WMLTextdomain__NameAssignment");
|
||||
put(grammarAccess.getWMLValueAccess().getValueAssignment(), "rule__WMLValue__ValueAssignment");
|
||||
}
|
||||
|
@ -305,9 +305,9 @@ ruleWMLMacroDefine
|
||||
}
|
||||
:
|
||||
(
|
||||
{ before(grammarAccess.getWMLMacroDefineAccess().getNameAssignment()); }
|
||||
(rule__WMLMacroDefine__NameAssignment)
|
||||
{ after(grammarAccess.getWMLMacroDefineAccess().getNameAssignment()); }
|
||||
{ before(grammarAccess.getWMLMacroDefineAccess().getGroup()); }
|
||||
(rule__WMLMacroDefine__Group__0)
|
||||
{ after(grammarAccess.getWMLMacroDefineAccess().getGroup()); }
|
||||
)
|
||||
|
||||
;
|
||||
@ -361,10 +361,17 @@ ruleWMLValue
|
||||
}
|
||||
:
|
||||
(
|
||||
(
|
||||
{ before(grammarAccess.getWMLValueAccess().getValueAssignment()); }
|
||||
(rule__WMLValue__ValueAssignment)
|
||||
{ after(grammarAccess.getWMLValueAccess().getValueAssignment()); }
|
||||
)
|
||||
(
|
||||
{ before(grammarAccess.getWMLValueAccess().getValueAssignment()); }
|
||||
(rule__WMLValue__ValueAssignment)*
|
||||
{ after(grammarAccess.getWMLValueAccess().getValueAssignment()); }
|
||||
)
|
||||
)
|
||||
|
||||
;
|
||||
finally {
|
||||
@ -448,28 +455,6 @@ finally {
|
||||
restoreStackSize(stackSize);
|
||||
}
|
||||
|
||||
rule__WMLKey__EolAlternatives_3_0
|
||||
@init {
|
||||
int stackSize = keepStackSize();
|
||||
}
|
||||
:
|
||||
(
|
||||
{ before(grammarAccess.getWMLKeyAccess().getEolEOLTerminalRuleCall_3_0_0()); }
|
||||
RULE_EOL
|
||||
{ after(grammarAccess.getWMLKeyAccess().getEolEOLTerminalRuleCall_3_0_0()); }
|
||||
)
|
||||
|
||||
|(
|
||||
{ before(grammarAccess.getWMLKeyAccess().getEolSL_COMMENTTerminalRuleCall_3_0_1()); }
|
||||
RULE_SL_COMMENT
|
||||
{ after(grammarAccess.getWMLKeyAccess().getEolSL_COMMENTTerminalRuleCall_3_0_1()); }
|
||||
)
|
||||
|
||||
;
|
||||
finally {
|
||||
restoreStackSize(stackSize);
|
||||
}
|
||||
|
||||
rule__WMLKeyValue__Alternatives
|
||||
@init {
|
||||
int stackSize = keepStackSize();
|
||||
@ -582,6 +567,46 @@ finally {
|
||||
restoreStackSize(stackSize);
|
||||
}
|
||||
|
||||
rule__WMLMacroDefine__Alternatives_1
|
||||
@init {
|
||||
int stackSize = keepStackSize();
|
||||
}
|
||||
:
|
||||
(
|
||||
{ before(grammarAccess.getWMLMacroDefineAccess().getTagsAssignment_1_0()); }
|
||||
(rule__WMLMacroDefine__TagsAssignment_1_0)
|
||||
{ after(grammarAccess.getWMLMacroDefineAccess().getTagsAssignment_1_0()); }
|
||||
)
|
||||
|
||||
|(
|
||||
{ before(grammarAccess.getWMLMacroDefineAccess().getKeysAssignment_1_1()); }
|
||||
(rule__WMLMacroDefine__KeysAssignment_1_1)
|
||||
{ after(grammarAccess.getWMLMacroDefineAccess().getKeysAssignment_1_1()); }
|
||||
)
|
||||
|
||||
|(
|
||||
{ before(grammarAccess.getWMLMacroDefineAccess().getMacroCallsAssignment_1_2()); }
|
||||
(rule__WMLMacroDefine__MacroCallsAssignment_1_2)
|
||||
{ after(grammarAccess.getWMLMacroDefineAccess().getMacroCallsAssignment_1_2()); }
|
||||
)
|
||||
|
||||
|(
|
||||
{ before(grammarAccess.getWMLMacroDefineAccess().getMacroDefinesAssignment_1_3()); }
|
||||
(rule__WMLMacroDefine__MacroDefinesAssignment_1_3)
|
||||
{ after(grammarAccess.getWMLMacroDefineAccess().getMacroDefinesAssignment_1_3()); }
|
||||
)
|
||||
|
||||
|(
|
||||
{ before(grammarAccess.getWMLMacroDefineAccess().getTextdomainsAssignment_1_4()); }
|
||||
(rule__WMLMacroDefine__TextdomainsAssignment_1_4)
|
||||
{ after(grammarAccess.getWMLMacroDefineAccess().getTextdomainsAssignment_1_4()); }
|
||||
)
|
||||
|
||||
;
|
||||
finally {
|
||||
restoreStackSize(stackSize);
|
||||
}
|
||||
|
||||
rule__WMLValue__ValueAlternatives_0
|
||||
@init {
|
||||
int stackSize = keepStackSize();
|
||||
@ -949,7 +974,6 @@ rule__WMLKey__Group__2
|
||||
}
|
||||
:
|
||||
rule__WMLKey__Group__2__Impl
|
||||
rule__WMLKey__Group__3
|
||||
;
|
||||
finally {
|
||||
restoreStackSize(stackSize);
|
||||
@ -961,17 +985,10 @@ rule__WMLKey__Group__2__Impl
|
||||
}
|
||||
:
|
||||
(
|
||||
(
|
||||
{ before(grammarAccess.getWMLKeyAccess().getValueAssignment_2()); }
|
||||
(rule__WMLKey__ValueAssignment_2)
|
||||
{ after(grammarAccess.getWMLKeyAccess().getValueAssignment_2()); }
|
||||
)
|
||||
(
|
||||
{ before(grammarAccess.getWMLKeyAccess().getValueAssignment_2()); }
|
||||
(rule__WMLKey__ValueAssignment_2)*
|
||||
{ after(grammarAccess.getWMLKeyAccess().getValueAssignment_2()); }
|
||||
)
|
||||
)
|
||||
|
||||
;
|
||||
finally {
|
||||
@ -979,36 +996,6 @@ finally {
|
||||
}
|
||||
|
||||
|
||||
rule__WMLKey__Group__3
|
||||
@init {
|
||||
int stackSize = keepStackSize();
|
||||
}
|
||||
:
|
||||
rule__WMLKey__Group__3__Impl
|
||||
;
|
||||
finally {
|
||||
restoreStackSize(stackSize);
|
||||
}
|
||||
|
||||
rule__WMLKey__Group__3__Impl
|
||||
@init {
|
||||
int stackSize = keepStackSize();
|
||||
}
|
||||
:
|
||||
(
|
||||
{ before(grammarAccess.getWMLKeyAccess().getEolAssignment_3()); }
|
||||
(rule__WMLKey__EolAssignment_3)
|
||||
{ after(grammarAccess.getWMLKeyAccess().getEolAssignment_3()); }
|
||||
)
|
||||
|
||||
;
|
||||
finally {
|
||||
restoreStackSize(stackSize);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1405,6 +1392,98 @@ finally {
|
||||
|
||||
|
||||
|
||||
rule__WMLMacroDefine__Group__0
|
||||
@init {
|
||||
int stackSize = keepStackSize();
|
||||
}
|
||||
:
|
||||
rule__WMLMacroDefine__Group__0__Impl
|
||||
rule__WMLMacroDefine__Group__1
|
||||
;
|
||||
finally {
|
||||
restoreStackSize(stackSize);
|
||||
}
|
||||
|
||||
rule__WMLMacroDefine__Group__0__Impl
|
||||
@init {
|
||||
int stackSize = keepStackSize();
|
||||
}
|
||||
:
|
||||
(
|
||||
{ before(grammarAccess.getWMLMacroDefineAccess().getNameAssignment_0()); }
|
||||
(rule__WMLMacroDefine__NameAssignment_0)
|
||||
{ after(grammarAccess.getWMLMacroDefineAccess().getNameAssignment_0()); }
|
||||
)
|
||||
|
||||
;
|
||||
finally {
|
||||
restoreStackSize(stackSize);
|
||||
}
|
||||
|
||||
|
||||
rule__WMLMacroDefine__Group__1
|
||||
@init {
|
||||
int stackSize = keepStackSize();
|
||||
}
|
||||
:
|
||||
rule__WMLMacroDefine__Group__1__Impl
|
||||
rule__WMLMacroDefine__Group__2
|
||||
;
|
||||
finally {
|
||||
restoreStackSize(stackSize);
|
||||
}
|
||||
|
||||
rule__WMLMacroDefine__Group__1__Impl
|
||||
@init {
|
||||
int stackSize = keepStackSize();
|
||||
}
|
||||
:
|
||||
(
|
||||
{ before(grammarAccess.getWMLMacroDefineAccess().getAlternatives_1()); }
|
||||
(rule__WMLMacroDefine__Alternatives_1)*
|
||||
{ after(grammarAccess.getWMLMacroDefineAccess().getAlternatives_1()); }
|
||||
)
|
||||
|
||||
;
|
||||
finally {
|
||||
restoreStackSize(stackSize);
|
||||
}
|
||||
|
||||
|
||||
rule__WMLMacroDefine__Group__2
|
||||
@init {
|
||||
int stackSize = keepStackSize();
|
||||
}
|
||||
:
|
||||
rule__WMLMacroDefine__Group__2__Impl
|
||||
;
|
||||
finally {
|
||||
restoreStackSize(stackSize);
|
||||
}
|
||||
|
||||
rule__WMLMacroDefine__Group__2__Impl
|
||||
@init {
|
||||
int stackSize = keepStackSize();
|
||||
}
|
||||
:
|
||||
(
|
||||
{ before(grammarAccess.getWMLMacroDefineAccess().getENDDEFTerminalRuleCall_2()); }
|
||||
RULE_ENDDEF
|
||||
{ after(grammarAccess.getWMLMacroDefineAccess().getENDDEFTerminalRuleCall_2()); }
|
||||
)
|
||||
|
||||
;
|
||||
finally {
|
||||
restoreStackSize(stackSize);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
rule__WMLRoot__TagsAssignment_0
|
||||
@init {
|
||||
@ -1624,22 +1703,6 @@ finally {
|
||||
restoreStackSize(stackSize);
|
||||
}
|
||||
|
||||
rule__WMLKey__EolAssignment_3
|
||||
@init {
|
||||
int stackSize = keepStackSize();
|
||||
}
|
||||
:
|
||||
(
|
||||
{ before(grammarAccess.getWMLKeyAccess().getEolAlternatives_3_0()); }
|
||||
(rule__WMLKey__EolAlternatives_3_0)
|
||||
{ after(grammarAccess.getWMLKeyAccess().getEolAlternatives_3_0()); }
|
||||
)
|
||||
|
||||
;
|
||||
finally {
|
||||
restoreStackSize(stackSize);
|
||||
}
|
||||
|
||||
rule__WMLMacroCall__RelativeAssignment_1
|
||||
@init {
|
||||
int stackSize = keepStackSize();
|
||||
@ -1755,14 +1818,89 @@ finally {
|
||||
restoreStackSize(stackSize);
|
||||
}
|
||||
|
||||
rule__WMLMacroDefine__NameAssignment
|
||||
rule__WMLMacroDefine__NameAssignment_0
|
||||
@init {
|
||||
int stackSize = keepStackSize();
|
||||
}
|
||||
:
|
||||
(
|
||||
{ before(grammarAccess.getWMLMacroDefineAccess().getNameDEFINETerminalRuleCall_0()); }
|
||||
RULE_DEFINE{ after(grammarAccess.getWMLMacroDefineAccess().getNameDEFINETerminalRuleCall_0()); }
|
||||
{ before(grammarAccess.getWMLMacroDefineAccess().getNameDEFINETerminalRuleCall_0_0()); }
|
||||
RULE_DEFINE{ after(grammarAccess.getWMLMacroDefineAccess().getNameDEFINETerminalRuleCall_0_0()); }
|
||||
)
|
||||
|
||||
;
|
||||
finally {
|
||||
restoreStackSize(stackSize);
|
||||
}
|
||||
|
||||
rule__WMLMacroDefine__TagsAssignment_1_0
|
||||
@init {
|
||||
int stackSize = keepStackSize();
|
||||
}
|
||||
:
|
||||
(
|
||||
{ before(grammarAccess.getWMLMacroDefineAccess().getTagsWMLTagParserRuleCall_1_0_0()); }
|
||||
ruleWMLTag{ after(grammarAccess.getWMLMacroDefineAccess().getTagsWMLTagParserRuleCall_1_0_0()); }
|
||||
)
|
||||
|
||||
;
|
||||
finally {
|
||||
restoreStackSize(stackSize);
|
||||
}
|
||||
|
||||
rule__WMLMacroDefine__KeysAssignment_1_1
|
||||
@init {
|
||||
int stackSize = keepStackSize();
|
||||
}
|
||||
:
|
||||
(
|
||||
{ before(grammarAccess.getWMLMacroDefineAccess().getKeysWMLKeyParserRuleCall_1_1_0()); }
|
||||
ruleWMLKey{ after(grammarAccess.getWMLMacroDefineAccess().getKeysWMLKeyParserRuleCall_1_1_0()); }
|
||||
)
|
||||
|
||||
;
|
||||
finally {
|
||||
restoreStackSize(stackSize);
|
||||
}
|
||||
|
||||
rule__WMLMacroDefine__MacroCallsAssignment_1_2
|
||||
@init {
|
||||
int stackSize = keepStackSize();
|
||||
}
|
||||
:
|
||||
(
|
||||
{ before(grammarAccess.getWMLMacroDefineAccess().getMacroCallsWMLMacroCallParserRuleCall_1_2_0()); }
|
||||
ruleWMLMacroCall{ after(grammarAccess.getWMLMacroDefineAccess().getMacroCallsWMLMacroCallParserRuleCall_1_2_0()); }
|
||||
)
|
||||
|
||||
;
|
||||
finally {
|
||||
restoreStackSize(stackSize);
|
||||
}
|
||||
|
||||
rule__WMLMacroDefine__MacroDefinesAssignment_1_3
|
||||
@init {
|
||||
int stackSize = keepStackSize();
|
||||
}
|
||||
:
|
||||
(
|
||||
{ before(grammarAccess.getWMLMacroDefineAccess().getMacroDefinesWMLMacroDefineParserRuleCall_1_3_0()); }
|
||||
ruleWMLMacroDefine{ after(grammarAccess.getWMLMacroDefineAccess().getMacroDefinesWMLMacroDefineParserRuleCall_1_3_0()); }
|
||||
)
|
||||
|
||||
;
|
||||
finally {
|
||||
restoreStackSize(stackSize);
|
||||
}
|
||||
|
||||
rule__WMLMacroDefine__TextdomainsAssignment_1_4
|
||||
@init {
|
||||
int stackSize = keepStackSize();
|
||||
}
|
||||
:
|
||||
(
|
||||
{ before(grammarAccess.getWMLMacroDefineAccess().getTextdomainsWMLTextdomainParserRuleCall_1_4_0()); }
|
||||
ruleWMLTextdomain{ after(grammarAccess.getWMLMacroDefineAccess().getTextdomainsWMLTextdomainParserRuleCall_1_4_0()); }
|
||||
)
|
||||
|
||||
;
|
||||
@ -1804,7 +1942,9 @@ finally {
|
||||
|
||||
RULE_LUA_CODE : '<<' ( options {greedy=false;} : . )*'>>';
|
||||
|
||||
RULE_DEFINE : '#define' ( options {greedy=false;} : . )*'#enddef';
|
||||
RULE_DEFINE : '#define' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
||||
|
||||
RULE_ENDDEF : '#enddef' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
||||
|
||||
RULE_TEXTDOMAIN : '#textdomain' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
||||
|
||||
|
@ -1,19 +1,20 @@
|
||||
RULE_LUA_CODE=9
|
||||
RULE_ID=6
|
||||
RULE_STRING=7
|
||||
RULE_DEFINE=10
|
||||
RULE_ANY_OTHER=8
|
||||
RULE_EOL=4
|
||||
RULE_TEXTDOMAIN=11
|
||||
RULE_LUA_CODE=8
|
||||
RULE_ID=4
|
||||
RULE_STRING=5
|
||||
RULE_DEFINE=9
|
||||
RULE_ANY_OTHER=6
|
||||
RULE_ENDDEF=7
|
||||
RULE_EOL=11
|
||||
RULE_TEXTDOMAIN=10
|
||||
RULE_WS=12
|
||||
RULE_SL_COMMENT=5
|
||||
'}'=20
|
||||
'='=18
|
||||
'~'=14
|
||||
'('=21
|
||||
'[/'=17
|
||||
'['=15
|
||||
'+'=13
|
||||
')'=22
|
||||
'{'=19
|
||||
']'=16
|
||||
RULE_SL_COMMENT=13
|
||||
'}'=21
|
||||
'='=19
|
||||
'~'=15
|
||||
'('=22
|
||||
'[/'=18
|
||||
'['=16
|
||||
'+'=14
|
||||
')'=23
|
||||
'{'=20
|
||||
']'=17
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -7,42 +7,45 @@ package org.wesnoth.ui.contentassist.antlr.internal;
|
||||
import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.Lexer;
|
||||
}
|
||||
|
||||
T13 : '+' ;
|
||||
T14 : '~' ;
|
||||
T15 : '[' ;
|
||||
T16 : ']' ;
|
||||
T17 : '[/' ;
|
||||
T18 : '=' ;
|
||||
T19 : '{' ;
|
||||
T20 : '}' ;
|
||||
T21 : '(' ;
|
||||
T22 : ')' ;
|
||||
T14 : '+' ;
|
||||
T15 : '~' ;
|
||||
T16 : '[' ;
|
||||
T17 : ']' ;
|
||||
T18 : '[/' ;
|
||||
T19 : '=' ;
|
||||
T20 : '{' ;
|
||||
T21 : '}' ;
|
||||
T22 : '(' ;
|
||||
T23 : ')' ;
|
||||
|
||||
// $ANTLR src "../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 1805
|
||||
// $ANTLR src "../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 1943
|
||||
RULE_LUA_CODE : '<<' ( options {greedy=false;} : . )*'>>';
|
||||
|
||||
// $ANTLR src "../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 1807
|
||||
RULE_DEFINE : '#define' ( options {greedy=false;} : . )*'#enddef';
|
||||
// $ANTLR src "../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 1945
|
||||
RULE_DEFINE : '#define' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
||||
|
||||
// $ANTLR src "../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 1809
|
||||
// $ANTLR src "../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 1947
|
||||
RULE_ENDDEF : '#enddef' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
||||
|
||||
// $ANTLR src "../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 1949
|
||||
RULE_TEXTDOMAIN : '#textdomain' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
||||
|
||||
// $ANTLR src "../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 1811
|
||||
// $ANTLR src "../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 1951
|
||||
RULE_STRING : '"' ('\\' ('b'|'t'|'n'|'f'|'r'|'"'|'\''|'\\')|~(('\\'|'"')))* '"';
|
||||
|
||||
// $ANTLR src "../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 1813
|
||||
// $ANTLR src "../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 1953
|
||||
RULE_ID : ('a'..'z'|'A'..'Z'|'0'..'9'|'_'|'-'|',')+;
|
||||
|
||||
// $ANTLR src "../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 1815
|
||||
// $ANTLR src "../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 1955
|
||||
RULE_EOL : ('\r'|'\n');
|
||||
|
||||
// $ANTLR src "../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 1817
|
||||
// $ANTLR src "../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 1957
|
||||
RULE_WS : (' '|'\t')+;
|
||||
|
||||
// $ANTLR src "../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 1819
|
||||
// $ANTLR src "../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 1959
|
||||
RULE_ANY_OTHER : .;
|
||||
|
||||
// $ANTLR src "../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 1821
|
||||
// $ANTLR src "../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 1961
|
||||
RULE_SL_COMMENT : '#' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
||||
|
||||
|
||||
|
@ -30,9 +30,8 @@
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="WMLKey">
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="value" upperBound="-1"
|
||||
eType="#//WMLKeyValue" containment="true"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="eol" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="value" eType="#//WMLKeyValue"
|
||||
containment="true"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="WMLKeyValue"/>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="WMLMacroCall" eSuperTypes="#//WMLKeyValue">
|
||||
@ -56,11 +55,22 @@
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="WMLMacroDefine">
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="Tags" upperBound="-1" eType="#//WMLTag"
|
||||
containment="true"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="Keys" upperBound="-1" eType="#//WMLKey"
|
||||
containment="true"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="MacroCalls" upperBound="-1"
|
||||
eType="#//WMLMacroCall" containment="true"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="MacroDefines" upperBound="-1"
|
||||
eType="#//WMLMacroDefine" containment="true"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="Textdomains" upperBound="-1"
|
||||
eType="#//WMLTextdomain" containment="true"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="WMLTextdomain">
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="WMLValue" eSuperTypes="#//WMLKeyValue">
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="value" unique="false" upperBound="-1"
|
||||
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
</eClassifiers>
|
||||
</ecore:EPackage>
|
||||
|
@ -27,7 +27,6 @@
|
||||
<genClasses ecoreClass="WML.ecore#//WMLKey">
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute WML.ecore#//WMLKey/name"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference WML.ecore#//WMLKey/value"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute WML.ecore#//WMLKey/eol"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="WML.ecore#//WMLKeyValue"/>
|
||||
<genClasses ecoreClass="WML.ecore#//WMLMacroCall">
|
||||
@ -47,6 +46,11 @@
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="WML.ecore#//WMLMacroDefine">
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute WML.ecore#//WMLMacroDefine/name"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference WML.ecore#//WMLMacroDefine/Tags"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference WML.ecore#//WMLMacroDefine/Keys"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference WML.ecore#//WMLMacroDefine/MacroCalls"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference WML.ecore#//WMLMacroDefine/MacroDefines"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference WML.ecore#//WMLMacroDefine/Textdomains"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="WML.ecore#//WMLTextdomain">
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute WML.ecore#//WMLTextdomain/name"/>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?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.16 //@rules.17 //@rules.19">
|
||||
<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.17 //@rules.18 //@rules.20">
|
||||
<metamodelDeclarations xsi:type="xtext:GeneratedMetamodel" name="wML">
|
||||
<ePackage href="http://www.wesnoth.org/WML#/"/>
|
||||
</metamodelDeclarations>
|
||||
@ -35,7 +35,7 @@
|
||||
<terminal xsi:type="xtext:Keyword" value="+"/>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:Assignment" feature="name" operator="=">
|
||||
<terminal xsi:type="xtext:RuleCall" rule="//@rules.15"/>
|
||||
<terminal xsi:type="xtext:RuleCall" rule="//@rules.16"/>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:Keyword" value="]"/>
|
||||
<elements xsi:type="xtext:Alternatives" cardinality="*">
|
||||
@ -57,29 +57,23 @@
|
||||
</elements>
|
||||
<elements xsi:type="xtext:Keyword" value="[/"/>
|
||||
<elements xsi:type="xtext:Assignment" feature="endName" operator="=">
|
||||
<terminal xsi:type="xtext:RuleCall" rule="//@rules.15"/>
|
||||
<terminal xsi:type="xtext:RuleCall" rule="//@rules.16"/>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:Keyword" value="]"/>
|
||||
</alternatives>
|
||||
</rules>
|
||||
<rules xsi:type="xtext:ParserRule" name="WMLKey" definesHiddenTokens="true" hiddenTokens="//@rules.17">
|
||||
<rules xsi:type="xtext:ParserRule" name="WMLKey" definesHiddenTokens="true" hiddenTokens="//@rules.18">
|
||||
<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.15"/>
|
||||
<terminal xsi:type="xtext:RuleCall" rule="//@rules.16"/>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:Keyword" value="="/>
|
||||
<elements xsi:type="xtext:Assignment" cardinality="+" feature="value" operator="+=">
|
||||
<elements xsi:type="xtext:Assignment" feature="value" operator="=">
|
||||
<terminal xsi:type="xtext:RuleCall" rule="//@rules.3"/>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:Assignment" feature="eol" operator="=">
|
||||
<terminal xsi:type="xtext:Alternatives">
|
||||
<elements xsi:type="xtext:RuleCall" rule="//@rules.16"/>
|
||||
<elements xsi:type="xtext:RuleCall" rule="//@rules.19"/>
|
||||
</terminal>
|
||||
</elements>
|
||||
</alternatives>
|
||||
</rules>
|
||||
<rules xsi:type="xtext:ParserRule" name="WMLKeyValue">
|
||||
@ -103,7 +97,7 @@
|
||||
<terminal xsi:type="xtext:Keyword" value="~"/>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:Assignment" feature="name" operator="=">
|
||||
<terminal xsi:type="xtext:RuleCall" rule="//@rules.15"/>
|
||||
<terminal xsi:type="xtext:RuleCall" rule="//@rules.16"/>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:Alternatives" cardinality="*">
|
||||
<elements xsi:type="xtext:Assignment" feature="params" operator="+=">
|
||||
@ -165,8 +159,28 @@
|
||||
<type metamodel="//@metamodelDeclarations.0">
|
||||
<classifier xsi:type="ecore:EClass" href="http://www.wesnoth.org/WML#//WMLMacroDefine"/>
|
||||
</type>
|
||||
<alternatives xsi:type="xtext:Assignment" feature="name" operator="=">
|
||||
<terminal xsi:type="xtext:RuleCall" rule="//@rules.12"/>
|
||||
<alternatives xsi:type="xtext:Group">
|
||||
<elements xsi:type="xtext:Assignment" feature="name" operator="=">
|
||||
<terminal xsi:type="xtext:RuleCall" rule="//@rules.12"/>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:Alternatives" cardinality="*">
|
||||
<elements xsi:type="xtext:Assignment" feature="Tags" operator="+=">
|
||||
<terminal xsi:type="xtext:RuleCall" rule="//@rules.1"/>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:Assignment" feature="Keys" operator="+=">
|
||||
<terminal xsi:type="xtext:RuleCall" rule="//@rules.2"/>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:Assignment" feature="MacroCalls" operator="+=">
|
||||
<terminal xsi:type="xtext:RuleCall" rule="//@rules.4"/>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:Assignment" feature="MacroDefines" operator="+=">
|
||||
<terminal xsi:type="xtext:RuleCall" rule="//@rules.8"/>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:Assignment" feature="Textdomains" operator="+=">
|
||||
<terminal xsi:type="xtext:RuleCall" rule="//@rules.9"/>
|
||||
</elements>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:RuleCall" rule="//@rules.13"/>
|
||||
</alternatives>
|
||||
</rules>
|
||||
<rules xsi:type="xtext:ParserRule" name="WMLTextdomain">
|
||||
@ -174,20 +188,20 @@
|
||||
<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.13"/>
|
||||
<terminal xsi:type="xtext:RuleCall" rule="//@rules.14"/>
|
||||
</alternatives>
|
||||
</rules>
|
||||
<rules xsi:type="xtext:ParserRule" name="WMLValue">
|
||||
<type metamodel="//@metamodelDeclarations.0">
|
||||
<classifier xsi:type="ecore:EClass" href="http://www.wesnoth.org/WML#//WMLValue"/>
|
||||
</type>
|
||||
<alternatives xsi:type="xtext:Assignment" feature="value" operator="=">
|
||||
<alternatives xsi:type="xtext:Assignment" cardinality="+" feature="value" operator="+=">
|
||||
<terminal xsi:type="xtext:Alternatives">
|
||||
<elements xsi:type="xtext:RuleCall" rule="//@rules.16"/>
|
||||
<elements xsi:type="xtext:RuleCall" rule="//@rules.15"/>
|
||||
<elements xsi:type="xtext:RuleCall" rule="//@rules.14"/>
|
||||
<elements xsi:type="xtext:Keyword" value="+"/>
|
||||
<elements xsi:type="xtext:Keyword" value="~"/>
|
||||
<elements xsi:type="xtext:RuleCall" rule="//@rules.18"/>
|
||||
<elements xsi:type="xtext:RuleCall" rule="//@rules.19"/>
|
||||
</terminal>
|
||||
</alternatives>
|
||||
</rules>
|
||||
@ -208,8 +222,33 @@
|
||||
</type>
|
||||
<alternatives xsi:type="xtext:Group">
|
||||
<elements xsi:type="xtext:Keyword" value="#define"/>
|
||||
<elements xsi:type="xtext:UntilToken">
|
||||
<terminal xsi:type="xtext:Keyword" value="#enddef"/>
|
||||
<elements xsi:type="xtext:NegatedToken" cardinality="*">
|
||||
<terminal xsi:type="xtext:Alternatives">
|
||||
<elements xsi:type="xtext:Keyword" value="
"/>
|
||||
<elements xsi:type="xtext:Keyword" value="
"/>
|
||||
</terminal>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:Group" cardinality="?">
|
||||
<elements xsi:type="xtext:Keyword" cardinality="?" value="
"/>
|
||||
<elements xsi:type="xtext:Keyword" value="
"/>
|
||||
</elements>
|
||||
</alternatives>
|
||||
</rules>
|
||||
<rules xsi:type="xtext:TerminalRule" name="ENDDEF">
|
||||
<type metamodel="//@metamodelDeclarations.1">
|
||||
<classifier xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
</type>
|
||||
<alternatives xsi:type="xtext:Group">
|
||||
<elements xsi:type="xtext:Keyword" value="#enddef"/>
|
||||
<elements xsi:type="xtext:NegatedToken" cardinality="*">
|
||||
<terminal xsi:type="xtext:Alternatives">
|
||||
<elements xsi:type="xtext:Keyword" value="
"/>
|
||||
<elements xsi:type="xtext:Keyword" value="
"/>
|
||||
</terminal>
|
||||
</elements>
|
||||
<elements xsi:type="xtext:Group" cardinality="?">
|
||||
<elements xsi:type="xtext:Keyword" cardinality="?" value="
"/>
|
||||
<elements xsi:type="xtext:Keyword" value="
"/>
|
||||
</elements>
|
||||
</alternatives>
|
||||
</rules>
|
||||
|
@ -39,7 +39,7 @@ protected class ThisRootNode extends RootToken {
|
||||
case 5: return new WMLMacroParameter_Group(this, this, 5, inst);
|
||||
case 6: return new WMLLuaCode_ValueAssignment(this, this, 6, inst);
|
||||
case 7: return new WMLArrayCall_Group(this, this, 7, inst);
|
||||
case 8: return new WMLMacroDefine_NameAssignment(this, this, 8, inst);
|
||||
case 8: return new WMLMacroDefine_Group(this, this, 8, inst);
|
||||
case 9: return new WMLTextdomain_NameAssignment(this, this, 9, inst);
|
||||
case 10: return new WMLValue_ValueAssignment(this, this, 10, inst);
|
||||
default: return null;
|
||||
@ -53,7 +53,6 @@ protected class ThisRootNode extends RootToken {
|
||||
* //TODO: add cross-reference for variables
|
||||
* //handles TODO:
|
||||
* // - preprocessor commands: #define, #enddef, etc
|
||||
* // - fix: { { } }
|
||||
* WMLRoot:
|
||||
* (Tags+=WMLTag | MacroCalls+=WMLMacroCall | MacroDefines+=WMLMacroDefine | Textdomains+=WMLTextdomain)*;
|
||||
*
|
||||
@ -191,7 +190,7 @@ protected class WMLRoot_MacroDefinesAssignment_2 extends AssignmentToken {
|
||||
@Override
|
||||
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
|
||||
switch(index) {
|
||||
case 0: return new WMLMacroDefine_NameAssignment(this, this, 0, inst);
|
||||
case 0: return new WMLMacroDefine_Group(this, this, 0, inst);
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
@ -606,7 +605,7 @@ protected class WMLTag_MacroDefinesAssignment_4_3 extends AssignmentToken {
|
||||
@Override
|
||||
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
|
||||
switch(index) {
|
||||
case 0: return new WMLMacroDefine_NameAssignment(this, this, 0, inst);
|
||||
case 0: return new WMLMacroDefine_Group(this, this, 0, inst);
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
@ -772,11 +771,11 @@ protected class WMLTag_RightSquareBracketKeyword_7 extends KeywordToken {
|
||||
/************ begin Rule WMLKey ****************
|
||||
*
|
||||
* WMLKey hidden(WS):
|
||||
* name=ID "=" value+=WMLKeyValue+ eol=(EOL | SL_COMMENT);
|
||||
* name=ID "=" value=WMLKeyValue;
|
||||
*
|
||||
**/
|
||||
|
||||
// name=ID "=" value+=WMLKeyValue+ eol=(EOL | SL_COMMENT)
|
||||
// name=ID "=" value=WMLKeyValue
|
||||
protected class WMLKey_Group extends GroupToken {
|
||||
|
||||
public WMLKey_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
|
||||
@ -791,7 +790,7 @@ protected class WMLKey_Group extends GroupToken {
|
||||
@Override
|
||||
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
|
||||
switch(index) {
|
||||
case 0: return new WMLKey_EolAssignment_3(lastRuleCallOrigin, this, 0, inst);
|
||||
case 0: return new WMLKey_ValueAssignment_2(lastRuleCallOrigin, this, 0, inst);
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
@ -860,7 +859,7 @@ protected class WMLKey_EqualsSignKeyword_1 extends KeywordToken {
|
||||
|
||||
}
|
||||
|
||||
// value+=WMLKeyValue+
|
||||
// value=WMLKeyValue
|
||||
protected class WMLKey_ValueAssignment_2 extends AssignmentToken {
|
||||
|
||||
public WMLKey_ValueAssignment_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
|
||||
@ -900,52 +899,12 @@ protected class WMLKey_ValueAssignment_2 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 WMLKey_ValueAssignment_2(lastRuleCallOrigin, next, actIndex, consumed);
|
||||
case 1: return new WMLKey_EqualsSignKeyword_1(lastRuleCallOrigin, next, actIndex, consumed);
|
||||
case 0: return new WMLKey_EqualsSignKeyword_1(lastRuleCallOrigin, next, actIndex, consumed);
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// eol=(EOL | SL_COMMENT)
|
||||
protected class WMLKey_EolAssignment_3 extends AssignmentToken {
|
||||
|
||||
public WMLKey_EolAssignment_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
|
||||
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Assignment getGrammarElement() {
|
||||
return grammarAccess.getWMLKeyAccess().getEolAssignment_3();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
|
||||
switch(index) {
|
||||
case 0: return new WMLKey_ValueAssignment_2(lastRuleCallOrigin, this, 0, inst);
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IEObjectConsumer tryConsume() {
|
||||
if((value = eObjectConsumer.getConsumable("eol",true)) == null) return null;
|
||||
IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("eol");
|
||||
if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getWMLKeyAccess().getEolEOLTerminalRuleCall_3_0_0(), value, null)) {
|
||||
type = AssignmentType.TERMINAL_RULE_CALL;
|
||||
element = grammarAccess.getWMLKeyAccess().getEolEOLTerminalRuleCall_3_0_0();
|
||||
return obj;
|
||||
}
|
||||
if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getWMLKeyAccess().getEolSL_COMMENTTerminalRuleCall_3_0_1(), value, null)) {
|
||||
type = AssignmentType.TERMINAL_RULE_CALL;
|
||||
element = grammarAccess.getWMLKeyAccess().getEolSL_COMMENTTerminalRuleCall_3_0_1();
|
||||
return obj;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/************ end Rule WMLKey ****************/
|
||||
|
||||
@ -1787,20 +1746,51 @@ protected class WMLArrayCall_RightSquareBracketKeyword_2 extends KeywordToken {
|
||||
/************ begin Rule WMLMacroDefine ****************
|
||||
*
|
||||
* WMLMacroDefine:
|
||||
* name=DEFINE;
|
||||
* name=DEFINE (Tags+=WMLTag | Keys+=WMLKey | MacroCalls+=WMLMacroCall | MacroDefines+=WMLMacroDefine |
|
||||
* Textdomains+=WMLTextdomain)* ENDDEF;
|
||||
*
|
||||
**/
|
||||
|
||||
// name=DEFINE
|
||||
protected class WMLMacroDefine_NameAssignment extends AssignmentToken {
|
||||
// name=DEFINE (Tags+=WMLTag | Keys+=WMLKey | MacroCalls+=WMLMacroCall | MacroDefines+=WMLMacroDefine |
|
||||
// Textdomains+=WMLTextdomain)* ENDDEF
|
||||
protected class WMLMacroDefine_Group extends GroupToken {
|
||||
|
||||
public WMLMacroDefine_NameAssignment(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
|
||||
public WMLMacroDefine_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
|
||||
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Group getGrammarElement() {
|
||||
return grammarAccess.getWMLMacroDefineAccess().getGroup();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
|
||||
switch(index) {
|
||||
case 0: return new WMLMacroDefine_ENDDEFTerminalRuleCall_2(lastRuleCallOrigin, this, 0, inst);
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IEObjectConsumer tryConsume() {
|
||||
if(getEObject().eClass() != grammarAccess.getWMLMacroDefineRule().getType().getClassifier())
|
||||
return null;
|
||||
return eObjectConsumer;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// name=DEFINE
|
||||
protected class WMLMacroDefine_NameAssignment_0 extends AssignmentToken {
|
||||
|
||||
public WMLMacroDefine_NameAssignment_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
|
||||
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Assignment getGrammarElement() {
|
||||
return grammarAccess.getWMLMacroDefineAccess().getNameAssignment();
|
||||
return grammarAccess.getWMLMacroDefineAccess().getNameAssignment_0();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -1812,13 +1802,11 @@ protected class WMLMacroDefine_NameAssignment extends AssignmentToken {
|
||||
|
||||
@Override
|
||||
public IEObjectConsumer tryConsume() {
|
||||
if(getEObject().eClass() != grammarAccess.getWMLMacroDefineRule().getType().getClassifier())
|
||||
return null;
|
||||
if((value = eObjectConsumer.getConsumable("name",true)) == null) return null;
|
||||
IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("name");
|
||||
if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getWMLMacroDefineAccess().getNameDEFINETerminalRuleCall_0(), value, null)) {
|
||||
if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getWMLMacroDefineAccess().getNameDEFINETerminalRuleCall_0_0(), value, null)) {
|
||||
type = AssignmentType.TERMINAL_RULE_CALL;
|
||||
element = grammarAccess.getWMLMacroDefineAccess().getNameDEFINETerminalRuleCall_0();
|
||||
element = grammarAccess.getWMLMacroDefineAccess().getNameDEFINETerminalRuleCall_0_0();
|
||||
return obj;
|
||||
}
|
||||
return null;
|
||||
@ -1826,18 +1814,297 @@ protected class WMLMacroDefine_NameAssignment extends AssignmentToken {
|
||||
|
||||
}
|
||||
|
||||
// (Tags+=WMLTag | Keys+=WMLKey | MacroCalls+=WMLMacroCall | MacroDefines+=WMLMacroDefine | Textdomains+=WMLTextdomain)*
|
||||
protected class WMLMacroDefine_Alternatives_1 extends AlternativesToken {
|
||||
|
||||
public WMLMacroDefine_Alternatives_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
|
||||
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Alternatives getGrammarElement() {
|
||||
return grammarAccess.getWMLMacroDefineAccess().getAlternatives_1();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
|
||||
switch(index) {
|
||||
case 0: return new WMLMacroDefine_TagsAssignment_1_0(lastRuleCallOrigin, this, 0, inst);
|
||||
case 1: return new WMLMacroDefine_KeysAssignment_1_1(lastRuleCallOrigin, this, 1, inst);
|
||||
case 2: return new WMLMacroDefine_MacroCallsAssignment_1_2(lastRuleCallOrigin, this, 2, inst);
|
||||
case 3: return new WMLMacroDefine_MacroDefinesAssignment_1_3(lastRuleCallOrigin, this, 3, inst);
|
||||
case 4: return new WMLMacroDefine_TextdomainsAssignment_1_4(lastRuleCallOrigin, this, 4, inst);
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Tags+=WMLTag
|
||||
protected class WMLMacroDefine_TagsAssignment_1_0 extends AssignmentToken {
|
||||
|
||||
public WMLMacroDefine_TagsAssignment_1_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
|
||||
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Assignment getGrammarElement() {
|
||||
return grammarAccess.getWMLMacroDefineAccess().getTagsAssignment_1_0();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
|
||||
switch(index) {
|
||||
case 0: return new WMLTag_Group(this, this, 0, inst);
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IEObjectConsumer tryConsume() {
|
||||
if((value = eObjectConsumer.getConsumable("Tags",true)) == null) return null;
|
||||
IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("Tags");
|
||||
if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
|
||||
IEObjectConsumer param = createEObjectConsumer((EObject)value);
|
||||
if(param.isInstanceOf(grammarAccess.getWMLTagRule().getType().getClassifier())) {
|
||||
type = AssignmentType.PARSER_RULE_CALL;
|
||||
element = grammarAccess.getWMLMacroDefineAccess().getTagsWMLTagParserRuleCall_1_0_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 WMLMacroDefine_Alternatives_1(lastRuleCallOrigin, next, actIndex, consumed);
|
||||
case 1: return new WMLMacroDefine_NameAssignment_0(lastRuleCallOrigin, next, actIndex, consumed);
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Keys+=WMLKey
|
||||
protected class WMLMacroDefine_KeysAssignment_1_1 extends AssignmentToken {
|
||||
|
||||
public WMLMacroDefine_KeysAssignment_1_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
|
||||
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Assignment getGrammarElement() {
|
||||
return grammarAccess.getWMLMacroDefineAccess().getKeysAssignment_1_1();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
|
||||
switch(index) {
|
||||
case 0: return new WMLKey_Group(this, this, 0, inst);
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IEObjectConsumer tryConsume() {
|
||||
if((value = eObjectConsumer.getConsumable("Keys",true)) == null) return null;
|
||||
IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("Keys");
|
||||
if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
|
||||
IEObjectConsumer param = createEObjectConsumer((EObject)value);
|
||||
if(param.isInstanceOf(grammarAccess.getWMLKeyRule().getType().getClassifier())) {
|
||||
type = AssignmentType.PARSER_RULE_CALL;
|
||||
element = grammarAccess.getWMLMacroDefineAccess().getKeysWMLKeyParserRuleCall_1_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 WMLMacroDefine_Alternatives_1(lastRuleCallOrigin, next, actIndex, consumed);
|
||||
case 1: return new WMLMacroDefine_NameAssignment_0(lastRuleCallOrigin, next, actIndex, consumed);
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MacroCalls+=WMLMacroCall
|
||||
protected class WMLMacroDefine_MacroCallsAssignment_1_2 extends AssignmentToken {
|
||||
|
||||
public WMLMacroDefine_MacroCallsAssignment_1_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
|
||||
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Assignment getGrammarElement() {
|
||||
return grammarAccess.getWMLMacroDefineAccess().getMacroCallsAssignment_1_2();
|
||||
}
|
||||
|
||||
@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("MacroCalls",true)) == null) return null;
|
||||
IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("MacroCalls");
|
||||
if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
|
||||
IEObjectConsumer param = createEObjectConsumer((EObject)value);
|
||||
if(param.isInstanceOf(grammarAccess.getWMLMacroCallRule().getType().getClassifier())) {
|
||||
type = AssignmentType.PARSER_RULE_CALL;
|
||||
element = grammarAccess.getWMLMacroDefineAccess().getMacroCallsWMLMacroCallParserRuleCall_1_2_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 WMLMacroDefine_Alternatives_1(lastRuleCallOrigin, next, actIndex, consumed);
|
||||
case 1: return new WMLMacroDefine_NameAssignment_0(lastRuleCallOrigin, next, actIndex, consumed);
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MacroDefines+=WMLMacroDefine
|
||||
protected class WMLMacroDefine_MacroDefinesAssignment_1_3 extends AssignmentToken {
|
||||
|
||||
public WMLMacroDefine_MacroDefinesAssignment_1_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
|
||||
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Assignment getGrammarElement() {
|
||||
return grammarAccess.getWMLMacroDefineAccess().getMacroDefinesAssignment_1_3();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
|
||||
switch(index) {
|
||||
case 0: return new WMLMacroDefine_Group(this, this, 0, inst);
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IEObjectConsumer tryConsume() {
|
||||
if((value = eObjectConsumer.getConsumable("MacroDefines",true)) == null) return null;
|
||||
IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("MacroDefines");
|
||||
if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
|
||||
IEObjectConsumer param = createEObjectConsumer((EObject)value);
|
||||
if(param.isInstanceOf(grammarAccess.getWMLMacroDefineRule().getType().getClassifier())) {
|
||||
type = AssignmentType.PARSER_RULE_CALL;
|
||||
element = grammarAccess.getWMLMacroDefineAccess().getMacroDefinesWMLMacroDefineParserRuleCall_1_3_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 WMLMacroDefine_Alternatives_1(lastRuleCallOrigin, next, actIndex, consumed);
|
||||
case 1: return new WMLMacroDefine_NameAssignment_0(lastRuleCallOrigin, next, actIndex, consumed);
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Textdomains+=WMLTextdomain
|
||||
protected class WMLMacroDefine_TextdomainsAssignment_1_4 extends AssignmentToken {
|
||||
|
||||
public WMLMacroDefine_TextdomainsAssignment_1_4(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
|
||||
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Assignment getGrammarElement() {
|
||||
return grammarAccess.getWMLMacroDefineAccess().getTextdomainsAssignment_1_4();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
|
||||
switch(index) {
|
||||
case 0: return new WMLTextdomain_NameAssignment(this, this, 0, inst);
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IEObjectConsumer tryConsume() {
|
||||
if((value = eObjectConsumer.getConsumable("Textdomains",true)) == null) return null;
|
||||
IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("Textdomains");
|
||||
if(value instanceof EObject) { // org::eclipse::xtext::impl::RuleCallImpl
|
||||
IEObjectConsumer param = createEObjectConsumer((EObject)value);
|
||||
if(param.isInstanceOf(grammarAccess.getWMLTextdomainRule().getType().getClassifier())) {
|
||||
type = AssignmentType.PARSER_RULE_CALL;
|
||||
element = grammarAccess.getWMLMacroDefineAccess().getTextdomainsWMLTextdomainParserRuleCall_1_4_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 WMLMacroDefine_Alternatives_1(lastRuleCallOrigin, next, actIndex, consumed);
|
||||
case 1: return new WMLMacroDefine_NameAssignment_0(lastRuleCallOrigin, next, actIndex, consumed);
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ENDDEF
|
||||
protected class WMLMacroDefine_ENDDEFTerminalRuleCall_2 extends UnassignedTextToken {
|
||||
|
||||
public WMLMacroDefine_ENDDEFTerminalRuleCall_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
|
||||
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RuleCall getGrammarElement() {
|
||||
return grammarAccess.getWMLMacroDefineAccess().getENDDEFTerminalRuleCall_2();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
|
||||
switch(index) {
|
||||
case 0: return new WMLMacroDefine_Alternatives_1(lastRuleCallOrigin, this, 0, inst);
|
||||
case 1: return new WMLMacroDefine_NameAssignment_0(lastRuleCallOrigin, this, 1, inst);
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/************ end Rule WMLMacroDefine ****************/
|
||||
|
||||
|
||||
/************ begin Rule WMLTextdomain ****************
|
||||
*
|
||||
* // ( Tags += WMLTag
|
||||
* // | Keys += WMLKey
|
||||
* // | MacroCalls += WMLMacroCall
|
||||
* // | MacroDefines += WMLMacroDefine
|
||||
* // | Textdomains += WMLTextdomain
|
||||
* // )*;
|
||||
* // ENDDEF;
|
||||
* WMLTextdomain:
|
||||
* name=TEXTDOMAIN;
|
||||
*
|
||||
@ -1884,11 +2151,11 @@ protected class WMLTextdomain_NameAssignment extends AssignmentToken {
|
||||
/************ begin Rule WMLValue ****************
|
||||
*
|
||||
* WMLValue:
|
||||
* value=(ID | STRING | "+" | "~" | ANY_OTHER);
|
||||
* value+=(ID | STRING | "+" | "~" | ANY_OTHER)+;
|
||||
*
|
||||
**/
|
||||
|
||||
// value=(ID | STRING | "+" | "~" | ANY_OTHER)
|
||||
// value+=(ID | STRING | "+" | "~" | ANY_OTHER)+
|
||||
protected class WMLValue_ValueAssignment extends AssignmentToken {
|
||||
|
||||
public WMLValue_ValueAssignment(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
|
||||
@ -1903,14 +2170,13 @@ protected class WMLValue_ValueAssignment extends AssignmentToken {
|
||||
@Override
|
||||
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
|
||||
switch(index) {
|
||||
default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index, inst);
|
||||
case 0: return new WMLValue_ValueAssignment(lastRuleCallOrigin, this, 0, inst);
|
||||
default: return lastRuleCallOrigin.createFollowerAfterReturn(this, index, index - 1, inst);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IEObjectConsumer tryConsume() {
|
||||
if(getEObject().eClass() != grammarAccess.getWMLValueRule().getType().getClassifier())
|
||||
return null;
|
||||
if((value = eObjectConsumer.getConsumable("value",true)) == null) return null;
|
||||
IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("value");
|
||||
if(keywordSerializer.isValid(obj.getEObject(), grammarAccess.getWMLValueAccess().getValuePlusSignKeyword_0_2(), value, null)) {
|
||||
|
@ -489,7 +489,7 @@ ruleWMLKey returns [EObject current=null]
|
||||
associateNodeWithAstElement(currentNode.getParent(), $current);
|
||||
}
|
||||
try {
|
||||
add(
|
||||
set(
|
||||
$current,
|
||||
"value",
|
||||
lv_value_2_0,
|
||||
@ -501,54 +501,6 @@ ruleWMLKey returns [EObject current=null]
|
||||
currentNode = currentNode.getParent();
|
||||
}
|
||||
|
||||
)
|
||||
)+(
|
||||
(
|
||||
(
|
||||
lv_eol_3_1=RULE_EOL
|
||||
{
|
||||
createLeafNode(grammarAccess.getWMLKeyAccess().getEolEOLTerminalRuleCall_3_0_0(), "eol");
|
||||
}
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = factory.create(grammarAccess.getWMLKeyRule().getType().getClassifier());
|
||||
associateNodeWithAstElement(currentNode, $current);
|
||||
}
|
||||
try {
|
||||
set(
|
||||
$current,
|
||||
"eol",
|
||||
lv_eol_3_1,
|
||||
"EOL",
|
||||
lastConsumedNode);
|
||||
} catch (ValueConverterException vce) {
|
||||
handleValueConverterException(vce);
|
||||
}
|
||||
}
|
||||
|
||||
| lv_eol_3_2=RULE_SL_COMMENT
|
||||
{
|
||||
createLeafNode(grammarAccess.getWMLKeyAccess().getEolSL_COMMENTTerminalRuleCall_3_0_1(), "eol");
|
||||
}
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = factory.create(grammarAccess.getWMLKeyRule().getType().getClassifier());
|
||||
associateNodeWithAstElement(currentNode, $current);
|
||||
}
|
||||
try {
|
||||
set(
|
||||
$current,
|
||||
"eol",
|
||||
lv_eol_3_2,
|
||||
"SL_COMMENT",
|
||||
lastConsumedNode);
|
||||
} catch (ValueConverterException vce) {
|
||||
handleValueConverterException(vce);
|
||||
}
|
||||
}
|
||||
|
||||
)
|
||||
|
||||
)
|
||||
))
|
||||
;
|
||||
@ -1021,11 +973,11 @@ ruleWMLMacroDefine returns [EObject current=null]
|
||||
@after { resetLookahead();
|
||||
lastConsumedNode = currentNode;
|
||||
}:
|
||||
(
|
||||
((
|
||||
(
|
||||
lv_name_0_0=RULE_DEFINE
|
||||
{
|
||||
createLeafNode(grammarAccess.getWMLMacroDefineAccess().getNameDEFINETerminalRuleCall_0(), "name");
|
||||
createLeafNode(grammarAccess.getWMLMacroDefineAccess().getNameDEFINETerminalRuleCall_0_0(), "name");
|
||||
}
|
||||
{
|
||||
if ($current==null) {
|
||||
@ -1045,6 +997,134 @@ ruleWMLMacroDefine returns [EObject current=null]
|
||||
}
|
||||
|
||||
)
|
||||
)((
|
||||
(
|
||||
{
|
||||
currentNode=createCompositeNode(grammarAccess.getWMLMacroDefineAccess().getTagsWMLTagParserRuleCall_1_0_0(), currentNode);
|
||||
}
|
||||
lv_Tags_1_0=ruleWMLTag {
|
||||
if ($current==null) {
|
||||
$current = factory.create(grammarAccess.getWMLMacroDefineRule().getType().getClassifier());
|
||||
associateNodeWithAstElement(currentNode.getParent(), $current);
|
||||
}
|
||||
try {
|
||||
add(
|
||||
$current,
|
||||
"Tags",
|
||||
lv_Tags_1_0,
|
||||
"WMLTag",
|
||||
currentNode);
|
||||
} catch (ValueConverterException vce) {
|
||||
handleValueConverterException(vce);
|
||||
}
|
||||
currentNode = currentNode.getParent();
|
||||
}
|
||||
|
||||
)
|
||||
)
|
||||
|(
|
||||
(
|
||||
{
|
||||
currentNode=createCompositeNode(grammarAccess.getWMLMacroDefineAccess().getKeysWMLKeyParserRuleCall_1_1_0(), currentNode);
|
||||
}
|
||||
lv_Keys_2_0=ruleWMLKey {
|
||||
if ($current==null) {
|
||||
$current = factory.create(grammarAccess.getWMLMacroDefineRule().getType().getClassifier());
|
||||
associateNodeWithAstElement(currentNode.getParent(), $current);
|
||||
}
|
||||
try {
|
||||
add(
|
||||
$current,
|
||||
"Keys",
|
||||
lv_Keys_2_0,
|
||||
"WMLKey",
|
||||
currentNode);
|
||||
} catch (ValueConverterException vce) {
|
||||
handleValueConverterException(vce);
|
||||
}
|
||||
currentNode = currentNode.getParent();
|
||||
}
|
||||
|
||||
)
|
||||
)
|
||||
|(
|
||||
(
|
||||
{
|
||||
currentNode=createCompositeNode(grammarAccess.getWMLMacroDefineAccess().getMacroCallsWMLMacroCallParserRuleCall_1_2_0(), currentNode);
|
||||
}
|
||||
lv_MacroCalls_3_0=ruleWMLMacroCall {
|
||||
if ($current==null) {
|
||||
$current = factory.create(grammarAccess.getWMLMacroDefineRule().getType().getClassifier());
|
||||
associateNodeWithAstElement(currentNode.getParent(), $current);
|
||||
}
|
||||
try {
|
||||
add(
|
||||
$current,
|
||||
"MacroCalls",
|
||||
lv_MacroCalls_3_0,
|
||||
"WMLMacroCall",
|
||||
currentNode);
|
||||
} catch (ValueConverterException vce) {
|
||||
handleValueConverterException(vce);
|
||||
}
|
||||
currentNode = currentNode.getParent();
|
||||
}
|
||||
|
||||
)
|
||||
)
|
||||
|(
|
||||
(
|
||||
{
|
||||
currentNode=createCompositeNode(grammarAccess.getWMLMacroDefineAccess().getMacroDefinesWMLMacroDefineParserRuleCall_1_3_0(), currentNode);
|
||||
}
|
||||
lv_MacroDefines_4_0=ruleWMLMacroDefine {
|
||||
if ($current==null) {
|
||||
$current = factory.create(grammarAccess.getWMLMacroDefineRule().getType().getClassifier());
|
||||
associateNodeWithAstElement(currentNode.getParent(), $current);
|
||||
}
|
||||
try {
|
||||
add(
|
||||
$current,
|
||||
"MacroDefines",
|
||||
lv_MacroDefines_4_0,
|
||||
"WMLMacroDefine",
|
||||
currentNode);
|
||||
} catch (ValueConverterException vce) {
|
||||
handleValueConverterException(vce);
|
||||
}
|
||||
currentNode = currentNode.getParent();
|
||||
}
|
||||
|
||||
)
|
||||
)
|
||||
|(
|
||||
(
|
||||
{
|
||||
currentNode=createCompositeNode(grammarAccess.getWMLMacroDefineAccess().getTextdomainsWMLTextdomainParserRuleCall_1_4_0(), currentNode);
|
||||
}
|
||||
lv_Textdomains_5_0=ruleWMLTextdomain {
|
||||
if ($current==null) {
|
||||
$current = factory.create(grammarAccess.getWMLMacroDefineRule().getType().getClassifier());
|
||||
associateNodeWithAstElement(currentNode.getParent(), $current);
|
||||
}
|
||||
try {
|
||||
add(
|
||||
$current,
|
||||
"Textdomains",
|
||||
lv_Textdomains_5_0,
|
||||
"WMLTextdomain",
|
||||
currentNode);
|
||||
} catch (ValueConverterException vce) {
|
||||
handleValueConverterException(vce);
|
||||
}
|
||||
currentNode = currentNode.getParent();
|
||||
}
|
||||
|
||||
)
|
||||
))*RULE_ENDDEF
|
||||
{
|
||||
createLeafNode(grammarAccess.getWMLMacroDefineAccess().getENDDEFTerminalRuleCall_2(), null);
|
||||
}
|
||||
)
|
||||
;
|
||||
|
||||
@ -1128,7 +1208,7 @@ ruleWMLValue returns [EObject current=null]
|
||||
associateNodeWithAstElement(currentNode, $current);
|
||||
}
|
||||
try {
|
||||
set(
|
||||
add(
|
||||
$current,
|
||||
"value",
|
||||
lv_value_0_1,
|
||||
@ -1149,7 +1229,7 @@ ruleWMLValue returns [EObject current=null]
|
||||
associateNodeWithAstElement(currentNode, $current);
|
||||
}
|
||||
try {
|
||||
set(
|
||||
add(
|
||||
$current,
|
||||
"value",
|
||||
lv_value_0_2,
|
||||
@ -1172,7 +1252,7 @@ ruleWMLValue returns [EObject current=null]
|
||||
}
|
||||
|
||||
try {
|
||||
set($current, "value", lv_value_0_3, null, lastConsumedNode);
|
||||
add($current, "value", lv_value_0_3, null, lastConsumedNode);
|
||||
} catch (ValueConverterException vce) {
|
||||
handleValueConverterException(vce);
|
||||
}
|
||||
@ -1190,7 +1270,7 @@ ruleWMLValue returns [EObject current=null]
|
||||
}
|
||||
|
||||
try {
|
||||
set($current, "value", lv_value_0_4, null, lastConsumedNode);
|
||||
add($current, "value", lv_value_0_4, null, lastConsumedNode);
|
||||
} catch (ValueConverterException vce) {
|
||||
handleValueConverterException(vce);
|
||||
}
|
||||
@ -1206,7 +1286,7 @@ ruleWMLValue returns [EObject current=null]
|
||||
associateNodeWithAstElement(currentNode, $current);
|
||||
}
|
||||
try {
|
||||
set(
|
||||
add(
|
||||
$current,
|
||||
"value",
|
||||
lv_value_0_5,
|
||||
@ -1220,7 +1300,7 @@ ruleWMLValue returns [EObject current=null]
|
||||
)
|
||||
|
||||
)
|
||||
)
|
||||
)+
|
||||
;
|
||||
|
||||
|
||||
@ -1229,7 +1309,9 @@ ruleWMLValue returns [EObject current=null]
|
||||
|
||||
RULE_LUA_CODE : '<<' ( options {greedy=false;} : . )*'>>';
|
||||
|
||||
RULE_DEFINE : '#define' ( options {greedy=false;} : . )*'#enddef';
|
||||
RULE_DEFINE : '#define' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
||||
|
||||
RULE_ENDDEF : '#enddef' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
||||
|
||||
RULE_TEXTDOMAIN : '#textdomain' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
||||
|
||||
|
@ -1,19 +1,20 @@
|
||||
RULE_LUA_CODE=7
|
||||
RULE_LUA_CODE=5
|
||||
RULE_ID=4
|
||||
RULE_STRING=10
|
||||
RULE_DEFINE=8
|
||||
RULE_ANY_OTHER=11
|
||||
RULE_EOL=5
|
||||
RULE_TEXTDOMAIN=9
|
||||
RULE_STRING=9
|
||||
RULE_DEFINE=6
|
||||
RULE_ANY_OTHER=10
|
||||
RULE_ENDDEF=7
|
||||
RULE_EOL=11
|
||||
RULE_TEXTDOMAIN=8
|
||||
RULE_WS=12
|
||||
RULE_SL_COMMENT=6
|
||||
'}'=20
|
||||
'~'=19
|
||||
'='=17
|
||||
'('=21
|
||||
'[/'=16
|
||||
'['=13
|
||||
'+'=14
|
||||
')'=22
|
||||
'{'=18
|
||||
']'=15
|
||||
RULE_SL_COMMENT=13
|
||||
'}'=21
|
||||
'~'=20
|
||||
'='=18
|
||||
'('=22
|
||||
'[/'=17
|
||||
'['=14
|
||||
'+'=15
|
||||
')'=23
|
||||
'{'=19
|
||||
']'=16
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -7,42 +7,45 @@ package org.wesnoth.parser.antlr.internal;
|
||||
import org.eclipse.xtext.parser.antlr.Lexer;
|
||||
}
|
||||
|
||||
T13 : '[' ;
|
||||
T14 : '+' ;
|
||||
T15 : ']' ;
|
||||
T16 : '[/' ;
|
||||
T17 : '=' ;
|
||||
T18 : '{' ;
|
||||
T19 : '~' ;
|
||||
T20 : '}' ;
|
||||
T21 : '(' ;
|
||||
T22 : ')' ;
|
||||
T14 : '[' ;
|
||||
T15 : '+' ;
|
||||
T16 : ']' ;
|
||||
T17 : '[/' ;
|
||||
T18 : '=' ;
|
||||
T19 : '{' ;
|
||||
T20 : '~' ;
|
||||
T21 : '}' ;
|
||||
T22 : '(' ;
|
||||
T23 : ')' ;
|
||||
|
||||
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1230
|
||||
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1310
|
||||
RULE_LUA_CODE : '<<' ( options {greedy=false;} : . )*'>>';
|
||||
|
||||
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1232
|
||||
RULE_DEFINE : '#define' ( options {greedy=false;} : . )*'#enddef';
|
||||
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1312
|
||||
RULE_DEFINE : '#define' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
||||
|
||||
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1234
|
||||
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1314
|
||||
RULE_ENDDEF : '#enddef' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
||||
|
||||
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1316
|
||||
RULE_TEXTDOMAIN : '#textdomain' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
||||
|
||||
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1236
|
||||
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1318
|
||||
RULE_STRING : '"' ('\\' ('b'|'t'|'n'|'f'|'r'|'"'|'\''|'\\')|~(('\\'|'"')))* '"';
|
||||
|
||||
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1238
|
||||
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1320
|
||||
RULE_ID : ('a'..'z'|'A'..'Z'|'0'..'9'|'_'|'-'|',')+;
|
||||
|
||||
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1240
|
||||
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1322
|
||||
RULE_EOL : ('\r'|'\n');
|
||||
|
||||
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1242
|
||||
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1324
|
||||
RULE_WS : (' '|'\t')+;
|
||||
|
||||
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1244
|
||||
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1326
|
||||
RULE_ANY_OTHER : .;
|
||||
|
||||
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1246
|
||||
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1328
|
||||
RULE_SL_COMMENT : '#' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
||||
|
||||
|
||||
|
@ -31,7 +31,6 @@ public class WMLGrammarAccess extends AbstractGrammarElementFinder {
|
||||
////TODO: add cross-reference for variables
|
||||
////handles TODO:
|
||||
//// - preprocessor commands: #define, #enddef, etc
|
||||
//// - fix: { { } }
|
||||
//WMLRoot:
|
||||
// (Tags+=WMLTag | MacroCalls+=WMLMacroCall | MacroDefines+=WMLMacroDefine | Textdomains+=WMLTextdomain)*;
|
||||
public ParserRule getRule() { return rule; }
|
||||
@ -173,16 +172,12 @@ public class WMLGrammarAccess extends AbstractGrammarElementFinder {
|
||||
private final Keyword cEqualsSignKeyword_1 = (Keyword)cGroup.eContents().get(1);
|
||||
private final Assignment cValueAssignment_2 = (Assignment)cGroup.eContents().get(2);
|
||||
private final RuleCall cValueWMLKeyValueParserRuleCall_2_0 = (RuleCall)cValueAssignment_2.eContents().get(0);
|
||||
private final Assignment cEolAssignment_3 = (Assignment)cGroup.eContents().get(3);
|
||||
private final Alternatives cEolAlternatives_3_0 = (Alternatives)cEolAssignment_3.eContents().get(0);
|
||||
private final RuleCall cEolEOLTerminalRuleCall_3_0_0 = (RuleCall)cEolAlternatives_3_0.eContents().get(0);
|
||||
private final RuleCall cEolSL_COMMENTTerminalRuleCall_3_0_1 = (RuleCall)cEolAlternatives_3_0.eContents().get(1);
|
||||
|
||||
//WMLKey hidden(WS):
|
||||
// name=ID "=" value+=WMLKeyValue+ eol=(EOL | SL_COMMENT);
|
||||
// name=ID "=" value=WMLKeyValue;
|
||||
public ParserRule getRule() { return rule; }
|
||||
|
||||
//name=ID "=" value+=WMLKeyValue+ eol=(EOL | SL_COMMENT)
|
||||
//name=ID "=" value=WMLKeyValue
|
||||
public Group getGroup() { return cGroup; }
|
||||
|
||||
//name=ID
|
||||
@ -194,23 +189,11 @@ public class WMLGrammarAccess extends AbstractGrammarElementFinder {
|
||||
//"="
|
||||
public Keyword getEqualsSignKeyword_1() { return cEqualsSignKeyword_1; }
|
||||
|
||||
//value+=WMLKeyValue+
|
||||
//value=WMLKeyValue
|
||||
public Assignment getValueAssignment_2() { return cValueAssignment_2; }
|
||||
|
||||
//WMLKeyValue
|
||||
public RuleCall getValueWMLKeyValueParserRuleCall_2_0() { return cValueWMLKeyValueParserRuleCall_2_0; }
|
||||
|
||||
//eol=(EOL | SL_COMMENT)
|
||||
public Assignment getEolAssignment_3() { return cEolAssignment_3; }
|
||||
|
||||
//EOL | SL_COMMENT
|
||||
public Alternatives getEolAlternatives_3_0() { return cEolAlternatives_3_0; }
|
||||
|
||||
//EOL
|
||||
public RuleCall getEolEOLTerminalRuleCall_3_0_0() { return cEolEOLTerminalRuleCall_3_0_0; }
|
||||
|
||||
//SL_COMMENT
|
||||
public RuleCall getEolSL_COMMENTTerminalRuleCall_3_0_1() { return cEolSL_COMMENTTerminalRuleCall_3_0_1; }
|
||||
}
|
||||
|
||||
public class WMLKeyValueElements extends AbstractParserRuleElementFinder {
|
||||
@ -399,18 +382,72 @@ public class WMLGrammarAccess extends AbstractGrammarElementFinder {
|
||||
|
||||
public class WMLMacroDefineElements extends AbstractParserRuleElementFinder {
|
||||
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "WMLMacroDefine");
|
||||
private final Assignment cNameAssignment = (Assignment)rule.eContents().get(1);
|
||||
private final RuleCall cNameDEFINETerminalRuleCall_0 = (RuleCall)cNameAssignment.eContents().get(0);
|
||||
private final Group cGroup = (Group)rule.eContents().get(1);
|
||||
private final Assignment cNameAssignment_0 = (Assignment)cGroup.eContents().get(0);
|
||||
private final RuleCall cNameDEFINETerminalRuleCall_0_0 = (RuleCall)cNameAssignment_0.eContents().get(0);
|
||||
private final Alternatives cAlternatives_1 = (Alternatives)cGroup.eContents().get(1);
|
||||
private final Assignment cTagsAssignment_1_0 = (Assignment)cAlternatives_1.eContents().get(0);
|
||||
private final RuleCall cTagsWMLTagParserRuleCall_1_0_0 = (RuleCall)cTagsAssignment_1_0.eContents().get(0);
|
||||
private final Assignment cKeysAssignment_1_1 = (Assignment)cAlternatives_1.eContents().get(1);
|
||||
private final RuleCall cKeysWMLKeyParserRuleCall_1_1_0 = (RuleCall)cKeysAssignment_1_1.eContents().get(0);
|
||||
private final Assignment cMacroCallsAssignment_1_2 = (Assignment)cAlternatives_1.eContents().get(2);
|
||||
private final RuleCall cMacroCallsWMLMacroCallParserRuleCall_1_2_0 = (RuleCall)cMacroCallsAssignment_1_2.eContents().get(0);
|
||||
private final Assignment cMacroDefinesAssignment_1_3 = (Assignment)cAlternatives_1.eContents().get(3);
|
||||
private final RuleCall cMacroDefinesWMLMacroDefineParserRuleCall_1_3_0 = (RuleCall)cMacroDefinesAssignment_1_3.eContents().get(0);
|
||||
private final Assignment cTextdomainsAssignment_1_4 = (Assignment)cAlternatives_1.eContents().get(4);
|
||||
private final RuleCall cTextdomainsWMLTextdomainParserRuleCall_1_4_0 = (RuleCall)cTextdomainsAssignment_1_4.eContents().get(0);
|
||||
private final RuleCall cENDDEFTerminalRuleCall_2 = (RuleCall)cGroup.eContents().get(2);
|
||||
|
||||
//WMLMacroDefine:
|
||||
// name=DEFINE;
|
||||
// name=DEFINE (Tags+=WMLTag | Keys+=WMLKey | MacroCalls+=WMLMacroCall | MacroDefines+=WMLMacroDefine |
|
||||
// Textdomains+=WMLTextdomain)* ENDDEF;
|
||||
public ParserRule getRule() { return rule; }
|
||||
|
||||
//name=DEFINE (Tags+=WMLTag | Keys+=WMLKey | MacroCalls+=WMLMacroCall | MacroDefines+=WMLMacroDefine |
|
||||
//Textdomains+=WMLTextdomain)* ENDDEF
|
||||
public Group getGroup() { return cGroup; }
|
||||
|
||||
//name=DEFINE
|
||||
public Assignment getNameAssignment() { return cNameAssignment; }
|
||||
public Assignment getNameAssignment_0() { return cNameAssignment_0; }
|
||||
|
||||
//DEFINE
|
||||
public RuleCall getNameDEFINETerminalRuleCall_0() { return cNameDEFINETerminalRuleCall_0; }
|
||||
public RuleCall getNameDEFINETerminalRuleCall_0_0() { return cNameDEFINETerminalRuleCall_0_0; }
|
||||
|
||||
//(Tags+=WMLTag | Keys+=WMLKey | MacroCalls+=WMLMacroCall | MacroDefines+=WMLMacroDefine | Textdomains+=WMLTextdomain)*
|
||||
public Alternatives getAlternatives_1() { return cAlternatives_1; }
|
||||
|
||||
//Tags+=WMLTag
|
||||
public Assignment getTagsAssignment_1_0() { return cTagsAssignment_1_0; }
|
||||
|
||||
//WMLTag
|
||||
public RuleCall getTagsWMLTagParserRuleCall_1_0_0() { return cTagsWMLTagParserRuleCall_1_0_0; }
|
||||
|
||||
//Keys+=WMLKey
|
||||
public Assignment getKeysAssignment_1_1() { return cKeysAssignment_1_1; }
|
||||
|
||||
//WMLKey
|
||||
public RuleCall getKeysWMLKeyParserRuleCall_1_1_0() { return cKeysWMLKeyParserRuleCall_1_1_0; }
|
||||
|
||||
//MacroCalls+=WMLMacroCall
|
||||
public Assignment getMacroCallsAssignment_1_2() { return cMacroCallsAssignment_1_2; }
|
||||
|
||||
//WMLMacroCall
|
||||
public RuleCall getMacroCallsWMLMacroCallParserRuleCall_1_2_0() { return cMacroCallsWMLMacroCallParserRuleCall_1_2_0; }
|
||||
|
||||
//MacroDefines+=WMLMacroDefine
|
||||
public Assignment getMacroDefinesAssignment_1_3() { return cMacroDefinesAssignment_1_3; }
|
||||
|
||||
//WMLMacroDefine
|
||||
public RuleCall getMacroDefinesWMLMacroDefineParserRuleCall_1_3_0() { return cMacroDefinesWMLMacroDefineParserRuleCall_1_3_0; }
|
||||
|
||||
//Textdomains+=WMLTextdomain
|
||||
public Assignment getTextdomainsAssignment_1_4() { return cTextdomainsAssignment_1_4; }
|
||||
|
||||
//WMLTextdomain
|
||||
public RuleCall getTextdomainsWMLTextdomainParserRuleCall_1_4_0() { return cTextdomainsWMLTextdomainParserRuleCall_1_4_0; }
|
||||
|
||||
//ENDDEF
|
||||
public RuleCall getENDDEFTerminalRuleCall_2() { return cENDDEFTerminalRuleCall_2; }
|
||||
}
|
||||
|
||||
public class WMLTextdomainElements extends AbstractParserRuleElementFinder {
|
||||
@ -418,13 +455,6 @@ public class WMLGrammarAccess extends AbstractGrammarElementFinder {
|
||||
private final Assignment cNameAssignment = (Assignment)rule.eContents().get(1);
|
||||
private final RuleCall cNameTEXTDOMAINTerminalRuleCall_0 = (RuleCall)cNameAssignment.eContents().get(0);
|
||||
|
||||
//// ( Tags += WMLTag
|
||||
//// | Keys += WMLKey
|
||||
//// | MacroCalls += WMLMacroCall
|
||||
//// | MacroDefines += WMLMacroDefine
|
||||
//// | Textdomains += WMLTextdomain
|
||||
//// )*;
|
||||
//// ENDDEF;
|
||||
//WMLTextdomain:
|
||||
// name=TEXTDOMAIN;
|
||||
public ParserRule getRule() { return rule; }
|
||||
@ -447,10 +477,10 @@ public class WMLGrammarAccess extends AbstractGrammarElementFinder {
|
||||
private final RuleCall cValueANY_OTHERTerminalRuleCall_0_4 = (RuleCall)cValueAlternatives_0.eContents().get(4);
|
||||
|
||||
//WMLValue:
|
||||
// value=(ID | STRING | "+" | "~" | ANY_OTHER);
|
||||
// value+=(ID | STRING | "+" | "~" | ANY_OTHER)+;
|
||||
public ParserRule getRule() { return rule; }
|
||||
|
||||
//value=(ID | STRING | "+" | "~" | ANY_OTHER)
|
||||
//value+=(ID | STRING | "+" | "~" | ANY_OTHER)+
|
||||
public Assignment getValueAssignment() { return cValueAssignment; }
|
||||
|
||||
//ID | STRING | "+" | "~" | ANY_OTHER
|
||||
@ -486,6 +516,7 @@ public class WMLGrammarAccess extends AbstractGrammarElementFinder {
|
||||
private WMLValueElements pWMLValue;
|
||||
private TerminalRule tLUA_CODE;
|
||||
private TerminalRule tDEFINE;
|
||||
private TerminalRule tENDDEF;
|
||||
private TerminalRule tTEXTDOMAIN;
|
||||
private TerminalRule tSTRING;
|
||||
private TerminalRule tID;
|
||||
@ -510,7 +541,6 @@ public class WMLGrammarAccess extends AbstractGrammarElementFinder {
|
||||
////TODO: add cross-reference for variables
|
||||
////handles TODO:
|
||||
//// - preprocessor commands: #define, #enddef, etc
|
||||
//// - fix: { { } }
|
||||
//WMLRoot:
|
||||
// (Tags+=WMLTag | MacroCalls+=WMLMacroCall | MacroDefines+=WMLMacroDefine | Textdomains+=WMLTextdomain)*;
|
||||
public WMLRootElements getWMLRootAccess() {
|
||||
@ -533,7 +563,7 @@ public class WMLGrammarAccess extends AbstractGrammarElementFinder {
|
||||
}
|
||||
|
||||
//WMLKey hidden(WS):
|
||||
// name=ID "=" value+=WMLKeyValue+ eol=(EOL | SL_COMMENT);
|
||||
// name=ID "=" value=WMLKeyValue;
|
||||
public WMLKeyElements getWMLKeyAccess() {
|
||||
return (pWMLKey != null) ? pWMLKey : (pWMLKey = new WMLKeyElements());
|
||||
}
|
||||
@ -593,7 +623,8 @@ public class WMLGrammarAccess extends AbstractGrammarElementFinder {
|
||||
}
|
||||
|
||||
//WMLMacroDefine:
|
||||
// name=DEFINE;
|
||||
// name=DEFINE (Tags+=WMLTag | Keys+=WMLKey | MacroCalls+=WMLMacroCall | MacroDefines+=WMLMacroDefine |
|
||||
// Textdomains+=WMLTextdomain)* ENDDEF;
|
||||
public WMLMacroDefineElements getWMLMacroDefineAccess() {
|
||||
return (pWMLMacroDefine != null) ? pWMLMacroDefine : (pWMLMacroDefine = new WMLMacroDefineElements());
|
||||
}
|
||||
@ -602,13 +633,6 @@ public class WMLGrammarAccess extends AbstractGrammarElementFinder {
|
||||
return getWMLMacroDefineAccess().getRule();
|
||||
}
|
||||
|
||||
//// ( Tags += WMLTag
|
||||
//// | Keys += WMLKey
|
||||
//// | MacroCalls += WMLMacroCall
|
||||
//// | MacroDefines += WMLMacroDefine
|
||||
//// | Textdomains += WMLTextdomain
|
||||
//// )*;
|
||||
//// ENDDEF;
|
||||
//WMLTextdomain:
|
||||
// name=TEXTDOMAIN;
|
||||
public WMLTextdomainElements getWMLTextdomainAccess() {
|
||||
@ -620,7 +644,7 @@ public class WMLGrammarAccess extends AbstractGrammarElementFinder {
|
||||
}
|
||||
|
||||
//WMLValue:
|
||||
// value=(ID | STRING | "+" | "~" | ANY_OTHER);
|
||||
// value+=(ID | STRING | "+" | "~" | ANY_OTHER)+;
|
||||
public WMLValueElements getWMLValueAccess() {
|
||||
return (pWMLValue != null) ? pWMLValue : (pWMLValue = new WMLValueElements());
|
||||
}
|
||||
@ -635,14 +659,18 @@ public class WMLGrammarAccess extends AbstractGrammarElementFinder {
|
||||
return (tLUA_CODE != null) ? tLUA_CODE : (tLUA_CODE = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "LUA_CODE"));
|
||||
}
|
||||
|
||||
////!('\n'|'\r')* ('\r'? '\n')?;
|
||||
//terminal DEFINE:
|
||||
// "#define"->"#enddef";
|
||||
// "#define" !("\n" | "\r")* ("\r"? "\n")?;
|
||||
public TerminalRule getDEFINERule() {
|
||||
return (tDEFINE != null) ? tDEFINE : (tDEFINE = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "DEFINE"));
|
||||
}
|
||||
|
||||
////terminal ENDDEF : '#enddef' !('\n'|'\r')* ('\r'? '\n')?;
|
||||
//terminal ENDDEF:
|
||||
// "#enddef" !("\n" | "\r")* ("\r"? "\n")?;
|
||||
public TerminalRule getENDDEFRule() {
|
||||
return (tENDDEF != null) ? tENDDEF : (tENDDEF = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "ENDDEF"));
|
||||
}
|
||||
|
||||
//terminal TEXTDOMAIN:
|
||||
// "#textdomain" !("\n" | "\r")* ("\r"? "\n")?;
|
||||
public TerminalRule getTEXTDOMAINRule() {
|
||||
|
@ -6,8 +6,6 @@
|
||||
*/
|
||||
package org.wesnoth.wML;
|
||||
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
|
||||
/**
|
||||
@ -20,7 +18,6 @@ import org.eclipse.emf.ecore.EObject;
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wML.WMLKey#getName <em>Name</em>}</li>
|
||||
* <li>{@link org.wesnoth.wML.WMLKey#getValue <em>Value</em>}</li>
|
||||
* <li>{@link org.wesnoth.wML.WMLKey#getEol <em>Eol</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
@ -57,45 +54,29 @@ public interface WMLKey extends EObject
|
||||
void setName(String value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Value</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wML.WMLKeyValue}.
|
||||
* Returns the value of the '<em><b>Value</b></em>' containment reference.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Value</em>' containment reference list isn't clear,
|
||||
* If the meaning of the '<em>Value</em>' containment reference isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Value</em>' containment reference list.
|
||||
* @return the value of the '<em>Value</em>' containment reference.
|
||||
* @see #setValue(WMLKeyValue)
|
||||
* @see org.wesnoth.wML.WMLPackage#getWMLKey_Value()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLKeyValue> getValue();
|
||||
WMLKeyValue getValue();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Eol</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Eol</em>' attribute isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Eol</em>' attribute.
|
||||
* @see #setEol(String)
|
||||
* @see org.wesnoth.wML.WMLPackage#getWMLKey_Eol()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getEol();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wML.WMLKey#getEol <em>Eol</em>}' attribute.
|
||||
* Sets the value of the '{@link org.wesnoth.wML.WMLKey#getValue <em>Value</em>}' containment reference.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Eol</em>' attribute.
|
||||
* @see #getEol()
|
||||
* @param value the new value of the '<em>Value</em>' containment reference.
|
||||
* @see #getValue()
|
||||
* @generated
|
||||
*/
|
||||
void setEol(String value);
|
||||
void setValue(WMLKeyValue value);
|
||||
|
||||
} // WMLKey
|
||||
|
@ -6,6 +6,8 @@
|
||||
*/
|
||||
package org.wesnoth.wML;
|
||||
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
|
||||
/**
|
||||
@ -17,6 +19,11 @@ import org.eclipse.emf.ecore.EObject;
|
||||
* The following features are supported:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wML.WMLMacroDefine#getName <em>Name</em>}</li>
|
||||
* <li>{@link org.wesnoth.wML.WMLMacroDefine#getTags <em>Tags</em>}</li>
|
||||
* <li>{@link org.wesnoth.wML.WMLMacroDefine#getKeys <em>Keys</em>}</li>
|
||||
* <li>{@link org.wesnoth.wML.WMLMacroDefine#getMacroCalls <em>Macro Calls</em>}</li>
|
||||
* <li>{@link org.wesnoth.wML.WMLMacroDefine#getMacroDefines <em>Macro Defines</em>}</li>
|
||||
* <li>{@link org.wesnoth.wML.WMLMacroDefine#getTextdomains <em>Textdomains</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
@ -52,4 +59,84 @@ public interface WMLMacroDefine extends EObject
|
||||
*/
|
||||
void setName(String value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Tags</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wML.WMLTag}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Tags</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>Tags</em>' containment reference list.
|
||||
* @see org.wesnoth.wML.WMLPackage#getWMLMacroDefine_Tags()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLTag> getTags();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Keys</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wML.WMLKey}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Keys</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>Keys</em>' containment reference list.
|
||||
* @see org.wesnoth.wML.WMLPackage#getWMLMacroDefine_Keys()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLKey> getKeys();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Macro Calls</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>Macro Calls</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>Macro Calls</em>' containment reference list.
|
||||
* @see org.wesnoth.wML.WMLPackage#getWMLMacroDefine_MacroCalls()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLMacroCall> getMacroCalls();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Macro Defines</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wML.WMLMacroDefine}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Macro Defines</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>Macro Defines</em>' containment reference list.
|
||||
* @see org.wesnoth.wML.WMLPackage#getWMLMacroDefine_MacroDefines()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLMacroDefine> getMacroDefines();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Textdomains</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.wesnoth.wML.WMLTextdomain}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Textdomains</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>Textdomains</em>' containment reference list.
|
||||
* @see org.wesnoth.wML.WMLPackage#getWMLMacroDefine_Textdomains()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<WMLTextdomain> getTextdomains();
|
||||
|
||||
} // WMLMacroDefine
|
||||
|
@ -226,7 +226,7 @@ public interface WMLPackage extends EPackage
|
||||
int WML_KEY__NAME = 0;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Value</b></em>' containment reference list.
|
||||
* The feature id for the '<em><b>Value</b></em>' containment reference.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
@ -234,15 +234,6 @@ public interface WMLPackage extends EPackage
|
||||
*/
|
||||
int WML_KEY__VALUE = 1;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Eol</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_KEY__EOL = 2;
|
||||
|
||||
/**
|
||||
* The number of structural features of the '<em>Key</em>' class.
|
||||
* <!-- begin-user-doc -->
|
||||
@ -250,7 +241,7 @@ public interface WMLPackage extends EPackage
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_KEY_FEATURE_COUNT = 3;
|
||||
int WML_KEY_FEATURE_COUNT = 2;
|
||||
|
||||
/**
|
||||
* The meta object id for the '{@link org.wesnoth.wML.impl.WMLKeyValueImpl <em>Key Value</em>}' class.
|
||||
@ -429,6 +420,51 @@ public interface WMLPackage extends EPackage
|
||||
*/
|
||||
int WML_MACRO_DEFINE__NAME = 0;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Tags</b></em>' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_MACRO_DEFINE__TAGS = 1;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Keys</b></em>' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_MACRO_DEFINE__KEYS = 2;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Macro Calls</b></em>' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_MACRO_DEFINE__MACRO_CALLS = 3;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Macro Defines</b></em>' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_MACRO_DEFINE__MACRO_DEFINES = 4;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Textdomains</b></em>' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_MACRO_DEFINE__TEXTDOMAINS = 5;
|
||||
|
||||
/**
|
||||
* The number of structural features of the '<em>Macro Define</em>' class.
|
||||
* <!-- begin-user-doc -->
|
||||
@ -436,7 +472,7 @@ public interface WMLPackage extends EPackage
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WML_MACRO_DEFINE_FEATURE_COUNT = 1;
|
||||
int WML_MACRO_DEFINE_FEATURE_COUNT = 6;
|
||||
|
||||
/**
|
||||
* The meta object id for the '{@link org.wesnoth.wML.impl.WMLTextdomainImpl <em>Textdomain</em>}' class.
|
||||
@ -477,7 +513,7 @@ public interface WMLPackage extends EPackage
|
||||
int WML_VALUE = 10;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Value</b></em>' attribute.
|
||||
* The feature id for the '<em><b>Value</b></em>' attribute list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
@ -669,27 +705,16 @@ public interface WMLPackage extends EPackage
|
||||
EAttribute getWMLKey_Name();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the containment reference list '{@link org.wesnoth.wML.WMLKey#getValue <em>Value</em>}'.
|
||||
* Returns the meta object for the containment reference '{@link org.wesnoth.wML.WMLKey#getValue <em>Value</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for the containment reference list '<em>Value</em>'.
|
||||
* @return the meta object for the containment reference '<em>Value</em>'.
|
||||
* @see org.wesnoth.wML.WMLKey#getValue()
|
||||
* @see #getWMLKey()
|
||||
* @generated
|
||||
*/
|
||||
EReference getWMLKey_Value();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the attribute '{@link org.wesnoth.wML.WMLKey#getEol <em>Eol</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for the attribute '<em>Eol</em>'.
|
||||
* @see org.wesnoth.wML.WMLKey#getEol()
|
||||
* @see #getWMLKey()
|
||||
* @generated
|
||||
*/
|
||||
EAttribute getWMLKey_Eol();
|
||||
|
||||
/**
|
||||
* Returns the meta object for class '{@link org.wesnoth.wML.WMLKeyValue <em>Key Value</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
@ -838,6 +863,61 @@ public interface WMLPackage extends EPackage
|
||||
*/
|
||||
EAttribute getWMLMacroDefine_Name();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the containment reference list '{@link org.wesnoth.wML.WMLMacroDefine#getTags <em>Tags</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for the containment reference list '<em>Tags</em>'.
|
||||
* @see org.wesnoth.wML.WMLMacroDefine#getTags()
|
||||
* @see #getWMLMacroDefine()
|
||||
* @generated
|
||||
*/
|
||||
EReference getWMLMacroDefine_Tags();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the containment reference list '{@link org.wesnoth.wML.WMLMacroDefine#getKeys <em>Keys</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for the containment reference list '<em>Keys</em>'.
|
||||
* @see org.wesnoth.wML.WMLMacroDefine#getKeys()
|
||||
* @see #getWMLMacroDefine()
|
||||
* @generated
|
||||
*/
|
||||
EReference getWMLMacroDefine_Keys();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the containment reference list '{@link org.wesnoth.wML.WMLMacroDefine#getMacroCalls <em>Macro Calls</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for the containment reference list '<em>Macro Calls</em>'.
|
||||
* @see org.wesnoth.wML.WMLMacroDefine#getMacroCalls()
|
||||
* @see #getWMLMacroDefine()
|
||||
* @generated
|
||||
*/
|
||||
EReference getWMLMacroDefine_MacroCalls();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the containment reference list '{@link org.wesnoth.wML.WMLMacroDefine#getMacroDefines <em>Macro Defines</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for the containment reference list '<em>Macro Defines</em>'.
|
||||
* @see org.wesnoth.wML.WMLMacroDefine#getMacroDefines()
|
||||
* @see #getWMLMacroDefine()
|
||||
* @generated
|
||||
*/
|
||||
EReference getWMLMacroDefine_MacroDefines();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the containment reference list '{@link org.wesnoth.wML.WMLMacroDefine#getTextdomains <em>Textdomains</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for the containment reference list '<em>Textdomains</em>'.
|
||||
* @see org.wesnoth.wML.WMLMacroDefine#getTextdomains()
|
||||
* @see #getWMLMacroDefine()
|
||||
* @generated
|
||||
*/
|
||||
EReference getWMLMacroDefine_Textdomains();
|
||||
|
||||
/**
|
||||
* Returns the meta object for class '{@link org.wesnoth.wML.WMLTextdomain <em>Textdomain</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
@ -870,10 +950,10 @@ public interface WMLPackage extends EPackage
|
||||
EClass getWMLValue();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the attribute '{@link org.wesnoth.wML.WMLValue#getValue <em>Value</em>}'.
|
||||
* Returns the meta object for the attribute list '{@link org.wesnoth.wML.WMLValue#getValue <em>Value</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for the attribute '<em>Value</em>'.
|
||||
* @return the meta object for the attribute list '<em>Value</em>'.
|
||||
* @see org.wesnoth.wML.WMLValue#getValue()
|
||||
* @see #getWMLValue()
|
||||
* @generated
|
||||
@ -1038,21 +1118,13 @@ public interface WMLPackage extends EPackage
|
||||
EAttribute WML_KEY__NAME = eINSTANCE.getWMLKey_Name();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Value</b></em>' containment reference list feature.
|
||||
* The meta object literal for the '<em><b>Value</b></em>' containment reference feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
EReference WML_KEY__VALUE = eINSTANCE.getWMLKey_Value();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Eol</b></em>' attribute feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
EAttribute WML_KEY__EOL = eINSTANCE.getWMLKey_Eol();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '{@link org.wesnoth.wML.impl.WMLKeyValueImpl <em>Key Value</em>}' class.
|
||||
* <!-- begin-user-doc -->
|
||||
@ -1177,6 +1249,46 @@ public interface WMLPackage extends EPackage
|
||||
*/
|
||||
EAttribute WML_MACRO_DEFINE__NAME = eINSTANCE.getWMLMacroDefine_Name();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Tags</b></em>' containment reference list feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
EReference WML_MACRO_DEFINE__TAGS = eINSTANCE.getWMLMacroDefine_Tags();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Keys</b></em>' containment reference list feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
EReference WML_MACRO_DEFINE__KEYS = eINSTANCE.getWMLMacroDefine_Keys();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Macro Calls</b></em>' containment reference list feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
EReference WML_MACRO_DEFINE__MACRO_CALLS = eINSTANCE.getWMLMacroDefine_MacroCalls();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Macro Defines</b></em>' containment reference list feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
EReference WML_MACRO_DEFINE__MACRO_DEFINES = eINSTANCE.getWMLMacroDefine_MacroDefines();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Textdomains</b></em>' containment reference list feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
EReference WML_MACRO_DEFINE__TEXTDOMAINS = eINSTANCE.getWMLMacroDefine_Textdomains();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '{@link org.wesnoth.wML.impl.WMLTextdomainImpl <em>Textdomain</em>}' class.
|
||||
* <!-- begin-user-doc -->
|
||||
@ -1206,7 +1318,7 @@ public interface WMLPackage extends EPackage
|
||||
EClass WML_VALUE = eINSTANCE.getWMLValue();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Value</b></em>' attribute feature.
|
||||
* The meta object literal for the '<em><b>Value</b></em>' attribute list feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
|
@ -6,6 +6,7 @@
|
||||
*/
|
||||
package org.wesnoth.wML;
|
||||
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
@ -26,29 +27,19 @@ package org.wesnoth.wML;
|
||||
public interface WMLValue extends WMLKeyValue
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Value</b></em>' attribute.
|
||||
* Returns the value of the '<em><b>Value</b></em>' attribute list.
|
||||
* The list contents are of type {@link java.lang.String}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Value</em>' attribute isn't clear,
|
||||
* If the meaning of the '<em>Value</em>' attribute list isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Value</em>' attribute.
|
||||
* @see #setValue(String)
|
||||
* @return the value of the '<em>Value</em>' attribute list.
|
||||
* @see org.wesnoth.wML.WMLPackage#getWMLValue_Value()
|
||||
* @model
|
||||
* @model unique="false"
|
||||
* @generated
|
||||
*/
|
||||
String getValue();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.wesnoth.wML.WMLValue#getValue <em>Value</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Value</em>' attribute.
|
||||
* @see #getValue()
|
||||
* @generated
|
||||
*/
|
||||
void setValue(String value);
|
||||
EList<String> getValue();
|
||||
|
||||
} // WMLValue
|
||||
|
@ -6,22 +6,15 @@
|
||||
*/
|
||||
package org.wesnoth.wML.impl;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.eclipse.emf.common.notify.Notification;
|
||||
import org.eclipse.emf.common.notify.NotificationChain;
|
||||
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
|
||||
import org.eclipse.emf.ecore.EClass;
|
||||
import org.eclipse.emf.ecore.InternalEObject;
|
||||
|
||||
import org.eclipse.emf.ecore.impl.ENotificationImpl;
|
||||
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
|
||||
|
||||
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
|
||||
import org.eclipse.emf.ecore.util.InternalEList;
|
||||
|
||||
import org.wesnoth.wML.WMLKey;
|
||||
import org.wesnoth.wML.WMLKeyValue;
|
||||
import org.wesnoth.wML.WMLPackage;
|
||||
@ -35,7 +28,6 @@ import org.wesnoth.wML.WMLPackage;
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wML.impl.WMLKeyImpl#getName <em>Name</em>}</li>
|
||||
* <li>{@link org.wesnoth.wML.impl.WMLKeyImpl#getValue <em>Value</em>}</li>
|
||||
* <li>{@link org.wesnoth.wML.impl.WMLKeyImpl#getEol <em>Eol</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
@ -64,34 +56,14 @@ public class WMLKeyImpl extends MinimalEObjectImpl.Container implements WMLKey
|
||||
protected String name = NAME_EDEFAULT;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getValue() <em>Value</em>}' containment reference list.
|
||||
* The cached value of the '{@link #getValue() <em>Value</em>}' containment reference.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getValue()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected EList<WMLKeyValue> value;
|
||||
|
||||
/**
|
||||
* The default value of the '{@link #getEol() <em>Eol</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getEol()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final String EOL_EDEFAULT = null;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getEol() <em>Eol</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getEol()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected String eol = EOL_EDEFAULT;
|
||||
protected WMLKeyValue value;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
@ -142,12 +114,8 @@ public class WMLKeyImpl extends MinimalEObjectImpl.Container implements WMLKey
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EList<WMLKeyValue> getValue()
|
||||
public WMLKeyValue getValue()
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
value = new EObjectContainmentEList<WMLKeyValue>(WMLKeyValue.class, this, WMLPackage.WML_KEY__VALUE);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
@ -156,9 +124,16 @@ public class WMLKeyImpl extends MinimalEObjectImpl.Container implements WMLKey
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public String getEol()
|
||||
public NotificationChain basicSetValue(WMLKeyValue newValue, NotificationChain msgs)
|
||||
{
|
||||
return eol;
|
||||
WMLKeyValue oldValue = value;
|
||||
value = newValue;
|
||||
if (eNotificationRequired())
|
||||
{
|
||||
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, WMLPackage.WML_KEY__VALUE, oldValue, newValue);
|
||||
if (msgs == null) msgs = notification; else msgs.add(notification);
|
||||
}
|
||||
return msgs;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -166,12 +141,20 @@ public class WMLKeyImpl extends MinimalEObjectImpl.Container implements WMLKey
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setEol(String newEol)
|
||||
public void setValue(WMLKeyValue newValue)
|
||||
{
|
||||
String oldEol = eol;
|
||||
eol = newEol;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WMLPackage.WML_KEY__EOL, oldEol, eol));
|
||||
if (newValue != value)
|
||||
{
|
||||
NotificationChain msgs = null;
|
||||
if (value != null)
|
||||
msgs = ((InternalEObject)value).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - WMLPackage.WML_KEY__VALUE, null, msgs);
|
||||
if (newValue != null)
|
||||
msgs = ((InternalEObject)newValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - WMLPackage.WML_KEY__VALUE, null, msgs);
|
||||
msgs = basicSetValue(newValue, msgs);
|
||||
if (msgs != null) msgs.dispatch();
|
||||
}
|
||||
else if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WMLPackage.WML_KEY__VALUE, newValue, newValue));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -185,7 +168,7 @@ public class WMLKeyImpl extends MinimalEObjectImpl.Container implements WMLKey
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.WML_KEY__VALUE:
|
||||
return ((InternalEList<?>)getValue()).basicRemove(otherEnd, msgs);
|
||||
return basicSetValue(null, msgs);
|
||||
}
|
||||
return super.eInverseRemove(otherEnd, featureID, msgs);
|
||||
}
|
||||
@ -204,8 +187,6 @@ public class WMLKeyImpl extends MinimalEObjectImpl.Container implements WMLKey
|
||||
return getName();
|
||||
case WMLPackage.WML_KEY__VALUE:
|
||||
return getValue();
|
||||
case WMLPackage.WML_KEY__EOL:
|
||||
return getEol();
|
||||
}
|
||||
return super.eGet(featureID, resolve, coreType);
|
||||
}
|
||||
@ -215,7 +196,6 @@ public class WMLKeyImpl extends MinimalEObjectImpl.Container implements WMLKey
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void eSet(int featureID, Object newValue)
|
||||
{
|
||||
@ -225,11 +205,7 @@ public class WMLKeyImpl extends MinimalEObjectImpl.Container implements WMLKey
|
||||
setName((String)newValue);
|
||||
return;
|
||||
case WMLPackage.WML_KEY__VALUE:
|
||||
getValue().clear();
|
||||
getValue().addAll((Collection<? extends WMLKeyValue>)newValue);
|
||||
return;
|
||||
case WMLPackage.WML_KEY__EOL:
|
||||
setEol((String)newValue);
|
||||
setValue((WMLKeyValue)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
@ -249,10 +225,7 @@ public class WMLKeyImpl extends MinimalEObjectImpl.Container implements WMLKey
|
||||
setName(NAME_EDEFAULT);
|
||||
return;
|
||||
case WMLPackage.WML_KEY__VALUE:
|
||||
getValue().clear();
|
||||
return;
|
||||
case WMLPackage.WML_KEY__EOL:
|
||||
setEol(EOL_EDEFAULT);
|
||||
setValue((WMLKeyValue)null);
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
@ -271,9 +244,7 @@ public class WMLKeyImpl extends MinimalEObjectImpl.Container implements WMLKey
|
||||
case WMLPackage.WML_KEY__NAME:
|
||||
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
|
||||
case WMLPackage.WML_KEY__VALUE:
|
||||
return value != null && !value.isEmpty();
|
||||
case WMLPackage.WML_KEY__EOL:
|
||||
return EOL_EDEFAULT == null ? eol != null : !EOL_EDEFAULT.equals(eol);
|
||||
return value != null;
|
||||
}
|
||||
return super.eIsSet(featureID);
|
||||
}
|
||||
@ -291,8 +262,6 @@ public class WMLKeyImpl extends MinimalEObjectImpl.Container implements WMLKey
|
||||
StringBuffer result = new StringBuffer(super.toString());
|
||||
result.append(" (name: ");
|
||||
result.append(name);
|
||||
result.append(", eol: ");
|
||||
result.append(eol);
|
||||
result.append(')');
|
||||
return result.toString();
|
||||
}
|
||||
|
@ -6,15 +6,28 @@
|
||||
*/
|
||||
package org.wesnoth.wML.impl;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.eclipse.emf.common.notify.Notification;
|
||||
import org.eclipse.emf.common.notify.NotificationChain;
|
||||
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
|
||||
import org.eclipse.emf.ecore.EClass;
|
||||
import org.eclipse.emf.ecore.InternalEObject;
|
||||
|
||||
import org.eclipse.emf.ecore.impl.ENotificationImpl;
|
||||
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
|
||||
|
||||
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
|
||||
import org.eclipse.emf.ecore.util.InternalEList;
|
||||
|
||||
import org.wesnoth.wML.WMLKey;
|
||||
import org.wesnoth.wML.WMLMacroCall;
|
||||
import org.wesnoth.wML.WMLMacroDefine;
|
||||
import org.wesnoth.wML.WMLPackage;
|
||||
import org.wesnoth.wML.WMLTag;
|
||||
import org.wesnoth.wML.WMLTextdomain;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
@ -24,6 +37,11 @@ import org.wesnoth.wML.WMLPackage;
|
||||
* The following features are implemented:
|
||||
* <ul>
|
||||
* <li>{@link org.wesnoth.wML.impl.WMLMacroDefineImpl#getName <em>Name</em>}</li>
|
||||
* <li>{@link org.wesnoth.wML.impl.WMLMacroDefineImpl#getTags <em>Tags</em>}</li>
|
||||
* <li>{@link org.wesnoth.wML.impl.WMLMacroDefineImpl#getKeys <em>Keys</em>}</li>
|
||||
* <li>{@link org.wesnoth.wML.impl.WMLMacroDefineImpl#getMacroCalls <em>Macro Calls</em>}</li>
|
||||
* <li>{@link org.wesnoth.wML.impl.WMLMacroDefineImpl#getMacroDefines <em>Macro Defines</em>}</li>
|
||||
* <li>{@link org.wesnoth.wML.impl.WMLMacroDefineImpl#getTextdomains <em>Textdomains</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
@ -51,6 +69,56 @@ public class WMLMacroDefineImpl extends MinimalEObjectImpl.Container implements
|
||||
*/
|
||||
protected String name = NAME_EDEFAULT;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getTags() <em>Tags</em>}' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getTags()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected EList<WMLTag> tags;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getKeys() <em>Keys</em>}' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getKeys()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected EList<WMLKey> keys;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getMacroCalls() <em>Macro Calls</em>}' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getMacroCalls()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected EList<WMLMacroCall> macroCalls;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getMacroDefines() <em>Macro Defines</em>}' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getMacroDefines()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected EList<WMLMacroDefine> macroDefines;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getTextdomains() <em>Textdomains</em>}' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getTextdomains()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected EList<WMLTextdomain> textdomains;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
@ -95,6 +163,100 @@ public class WMLMacroDefineImpl extends MinimalEObjectImpl.Container implements
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WMLPackage.WML_MACRO_DEFINE__NAME, oldName, name));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EList<WMLTag> getTags()
|
||||
{
|
||||
if (tags == null)
|
||||
{
|
||||
tags = new EObjectContainmentEList<WMLTag>(WMLTag.class, this, WMLPackage.WML_MACRO_DEFINE__TAGS);
|
||||
}
|
||||
return tags;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EList<WMLKey> getKeys()
|
||||
{
|
||||
if (keys == null)
|
||||
{
|
||||
keys = new EObjectContainmentEList<WMLKey>(WMLKey.class, this, WMLPackage.WML_MACRO_DEFINE__KEYS);
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EList<WMLMacroCall> getMacroCalls()
|
||||
{
|
||||
if (macroCalls == null)
|
||||
{
|
||||
macroCalls = new EObjectContainmentEList<WMLMacroCall>(WMLMacroCall.class, this, WMLPackage.WML_MACRO_DEFINE__MACRO_CALLS);
|
||||
}
|
||||
return macroCalls;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EList<WMLMacroDefine> getMacroDefines()
|
||||
{
|
||||
if (macroDefines == null)
|
||||
{
|
||||
macroDefines = new EObjectContainmentEList<WMLMacroDefine>(WMLMacroDefine.class, this, WMLPackage.WML_MACRO_DEFINE__MACRO_DEFINES);
|
||||
}
|
||||
return macroDefines;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EList<WMLTextdomain> getTextdomains()
|
||||
{
|
||||
if (textdomains == null)
|
||||
{
|
||||
textdomains = new EObjectContainmentEList<WMLTextdomain>(WMLTextdomain.class, this, WMLPackage.WML_MACRO_DEFINE__TEXTDOMAINS);
|
||||
}
|
||||
return textdomains;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.WML_MACRO_DEFINE__TAGS:
|
||||
return ((InternalEList<?>)getTags()).basicRemove(otherEnd, msgs);
|
||||
case WMLPackage.WML_MACRO_DEFINE__KEYS:
|
||||
return ((InternalEList<?>)getKeys()).basicRemove(otherEnd, msgs);
|
||||
case WMLPackage.WML_MACRO_DEFINE__MACRO_CALLS:
|
||||
return ((InternalEList<?>)getMacroCalls()).basicRemove(otherEnd, msgs);
|
||||
case WMLPackage.WML_MACRO_DEFINE__MACRO_DEFINES:
|
||||
return ((InternalEList<?>)getMacroDefines()).basicRemove(otherEnd, msgs);
|
||||
case WMLPackage.WML_MACRO_DEFINE__TEXTDOMAINS:
|
||||
return ((InternalEList<?>)getTextdomains()).basicRemove(otherEnd, msgs);
|
||||
}
|
||||
return super.eInverseRemove(otherEnd, featureID, msgs);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
@ -107,6 +269,16 @@ public class WMLMacroDefineImpl extends MinimalEObjectImpl.Container implements
|
||||
{
|
||||
case WMLPackage.WML_MACRO_DEFINE__NAME:
|
||||
return getName();
|
||||
case WMLPackage.WML_MACRO_DEFINE__TAGS:
|
||||
return getTags();
|
||||
case WMLPackage.WML_MACRO_DEFINE__KEYS:
|
||||
return getKeys();
|
||||
case WMLPackage.WML_MACRO_DEFINE__MACRO_CALLS:
|
||||
return getMacroCalls();
|
||||
case WMLPackage.WML_MACRO_DEFINE__MACRO_DEFINES:
|
||||
return getMacroDefines();
|
||||
case WMLPackage.WML_MACRO_DEFINE__TEXTDOMAINS:
|
||||
return getTextdomains();
|
||||
}
|
||||
return super.eGet(featureID, resolve, coreType);
|
||||
}
|
||||
@ -116,6 +288,7 @@ public class WMLMacroDefineImpl extends MinimalEObjectImpl.Container implements
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void eSet(int featureID, Object newValue)
|
||||
{
|
||||
@ -124,6 +297,26 @@ public class WMLMacroDefineImpl extends MinimalEObjectImpl.Container implements
|
||||
case WMLPackage.WML_MACRO_DEFINE__NAME:
|
||||
setName((String)newValue);
|
||||
return;
|
||||
case WMLPackage.WML_MACRO_DEFINE__TAGS:
|
||||
getTags().clear();
|
||||
getTags().addAll((Collection<? extends WMLTag>)newValue);
|
||||
return;
|
||||
case WMLPackage.WML_MACRO_DEFINE__KEYS:
|
||||
getKeys().clear();
|
||||
getKeys().addAll((Collection<? extends WMLKey>)newValue);
|
||||
return;
|
||||
case WMLPackage.WML_MACRO_DEFINE__MACRO_CALLS:
|
||||
getMacroCalls().clear();
|
||||
getMacroCalls().addAll((Collection<? extends WMLMacroCall>)newValue);
|
||||
return;
|
||||
case WMLPackage.WML_MACRO_DEFINE__MACRO_DEFINES:
|
||||
getMacroDefines().clear();
|
||||
getMacroDefines().addAll((Collection<? extends WMLMacroDefine>)newValue);
|
||||
return;
|
||||
case WMLPackage.WML_MACRO_DEFINE__TEXTDOMAINS:
|
||||
getTextdomains().clear();
|
||||
getTextdomains().addAll((Collection<? extends WMLTextdomain>)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
@ -141,6 +334,21 @@ public class WMLMacroDefineImpl extends MinimalEObjectImpl.Container implements
|
||||
case WMLPackage.WML_MACRO_DEFINE__NAME:
|
||||
setName(NAME_EDEFAULT);
|
||||
return;
|
||||
case WMLPackage.WML_MACRO_DEFINE__TAGS:
|
||||
getTags().clear();
|
||||
return;
|
||||
case WMLPackage.WML_MACRO_DEFINE__KEYS:
|
||||
getKeys().clear();
|
||||
return;
|
||||
case WMLPackage.WML_MACRO_DEFINE__MACRO_CALLS:
|
||||
getMacroCalls().clear();
|
||||
return;
|
||||
case WMLPackage.WML_MACRO_DEFINE__MACRO_DEFINES:
|
||||
getMacroDefines().clear();
|
||||
return;
|
||||
case WMLPackage.WML_MACRO_DEFINE__TEXTDOMAINS:
|
||||
getTextdomains().clear();
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
@ -157,6 +365,16 @@ public class WMLMacroDefineImpl extends MinimalEObjectImpl.Container implements
|
||||
{
|
||||
case WMLPackage.WML_MACRO_DEFINE__NAME:
|
||||
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
|
||||
case WMLPackage.WML_MACRO_DEFINE__TAGS:
|
||||
return tags != null && !tags.isEmpty();
|
||||
case WMLPackage.WML_MACRO_DEFINE__KEYS:
|
||||
return keys != null && !keys.isEmpty();
|
||||
case WMLPackage.WML_MACRO_DEFINE__MACRO_CALLS:
|
||||
return macroCalls != null && !macroCalls.isEmpty();
|
||||
case WMLPackage.WML_MACRO_DEFINE__MACRO_DEFINES:
|
||||
return macroDefines != null && !macroDefines.isEmpty();
|
||||
case WMLPackage.WML_MACRO_DEFINE__TEXTDOMAINS:
|
||||
return textdomains != null && !textdomains.isEmpty();
|
||||
}
|
||||
return super.eIsSet(featureID);
|
||||
}
|
||||
|
@ -345,16 +345,6 @@ public class WMLPackageImpl extends EPackageImpl implements WMLPackage
|
||||
return (EReference)wmlKeyEClass.getEStructuralFeatures().get(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EAttribute getWMLKey_Eol()
|
||||
{
|
||||
return (EAttribute)wmlKeyEClass.getEStructuralFeatures().get(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
@ -495,6 +485,56 @@ public class WMLPackageImpl extends EPackageImpl implements WMLPackage
|
||||
return (EAttribute)wmlMacroDefineEClass.getEStructuralFeatures().get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EReference getWMLMacroDefine_Tags()
|
||||
{
|
||||
return (EReference)wmlMacroDefineEClass.getEStructuralFeatures().get(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EReference getWMLMacroDefine_Keys()
|
||||
{
|
||||
return (EReference)wmlMacroDefineEClass.getEStructuralFeatures().get(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EReference getWMLMacroDefine_MacroCalls()
|
||||
{
|
||||
return (EReference)wmlMacroDefineEClass.getEStructuralFeatures().get(3);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EReference getWMLMacroDefine_MacroDefines()
|
||||
{
|
||||
return (EReference)wmlMacroDefineEClass.getEStructuralFeatures().get(4);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EReference getWMLMacroDefine_Textdomains()
|
||||
{
|
||||
return (EReference)wmlMacroDefineEClass.getEStructuralFeatures().get(5);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
@ -584,7 +624,6 @@ public class WMLPackageImpl extends EPackageImpl implements WMLPackage
|
||||
wmlKeyEClass = createEClass(WML_KEY);
|
||||
createEAttribute(wmlKeyEClass, WML_KEY__NAME);
|
||||
createEReference(wmlKeyEClass, WML_KEY__VALUE);
|
||||
createEAttribute(wmlKeyEClass, WML_KEY__EOL);
|
||||
|
||||
wmlKeyValueEClass = createEClass(WML_KEY_VALUE);
|
||||
|
||||
@ -605,6 +644,11 @@ public class WMLPackageImpl extends EPackageImpl implements WMLPackage
|
||||
|
||||
wmlMacroDefineEClass = createEClass(WML_MACRO_DEFINE);
|
||||
createEAttribute(wmlMacroDefineEClass, WML_MACRO_DEFINE__NAME);
|
||||
createEReference(wmlMacroDefineEClass, WML_MACRO_DEFINE__TAGS);
|
||||
createEReference(wmlMacroDefineEClass, WML_MACRO_DEFINE__KEYS);
|
||||
createEReference(wmlMacroDefineEClass, WML_MACRO_DEFINE__MACRO_CALLS);
|
||||
createEReference(wmlMacroDefineEClass, WML_MACRO_DEFINE__MACRO_DEFINES);
|
||||
createEReference(wmlMacroDefineEClass, WML_MACRO_DEFINE__TEXTDOMAINS);
|
||||
|
||||
wmlTextdomainEClass = createEClass(WML_TEXTDOMAIN);
|
||||
createEAttribute(wmlTextdomainEClass, WML_TEXTDOMAIN__NAME);
|
||||
@ -666,8 +710,7 @@ public class WMLPackageImpl extends EPackageImpl implements WMLPackage
|
||||
|
||||
initEClass(wmlKeyEClass, WMLKey.class, "WMLKey", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
initEAttribute(getWMLKey_Name(), ecorePackage.getEString(), "name", null, 0, 1, WMLKey.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEReference(getWMLKey_Value(), this.getWMLKeyValue(), null, "value", null, 0, -1, WMLKey.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEAttribute(getWMLKey_Eol(), ecorePackage.getEString(), "eol", null, 0, 1, WMLKey.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEReference(getWMLKey_Value(), this.getWMLKeyValue(), null, "value", null, 0, 1, WMLKey.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
||||
initEClass(wmlKeyValueEClass, WMLKeyValue.class, "WMLKeyValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
|
||||
@ -688,12 +731,17 @@ public class WMLPackageImpl extends EPackageImpl implements WMLPackage
|
||||
|
||||
initEClass(wmlMacroDefineEClass, WMLMacroDefine.class, "WMLMacroDefine", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
initEAttribute(getWMLMacroDefine_Name(), ecorePackage.getEString(), "name", null, 0, 1, WMLMacroDefine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEReference(getWMLMacroDefine_Tags(), this.getWMLTag(), null, "Tags", null, 0, -1, WMLMacroDefine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEReference(getWMLMacroDefine_Keys(), this.getWMLKey(), null, "Keys", null, 0, -1, WMLMacroDefine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEReference(getWMLMacroDefine_MacroCalls(), this.getWMLMacroCall(), null, "MacroCalls", null, 0, -1, WMLMacroDefine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEReference(getWMLMacroDefine_MacroDefines(), this.getWMLMacroDefine(), null, "MacroDefines", null, 0, -1, WMLMacroDefine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEReference(getWMLMacroDefine_Textdomains(), this.getWMLTextdomain(), null, "Textdomains", null, 0, -1, WMLMacroDefine.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
||||
initEClass(wmlTextdomainEClass, WMLTextdomain.class, "WMLTextdomain", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
initEAttribute(getWMLTextdomain_Name(), ecorePackage.getEString(), "name", null, 0, 1, WMLTextdomain.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
||||
initEClass(wmlValueEClass, WMLValue.class, "WMLValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
initEAttribute(getWMLValue_Value(), ecorePackage.getEString(), "value", null, 0, 1, WMLValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEAttribute(getWMLValue_Value(), ecorePackage.getEString(), "value", null, 0, -1, WMLValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
||||
// Create resource
|
||||
createResource(eNS_URI);
|
||||
|
@ -6,11 +6,13 @@
|
||||
*/
|
||||
package org.wesnoth.wML.impl;
|
||||
|
||||
import org.eclipse.emf.common.notify.Notification;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
|
||||
import org.eclipse.emf.ecore.EClass;
|
||||
|
||||
import org.eclipse.emf.ecore.impl.ENotificationImpl;
|
||||
import org.eclipse.emf.ecore.util.EDataTypeEList;
|
||||
|
||||
import org.wesnoth.wML.WMLPackage;
|
||||
import org.wesnoth.wML.WMLValue;
|
||||
@ -31,24 +33,14 @@ import org.wesnoth.wML.WMLValue;
|
||||
public class WMLValueImpl extends WMLKeyValueImpl implements WMLValue
|
||||
{
|
||||
/**
|
||||
* The default value of the '{@link #getValue() <em>Value</em>}' attribute.
|
||||
* The cached value of the '{@link #getValue() <em>Value</em>}' attribute list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getValue()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final String VALUE_EDEFAULT = null;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getValue()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected String value = VALUE_EDEFAULT;
|
||||
protected EList<String> value;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
@ -76,24 +68,15 @@ public class WMLValueImpl extends WMLKeyValueImpl implements WMLValue
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public String getValue()
|
||||
public EList<String> getValue()
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
value = new EDataTypeEList<String>(String.class, this, WMLPackage.WML_VALUE__VALUE);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setValue(String newValue)
|
||||
{
|
||||
String oldValue = value;
|
||||
value = newValue;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WMLPackage.WML_VALUE__VALUE, oldValue, value));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
@ -115,13 +98,15 @@ public class WMLValueImpl extends WMLKeyValueImpl implements WMLValue
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void eSet(int featureID, Object newValue)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.WML_VALUE__VALUE:
|
||||
setValue((String)newValue);
|
||||
getValue().clear();
|
||||
getValue().addAll((Collection<? extends String>)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
@ -138,7 +123,7 @@ public class WMLValueImpl extends WMLKeyValueImpl implements WMLValue
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.WML_VALUE__VALUE:
|
||||
setValue(VALUE_EDEFAULT);
|
||||
getValue().clear();
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
@ -155,7 +140,7 @@ public class WMLValueImpl extends WMLKeyValueImpl implements WMLValue
|
||||
switch (featureID)
|
||||
{
|
||||
case WMLPackage.WML_VALUE__VALUE:
|
||||
return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
|
||||
return value != null && !value.isEmpty();
|
||||
}
|
||||
return super.eIsSet(featureID);
|
||||
}
|
||||
|
@ -9,7 +9,6 @@ import "http://www.eclipse.org/emf/2002/Ecore" as ecore
|
||||
//TODO: add cross-reference for variables
|
||||
//handles TODO:
|
||||
// - preprocessor commands: #define, #enddef, etc
|
||||
// - fix: { { } }
|
||||
|
||||
WMLRoot:
|
||||
( Tags += WMLTag
|
||||
@ -31,7 +30,7 @@ WMLTag:
|
||||
;
|
||||
|
||||
WMLKey hidden(WS):
|
||||
(name = ID) '=' value += WMLKeyValue+ eol=(EOL|SL_COMMENT);
|
||||
(name = ID) '=' value = WMLKeyValue;
|
||||
|
||||
WMLKeyValue:
|
||||
WMLValue | WMLMacroCall | WMLLuaCode | WMLArrayCall;
|
||||
@ -50,24 +49,24 @@ WMLLuaCode:
|
||||
WMLArrayCall:
|
||||
'[' value += WMLValue+ ']' ;
|
||||
WMLMacroDefine:
|
||||
name = DEFINE;
|
||||
// ( Tags += WMLTag
|
||||
// | Keys += WMLKey
|
||||
// | MacroCalls += WMLMacroCall
|
||||
// | MacroDefines += WMLMacroDefine
|
||||
// | Textdomains += WMLTextdomain
|
||||
// )*;
|
||||
// ENDDEF;
|
||||
name = DEFINE
|
||||
( Tags += WMLTag
|
||||
| Keys += WMLKey
|
||||
| MacroCalls += WMLMacroCall
|
||||
| MacroDefines += WMLMacroDefine
|
||||
| Textdomains += WMLTextdomain
|
||||
)*
|
||||
ENDDEF;
|
||||
|
||||
WMLTextdomain:
|
||||
name = TEXTDOMAIN;
|
||||
|
||||
WMLValue:
|
||||
value = (ID | STRING |'+'|'~'| ANY_OTHER );
|
||||
value += (ID | STRING |'+'|'~'| ANY_OTHER)+;
|
||||
|
||||
terminal LUA_CODE : '<<' -> '>>';
|
||||
terminal DEFINE : '#define' -> '#enddef';//!('\n'|'\r')* ('\r'? '\n')?;
|
||||
//terminal ENDDEF : '#enddef' !('\n'|'\r')* ('\r'? '\n')?;
|
||||
terminal DEFINE : '#define' !('\n'|'\r')* ('\r'? '\n')?;
|
||||
terminal ENDDEF : '#enddef' !('\n'|'\r')* ('\r'? '\n')?;
|
||||
terminal TEXTDOMAIN : '#textdomain' !('\n'|'\r')* ('\r'? '\n')?;
|
||||
terminal STRING : '"' ( '\\' ('b'|'t'|'n'|'f'|'r'|'"'|"'"|'\\') | !('\\'|'"') )* '"';
|
||||
terminal ID : ('a'..'z'|'A'..'Z'|'0'..'9'|'_'|'-'|',')+;
|
||||
|
@ -48,8 +48,8 @@ public class WMLFormatter extends AbstractDeclarativeFormatter
|
||||
|
||||
// one indentation after tag ...
|
||||
c.setIndentationIncrement().before(f.getWMLTagAccess().getTagsAssignment_4_0());
|
||||
c.setIndentationIncrement().before(f.getWMLTagAccess().getTextdomainsAssignment_4_4());
|
||||
c.setIndentationIncrement().before(f.getWMLTagAccess().getMacroCallsAssignment_4_2());
|
||||
// c.setIndentationIncrement().before(f.getWMLTagAccess().getTextdomainsAssignment_4_4());
|
||||
// c.setIndentationIncrement().before(f.getWMLTagAccess().getMacroCallsAssignment_4_2());
|
||||
c.setIndentationIncrement().before(f.getWMLTagAccess().getKeysAssignment_4_1());
|
||||
|
||||
// but get back the [/<tagname>]
|
||||
|
Loading…
x
Reference in New Issue
Block a user