eclipse plugin: wml grammar update - editor

This commit is contained in:
Timotei Dolean 2010-06-26 21:26:33 +00:00
parent 2bf4894b61
commit a43dfa71e0
22 changed files with 2783 additions and 5198 deletions

View file

@ -29,7 +29,7 @@ public class AbstractWMLProposalProvider extends AbstractJavaBasedContentProposa
public void completeTextDomain_DomainName(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeMacro_MacroName(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
public void completeMacro_MacroContent(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completePathInclude_Path(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {

View file

@ -41,11 +41,11 @@ public class WMLParser extends AbstractContentAssistParser {
put(grammarAccess.getPathIncludeAccess().getPathAlternatives_1_0(), "rule__PathInclude__PathAlternatives_1_0");
put(grammarAccess.getRootTagAccess().getAlternatives(), "rule__RootTag__Alternatives");
put(grammarAccess.getAttributesAccess().getAttrValueAlternatives_2_0(), "rule__Attributes__AttrValueAlternatives_2_0");
put(grammarAccess.getRootAccess().getGroup(), "rule__Root__Group__0");
put(grammarAccess.getTextDomainAccess().getGroup(), "rule__TextDomain__Group__0");
put(grammarAccess.getMacroAccess().getGroup(), "rule__Macro__Group__0");
put(grammarAccess.getPathIncludeAccess().getGroup(), "rule__PathInclude__Group__0");
put(grammarAccess.getRootTypeAccess().getGroup_0(), "rule__RootType__Group_0__0");
put(grammarAccess.getRootTypeAccess().getGroup_2(), "rule__RootType__Group_2__0");
put(grammarAccess.getRootTypeAccess().getGroup(), "rule__RootType__Group__0");
put(grammarAccess.getSimpleTagAccess().getGroup(), "rule__SimpleTag__Group__0");
put(grammarAccess.getAddedTagAccess().getGroup(), "rule__AddedTag__Group__0");
put(grammarAccess.getAttributesAccess().getGroup(), "rule__Attributes__Group__0");
@ -55,20 +55,18 @@ public class WMLParser extends AbstractContentAssistParser {
put(grammarAccess.getRootAccess().getPreprocAssignment_1(), "rule__Root__PreprocAssignment_1");
put(grammarAccess.getRootAccess().getRootsAssignment_2(), "rule__Root__RootsAssignment_2");
put(grammarAccess.getTextDomainAccess().getDomainNameAssignment_1(), "rule__TextDomain__DomainNameAssignment_1");
put(grammarAccess.getMacroAccess().getMacroNameAssignment_1(), "rule__Macro__MacroNameAssignment_1");
put(grammarAccess.getMacroAccess().getMacroContentAssignment_1(), "rule__Macro__MacroContentAssignment_1");
put(grammarAccess.getPathIncludeAccess().getPathAssignment_1(), "rule__PathInclude__PathAssignment_1");
put(grammarAccess.getRootTypeAccess().getStartTagAssignment_0_1(), "rule__RootType__StartTagAssignment_0_1");
put(grammarAccess.getRootTypeAccess().getSubTypesAssignment_0_3(), "rule__RootType__SubTypesAssignment_0_3");
put(grammarAccess.getRootTypeAccess().getAtAssignment_1(), "rule__RootType__AtAssignment_1");
put(grammarAccess.getRootTypeAccess().getOkpreprocAssignment_2_0(), "rule__RootType__OkpreprocAssignment_2_0");
put(grammarAccess.getRootTypeAccess().getEndTagAssignment_2_3(), "rule__RootType__EndTagAssignment_2_3");
put(grammarAccess.getRootTypeAccess().getStartTagAssignment_1(), "rule__RootType__StartTagAssignment_1");
put(grammarAccess.getRootTypeAccess().getSubTypesAssignment_3(), "rule__RootType__SubTypesAssignment_3");
put(grammarAccess.getRootTypeAccess().getAtAssignment_4(), "rule__RootType__AtAssignment_4");
put(grammarAccess.getRootTypeAccess().getOkpreprocAssignment_5(), "rule__RootType__OkpreprocAssignment_5");
put(grammarAccess.getRootTypeAccess().getEndTagAssignment_8(), "rule__RootType__EndTagAssignment_8");
put(grammarAccess.getSimpleTagAccess().getEndTagAssignment_0(), "rule__SimpleTag__EndTagAssignment_0");
put(grammarAccess.getSimpleTagAccess().getTagNameAssignment_1(), "rule__SimpleTag__TagNameAssignment_1");
put(grammarAccess.getAddedTagAccess().getTagNameAssignment_1(), "rule__AddedTag__TagNameAssignment_1");
put(grammarAccess.getAttributesAccess().getAttrNameAssignment_0(), "rule__Attributes__AttrNameAssignment_0");
put(grammarAccess.getAttributesAccess().getAttrValueAssignment_2(), "rule__Attributes__AttrValueAssignment_2");
put(grammarAccess.getRootAccess().getUnorderedGroup(), "rule__Root__UnorderedGroup");
put(grammarAccess.getRootTypeAccess().getUnorderedGroup(), "rule__RootType__UnorderedGroup");
}
};
}

View file

@ -73,9 +73,9 @@ ruleRoot
}
:
(
{ before(grammarAccess.getRootAccess().getUnorderedGroup()); }
(rule__Root__UnorderedGroup)
{ after(grammarAccess.getRootAccess().getUnorderedGroup()); }
{ before(grammarAccess.getRootAccess().getGroup()); }
(rule__Root__Group__0)
{ after(grammarAccess.getRootAccess().getGroup()); }
)
;
@ -213,9 +213,9 @@ ruleRootType
}
:
(
{ before(grammarAccess.getRootTypeAccess().getUnorderedGroup()); }
(rule__RootType__UnorderedGroup)
{ after(grammarAccess.getRootTypeAccess().getUnorderedGroup()); }
{ before(grammarAccess.getRootTypeAccess().getGroup()); }
(rule__RootType__Group__0)
{ after(grammarAccess.getRootTypeAccess().getGroup()); }
)
;
@ -494,33 +494,33 @@ rule__Attributes__AttrValueAlternatives_2_0
}
:
(
{ before(grammarAccess.getAttributesAccess().getAttrValueIDTerminalRuleCall_2_0_0()); }
RULE_ID
{ after(grammarAccess.getAttributesAccess().getAttrValueIDTerminalRuleCall_2_0_0()); }
)
|(
{ before(grammarAccess.getAttributesAccess().getAttrValueIDLISTTerminalRuleCall_2_0_1()); }
RULE_IDLIST
{ after(grammarAccess.getAttributesAccess().getAttrValueIDLISTTerminalRuleCall_2_0_1()); }
)
|(
{ before(grammarAccess.getAttributesAccess().getAttrValueTSTRINGParserRuleCall_2_0_2()); }
{ before(grammarAccess.getAttributesAccess().getAttrValueTSTRINGParserRuleCall_2_0_0()); }
ruleTSTRING
{ after(grammarAccess.getAttributesAccess().getAttrValueTSTRINGParserRuleCall_2_0_2()); }
{ after(grammarAccess.getAttributesAccess().getAttrValueTSTRINGParserRuleCall_2_0_0()); }
)
|(
{ before(grammarAccess.getAttributesAccess().getAttrValueSTRINGTerminalRuleCall_2_0_3()); }
{ before(grammarAccess.getAttributesAccess().getAttrValueSTRINGTerminalRuleCall_2_0_1()); }
RULE_STRING
{ after(grammarAccess.getAttributesAccess().getAttrValueSTRINGTerminalRuleCall_2_0_3()); }
{ after(grammarAccess.getAttributesAccess().getAttrValueSTRINGTerminalRuleCall_2_0_1()); }
)
|(
{ before(grammarAccess.getAttributesAccess().getAttrValuePATHTerminalRuleCall_2_0_4()); }
{ before(grammarAccess.getAttributesAccess().getAttrValuePATHTerminalRuleCall_2_0_2()); }
RULE_PATH
{ after(grammarAccess.getAttributesAccess().getAttrValuePATHTerminalRuleCall_2_0_4()); }
{ after(grammarAccess.getAttributesAccess().getAttrValuePATHTerminalRuleCall_2_0_2()); }
)
|(
{ before(grammarAccess.getAttributesAccess().getAttrValueIDTerminalRuleCall_2_0_3()); }
RULE_ID
{ after(grammarAccess.getAttributesAccess().getAttrValueIDTerminalRuleCall_2_0_3()); }
)
|(
{ before(grammarAccess.getAttributesAccess().getAttrValueIDLISTTerminalRuleCall_2_0_4()); }
RULE_IDLIST
{ after(grammarAccess.getAttributesAccess().getAttrValueIDLISTTerminalRuleCall_2_0_4()); }
)
;
@ -530,6 +530,98 @@ finally {
rule__Root__Group__0
@init {
int stackSize = keepStackSize();
}
:
rule__Root__Group__0__Impl
rule__Root__Group__1
;
finally {
restoreStackSize(stackSize);
}
rule__Root__Group__0__Impl
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getRootAccess().getTextdomainsAssignment_0()); }
(rule__Root__TextdomainsAssignment_0)*
{ after(grammarAccess.getRootAccess().getTextdomainsAssignment_0()); }
)
;
finally {
restoreStackSize(stackSize);
}
rule__Root__Group__1
@init {
int stackSize = keepStackSize();
}
:
rule__Root__Group__1__Impl
rule__Root__Group__2
;
finally {
restoreStackSize(stackSize);
}
rule__Root__Group__1__Impl
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getRootAccess().getPreprocAssignment_1()); }
(rule__Root__PreprocAssignment_1)*
{ after(grammarAccess.getRootAccess().getPreprocAssignment_1()); }
)
;
finally {
restoreStackSize(stackSize);
}
rule__Root__Group__2
@init {
int stackSize = keepStackSize();
}
:
rule__Root__Group__2__Impl
;
finally {
restoreStackSize(stackSize);
}
rule__Root__Group__2__Impl
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getRootAccess().getRootsAssignment_2()); }
(rule__Root__RootsAssignment_2)*
{ after(grammarAccess.getRootAccess().getRootsAssignment_2()); }
)
;
finally {
restoreStackSize(stackSize);
}
rule__TextDomain__Group__0
@init {
int stackSize = keepStackSize();
@ -642,9 +734,16 @@ rule__Macro__Group__1__Impl
}
:
(
{ before(grammarAccess.getMacroAccess().getMacroNameAssignment_1()); }
(rule__Macro__MacroNameAssignment_1)
{ after(grammarAccess.getMacroAccess().getMacroNameAssignment_1()); }
(
{ before(grammarAccess.getMacroAccess().getMacroContentAssignment_1()); }
(rule__Macro__MacroContentAssignment_1)
{ after(grammarAccess.getMacroAccess().getMacroContentAssignment_1()); }
)
(
{ before(grammarAccess.getMacroAccess().getMacroContentAssignment_1()); }
(rule__Macro__MacroContentAssignment_1)*
{ after(grammarAccess.getMacroAccess().getMacroContentAssignment_1()); }
)
)
;
@ -785,29 +884,29 @@ finally {
rule__RootType__Group_0__0
rule__RootType__Group__0
@init {
int stackSize = keepStackSize();
}
:
rule__RootType__Group_0__0__Impl
rule__RootType__Group_0__1
rule__RootType__Group__0__Impl
rule__RootType__Group__1
;
finally {
restoreStackSize(stackSize);
}
rule__RootType__Group_0__0__Impl
rule__RootType__Group__0__Impl
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getRootTypeAccess().getLeftSquareBracketKeyword_0_0()); }
{ before(grammarAccess.getRootTypeAccess().getLeftSquareBracketKeyword_0()); }
'['
{ after(grammarAccess.getRootTypeAccess().getLeftSquareBracketKeyword_0_0()); }
{ after(grammarAccess.getRootTypeAccess().getLeftSquareBracketKeyword_0()); }
)
;
@ -816,27 +915,27 @@ finally {
}
rule__RootType__Group_0__1
rule__RootType__Group__1
@init {
int stackSize = keepStackSize();
}
:
rule__RootType__Group_0__1__Impl
rule__RootType__Group_0__2
rule__RootType__Group__1__Impl
rule__RootType__Group__2
;
finally {
restoreStackSize(stackSize);
}
rule__RootType__Group_0__1__Impl
rule__RootType__Group__1__Impl
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getRootTypeAccess().getStartTagAssignment_0_1()); }
(rule__RootType__StartTagAssignment_0_1)
{ after(grammarAccess.getRootTypeAccess().getStartTagAssignment_0_1()); }
{ before(grammarAccess.getRootTypeAccess().getStartTagAssignment_1()); }
(rule__RootType__StartTagAssignment_1)
{ after(grammarAccess.getRootTypeAccess().getStartTagAssignment_1()); }
)
;
@ -845,29 +944,29 @@ finally {
}
rule__RootType__Group_0__2
rule__RootType__Group__2
@init {
int stackSize = keepStackSize();
}
:
rule__RootType__Group_0__2__Impl
rule__RootType__Group_0__3
rule__RootType__Group__2__Impl
rule__RootType__Group__3
;
finally {
restoreStackSize(stackSize);
}
rule__RootType__Group_0__2__Impl
rule__RootType__Group__2__Impl
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getRootTypeAccess().getRightSquareBracketKeyword_0_2()); }
{ before(grammarAccess.getRootTypeAccess().getRightSquareBracketKeyword_2()); }
']'
{ after(grammarAccess.getRootTypeAccess().getRightSquareBracketKeyword_0_2()); }
{ after(grammarAccess.getRootTypeAccess().getRightSquareBracketKeyword_2()); }
)
;
@ -876,26 +975,27 @@ finally {
}
rule__RootType__Group_0__3
rule__RootType__Group__3
@init {
int stackSize = keepStackSize();
}
:
rule__RootType__Group_0__3__Impl
rule__RootType__Group__3__Impl
rule__RootType__Group__4
;
finally {
restoreStackSize(stackSize);
}
rule__RootType__Group_0__3__Impl
rule__RootType__Group__3__Impl
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getRootTypeAccess().getSubTypesAssignment_0_3()); }
(rule__RootType__SubTypesAssignment_0_3)*
{ after(grammarAccess.getRootTypeAccess().getSubTypesAssignment_0_3()); }
{ before(grammarAccess.getRootTypeAccess().getSubTypesAssignment_3()); }
(rule__RootType__SubTypesAssignment_3)*
{ after(grammarAccess.getRootTypeAccess().getSubTypesAssignment_3()); }
)
;
@ -904,35 +1004,27 @@ finally {
}
rule__RootType__Group_2__0
rule__RootType__Group__4
@init {
int stackSize = keepStackSize();
}
:
rule__RootType__Group_2__0__Impl
rule__RootType__Group_2__1
rule__RootType__Group__4__Impl
rule__RootType__Group__5
;
finally {
restoreStackSize(stackSize);
}
rule__RootType__Group_2__0__Impl
rule__RootType__Group__4__Impl
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getRootTypeAccess().getOkpreprocAssignment_2_0()); }
(rule__RootType__OkpreprocAssignment_2_0)*
{ after(grammarAccess.getRootTypeAccess().getOkpreprocAssignment_2_0()); }
{ before(grammarAccess.getRootTypeAccess().getAtAssignment_4()); }
(rule__RootType__AtAssignment_4)*
{ after(grammarAccess.getRootTypeAccess().getAtAssignment_4()); }
)
;
@ -941,29 +1033,58 @@ finally {
}
rule__RootType__Group_2__1
rule__RootType__Group__5
@init {
int stackSize = keepStackSize();
}
:
rule__RootType__Group_2__1__Impl
rule__RootType__Group_2__2
rule__RootType__Group__5__Impl
rule__RootType__Group__6
;
finally {
restoreStackSize(stackSize);
}
rule__RootType__Group_2__1__Impl
rule__RootType__Group__5__Impl
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getRootTypeAccess().getLeftSquareBracketKeyword_2_1()); }
{ before(grammarAccess.getRootTypeAccess().getOkpreprocAssignment_5()); }
(rule__RootType__OkpreprocAssignment_5)*
{ after(grammarAccess.getRootTypeAccess().getOkpreprocAssignment_5()); }
)
;
finally {
restoreStackSize(stackSize);
}
rule__RootType__Group__6
@init {
int stackSize = keepStackSize();
}
:
rule__RootType__Group__6__Impl
rule__RootType__Group__7
;
finally {
restoreStackSize(stackSize);
}
rule__RootType__Group__6__Impl
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getRootTypeAccess().getLeftSquareBracketKeyword_6()); }
'['
{ after(grammarAccess.getRootTypeAccess().getLeftSquareBracketKeyword_2_1()); }
{ after(grammarAccess.getRootTypeAccess().getLeftSquareBracketKeyword_6()); }
)
;
@ -972,29 +1093,29 @@ finally {
}
rule__RootType__Group_2__2
rule__RootType__Group__7
@init {
int stackSize = keepStackSize();
}
:
rule__RootType__Group_2__2__Impl
rule__RootType__Group_2__3
rule__RootType__Group__7__Impl
rule__RootType__Group__8
;
finally {
restoreStackSize(stackSize);
}
rule__RootType__Group_2__2__Impl
rule__RootType__Group__7__Impl
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getRootTypeAccess().getSolidusKeyword_2_2()); }
{ before(grammarAccess.getRootTypeAccess().getSolidusKeyword_7()); }
'/'
{ after(grammarAccess.getRootTypeAccess().getSolidusKeyword_2_2()); }
{ after(grammarAccess.getRootTypeAccess().getSolidusKeyword_7()); }
)
;
@ -1003,27 +1124,27 @@ finally {
}
rule__RootType__Group_2__3
rule__RootType__Group__8
@init {
int stackSize = keepStackSize();
}
:
rule__RootType__Group_2__3__Impl
rule__RootType__Group_2__4
rule__RootType__Group__8__Impl
rule__RootType__Group__9
;
finally {
restoreStackSize(stackSize);
}
rule__RootType__Group_2__3__Impl
rule__RootType__Group__8__Impl
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getRootTypeAccess().getEndTagAssignment_2_3()); }
(rule__RootType__EndTagAssignment_2_3)
{ after(grammarAccess.getRootTypeAccess().getEndTagAssignment_2_3()); }
{ before(grammarAccess.getRootTypeAccess().getEndTagAssignment_8()); }
(rule__RootType__EndTagAssignment_8)
{ after(grammarAccess.getRootTypeAccess().getEndTagAssignment_8()); }
)
;
@ -1032,28 +1153,28 @@ finally {
}
rule__RootType__Group_2__4
rule__RootType__Group__9
@init {
int stackSize = keepStackSize();
}
:
rule__RootType__Group_2__4__Impl
rule__RootType__Group__9__Impl
;
finally {
restoreStackSize(stackSize);
}
rule__RootType__Group_2__4__Impl
rule__RootType__Group__9__Impl
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getRootTypeAccess().getRightSquareBracketKeyword_2_4()); }
{ before(grammarAccess.getRootTypeAccess().getRightSquareBracketKeyword_9()); }
']'
{ after(grammarAccess.getRootTypeAccess().getRightSquareBracketKeyword_2_4()); }
{ after(grammarAccess.getRootTypeAccess().getRightSquareBracketKeyword_9()); }
)
;
@ -1070,6 +1191,16 @@ finally {
rule__SimpleTag__Group__0
@ -1417,283 +1548,6 @@ finally {
rule__Root__UnorderedGroup
@init {
int stackSize = keepStackSize();
getUnorderedGroupHelper().enter(grammarAccess.getRootAccess().getUnorderedGroup());
}
:
rule__Root__UnorderedGroup__0
?
;
finally {
getUnorderedGroupHelper().leave(grammarAccess.getRootAccess().getUnorderedGroup());
restoreStackSize(stackSize);
}
rule__Root__UnorderedGroup__Impl
@init {
int stackSize = keepStackSize();
boolean selected = false;
}
:
(
(
{getUnorderedGroupHelper().canSelect(grammarAccess.getRootAccess().getUnorderedGroup(), 0)}?=>(
{
getUnorderedGroupHelper().select(grammarAccess.getRootAccess().getUnorderedGroup(), 0);
}
{
selected = true;
}
(
(
{ before(grammarAccess.getRootAccess().getTextdomainsAssignment_0()); }
(rule__Root__TextdomainsAssignment_0)
{ after(grammarAccess.getRootAccess().getTextdomainsAssignment_0()); }
)
(
{ before(grammarAccess.getRootAccess().getTextdomainsAssignment_0()); }
(rule__Root__TextdomainsAssignment_0)*
{ after(grammarAccess.getRootAccess().getTextdomainsAssignment_0()); }
) )
)
) |
(
{getUnorderedGroupHelper().canSelect(grammarAccess.getRootAccess().getUnorderedGroup(), 1)}?=>(
{
getUnorderedGroupHelper().select(grammarAccess.getRootAccess().getUnorderedGroup(), 1);
}
{
selected = true;
}
(
(
{ before(grammarAccess.getRootAccess().getPreprocAssignment_1()); }
(rule__Root__PreprocAssignment_1)
{ after(grammarAccess.getRootAccess().getPreprocAssignment_1()); }
)
(
{ before(grammarAccess.getRootAccess().getPreprocAssignment_1()); }
(rule__Root__PreprocAssignment_1)*
{ after(grammarAccess.getRootAccess().getPreprocAssignment_1()); }
) )
)
) |
(
{getUnorderedGroupHelper().canSelect(grammarAccess.getRootAccess().getUnorderedGroup(), 2)}?=>(
{
getUnorderedGroupHelper().select(grammarAccess.getRootAccess().getUnorderedGroup(), 2);
}
{
selected = true;
}
(
(
{ before(grammarAccess.getRootAccess().getRootsAssignment_2()); }
(rule__Root__RootsAssignment_2)
{ after(grammarAccess.getRootAccess().getRootsAssignment_2()); }
)
(
{ before(grammarAccess.getRootAccess().getRootsAssignment_2()); }
(rule__Root__RootsAssignment_2)*
{ after(grammarAccess.getRootAccess().getRootsAssignment_2()); }
) )
)
)
)
;
finally {
if (selected)
getUnorderedGroupHelper().returnFromSelection(grammarAccess.getRootAccess().getUnorderedGroup());
restoreStackSize(stackSize);
}
rule__Root__UnorderedGroup__0
@init {
int stackSize = keepStackSize();
}
:
rule__Root__UnorderedGroup__Impl
rule__Root__UnorderedGroup__1?
;
finally {
restoreStackSize(stackSize);
}
rule__Root__UnorderedGroup__1
@init {
int stackSize = keepStackSize();
}
:
rule__Root__UnorderedGroup__Impl
rule__Root__UnorderedGroup__2?
;
finally {
restoreStackSize(stackSize);
}
rule__Root__UnorderedGroup__2
@init {
int stackSize = keepStackSize();
}
:
rule__Root__UnorderedGroup__Impl
;
finally {
restoreStackSize(stackSize);
}
rule__RootType__UnorderedGroup
@init {
int stackSize = keepStackSize();
getUnorderedGroupHelper().enter(grammarAccess.getRootTypeAccess().getUnorderedGroup());
}
:
rule__RootType__UnorderedGroup__0
{getUnorderedGroupHelper().canLeave(grammarAccess.getRootTypeAccess().getUnorderedGroup())}?
;
finally {
getUnorderedGroupHelper().leave(grammarAccess.getRootTypeAccess().getUnorderedGroup());
restoreStackSize(stackSize);
}
rule__RootType__UnorderedGroup__Impl
@init {
int stackSize = keepStackSize();
boolean selected = false;
}
:
(
(
{getUnorderedGroupHelper().canSelect(grammarAccess.getRootTypeAccess().getUnorderedGroup(), 0)}?=>(
{
getUnorderedGroupHelper().select(grammarAccess.getRootTypeAccess().getUnorderedGroup(), 0);
}
{
selected = true;
}
(
{ before(grammarAccess.getRootTypeAccess().getGroup_0()); }
(rule__RootType__Group_0__0)
{ after(grammarAccess.getRootTypeAccess().getGroup_0()); }
)
)
) |
(
{getUnorderedGroupHelper().canSelect(grammarAccess.getRootTypeAccess().getUnorderedGroup(), 1)}?=>(
{
getUnorderedGroupHelper().select(grammarAccess.getRootTypeAccess().getUnorderedGroup(), 1);
}
{
selected = true;
}
(
(
{ before(grammarAccess.getRootTypeAccess().getAtAssignment_1()); }
(rule__RootType__AtAssignment_1)
{ after(grammarAccess.getRootTypeAccess().getAtAssignment_1()); }
)
(
{ before(grammarAccess.getRootTypeAccess().getAtAssignment_1()); }
(rule__RootType__AtAssignment_1)*
{ after(grammarAccess.getRootTypeAccess().getAtAssignment_1()); }
) )
)
) |
(
{getUnorderedGroupHelper().canSelect(grammarAccess.getRootTypeAccess().getUnorderedGroup(), 2)}?=>(
{
getUnorderedGroupHelper().select(grammarAccess.getRootTypeAccess().getUnorderedGroup(), 2);
}
{
selected = true;
}
(
{ before(grammarAccess.getRootTypeAccess().getGroup_2()); }
(rule__RootType__Group_2__0)
{ after(grammarAccess.getRootTypeAccess().getGroup_2()); }
)
)
)
)
;
finally {
if (selected)
getUnorderedGroupHelper().returnFromSelection(grammarAccess.getRootTypeAccess().getUnorderedGroup());
restoreStackSize(stackSize);
}
rule__RootType__UnorderedGroup__0
@init {
int stackSize = keepStackSize();
}
:
rule__RootType__UnorderedGroup__Impl
rule__RootType__UnorderedGroup__1?
;
finally {
restoreStackSize(stackSize);
}
rule__RootType__UnorderedGroup__1
@init {
int stackSize = keepStackSize();
}
:
rule__RootType__UnorderedGroup__Impl
rule__RootType__UnorderedGroup__2?
;
finally {
restoreStackSize(stackSize);
}
rule__RootType__UnorderedGroup__2
@init {
int stackSize = keepStackSize();
}
:
rule__RootType__UnorderedGroup__Impl
;
finally {
restoreStackSize(stackSize);
}
rule__Root__TextdomainsAssignment_0
@init {
int stackSize = keepStackSize();
@ -1754,14 +1608,14 @@ finally {
restoreStackSize(stackSize);
}
rule__Macro__MacroNameAssignment_1
rule__Macro__MacroContentAssignment_1
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getMacroAccess().getMacroNameIDTerminalRuleCall_1_0()); }
RULE_ID{ after(grammarAccess.getMacroAccess().getMacroNameIDTerminalRuleCall_1_0()); }
{ before(grammarAccess.getMacroAccess().getMacroContentIDTerminalRuleCall_1_0()); }
RULE_ID{ after(grammarAccess.getMacroAccess().getMacroContentIDTerminalRuleCall_1_0()); }
)
;
@ -1785,14 +1639,14 @@ finally {
restoreStackSize(stackSize);
}
rule__RootType__StartTagAssignment_0_1
rule__RootType__StartTagAssignment_1
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getRootTypeAccess().getStartTagRootTagParserRuleCall_0_1_0()); }
ruleRootTag{ after(grammarAccess.getRootTypeAccess().getStartTagRootTagParserRuleCall_0_1_0()); }
{ before(grammarAccess.getRootTypeAccess().getStartTagRootTagParserRuleCall_1_0()); }
ruleRootTag{ after(grammarAccess.getRootTypeAccess().getStartTagRootTagParserRuleCall_1_0()); }
)
;
@ -1800,14 +1654,14 @@ finally {
restoreStackSize(stackSize);
}
rule__RootType__SubTypesAssignment_0_3
rule__RootType__SubTypesAssignment_3
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getRootTypeAccess().getSubTypesRootTypeParserRuleCall_0_3_0()); }
ruleRootType{ after(grammarAccess.getRootTypeAccess().getSubTypesRootTypeParserRuleCall_0_3_0()); }
{ before(grammarAccess.getRootTypeAccess().getSubTypesRootTypeParserRuleCall_3_0()); }
ruleRootType{ after(grammarAccess.getRootTypeAccess().getSubTypesRootTypeParserRuleCall_3_0()); }
)
;
@ -1815,14 +1669,14 @@ finally {
restoreStackSize(stackSize);
}
rule__RootType__AtAssignment_1
rule__RootType__AtAssignment_4
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getRootTypeAccess().getAtAttributesParserRuleCall_1_0()); }
ruleAttributes{ after(grammarAccess.getRootTypeAccess().getAtAttributesParserRuleCall_1_0()); }
{ before(grammarAccess.getRootTypeAccess().getAtAttributesParserRuleCall_4_0()); }
ruleAttributes{ after(grammarAccess.getRootTypeAccess().getAtAttributesParserRuleCall_4_0()); }
)
;
@ -1830,14 +1684,14 @@ finally {
restoreStackSize(stackSize);
}
rule__RootType__OkpreprocAssignment_2_0
rule__RootType__OkpreprocAssignment_5
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getRootTypeAccess().getOkpreprocPreprocessorParserRuleCall_2_0_0()); }
rulePreprocessor{ after(grammarAccess.getRootTypeAccess().getOkpreprocPreprocessorParserRuleCall_2_0_0()); }
{ before(grammarAccess.getRootTypeAccess().getOkpreprocPreprocessorParserRuleCall_5_0()); }
rulePreprocessor{ after(grammarAccess.getRootTypeAccess().getOkpreprocPreprocessorParserRuleCall_5_0()); }
)
;
@ -1845,14 +1699,14 @@ finally {
restoreStackSize(stackSize);
}
rule__RootType__EndTagAssignment_2_3
rule__RootType__EndTagAssignment_8
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getRootTypeAccess().getEndTagRootTagParserRuleCall_2_3_0()); }
ruleRootTag{ after(grammarAccess.getRootTypeAccess().getEndTagRootTagParserRuleCall_2_3_0()); }
{ before(grammarAccess.getRootTypeAccess().getEndTagRootTagParserRuleCall_8_0()); }
ruleRootTag{ after(grammarAccess.getRootTypeAccess().getEndTagRootTagParserRuleCall_8_0()); }
)
;
@ -1949,7 +1803,7 @@ RULE_SL_COMMENT : '#' ~(('\n'|'\r'))* ('\r'? '\n')?;
RULE_WS : (' '|'\t'|'\r'|'\n')+;
RULE_ID : ('a'..'z'|'A'..'Z'|'_'|'-'|'0'..'9')+;
RULE_ID : ('a'..'z'|'A'..'Z'|'_'|'-'|' '|'0'..'9')+;
RULE_IDLIST : (RULE_ID ',')* RULE_ID;

View file

@ -1,6 +1,6 @@
RULE_ID=4
RULE_STRING=7
RULE_IDLIST=6
RULE_STRING=6
RULE_IDLIST=7
RULE_ANY_OTHER=10
RULE_PATH=5
RULE_WS=9

View file

@ -13,14 +13,14 @@ import java.util.ArrayList;
@SuppressWarnings("all")
public class InternalWMLLexer extends Lexer {
public static final int RULE_ID=4;
public static final int RULE_IDLIST=6;
public static final int RULE_IDLIST=7;
public static final int RULE_ANY_OTHER=10;
public static final int RULE_PATH=5;
public static final int Tokens=21;
public static final int EOF=-1;
public static final int RULE_SL_COMMENT=8;
public static final int T20=20;
public static final int RULE_STRING=7;
public static final int RULE_STRING=6;
public static final int T11=11;
public static final int T12=12;
public static final int T13=13;
@ -222,11 +222,11 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_SL_COMMENT() throws RecognitionException {
try {
int _type = RULE_SL_COMMENT;
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1948:17: ( '#' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1948:19: '#' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1802:17: ( '#' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1802:19: '#' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
{
match('#');
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1948:23: (~ ( ( '\\n' | '\\r' ) ) )*
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1802:23: (~ ( ( '\\n' | '\\r' ) ) )*
loop1:
do {
int alt1=2;
@ -239,7 +239,7 @@ public class InternalWMLLexer extends Lexer {
switch (alt1) {
case 1 :
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1948:23: ~ ( ( '\\n' | '\\r' ) )
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1802:23: ~ ( ( '\\n' | '\\r' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFE') ) {
input.consume();
@ -260,7 +260,7 @@ public class InternalWMLLexer extends Lexer {
}
} while (true);
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1948:39: ( ( '\\r' )? '\\n' )?
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1802:39: ( ( '\\r' )? '\\n' )?
int alt3=2;
int LA3_0 = input.LA(1);
@ -269,9 +269,9 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt3) {
case 1 :
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1948:40: ( '\\r' )? '\\n'
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1802:40: ( '\\r' )? '\\n'
{
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1948:40: ( '\\r' )?
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1802:40: ( '\\r' )?
int alt2=2;
int LA2_0 = input.LA(1);
@ -280,7 +280,7 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt2) {
case 1 :
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1948:40: '\\r'
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1802:40: '\\r'
{
match('\r');
@ -310,10 +310,10 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_WS() throws RecognitionException {
try {
int _type = RULE_WS;
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1950:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1950:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1804:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1804:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
{
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1950:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1804:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
int cnt4=0;
loop4:
do {
@ -366,17 +366,17 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_ID() throws RecognitionException {
try {
int _type = RULE_ID;
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1952:9: ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '-' | '0' .. '9' )+ )
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1952:11: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '-' | '0' .. '9' )+
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1806:9: ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '-' | ' ' | '0' .. '9' )+ )
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1806:11: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '-' | ' ' | '0' .. '9' )+
{
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1952:11: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '-' | '0' .. '9' )+
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1806:11: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '-' | ' ' | '0' .. '9' )+
int cnt5=0;
loop5:
do {
int alt5=2;
int LA5_0 = input.LA(1);
if ( (LA5_0=='-'||(LA5_0>='0' && LA5_0<='9')||(LA5_0>='A' && LA5_0<='Z')||LA5_0=='_'||(LA5_0>='a' && LA5_0<='z')) ) {
if ( (LA5_0==' '||LA5_0=='-'||(LA5_0>='0' && LA5_0<='9')||(LA5_0>='A' && LA5_0<='Z')||LA5_0=='_'||(LA5_0>='a' && LA5_0<='z')) ) {
alt5=1;
}
@ -385,7 +385,7 @@ public class InternalWMLLexer extends Lexer {
case 1 :
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:
{
if ( input.LA(1)=='-'||(input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {
if ( input.LA(1)==' '||input.LA(1)=='-'||(input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {
input.consume();
}
@ -422,17 +422,17 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_IDLIST() throws RecognitionException {
try {
int _type = RULE_IDLIST;
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1954:13: ( ( RULE_ID ',' )* RULE_ID )
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1954:15: ( RULE_ID ',' )* RULE_ID
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1808:13: ( ( RULE_ID ',' )* RULE_ID )
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1808:15: ( RULE_ID ',' )* RULE_ID
{
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1954:15: ( RULE_ID ',' )*
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1808:15: ( RULE_ID ',' )*
loop6:
do {
int alt6=2;
alt6 = dfa6.predict(input);
switch (alt6) {
case 1 :
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1954:16: RULE_ID ','
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1808:16: RULE_ID ','
{
mRULE_ID();
match(',');
@ -460,10 +460,10 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_STRING() throws RecognitionException {
try {
int _type = RULE_STRING;
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1956:13: ( ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) )
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1956:15: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1810:13: ( ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) )
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1810:15: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
{
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1956:15: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1810:15: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
int alt9=2;
int LA9_0 = input.LA(1);
@ -475,16 +475,16 @@ public class InternalWMLLexer extends Lexer {
}
else {
NoViableAltException nvae =
new NoViableAltException("1956:15: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )", 9, 0, input);
new NoViableAltException("1810:15: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )", 9, 0, input);
throw nvae;
}
switch (alt9) {
case 1 :
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1956:16: '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"'
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1810:16: '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"'
{
match('\"');
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1956:20: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )*
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1810:20: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )*
loop7:
do {
int alt7=3;
@ -500,7 +500,7 @@ public class InternalWMLLexer extends Lexer {
switch (alt7) {
case 1 :
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1956:21: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' )
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1810:21: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' )
{
match('\\');
if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||input.LA(1)=='t' ) {
@ -517,7 +517,7 @@ public class InternalWMLLexer extends Lexer {
}
break;
case 2 :
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1956:62: ~ ( ( '\\\\' | '\"' ) )
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1810:62: ~ ( ( '\\\\' | '\"' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
input.consume();
@ -543,10 +543,10 @@ public class InternalWMLLexer extends Lexer {
}
break;
case 2 :
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1956:82: '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\''
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1810:82: '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\''
{
match('\'');
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1956:87: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )*
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1810:87: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )*
loop8:
do {
int alt8=3;
@ -562,7 +562,7 @@ public class InternalWMLLexer extends Lexer {
switch (alt8) {
case 1 :
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1956:88: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' )
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1810:88: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' )
{
match('\\');
if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||input.LA(1)=='t' ) {
@ -579,7 +579,7 @@ public class InternalWMLLexer extends Lexer {
}
break;
case 2 :
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1956:129: ~ ( ( '\\\\' | '\\'' ) )
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1810:129: ~ ( ( '\\\\' | '\\'' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
input.consume();
@ -621,8 +621,8 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_ANY_OTHER() throws RecognitionException {
try {
int _type = RULE_ANY_OTHER;
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1958:16: ( . )
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1958:18: .
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1812:16: ( . )
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1812:18: .
{
matchAny();
@ -639,19 +639,19 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_PATH() throws RecognitionException {
try {
int _type = RULE_PATH;
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1960:11: ( ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '.' | '-' | '0' .. '9' )+ '/' )* ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '.' | '-' | '0' .. '9' )+ ( '/' )? )
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1960:13: ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '.' | '-' | '0' .. '9' )+ '/' )* ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '.' | '-' | '0' .. '9' )+ ( '/' )?
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1814:11: ( ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '.' | '-' | '0' .. '9' )+ '/' )* ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '.' | '-' | '0' .. '9' )+ ( '/' )? )
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1814:13: ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '.' | '-' | '0' .. '9' )+ '/' )* ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '.' | '-' | '0' .. '9' )+ ( '/' )?
{
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1960:13: ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '.' | '-' | '0' .. '9' )+ '/' )*
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1814:13: ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '.' | '-' | '0' .. '9' )+ '/' )*
loop11:
do {
int alt11=2;
alt11 = dfa11.predict(input);
switch (alt11) {
case 1 :
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1960:14: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '.' | '-' | '0' .. '9' )+ '/'
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1814:14: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '.' | '-' | '0' .. '9' )+ '/'
{
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1960:14: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '.' | '-' | '0' .. '9' )+
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1814:14: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '.' | '-' | '0' .. '9' )+
int cnt10=0;
loop10:
do {
@ -700,7 +700,7 @@ public class InternalWMLLexer extends Lexer {
}
} while (true);
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1960:62: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '.' | '-' | '0' .. '9' )+
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1814:62: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '.' | '-' | '0' .. '9' )+
int cnt12=0;
loop12:
do {
@ -739,7 +739,7 @@ public class InternalWMLLexer extends Lexer {
cnt12++;
} while (true);
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1960:104: ( '/' )?
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1814:104: ( '/' )?
int alt13=2;
int LA13_0 = input.LA(1);
@ -748,7 +748,7 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt13) {
case 1 :
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1960:104: '/'
// ../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g:1814:104: '/'
{
match('/');
@ -905,7 +905,7 @@ public class InternalWMLLexer extends Lexer {
static final String DFA6_eofS =
"\4\uffff";
static final String DFA6_minS =
"\1\55\1\54\2\uffff";
"\2\40\2\uffff";
static final String DFA6_maxS =
"\2\172\2\uffff";
static final String DFA6_acceptS =
@ -913,8 +913,10 @@ public class InternalWMLLexer extends Lexer {
static final String DFA6_specialS =
"\4\uffff}>";
static final String[] DFA6_transitionS = {
"\1\1\2\uffff\12\1\7\uffff\32\1\4\uffff\1\1\1\uffff\32\1",
"\1\3\1\1\2\uffff\12\1\7\uffff\32\1\4\uffff\1\1\1\uffff\32\1",
"\1\1\14\uffff\1\1\2\uffff\12\1\7\uffff\32\1\4\uffff\1\1\1\uffff"+
"\32\1",
"\1\1\13\uffff\1\3\1\1\2\uffff\12\1\7\uffff\32\1\4\uffff\1\1"+
"\1\uffff\32\1",
"",
""
};
@ -949,7 +951,7 @@ public class InternalWMLLexer extends Lexer {
this.transition = DFA6_transition;
}
public String getDescription() {
return "()* loopback of 1954:15: ( RULE_ID ',' )*";
return "()* loopback of 1808:15: ( RULE_ID ',' )*";
}
}
static final String DFA11_eotS =
@ -1002,33 +1004,35 @@ public class InternalWMLLexer extends Lexer {
this.transition = DFA11_transition;
}
public String getDescription() {
return "()* loopback of 1960:13: ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '.' | '-' | '0' .. '9' )+ '/' )*";
return "()* loopback of 1814:13: ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '.' | '-' | '0' .. '9' )+ '/' )*";
}
}
static final String DFA14_eotS =
"\1\uffff\1\22\7\uffff\1\32\2\uffff\1\40\3\20\1\uffff\1\22\11\uffff"+
"\1\40\6\uffff\11\22\1\54\1\uffff";
"\1\uffff\1\23\7\uffff\1\33\1\uffff\1\41\1\uffff\1\43\3\21\1\uffff"+
"\1\23\11\uffff\1\43\1\uffff\1\43\3\uffff\1\41\2\uffff\11\23\1\57"+
"\1\uffff";
static final String DFA14_eofS =
"\55\uffff";
"\60\uffff";
static final String DFA14_minS =
"\1\0\1\164\7\uffff\1\54\2\uffff\1\54\2\0\1\55\1\uffff\1\145\11\uffff"+
"\1\54\6\uffff\1\170\1\164\1\144\1\157\1\155\1\141\1\151\1\156\1"+
"\40\1\0\1\uffff";
"\1\0\1\164\7\uffff\1\40\1\uffff\1\40\1\uffff\1\40\2\0\1\55\1\uffff"+
"\1\145\11\uffff\1\40\1\uffff\1\40\3\uffff\1\40\2\uffff\1\170\1\164"+
"\1\144\1\157\1\155\1\141\1\151\1\156\1\40\1\0\1\uffff";
static final String DFA14_maxS =
"\1\ufffe\1\164\7\uffff\1\172\2\uffff\1\172\2\ufffe\1\172\1\uffff"+
"\1\145\11\uffff\1\172\6\uffff\1\170\1\164\1\144\1\157\1\155\1\141"+
"\1\151\1\156\1\40\1\ufffe\1\uffff";
"\1\ufffe\1\164\7\uffff\1\172\1\uffff\1\172\1\uffff\1\172\2\ufffe"+
"\1\172\1\uffff\1\145\11\uffff\1\172\1\uffff\1\172\3\uffff\1\172"+
"\2\uffff\1\170\1\164\1\144\1\157\1\155\1\141\1\151\1\156\1\40\1"+
"\ufffe\1\uffff";
static final String DFA14_acceptS =
"\2\uffff\1\2\1\3\1\4\1\5\1\6\1\7\1\10\1\uffff\1\12\1\14\4\uffff"+
"\1\20\1\uffff\1\13\1\2\1\3\1\4\1\5\1\6\1\7\1\10\1\11\1\uffff\1\21"+
"\1\16\1\12\1\14\1\15\1\17\12\uffff\1\1";
"\2\uffff\1\2\1\3\1\4\1\5\1\6\1\7\1\10\1\uffff\1\12\1\uffff\1\14"+
"\4\uffff\1\20\1\uffff\1\13\1\2\1\3\1\4\1\5\1\6\1\7\1\10\1\11\1\uffff"+
"\1\21\1\uffff\1\16\1\12\1\14\1\uffff\1\15\1\17\12\uffff\1\1";
static final String DFA14_specialS =
"\55\uffff}>";
"\60\uffff}>";
static final String[] DFA14_transitionS = {
"\11\20\2\13\2\20\1\13\22\20\1\13\1\20\1\15\1\1\3\20\1\16\3\20"+
"\1\7\1\20\1\14\1\17\1\6\12\14\3\20\1\10\3\20\32\14\1\4\1\20"+
"\1\5\1\20\1\11\1\20\32\14\1\2\1\20\1\3\1\12\uff80\20",
"\1\21",
"\11\21\2\14\2\21\1\14\22\21\1\13\1\21\1\16\1\1\3\21\1\17\3\21"+
"\1\7\1\21\1\15\1\20\1\6\12\15\3\21\1\10\3\21\32\15\1\4\1\21"+
"\1\5\1\21\1\11\1\21\32\15\1\2\1\21\1\3\1\12\uff80\21",
"\1\22",
"",
"",
"",
@ -1036,44 +1040,50 @@ public class InternalWMLLexer extends Lexer {
"",
"",
"",
"\1\35\1\33\2\34\12\33\7\uffff\32\33\4\uffff\1\33\1\uffff\32"+
"\33",
"\1\36\13\uffff\1\37\1\34\2\35\12\34\7\uffff\32\34\4\uffff\1"+
"\34\1\uffff\32\34",
"",
"\1\42\13\uffff\1\37\1\36\2\uffff\12\36\7\uffff\32\36\4\uffff"+
"\1\36\1\uffff\32\36",
"",
"\1\35\1\33\2\34\12\33\7\uffff\32\33\4\uffff\1\33\1\uffff\32"+
"\33",
"\uffff\41",
"\uffff\41",
"\15\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34",
"\1\36\13\uffff\1\37\1\34\2\35\12\34\7\uffff\32\34\4\uffff\1"+
"\34\1\uffff\32\34",
"\uffff\44",
"\uffff\44",
"\15\35\7\uffff\32\35\4\uffff\1\35\1\uffff\32\35",
"",
"\1\42",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"\1\35\1\33\2\34\12\33\7\uffff\32\33\4\uffff\1\33\1\uffff\32"+
"\33",
"",
"",
"",
"",
"",
"",
"\1\43",
"\1\44",
"\1\45",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"\1\36\13\uffff\1\37\1\34\2\35\12\34\7\uffff\32\34\4\uffff\1"+
"\34\1\uffff\32\34",
"",
"\1\36\13\uffff\1\37\1\36\2\uffff\12\36\7\uffff\32\36\4\uffff"+
"\1\36\1\uffff\32\36",
"",
"",
"",
"\1\42\13\uffff\1\37\1\36\2\uffff\12\36\7\uffff\32\36\4\uffff"+
"\1\36\1\uffff\32\36",
"",
"",
"\1\46",
"\1\47",
"\1\50",
"\1\51",
"\1\52",
"\1\53",
"\uffff\22",
"\1\54",
"\1\55",
"\1\56",
"\uffff\23",
""
};

View file

@ -18,25 +18,25 @@ T18 : '=' ;
T19 : '_' ;
T20 : '~' ;
// $ANTLR src "../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 1948
// $ANTLR src "../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 1802
RULE_SL_COMMENT : '#' ~(('\n'|'\r'))* ('\r'? '\n')?;
// $ANTLR src "../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 1950
// $ANTLR src "../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 1804
RULE_WS : (' '|'\t'|'\r'|'\n')+;
// $ANTLR src "../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 1952
RULE_ID : ('a'..'z'|'A'..'Z'|'_'|'-'|'0'..'9')+;
// $ANTLR src "../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 1806
RULE_ID : ('a'..'z'|'A'..'Z'|'_'|'-'|' '|'0'..'9')+;
// $ANTLR src "../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 1954
// $ANTLR src "../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 1808
RULE_IDLIST : (RULE_ID ',')* RULE_ID;
// $ANTLR src "../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 1956
// $ANTLR src "../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 1810
RULE_STRING : ('"' ('\\' ('b'|'t'|'n'|'f'|'r'|'"'|'\''|'\\')|~(('\\'|'"')))* '"'|'\'' ('\\' ('b'|'t'|'n'|'f'|'r'|'"'|'\''|'\\')|~(('\\'|'\'')))* '\'');
// $ANTLR src "../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 1958
// $ANTLR src "../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 1812
RULE_ANY_OTHER : .;
// $ANTLR src "../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 1960
// $ANTLR src "../org.wesnoth.wml.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 1814
RULE_PATH : (('a'..'z'|'A'..'Z'|'_'|'.'|'-'|'0'..'9')+ '/')* ('a'..'z'|'A'..'Z'|'_'|'.'|'-'|'0'..'9')+ '/'?;

View file

@ -79,11 +79,6 @@ public abstract class AbstractWMLRuntimeModule extends DefaultRuntimeModule {
return org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider.class;
}
// contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
public Class<? extends org.eclipse.xtext.parser.antlr.IUnorderedGroupHelper> bindIUnorderedGroupHelper() {
return org.eclipse.xtext.parser.antlr.UnorderedGroupHelper.class;
}
// contributed by org.eclipse.xtext.generator.validation.JavaValidatorFragment
@org.eclipse.xtext.service.SingletonBinding(eager=true) public Class<? extends org.wesnoth.validation.WMLJavaValidator> bindWMLJavaValidator() {
return org.wesnoth.validation.WMLJavaValidator.class;

View file

@ -16,7 +16,8 @@
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Preprocessor"/>
<eClassifiers xsi:type="ecore:EClass" name="Macro" eSuperTypes="#//Preprocessor">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="macroName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="macroContent" unique="false"
upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="PathInclude" eSuperTypes="#//Preprocessor">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="path" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>

View file

@ -18,7 +18,7 @@
</genClasses>
<genClasses ecoreClass="WML.ecore#//Preprocessor"/>
<genClasses ecoreClass="WML.ecore#//Macro">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute WML.ecore#//Macro/macroName"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute WML.ecore#//Macro/macroContent"/>
</genClasses>
<genClasses ecoreClass="WML.ecore#//PathInclude">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute WML.ecore#//PathInclude/path"/>

View file

@ -10,7 +10,7 @@
<type metamodel="//@metamodelDeclarations.1">
<classifier xsi:type="ecore:EClass" href="http://www.wesnoth.org/WML#//Root"/>
</type>
<alternatives xsi:type="xtext:UnorderedGroup">
<alternatives xsi:type="xtext:Group">
<elements xsi:type="xtext:Assignment" cardinality="*" feature="textdomains" operator="+=">
<terminal xsi:type="xtext:RuleCall" rule="//@rules.1"/>
</elements>
@ -48,7 +48,7 @@
</type>
<alternatives xsi:type="xtext:Group">
<elements xsi:type="xtext:Keyword" value="{"/>
<elements xsi:type="xtext:Assignment" feature="macroName" operator="=">
<elements xsi:type="xtext:Assignment" cardinality="+" feature="macroContent" operator="+=">
<terminal xsi:type="xtext:RuleCall" rule="//@rules.15"/>
</elements>
<elements xsi:type="xtext:Keyword" value="}"/>
@ -73,31 +73,27 @@
<type metamodel="//@metamodelDeclarations.1">
<classifier xsi:type="ecore:EClass" href="http://www.wesnoth.org/WML#//RootType"/>
</type>
<alternatives xsi:type="xtext:UnorderedGroup">
<elements xsi:type="xtext:Group">
<elements xsi:type="xtext:Keyword" value="["/>
<elements xsi:type="xtext:Assignment" feature="startTag" operator="=">
<terminal xsi:type="xtext:RuleCall" rule="//@rules.6"/>
</elements>
<elements xsi:type="xtext:Keyword" value="]"/>
<elements xsi:type="xtext:Assignment" cardinality="*" feature="subTypes" operator="+=">
<terminal xsi:type="xtext:RuleCall" rule="//@rules.5"/>
</elements>
<alternatives xsi:type="xtext:Group">
<elements xsi:type="xtext:Keyword" value="["/>
<elements xsi:type="xtext:Assignment" feature="startTag" operator="=">
<terminal xsi:type="xtext:RuleCall" rule="//@rules.6"/>
</elements>
<elements xsi:type="xtext:Keyword" value="]"/>
<elements xsi:type="xtext:Assignment" cardinality="*" feature="subTypes" operator="+=">
<terminal xsi:type="xtext:RuleCall" rule="//@rules.5"/>
</elements>
<elements xsi:type="xtext:Assignment" cardinality="*" feature="at" operator="+=">
<terminal xsi:type="xtext:RuleCall" rule="//@rules.10"/>
</elements>
<elements xsi:type="xtext:Group">
<elements xsi:type="xtext:Assignment" cardinality="*" feature="okpreproc" operator="+=">
<terminal xsi:type="xtext:RuleCall" rule="//@rules.2"/>
</elements>
<elements xsi:type="xtext:Keyword" value="["/>
<elements xsi:type="xtext:Keyword" value="/"/>
<elements xsi:type="xtext:Assignment" feature="endTag" operator="=">
<terminal xsi:type="xtext:RuleCall" rule="//@rules.6"/>
</elements>
<elements xsi:type="xtext:Keyword" value="]"/>
<elements xsi:type="xtext:Assignment" cardinality="*" feature="okpreproc" operator="+=">
<terminal xsi:type="xtext:RuleCall" rule="//@rules.2"/>
</elements>
<elements xsi:type="xtext:Keyword" value="["/>
<elements xsi:type="xtext:Keyword" value="/"/>
<elements xsi:type="xtext:Assignment" feature="endTag" operator="=">
<terminal xsi:type="xtext:RuleCall" rule="//@rules.6"/>
</elements>
<elements xsi:type="xtext:Keyword" value="]"/>
</alternatives>
</rules>
<rules xsi:type="xtext:ParserRule" name="RootTag">
@ -150,11 +146,11 @@
<elements xsi:type="xtext:Keyword" value="="/>
<elements xsi:type="xtext:Assignment" feature="attrValue" operator="=">
<terminal xsi:type="xtext:Alternatives">
<elements xsi:type="xtext:RuleCall" rule="//@rules.15"/>
<elements xsi:type="xtext:RuleCall" rule="//@rules.16"/>
<elements xsi:type="xtext:RuleCall" rule="//@rules.11"/>
<elements xsi:type="xtext:RuleCall" rule="//@rules.17"/>
<elements xsi:type="xtext:RuleCall" rule="//@rules.19"/>
<elements xsi:type="xtext:RuleCall" rule="//@rules.15"/>
<elements xsi:type="xtext:RuleCall" rule="//@rules.16"/>
</terminal>
</elements>
</alternatives>
@ -221,6 +217,7 @@
</elements>
<elements xsi:type="xtext:Keyword" value="_"/>
<elements xsi:type="xtext:Keyword" value="-"/>
<elements xsi:type="xtext:Keyword" value=" "/>
<elements xsi:type="xtext:CharacterRange">
<left value="0"/>
<right value="9"/>

View file

@ -31,12 +31,12 @@ protected class ThisRootNode extends RootToken {
@Override
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
switch(index) {
case 0: return new Root_UnorderedGroup(this, this, 0, inst);
case 0: return new Root_Group(this, this, 0, inst);
case 1: return new TextDomain_Group(this, this, 1, inst);
case 2: return new Preprocessor_Alternatives(this, this, 2, inst);
case 3: return new Macro_Group(this, this, 3, inst);
case 4: return new PathInclude_Group(this, this, 4, inst);
case 5: return new RootType_UnorderedGroup(this, this, 5, inst);
case 5: return new RootType_Group(this, this, 5, inst);
case 6: return new RootTag_Alternatives(this, this, 6, inst);
case 7: return new SimpleTag_Group(this, this, 7, inst);
case 8: return new AddedTag_Group(this, this, 8, inst);
@ -50,20 +50,20 @@ protected class ThisRootNode extends RootToken {
/************ begin Rule Root ****************
*
* Root:
* textdomains+=TextDomain* & preproc+=Preprocessor* & roots+=RootType*;
* textdomains+=TextDomain* preproc+=Preprocessor* roots+=RootType*;
*
**/
// textdomains+=TextDomain* & preproc+=Preprocessor* & roots+=RootType*
protected class Root_UnorderedGroup extends UnorderedGroupToken {
// textdomains+=TextDomain* preproc+=Preprocessor* roots+=RootType*
protected class Root_Group extends GroupToken {
public Root_UnorderedGroup(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
public Root_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
}
@Override
public UnorderedGroup getGrammarElement() {
return grammarAccess.getRootAccess().getUnorderedGroup();
public Group getGrammarElement() {
return grammarAccess.getRootAccess().getGroup();
}
@Override
@ -193,7 +193,7 @@ protected class Root_RootsAssignment_2 extends AssignmentToken {
@Override
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
switch(index) {
case 0: return new RootType_UnorderedGroup(this, this, 0, inst);
case 0: return new RootType_Group(this, this, 0, inst);
default: return null;
}
}
@ -442,11 +442,11 @@ protected class Preprocessor_PathIncludeParserRuleCall_1 extends RuleCallToken {
/************ begin Rule Macro ****************
*
* Macro:
* "{" macroName=ID "}";
* "{" macroContent+=ID+ "}";
*
**/
// "{" macroName=ID "}"
// "{" macroContent+=ID+ "}"
protected class Macro_Group extends GroupToken {
public Macro_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
@ -496,33 +496,34 @@ protected class Macro_LeftCurlyBracketKeyword_0 extends KeywordToken {
}
// macroName=ID
protected class Macro_MacroNameAssignment_1 extends AssignmentToken {
// macroContent+=ID+
protected class Macro_MacroContentAssignment_1 extends AssignmentToken {
public Macro_MacroNameAssignment_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
public Macro_MacroContentAssignment_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
}
@Override
public Assignment getGrammarElement() {
return grammarAccess.getMacroAccess().getMacroNameAssignment_1();
return grammarAccess.getMacroAccess().getMacroContentAssignment_1();
}
@Override
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
switch(index) {
case 0: return new Macro_LeftCurlyBracketKeyword_0(lastRuleCallOrigin, this, 0, inst);
case 0: return new Macro_MacroContentAssignment_1(lastRuleCallOrigin, this, 0, inst);
case 1: return new Macro_LeftCurlyBracketKeyword_0(lastRuleCallOrigin, this, 1, inst);
default: return null;
}
}
@Override
public IEObjectConsumer tryConsume() {
if((value = eObjectConsumer.getConsumable("macroName",true)) == null) return null;
IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("macroName");
if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getMacroAccess().getMacroNameIDTerminalRuleCall_1_0(), value, null)) {
if((value = eObjectConsumer.getConsumable("macroContent",true)) == null) return null;
IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("macroContent");
if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getMacroAccess().getMacroContentIDTerminalRuleCall_1_0(), value, null)) {
type = AssignmentType.TERMINAL_RULE_CALL;
element = grammarAccess.getMacroAccess().getMacroNameIDTerminalRuleCall_1_0();
element = grammarAccess.getMacroAccess().getMacroContentIDTerminalRuleCall_1_0();
return obj;
}
return null;
@ -545,7 +546,7 @@ protected class Macro_RightCurlyBracketKeyword_2 extends KeywordToken {
@Override
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
switch(index) {
case 0: return new Macro_MacroNameAssignment_1(lastRuleCallOrigin, this, 0, inst);
case 0: return new Macro_MacroContentAssignment_1(lastRuleCallOrigin, this, 0, inst);
default: return null;
}
}
@ -681,26 +682,26 @@ protected class PathInclude_RightCurlyBracketKeyword_2 extends KeywordToken {
/************ begin Rule RootType ****************
*
* RootType:
* "[" startTag=RootTag "]" subTypes+=RootType* & at+=Attributes* & okpreproc+=Preprocessor* "[" "/" endTag=RootTag "]";
* "[" startTag=RootTag "]" subTypes+=RootType* at+=Attributes* okpreproc+=Preprocessor* "[" "/" endTag=RootTag "]";
*
**/
// "[" startTag=RootTag "]" subTypes+=RootType* & at+=Attributes* & okpreproc+=Preprocessor* "[" "/" endTag=RootTag "]"
protected class RootType_UnorderedGroup extends UnorderedGroupToken {
// "[" startTag=RootTag "]" subTypes+=RootType* at+=Attributes* okpreproc+=Preprocessor* "[" "/" endTag=RootTag "]"
protected class RootType_Group extends GroupToken {
public RootType_UnorderedGroup(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
public RootType_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
}
@Override
public UnorderedGroup getGrammarElement() {
return grammarAccess.getRootTypeAccess().getUnorderedGroup();
public Group getGrammarElement() {
return grammarAccess.getRootTypeAccess().getGroup();
}
@Override
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
switch(index) {
case 0: return new RootType_Group_2(lastRuleCallOrigin, this, 0, inst);
case 0: return new RootType_RightSquareBracketKeyword_9(lastRuleCallOrigin, this, 0, inst);
default: return null;
}
}
@ -714,39 +715,16 @@ protected class RootType_UnorderedGroup extends UnorderedGroupToken {
}
// "[" startTag=RootTag "]" subTypes+=RootType*
protected class RootType_Group_0 extends GroupToken {
public RootType_Group_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
}
@Override
public Group getGrammarElement() {
return grammarAccess.getRootTypeAccess().getGroup_0();
}
@Override
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
switch(index) {
case 0: return new RootType_SubTypesAssignment_0_3(lastRuleCallOrigin, this, 0, inst);
case 1: return new RootType_RightSquareBracketKeyword_0_2(lastRuleCallOrigin, this, 1, inst);
default: return null;
}
}
}
// "["
protected class RootType_LeftSquareBracketKeyword_0_0 extends KeywordToken {
protected class RootType_LeftSquareBracketKeyword_0 extends KeywordToken {
public RootType_LeftSquareBracketKeyword_0_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
public RootType_LeftSquareBracketKeyword_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
}
@Override
public Keyword getGrammarElement() {
return grammarAccess.getRootTypeAccess().getLeftSquareBracketKeyword_0_0();
return grammarAccess.getRootTypeAccess().getLeftSquareBracketKeyword_0();
}
@Override
@ -759,15 +737,15 @@ protected class RootType_LeftSquareBracketKeyword_0_0 extends KeywordToken {
}
// startTag=RootTag
protected class RootType_StartTagAssignment_0_1 extends AssignmentToken {
protected class RootType_StartTagAssignment_1 extends AssignmentToken {
public RootType_StartTagAssignment_0_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
public RootType_StartTagAssignment_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
}
@Override
public Assignment getGrammarElement() {
return grammarAccess.getRootTypeAccess().getStartTagAssignment_0_1();
return grammarAccess.getRootTypeAccess().getStartTagAssignment_1();
}
@Override
@ -786,7 +764,7 @@ protected class RootType_StartTagAssignment_0_1 extends AssignmentToken {
IEObjectConsumer param = createEObjectConsumer((EObject)value);
if(param.isInstanceOf(grammarAccess.getRootTagRule().getType().getClassifier())) {
type = AssignmentType.PARSER_RULE_CALL;
element = grammarAccess.getRootTypeAccess().getStartTagRootTagParserRuleCall_0_1_0();
element = grammarAccess.getRootTypeAccess().getStartTagRootTagParserRuleCall_1_0();
consumed = obj;
return param;
}
@ -798,28 +776,28 @@ protected class RootType_StartTagAssignment_0_1 extends AssignmentToken {
public AbstractToken createFollowerAfterReturn(AbstractToken next, int actIndex, int index, IEObjectConsumer inst) {
if(value == inst.getEObject() && !inst.isConsumed()) return null;
switch(index) {
case 0: return new RootType_LeftSquareBracketKeyword_0_0(lastRuleCallOrigin, next, actIndex, consumed);
case 0: return new RootType_LeftSquareBracketKeyword_0(lastRuleCallOrigin, next, actIndex, consumed);
default: return null;
}
}
}
// "]"
protected class RootType_RightSquareBracketKeyword_0_2 extends KeywordToken {
protected class RootType_RightSquareBracketKeyword_2 extends KeywordToken {
public RootType_RightSquareBracketKeyword_0_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
public RootType_RightSquareBracketKeyword_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
}
@Override
public Keyword getGrammarElement() {
return grammarAccess.getRootTypeAccess().getRightSquareBracketKeyword_0_2();
return grammarAccess.getRootTypeAccess().getRightSquareBracketKeyword_2();
}
@Override
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
switch(index) {
case 0: return new RootType_StartTagAssignment_0_1(lastRuleCallOrigin, this, 0, inst);
case 0: return new RootType_StartTagAssignment_1(lastRuleCallOrigin, this, 0, inst);
default: return null;
}
}
@ -827,21 +805,21 @@ protected class RootType_RightSquareBracketKeyword_0_2 extends KeywordToken {
}
// subTypes+=RootType*
protected class RootType_SubTypesAssignment_0_3 extends AssignmentToken {
protected class RootType_SubTypesAssignment_3 extends AssignmentToken {
public RootType_SubTypesAssignment_0_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
public RootType_SubTypesAssignment_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
}
@Override
public Assignment getGrammarElement() {
return grammarAccess.getRootTypeAccess().getSubTypesAssignment_0_3();
return grammarAccess.getRootTypeAccess().getSubTypesAssignment_3();
}
@Override
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
switch(index) {
case 0: return new RootType_UnorderedGroup(this, this, 0, inst);
case 0: return new RootType_Group(this, this, 0, inst);
default: return null;
}
}
@ -854,7 +832,7 @@ protected class RootType_SubTypesAssignment_0_3 extends AssignmentToken {
IEObjectConsumer param = createEObjectConsumer((EObject)value);
if(param.isInstanceOf(grammarAccess.getRootTypeRule().getType().getClassifier())) {
type = AssignmentType.PARSER_RULE_CALL;
element = grammarAccess.getRootTypeAccess().getSubTypesRootTypeParserRuleCall_0_3_0();
element = grammarAccess.getRootTypeAccess().getSubTypesRootTypeParserRuleCall_3_0();
consumed = obj;
return param;
}
@ -866,24 +844,23 @@ protected class RootType_SubTypesAssignment_0_3 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 RootType_SubTypesAssignment_0_3(lastRuleCallOrigin, next, actIndex, consumed);
case 1: return new RootType_RightSquareBracketKeyword_0_2(lastRuleCallOrigin, next, actIndex, consumed);
case 0: return new RootType_SubTypesAssignment_3(lastRuleCallOrigin, next, actIndex, consumed);
case 1: return new RootType_RightSquareBracketKeyword_2(lastRuleCallOrigin, next, actIndex, consumed);
default: return null;
}
}
}
// at+=Attributes*
protected class RootType_AtAssignment_1 extends AssignmentToken {
protected class RootType_AtAssignment_4 extends AssignmentToken {
public RootType_AtAssignment_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
public RootType_AtAssignment_4(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
}
@Override
public Assignment getGrammarElement() {
return grammarAccess.getRootTypeAccess().getAtAssignment_1();
return grammarAccess.getRootTypeAccess().getAtAssignment_4();
}
@Override
@ -902,7 +879,7 @@ protected class RootType_AtAssignment_1 extends AssignmentToken {
IEObjectConsumer param = createEObjectConsumer((EObject)value);
if(param.isInstanceOf(grammarAccess.getAttributesRule().getType().getClassifier())) {
type = AssignmentType.PARSER_RULE_CALL;
element = grammarAccess.getRootTypeAccess().getAtAttributesParserRuleCall_1_0();
element = grammarAccess.getRootTypeAccess().getAtAttributesParserRuleCall_4_0();
consumed = obj;
return param;
}
@ -914,45 +891,24 @@ protected class RootType_AtAssignment_1 extends AssignmentToken {
public AbstractToken createFollowerAfterReturn(AbstractToken next, int actIndex, int index, IEObjectConsumer inst) {
if(value == inst.getEObject() && !inst.isConsumed()) return null;
switch(index) {
case 0: return new RootType_AtAssignment_1(lastRuleCallOrigin, next, actIndex, consumed);
case 1: return new RootType_Group_0(lastRuleCallOrigin, next, actIndex, consumed);
case 0: return new RootType_AtAssignment_4(lastRuleCallOrigin, next, actIndex, consumed);
case 1: return new RootType_SubTypesAssignment_3(lastRuleCallOrigin, next, actIndex, consumed);
case 2: return new RootType_RightSquareBracketKeyword_2(lastRuleCallOrigin, next, actIndex, consumed);
default: return null;
}
}
}
// okpreproc+=Preprocessor* "[" "/" endTag=RootTag "]"
protected class RootType_Group_2 extends GroupToken {
public RootType_Group_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
}
@Override
public Group getGrammarElement() {
return grammarAccess.getRootTypeAccess().getGroup_2();
}
@Override
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
switch(index) {
case 0: return new RootType_RightSquareBracketKeyword_2_4(lastRuleCallOrigin, this, 0, inst);
default: return null;
}
}
}
// okpreproc+=Preprocessor*
protected class RootType_OkpreprocAssignment_2_0 extends AssignmentToken {
protected class RootType_OkpreprocAssignment_5 extends AssignmentToken {
public RootType_OkpreprocAssignment_2_0(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
public RootType_OkpreprocAssignment_5(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
}
@Override
public Assignment getGrammarElement() {
return grammarAccess.getRootTypeAccess().getOkpreprocAssignment_2_0();
return grammarAccess.getRootTypeAccess().getOkpreprocAssignment_5();
}
@Override
@ -971,7 +927,7 @@ protected class RootType_OkpreprocAssignment_2_0 extends AssignmentToken {
IEObjectConsumer param = createEObjectConsumer((EObject)value);
if(param.isInstanceOf(grammarAccess.getPreprocessorRule().getType().getClassifier())) {
type = AssignmentType.PARSER_RULE_CALL;
element = grammarAccess.getRootTypeAccess().getOkpreprocPreprocessorParserRuleCall_2_0_0();
element = grammarAccess.getRootTypeAccess().getOkpreprocPreprocessorParserRuleCall_5_0();
consumed = obj;
return param;
}
@ -983,32 +939,34 @@ protected class RootType_OkpreprocAssignment_2_0 extends AssignmentToken {
public AbstractToken createFollowerAfterReturn(AbstractToken next, int actIndex, int index, IEObjectConsumer inst) {
if(value == inst.getEObject() && !inst.isConsumed()) return null;
switch(index) {
case 0: return new RootType_OkpreprocAssignment_2_0(lastRuleCallOrigin, next, actIndex, consumed);
case 1: return new RootType_AtAssignment_1(lastRuleCallOrigin, next, actIndex, consumed);
case 2: return new RootType_Group_0(lastRuleCallOrigin, next, actIndex, consumed);
case 0: return new RootType_OkpreprocAssignment_5(lastRuleCallOrigin, next, actIndex, consumed);
case 1: return new RootType_AtAssignment_4(lastRuleCallOrigin, next, actIndex, consumed);
case 2: return new RootType_SubTypesAssignment_3(lastRuleCallOrigin, next, actIndex, consumed);
case 3: return new RootType_RightSquareBracketKeyword_2(lastRuleCallOrigin, next, actIndex, consumed);
default: return null;
}
}
}
// "["
protected class RootType_LeftSquareBracketKeyword_2_1 extends KeywordToken {
protected class RootType_LeftSquareBracketKeyword_6 extends KeywordToken {
public RootType_LeftSquareBracketKeyword_2_1(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
public RootType_LeftSquareBracketKeyword_6(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
}
@Override
public Keyword getGrammarElement() {
return grammarAccess.getRootTypeAccess().getLeftSquareBracketKeyword_2_1();
return grammarAccess.getRootTypeAccess().getLeftSquareBracketKeyword_6();
}
@Override
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
switch(index) {
case 0: return new RootType_OkpreprocAssignment_2_0(lastRuleCallOrigin, this, 0, inst);
case 1: return new RootType_AtAssignment_1(lastRuleCallOrigin, this, 1, inst);
case 2: return new RootType_Group_0(lastRuleCallOrigin, this, 2, inst);
case 0: return new RootType_OkpreprocAssignment_5(lastRuleCallOrigin, this, 0, inst);
case 1: return new RootType_AtAssignment_4(lastRuleCallOrigin, this, 1, inst);
case 2: return new RootType_SubTypesAssignment_3(lastRuleCallOrigin, this, 2, inst);
case 3: return new RootType_RightSquareBracketKeyword_2(lastRuleCallOrigin, this, 3, inst);
default: return null;
}
}
@ -1016,21 +974,21 @@ protected class RootType_LeftSquareBracketKeyword_2_1 extends KeywordToken {
}
// "/"
protected class RootType_SolidusKeyword_2_2 extends KeywordToken {
protected class RootType_SolidusKeyword_7 extends KeywordToken {
public RootType_SolidusKeyword_2_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
public RootType_SolidusKeyword_7(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
}
@Override
public Keyword getGrammarElement() {
return grammarAccess.getRootTypeAccess().getSolidusKeyword_2_2();
return grammarAccess.getRootTypeAccess().getSolidusKeyword_7();
}
@Override
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
switch(index) {
case 0: return new RootType_LeftSquareBracketKeyword_2_1(lastRuleCallOrigin, this, 0, inst);
case 0: return new RootType_LeftSquareBracketKeyword_6(lastRuleCallOrigin, this, 0, inst);
default: return null;
}
}
@ -1038,15 +996,15 @@ protected class RootType_SolidusKeyword_2_2 extends KeywordToken {
}
// endTag=RootTag
protected class RootType_EndTagAssignment_2_3 extends AssignmentToken {
protected class RootType_EndTagAssignment_8 extends AssignmentToken {
public RootType_EndTagAssignment_2_3(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
public RootType_EndTagAssignment_8(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
}
@Override
public Assignment getGrammarElement() {
return grammarAccess.getRootTypeAccess().getEndTagAssignment_2_3();
return grammarAccess.getRootTypeAccess().getEndTagAssignment_8();
}
@Override
@ -1065,7 +1023,7 @@ protected class RootType_EndTagAssignment_2_3 extends AssignmentToken {
IEObjectConsumer param = createEObjectConsumer((EObject)value);
if(param.isInstanceOf(grammarAccess.getRootTagRule().getType().getClassifier())) {
type = AssignmentType.PARSER_RULE_CALL;
element = grammarAccess.getRootTypeAccess().getEndTagRootTagParserRuleCall_2_3_0();
element = grammarAccess.getRootTypeAccess().getEndTagRootTagParserRuleCall_8_0();
consumed = obj;
return param;
}
@ -1077,28 +1035,28 @@ protected class RootType_EndTagAssignment_2_3 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 RootType_SolidusKeyword_2_2(lastRuleCallOrigin, next, actIndex, consumed);
case 0: return new RootType_SolidusKeyword_7(lastRuleCallOrigin, next, actIndex, consumed);
default: return null;
}
}
}
// "]"
protected class RootType_RightSquareBracketKeyword_2_4 extends KeywordToken {
protected class RootType_RightSquareBracketKeyword_9 extends KeywordToken {
public RootType_RightSquareBracketKeyword_2_4(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
public RootType_RightSquareBracketKeyword_9(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
super(lastRuleCallOrigin, next, transitionIndex, eObjectConsumer);
}
@Override
public Keyword getGrammarElement() {
return grammarAccess.getRootTypeAccess().getRightSquareBracketKeyword_2_4();
return grammarAccess.getRootTypeAccess().getRightSquareBracketKeyword_9();
}
@Override
public AbstractToken createFollower(int index, IEObjectConsumer inst) {
switch(index) {
case 0: return new RootType_EndTagAssignment_2_3(lastRuleCallOrigin, this, 0, inst);
case 0: return new RootType_EndTagAssignment_8(lastRuleCallOrigin, this, 0, inst);
default: return null;
}
}
@ -1106,7 +1064,6 @@ protected class RootType_RightSquareBracketKeyword_2_4 extends KeywordToken {
}
/************ end Rule RootType ****************/
@ -1430,11 +1387,11 @@ protected class AddedTag_TagNameAssignment_1 extends AssignmentToken {
/************ begin Rule Attributes ****************
*
* Attributes:
* attrName=ID "=" attrValue=(ID | IDLIST | TSTRING | STRING | PATH);
* attrName=ID "=" attrValue=(TSTRING | STRING | PATH | ID | IDLIST);
*
**/
// attrName=ID "=" attrValue=(ID | IDLIST | TSTRING | STRING | PATH)
// attrName=ID "=" attrValue=(TSTRING | STRING | PATH | ID | IDLIST)
protected class Attributes_Group extends GroupToken {
public Attributes_Group(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
@ -1518,7 +1475,7 @@ protected class Attributes_EqualsSignKeyword_1 extends KeywordToken {
}
// attrValue=(ID | IDLIST | TSTRING | STRING | PATH)
// attrValue=(TSTRING | STRING | PATH | ID | IDLIST)
protected class Attributes_AttrValueAssignment_2 extends AssignmentToken {
public Attributes_AttrValueAssignment_2(AbstractToken lastRuleCallOrigin, AbstractToken next, int transitionIndex, IEObjectConsumer eObjectConsumer) {
@ -1542,29 +1499,29 @@ protected class Attributes_AttrValueAssignment_2 extends AssignmentToken {
public IEObjectConsumer tryConsume() {
if((value = eObjectConsumer.getConsumable("attrValue",true)) == null) return null;
IEObjectConsumer obj = eObjectConsumer.cloneAndConsume("attrValue");
if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getAttributesAccess().getAttrValueIDTerminalRuleCall_2_0_0(), value, null)) {
type = AssignmentType.TERMINAL_RULE_CALL;
element = grammarAccess.getAttributesAccess().getAttrValueIDTerminalRuleCall_2_0_0();
return obj;
}
if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getAttributesAccess().getAttrValueIDLISTTerminalRuleCall_2_0_1(), value, null)) {
type = AssignmentType.TERMINAL_RULE_CALL;
element = grammarAccess.getAttributesAccess().getAttrValueIDLISTTerminalRuleCall_2_0_1();
return obj;
}
if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getAttributesAccess().getAttrValueTSTRINGParserRuleCall_2_0_2(), value, null)) {
if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getAttributesAccess().getAttrValueTSTRINGParserRuleCall_2_0_0(), value, null)) {
type = AssignmentType.DATATYPE_RULE_CALL;
element = grammarAccess.getAttributesAccess().getAttrValueTSTRINGParserRuleCall_2_0_2();
element = grammarAccess.getAttributesAccess().getAttrValueTSTRINGParserRuleCall_2_0_0();
return obj;
}
if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getAttributesAccess().getAttrValueSTRINGTerminalRuleCall_2_0_3(), value, null)) {
if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getAttributesAccess().getAttrValueSTRINGTerminalRuleCall_2_0_1(), value, null)) {
type = AssignmentType.TERMINAL_RULE_CALL;
element = grammarAccess.getAttributesAccess().getAttrValueSTRINGTerminalRuleCall_2_0_3();
element = grammarAccess.getAttributesAccess().getAttrValueSTRINGTerminalRuleCall_2_0_1();
return obj;
}
if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getAttributesAccess().getAttrValuePATHTerminalRuleCall_2_0_4(), value, null)) {
if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getAttributesAccess().getAttrValuePATHTerminalRuleCall_2_0_2(), value, null)) {
type = AssignmentType.TERMINAL_RULE_CALL;
element = grammarAccess.getAttributesAccess().getAttrValuePATHTerminalRuleCall_2_0_4();
element = grammarAccess.getAttributesAccess().getAttrValuePATHTerminalRuleCall_2_0_2();
return obj;
}
if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getAttributesAccess().getAttrValueIDTerminalRuleCall_2_0_3(), value, null)) {
type = AssignmentType.TERMINAL_RULE_CALL;
element = grammarAccess.getAttributesAccess().getAttrValueIDTerminalRuleCall_2_0_3();
return obj;
}
if(valueSerializer.isValid(obj.getEObject(), grammarAccess.getAttributesAccess().getAttrValueIDLISTTerminalRuleCall_2_0_4(), value, null)) {
type = AssignmentType.TERMINAL_RULE_CALL;
element = grammarAccess.getAttributesAccess().getAttrValueIDLISTTerminalRuleCall_2_0_4();
return obj;
}
return null;

View file

@ -89,26 +89,12 @@ ruleRoot returns [EObject current=null]
@after { resetLookahead();
lastConsumedNode = currentNode;
}:
(
(
{
getUnorderedGroupHelper().enter(grammarAccess.getRootAccess().getUnorderedGroup());
}
(
(
(
{getUnorderedGroupHelper().canSelect(grammarAccess.getRootAccess().getUnorderedGroup(), 0)}?=>(
{
getUnorderedGroupHelper().select(grammarAccess.getRootAccess().getUnorderedGroup(), 0);
}
(
((
(
{
currentNode=createCompositeNode(grammarAccess.getRootAccess().getTextdomainsTextDomainParserRuleCall_0_0(), currentNode);
}
lv_textdomains_1_0=ruleTextDomain {
lv_textdomains_0_0=ruleTextDomain {
if ($current==null) {
$current = factory.create(grammarAccess.getRootRule().getType().getClassifier());
associateNodeWithAstElement(currentNode.getParent(), $current);
@ -117,7 +103,7 @@ ruleRoot returns [EObject current=null]
add(
$current,
"textdomains",
lv_textdomains_1_0,
lv_textdomains_0_0,
"TextDomain",
currentNode);
} catch (ValueConverterException vce) {
@ -127,24 +113,12 @@ ruleRoot returns [EObject current=null]
}
)
)+
{
getUnorderedGroupHelper().returnFromSelection(grammarAccess.getRootAccess().getUnorderedGroup());
}
)
) |
(
{getUnorderedGroupHelper().canSelect(grammarAccess.getRootAccess().getUnorderedGroup(), 1)}?=>(
{
getUnorderedGroupHelper().select(grammarAccess.getRootAccess().getUnorderedGroup(), 1);
}
(
)*(
(
{
currentNode=createCompositeNode(grammarAccess.getRootAccess().getPreprocPreprocessorParserRuleCall_1_0(), currentNode);
}
lv_preproc_2_0=rulePreprocessor {
lv_preproc_1_0=rulePreprocessor {
if ($current==null) {
$current = factory.create(grammarAccess.getRootRule().getType().getClassifier());
associateNodeWithAstElement(currentNode.getParent(), $current);
@ -153,7 +127,7 @@ ruleRoot returns [EObject current=null]
add(
$current,
"preproc",
lv_preproc_2_0,
lv_preproc_1_0,
"Preprocessor",
currentNode);
} catch (ValueConverterException vce) {
@ -163,24 +137,12 @@ ruleRoot returns [EObject current=null]
}
)
)+
{
getUnorderedGroupHelper().returnFromSelection(grammarAccess.getRootAccess().getUnorderedGroup());
}
)
) |
(
{getUnorderedGroupHelper().canSelect(grammarAccess.getRootAccess().getUnorderedGroup(), 2)}?=>(
{
getUnorderedGroupHelper().select(grammarAccess.getRootAccess().getUnorderedGroup(), 2);
}
(
)*(
(
{
currentNode=createCompositeNode(grammarAccess.getRootAccess().getRootsRootTypeParserRuleCall_2_0(), currentNode);
}
lv_roots_3_0=ruleRootType {
lv_roots_2_0=ruleRootType {
if ($current==null) {
$current = factory.create(grammarAccess.getRootRule().getType().getClassifier());
associateNodeWithAstElement(currentNode.getParent(), $current);
@ -189,7 +151,7 @@ ruleRoot returns [EObject current=null]
add(
$current,
"roots",
lv_roots_3_0,
lv_roots_2_0,
"RootType",
currentNode);
} catch (ValueConverterException vce) {
@ -199,21 +161,7 @@ ruleRoot returns [EObject current=null]
}
)
)+
{
getUnorderedGroupHelper().returnFromSelection(grammarAccess.getRootAccess().getUnorderedGroup());
}
)
)
)*
)
)
{
getUnorderedGroupHelper().leave(grammarAccess.getRootAccess().getUnorderedGroup());
}
)
)*)
;
@ -335,9 +283,9 @@ ruleMacro returns [EObject current=null]
}
(
(
lv_macroName_1_0=RULE_ID
lv_macroContent_1_0=RULE_ID
{
createLeafNode(grammarAccess.getMacroAccess().getMacroNameIDTerminalRuleCall_1_0(), "macroName");
createLeafNode(grammarAccess.getMacroAccess().getMacroContentIDTerminalRuleCall_1_0(), "macroContent");
}
{
if ($current==null) {
@ -345,10 +293,10 @@ ruleMacro returns [EObject current=null]
associateNodeWithAstElement(currentNode, $current);
}
try {
set(
add(
$current,
"macroName",
lv_macroName_1_0,
"macroContent",
lv_macroContent_1_0,
"ID",
lastConsumedNode);
} catch (ValueConverterException vce) {
@ -357,7 +305,7 @@ ruleMacro returns [EObject current=null]
}
)
) '}'
)+ '}'
{
createLeafNode(grammarAccess.getMacroAccess().getRightCurlyBracketKeyword_2(), null);
}
@ -463,30 +411,16 @@ ruleRootType returns [EObject current=null]
@after { resetLookahead();
lastConsumedNode = currentNode;
}:
(
(
{
getUnorderedGroupHelper().enter(grammarAccess.getRootTypeAccess().getUnorderedGroup());
}
(
(
(
{getUnorderedGroupHelper().canSelect(grammarAccess.getRootTypeAccess().getUnorderedGroup(), 0)}?=>(
{
getUnorderedGroupHelper().select(grammarAccess.getRootTypeAccess().getUnorderedGroup(), 0);
}
( '['
( '['
{
createLeafNode(grammarAccess.getRootTypeAccess().getLeftSquareBracketKeyword_0_0(), null);
createLeafNode(grammarAccess.getRootTypeAccess().getLeftSquareBracketKeyword_0(), null);
}
(
(
{
currentNode=createCompositeNode(grammarAccess.getRootTypeAccess().getStartTagRootTagParserRuleCall_0_1_0(), currentNode);
currentNode=createCompositeNode(grammarAccess.getRootTypeAccess().getStartTagRootTagParserRuleCall_1_0(), currentNode);
}
lv_startTag_2_0=ruleRootTag {
lv_startTag_1_0=ruleRootTag {
if ($current==null) {
$current = factory.create(grammarAccess.getRootTypeRule().getType().getClassifier());
associateNodeWithAstElement(currentNode.getParent(), $current);
@ -495,7 +429,7 @@ ruleRootType returns [EObject current=null]
set(
$current,
"startTag",
lv_startTag_2_0,
lv_startTag_1_0,
"RootTag",
currentNode);
} catch (ValueConverterException vce) {
@ -507,14 +441,14 @@ ruleRootType returns [EObject current=null]
)
) ']'
{
createLeafNode(grammarAccess.getRootTypeAccess().getRightSquareBracketKeyword_0_2(), null);
createLeafNode(grammarAccess.getRootTypeAccess().getRightSquareBracketKeyword_2(), null);
}
(
(
{
currentNode=createCompositeNode(grammarAccess.getRootTypeAccess().getSubTypesRootTypeParserRuleCall_0_3_0(), currentNode);
currentNode=createCompositeNode(grammarAccess.getRootTypeAccess().getSubTypesRootTypeParserRuleCall_3_0(), currentNode);
}
lv_subTypes_4_0=ruleRootType {
lv_subTypes_3_0=ruleRootType {
if ($current==null) {
$current = factory.create(grammarAccess.getRootTypeRule().getType().getClassifier());
associateNodeWithAstElement(currentNode.getParent(), $current);
@ -523,7 +457,7 @@ ruleRootType returns [EObject current=null]
add(
$current,
"subTypes",
lv_subTypes_4_0,
lv_subTypes_3_0,
"RootType",
currentNode);
} catch (ValueConverterException vce) {
@ -533,24 +467,12 @@ ruleRootType returns [EObject current=null]
}
)
)*)
{
getUnorderedGroupHelper().returnFromSelection(grammarAccess.getRootTypeAccess().getUnorderedGroup());
}
)
) |
(
{getUnorderedGroupHelper().canSelect(grammarAccess.getRootTypeAccess().getUnorderedGroup(), 1)}?=>(
{
getUnorderedGroupHelper().select(grammarAccess.getRootTypeAccess().getUnorderedGroup(), 1);
}
(
)*(
(
{
currentNode=createCompositeNode(grammarAccess.getRootTypeAccess().getAtAttributesParserRuleCall_1_0(), currentNode);
currentNode=createCompositeNode(grammarAccess.getRootTypeAccess().getAtAttributesParserRuleCall_4_0(), currentNode);
}
lv_at_5_0=ruleAttributes {
lv_at_4_0=ruleAttributes {
if ($current==null) {
$current = factory.create(grammarAccess.getRootTypeRule().getType().getClassifier());
associateNodeWithAstElement(currentNode.getParent(), $current);
@ -559,7 +481,7 @@ ruleRootType returns [EObject current=null]
add(
$current,
"at",
lv_at_5_0,
lv_at_4_0,
"Attributes",
currentNode);
} catch (ValueConverterException vce) {
@ -569,24 +491,12 @@ ruleRootType returns [EObject current=null]
}
)
)+
{
getUnorderedGroupHelper().returnFromSelection(grammarAccess.getRootTypeAccess().getUnorderedGroup());
}
)
) |
(
{getUnorderedGroupHelper().canSelect(grammarAccess.getRootTypeAccess().getUnorderedGroup(), 2)}?=>(
{
getUnorderedGroupHelper().select(grammarAccess.getRootTypeAccess().getUnorderedGroup(), 2);
}
((
)*(
(
{
currentNode=createCompositeNode(grammarAccess.getRootTypeAccess().getOkpreprocPreprocessorParserRuleCall_2_0_0(), currentNode);
currentNode=createCompositeNode(grammarAccess.getRootTypeAccess().getOkpreprocPreprocessorParserRuleCall_5_0(), currentNode);
}
lv_okpreproc_6_0=rulePreprocessor {
lv_okpreproc_5_0=rulePreprocessor {
if ($current==null) {
$current = factory.create(grammarAccess.getRootTypeRule().getType().getClassifier());
associateNodeWithAstElement(currentNode.getParent(), $current);
@ -595,7 +505,7 @@ ruleRootType returns [EObject current=null]
add(
$current,
"okpreproc",
lv_okpreproc_6_0,
lv_okpreproc_5_0,
"Preprocessor",
currentNode);
} catch (ValueConverterException vce) {
@ -607,18 +517,18 @@ ruleRootType returns [EObject current=null]
)
)* '['
{
createLeafNode(grammarAccess.getRootTypeAccess().getLeftSquareBracketKeyword_2_1(), null);
createLeafNode(grammarAccess.getRootTypeAccess().getLeftSquareBracketKeyword_6(), null);
}
'/'
{
createLeafNode(grammarAccess.getRootTypeAccess().getSolidusKeyword_2_2(), null);
createLeafNode(grammarAccess.getRootTypeAccess().getSolidusKeyword_7(), null);
}
(
(
{
currentNode=createCompositeNode(grammarAccess.getRootTypeAccess().getEndTagRootTagParserRuleCall_2_3_0(), currentNode);
currentNode=createCompositeNode(grammarAccess.getRootTypeAccess().getEndTagRootTagParserRuleCall_8_0(), currentNode);
}
lv_endTag_9_0=ruleRootTag {
lv_endTag_8_0=ruleRootTag {
if ($current==null) {
$current = factory.create(grammarAccess.getRootTypeRule().getType().getClassifier());
associateNodeWithAstElement(currentNode.getParent(), $current);
@ -627,7 +537,7 @@ ruleRootType returns [EObject current=null]
set(
$current,
"endTag",
lv_endTag_9_0,
lv_endTag_8_0,
"RootTag",
currentNode);
} catch (ValueConverterException vce) {
@ -639,23 +549,8 @@ ruleRootType returns [EObject current=null]
)
) ']'
{
createLeafNode(grammarAccess.getRootTypeAccess().getRightSquareBracketKeyword_2_4(), null);
createLeafNode(grammarAccess.getRootTypeAccess().getRightSquareBracketKeyword_9(), null);
}
)
{
getUnorderedGroupHelper().returnFromSelection(grammarAccess.getRootTypeAccess().getUnorderedGroup());
}
)
)
)+
{getUnorderedGroupHelper().canLeave(grammarAccess.getRootTypeAccess().getUnorderedGroup())}?
)
)
{
getUnorderedGroupHelper().leave(grammarAccess.getRootTypeAccess().getUnorderedGroup());
}
)
;
@ -901,30 +796,30 @@ ruleAttributes returns [EObject current=null]
(
(
(
lv_attrValue_2_1=RULE_ID
{
createLeafNode(grammarAccess.getAttributesAccess().getAttrValueIDTerminalRuleCall_2_0_0(), "attrValue");
}
{
{
currentNode=createCompositeNode(grammarAccess.getAttributesAccess().getAttrValueTSTRINGParserRuleCall_2_0_0(), currentNode);
}
lv_attrValue_2_1=ruleTSTRING {
if ($current==null) {
$current = factory.create(grammarAccess.getAttributesRule().getType().getClassifier());
associateNodeWithAstElement(currentNode, $current);
associateNodeWithAstElement(currentNode.getParent(), $current);
}
try {
set(
$current,
"attrValue",
lv_attrValue_2_1,
"ID",
lastConsumedNode);
"TSTRING",
currentNode);
} catch (ValueConverterException vce) {
handleValueConverterException(vce);
}
currentNode = currentNode.getParent();
}
| lv_attrValue_2_2=RULE_IDLIST
| lv_attrValue_2_2=RULE_STRING
{
createLeafNode(grammarAccess.getAttributesAccess().getAttrValueIDLISTTerminalRuleCall_2_0_1(), "attrValue");
createLeafNode(grammarAccess.getAttributesAccess().getAttrValueSTRINGTerminalRuleCall_2_0_1(), "attrValue");
}
{
if ($current==null) {
@ -936,37 +831,37 @@ ruleAttributes returns [EObject current=null]
$current,
"attrValue",
lv_attrValue_2_2,
"IDLIST",
"STRING",
lastConsumedNode);
} catch (ValueConverterException vce) {
handleValueConverterException(vce);
}
}
| {
currentNode=createCompositeNode(grammarAccess.getAttributesAccess().getAttrValueTSTRINGParserRuleCall_2_0_2(), currentNode);
}
lv_attrValue_2_3=ruleTSTRING {
| lv_attrValue_2_3=RULE_PATH
{
createLeafNode(grammarAccess.getAttributesAccess().getAttrValuePATHTerminalRuleCall_2_0_2(), "attrValue");
}
{
if ($current==null) {
$current = factory.create(grammarAccess.getAttributesRule().getType().getClassifier());
associateNodeWithAstElement(currentNode.getParent(), $current);
associateNodeWithAstElement(currentNode, $current);
}
try {
set(
$current,
"attrValue",
lv_attrValue_2_3,
"TSTRING",
currentNode);
"PATH",
lastConsumedNode);
} catch (ValueConverterException vce) {
handleValueConverterException(vce);
}
currentNode = currentNode.getParent();
}
| lv_attrValue_2_4=RULE_STRING
| lv_attrValue_2_4=RULE_ID
{
createLeafNode(grammarAccess.getAttributesAccess().getAttrValueSTRINGTerminalRuleCall_2_0_3(), "attrValue");
createLeafNode(grammarAccess.getAttributesAccess().getAttrValueIDTerminalRuleCall_2_0_3(), "attrValue");
}
{
if ($current==null) {
@ -978,16 +873,16 @@ ruleAttributes returns [EObject current=null]
$current,
"attrValue",
lv_attrValue_2_4,
"STRING",
"ID",
lastConsumedNode);
} catch (ValueConverterException vce) {
handleValueConverterException(vce);
}
}
| lv_attrValue_2_5=RULE_PATH
| lv_attrValue_2_5=RULE_IDLIST
{
createLeafNode(grammarAccess.getAttributesAccess().getAttrValuePATHTerminalRuleCall_2_0_4(), "attrValue");
createLeafNode(grammarAccess.getAttributesAccess().getAttrValueIDLISTTerminalRuleCall_2_0_4(), "attrValue");
}
{
if ($current==null) {
@ -999,7 +894,7 @@ ruleAttributes returns [EObject current=null]
$current,
"attrValue",
lv_attrValue_2_5,
"PATH",
"IDLIST",
lastConsumedNode);
} catch (ValueConverterException vce) {
handleValueConverterException(vce);
@ -1092,7 +987,7 @@ RULE_SL_COMMENT : '#' ~(('\n'|'\r'))* ('\r'? '\n')?;
RULE_WS : (' '|'\t'|'\r'|'\n')+;
RULE_ID : ('a'..'z'|'A'..'Z'|'_'|'-'|'0'..'9')+;
RULE_ID : ('a'..'z'|'A'..'Z'|'_'|'-'|' '|'0'..'9')+;
RULE_IDLIST : (RULE_ID ',')* RULE_ID;

View file

@ -1,6 +1,6 @@
RULE_ID=4
RULE_STRING=7
RULE_IDLIST=6
RULE_STRING=6
RULE_IDLIST=7
RULE_ANY_OTHER=10
RULE_PATH=5
RULE_WS=9

View file

@ -13,14 +13,14 @@ import java.util.ArrayList;
@SuppressWarnings("all")
public class InternalWMLLexer extends Lexer {
public static final int RULE_ID=4;
public static final int RULE_IDLIST=6;
public static final int RULE_IDLIST=7;
public static final int RULE_ANY_OTHER=10;
public static final int RULE_PATH=5;
public static final int Tokens=21;
public static final int EOF=-1;
public static final int RULE_SL_COMMENT=8;
public static final int T20=20;
public static final int RULE_STRING=7;
public static final int RULE_STRING=6;
public static final int T11=11;
public static final int T12=12;
public static final int T13=13;
@ -222,11 +222,11 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_SL_COMMENT() throws RecognitionException {
try {
int _type = RULE_SL_COMMENT;
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1091:17: ( '#' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1091:19: '#' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:986:17: ( '#' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:986:19: '#' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
{
match('#');
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1091:23: (~ ( ( '\\n' | '\\r' ) ) )*
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:986:23: (~ ( ( '\\n' | '\\r' ) ) )*
loop1:
do {
int alt1=2;
@ -239,7 +239,7 @@ public class InternalWMLLexer extends Lexer {
switch (alt1) {
case 1 :
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1091:23: ~ ( ( '\\n' | '\\r' ) )
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:986:23: ~ ( ( '\\n' | '\\r' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFE') ) {
input.consume();
@ -260,7 +260,7 @@ public class InternalWMLLexer extends Lexer {
}
} while (true);
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1091:39: ( ( '\\r' )? '\\n' )?
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:986:39: ( ( '\\r' )? '\\n' )?
int alt3=2;
int LA3_0 = input.LA(1);
@ -269,9 +269,9 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt3) {
case 1 :
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1091:40: ( '\\r' )? '\\n'
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:986:40: ( '\\r' )? '\\n'
{
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1091:40: ( '\\r' )?
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:986:40: ( '\\r' )?
int alt2=2;
int LA2_0 = input.LA(1);
@ -280,7 +280,7 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt2) {
case 1 :
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1091:40: '\\r'
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:986:40: '\\r'
{
match('\r');
@ -310,10 +310,10 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_WS() throws RecognitionException {
try {
int _type = RULE_WS;
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1093:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1093:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:988:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:988:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
{
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1093:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:988:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
int cnt4=0;
loop4:
do {
@ -366,17 +366,17 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_ID() throws RecognitionException {
try {
int _type = RULE_ID;
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1095:9: ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '-' | '0' .. '9' )+ )
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1095:11: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '-' | '0' .. '9' )+
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:990:9: ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '-' | ' ' | '0' .. '9' )+ )
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:990:11: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '-' | ' ' | '0' .. '9' )+
{
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1095:11: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '-' | '0' .. '9' )+
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:990:11: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '-' | ' ' | '0' .. '9' )+
int cnt5=0;
loop5:
do {
int alt5=2;
int LA5_0 = input.LA(1);
if ( (LA5_0=='-'||(LA5_0>='0' && LA5_0<='9')||(LA5_0>='A' && LA5_0<='Z')||LA5_0=='_'||(LA5_0>='a' && LA5_0<='z')) ) {
if ( (LA5_0==' '||LA5_0=='-'||(LA5_0>='0' && LA5_0<='9')||(LA5_0>='A' && LA5_0<='Z')||LA5_0=='_'||(LA5_0>='a' && LA5_0<='z')) ) {
alt5=1;
}
@ -385,7 +385,7 @@ public class InternalWMLLexer extends Lexer {
case 1 :
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:
{
if ( input.LA(1)=='-'||(input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {
if ( input.LA(1)==' '||input.LA(1)=='-'||(input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {
input.consume();
}
@ -422,17 +422,17 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_IDLIST() throws RecognitionException {
try {
int _type = RULE_IDLIST;
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1097:13: ( ( RULE_ID ',' )* RULE_ID )
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1097:15: ( RULE_ID ',' )* RULE_ID
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:992:13: ( ( RULE_ID ',' )* RULE_ID )
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:992:15: ( RULE_ID ',' )* RULE_ID
{
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1097:15: ( RULE_ID ',' )*
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:992:15: ( RULE_ID ',' )*
loop6:
do {
int alt6=2;
alt6 = dfa6.predict(input);
switch (alt6) {
case 1 :
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1097:16: RULE_ID ','
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:992:16: RULE_ID ','
{
mRULE_ID();
match(',');
@ -460,10 +460,10 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_STRING() throws RecognitionException {
try {
int _type = RULE_STRING;
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1099:13: ( ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) )
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1099:15: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:994:13: ( ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) )
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:994:15: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
{
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1099:15: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:994:15: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
int alt9=2;
int LA9_0 = input.LA(1);
@ -475,16 +475,16 @@ public class InternalWMLLexer extends Lexer {
}
else {
NoViableAltException nvae =
new NoViableAltException("1099:15: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )", 9, 0, input);
new NoViableAltException("994:15: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )", 9, 0, input);
throw nvae;
}
switch (alt9) {
case 1 :
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1099:16: '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"'
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:994:16: '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )* '\"'
{
match('\"');
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1099:20: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )*
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:994:20: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\"' ) ) )*
loop7:
do {
int alt7=3;
@ -500,7 +500,7 @@ public class InternalWMLLexer extends Lexer {
switch (alt7) {
case 1 :
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1099:21: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' )
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:994:21: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' )
{
match('\\');
if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||input.LA(1)=='t' ) {
@ -517,7 +517,7 @@ public class InternalWMLLexer extends Lexer {
}
break;
case 2 :
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1099:62: ~ ( ( '\\\\' | '\"' ) )
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:994:62: ~ ( ( '\\\\' | '\"' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
input.consume();
@ -543,10 +543,10 @@ public class InternalWMLLexer extends Lexer {
}
break;
case 2 :
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1099:82: '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\''
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:994:82: '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )* '\\''
{
match('\'');
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1099:87: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )*
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:994:87: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' ) | ~ ( ( '\\\\' | '\\'' ) ) )*
loop8:
do {
int alt8=3;
@ -562,7 +562,7 @@ public class InternalWMLLexer extends Lexer {
switch (alt8) {
case 1 :
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1099:88: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' )
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:994:88: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\"' | '\\'' | '\\\\' )
{
match('\\');
if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||input.LA(1)=='t' ) {
@ -579,7 +579,7 @@ public class InternalWMLLexer extends Lexer {
}
break;
case 2 :
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1099:129: ~ ( ( '\\\\' | '\\'' ) )
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:994:129: ~ ( ( '\\\\' | '\\'' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
input.consume();
@ -621,8 +621,8 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_ANY_OTHER() throws RecognitionException {
try {
int _type = RULE_ANY_OTHER;
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1101:16: ( . )
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1101:18: .
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:996:16: ( . )
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:996:18: .
{
matchAny();
@ -639,19 +639,19 @@ public class InternalWMLLexer extends Lexer {
public final void mRULE_PATH() throws RecognitionException {
try {
int _type = RULE_PATH;
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1103:11: ( ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '.' | '-' | '0' .. '9' )+ '/' )* ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '.' | '-' | '0' .. '9' )+ ( '/' )? )
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1103:13: ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '.' | '-' | '0' .. '9' )+ '/' )* ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '.' | '-' | '0' .. '9' )+ ( '/' )?
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:998:11: ( ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '.' | '-' | '0' .. '9' )+ '/' )* ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '.' | '-' | '0' .. '9' )+ ( '/' )? )
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:998:13: ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '.' | '-' | '0' .. '9' )+ '/' )* ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '.' | '-' | '0' .. '9' )+ ( '/' )?
{
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1103:13: ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '.' | '-' | '0' .. '9' )+ '/' )*
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:998:13: ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '.' | '-' | '0' .. '9' )+ '/' )*
loop11:
do {
int alt11=2;
alt11 = dfa11.predict(input);
switch (alt11) {
case 1 :
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1103:14: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '.' | '-' | '0' .. '9' )+ '/'
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:998:14: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '.' | '-' | '0' .. '9' )+ '/'
{
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1103:14: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '.' | '-' | '0' .. '9' )+
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:998:14: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '.' | '-' | '0' .. '9' )+
int cnt10=0;
loop10:
do {
@ -700,7 +700,7 @@ public class InternalWMLLexer extends Lexer {
}
} while (true);
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1103:62: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '.' | '-' | '0' .. '9' )+
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:998:62: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '.' | '-' | '0' .. '9' )+
int cnt12=0;
loop12:
do {
@ -739,7 +739,7 @@ public class InternalWMLLexer extends Lexer {
cnt12++;
} while (true);
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1103:104: ( '/' )?
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:998:104: ( '/' )?
int alt13=2;
int LA13_0 = input.LA(1);
@ -748,7 +748,7 @@ public class InternalWMLLexer extends Lexer {
}
switch (alt13) {
case 1 :
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:1103:104: '/'
// ../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g:998:104: '/'
{
match('/');
@ -905,7 +905,7 @@ public class InternalWMLLexer extends Lexer {
static final String DFA6_eofS =
"\4\uffff";
static final String DFA6_minS =
"\1\55\1\54\2\uffff";
"\2\40\2\uffff";
static final String DFA6_maxS =
"\2\172\2\uffff";
static final String DFA6_acceptS =
@ -913,8 +913,10 @@ public class InternalWMLLexer extends Lexer {
static final String DFA6_specialS =
"\4\uffff}>";
static final String[] DFA6_transitionS = {
"\1\1\2\uffff\12\1\7\uffff\32\1\4\uffff\1\1\1\uffff\32\1",
"\1\3\1\1\2\uffff\12\1\7\uffff\32\1\4\uffff\1\1\1\uffff\32\1",
"\1\1\14\uffff\1\1\2\uffff\12\1\7\uffff\32\1\4\uffff\1\1\1\uffff"+
"\32\1",
"\1\1\13\uffff\1\3\1\1\2\uffff\12\1\7\uffff\32\1\4\uffff\1\1"+
"\1\uffff\32\1",
"",
""
};
@ -949,7 +951,7 @@ public class InternalWMLLexer extends Lexer {
this.transition = DFA6_transition;
}
public String getDescription() {
return "()* loopback of 1097:15: ( RULE_ID ',' )*";
return "()* loopback of 992:15: ( RULE_ID ',' )*";
}
}
static final String DFA11_eotS =
@ -1002,33 +1004,35 @@ public class InternalWMLLexer extends Lexer {
this.transition = DFA11_transition;
}
public String getDescription() {
return "()* loopback of 1103:13: ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '.' | '-' | '0' .. '9' )+ '/' )*";
return "()* loopback of 998:13: ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '.' | '-' | '0' .. '9' )+ '/' )*";
}
}
static final String DFA14_eotS =
"\1\uffff\1\22\7\uffff\1\32\2\uffff\1\40\3\20\1\uffff\1\22\11\uffff"+
"\1\40\6\uffff\11\22\1\54\1\uffff";
"\1\uffff\1\23\7\uffff\1\33\1\uffff\1\41\1\uffff\1\43\3\21\1\uffff"+
"\1\23\11\uffff\1\43\1\uffff\1\43\3\uffff\1\41\2\uffff\11\23\1\57"+
"\1\uffff";
static final String DFA14_eofS =
"\55\uffff";
"\60\uffff";
static final String DFA14_minS =
"\1\0\1\164\7\uffff\1\54\2\uffff\1\54\2\0\1\55\1\uffff\1\145\11\uffff"+
"\1\54\6\uffff\1\170\1\164\1\144\1\157\1\155\1\141\1\151\1\156\1"+
"\40\1\0\1\uffff";
"\1\0\1\164\7\uffff\1\40\1\uffff\1\40\1\uffff\1\40\2\0\1\55\1\uffff"+
"\1\145\11\uffff\1\40\1\uffff\1\40\3\uffff\1\40\2\uffff\1\170\1\164"+
"\1\144\1\157\1\155\1\141\1\151\1\156\1\40\1\0\1\uffff";
static final String DFA14_maxS =
"\1\ufffe\1\164\7\uffff\1\172\2\uffff\1\172\2\ufffe\1\172\1\uffff"+
"\1\145\11\uffff\1\172\6\uffff\1\170\1\164\1\144\1\157\1\155\1\141"+
"\1\151\1\156\1\40\1\ufffe\1\uffff";
"\1\ufffe\1\164\7\uffff\1\172\1\uffff\1\172\1\uffff\1\172\2\ufffe"+
"\1\172\1\uffff\1\145\11\uffff\1\172\1\uffff\1\172\3\uffff\1\172"+
"\2\uffff\1\170\1\164\1\144\1\157\1\155\1\141\1\151\1\156\1\40\1"+
"\ufffe\1\uffff";
static final String DFA14_acceptS =
"\2\uffff\1\2\1\3\1\4\1\5\1\6\1\7\1\10\1\uffff\1\12\1\14\4\uffff"+
"\1\20\1\uffff\1\13\1\2\1\3\1\4\1\5\1\6\1\7\1\10\1\11\1\uffff\1\21"+
"\1\16\1\12\1\14\1\15\1\17\12\uffff\1\1";
"\2\uffff\1\2\1\3\1\4\1\5\1\6\1\7\1\10\1\uffff\1\12\1\uffff\1\14"+
"\4\uffff\1\20\1\uffff\1\13\1\2\1\3\1\4\1\5\1\6\1\7\1\10\1\11\1\uffff"+
"\1\21\1\uffff\1\16\1\12\1\14\1\uffff\1\15\1\17\12\uffff\1\1";
static final String DFA14_specialS =
"\55\uffff}>";
"\60\uffff}>";
static final String[] DFA14_transitionS = {
"\11\20\2\13\2\20\1\13\22\20\1\13\1\20\1\15\1\1\3\20\1\16\3\20"+
"\1\7\1\20\1\14\1\17\1\6\12\14\3\20\1\10\3\20\32\14\1\4\1\20"+
"\1\5\1\20\1\11\1\20\32\14\1\2\1\20\1\3\1\12\uff80\20",
"\1\21",
"\11\21\2\14\2\21\1\14\22\21\1\13\1\21\1\16\1\1\3\21\1\17\3\21"+
"\1\7\1\21\1\15\1\20\1\6\12\15\3\21\1\10\3\21\32\15\1\4\1\21"+
"\1\5\1\21\1\11\1\21\32\15\1\2\1\21\1\3\1\12\uff80\21",
"\1\22",
"",
"",
"",
@ -1036,44 +1040,50 @@ public class InternalWMLLexer extends Lexer {
"",
"",
"",
"\1\35\1\33\2\34\12\33\7\uffff\32\33\4\uffff\1\33\1\uffff\32"+
"\33",
"\1\36\13\uffff\1\37\1\34\2\35\12\34\7\uffff\32\34\4\uffff\1"+
"\34\1\uffff\32\34",
"",
"\1\42\13\uffff\1\37\1\36\2\uffff\12\36\7\uffff\32\36\4\uffff"+
"\1\36\1\uffff\32\36",
"",
"\1\35\1\33\2\34\12\33\7\uffff\32\33\4\uffff\1\33\1\uffff\32"+
"\33",
"\uffff\41",
"\uffff\41",
"\15\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34",
"\1\36\13\uffff\1\37\1\34\2\35\12\34\7\uffff\32\34\4\uffff\1"+
"\34\1\uffff\32\34",
"\uffff\44",
"\uffff\44",
"\15\35\7\uffff\32\35\4\uffff\1\35\1\uffff\32\35",
"",
"\1\42",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"\1\35\1\33\2\34\12\33\7\uffff\32\33\4\uffff\1\33\1\uffff\32"+
"\33",
"",
"",
"",
"",
"",
"",
"\1\43",
"\1\44",
"\1\45",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"\1\36\13\uffff\1\37\1\34\2\35\12\34\7\uffff\32\34\4\uffff\1"+
"\34\1\uffff\32\34",
"",
"\1\36\13\uffff\1\37\1\36\2\uffff\12\36\7\uffff\32\36\4\uffff"+
"\1\36\1\uffff\32\36",
"",
"",
"",
"\1\42\13\uffff\1\37\1\36\2\uffff\12\36\7\uffff\32\36\4\uffff"+
"\1\36\1\uffff\32\36",
"",
"",
"\1\46",
"\1\47",
"\1\50",
"\1\51",
"\1\52",
"\1\53",
"\uffff\22",
"\1\54",
"\1\55",
"\1\56",
"\uffff\23",
""
};

View file

@ -18,25 +18,25 @@ T18 : '=' ;
T19 : '_' ;
T20 : '~' ;
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1091
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 986
RULE_SL_COMMENT : '#' ~(('\n'|'\r'))* ('\r'? '\n')?;
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1093
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 988
RULE_WS : (' '|'\t'|'\r'|'\n')+;
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1095
RULE_ID : ('a'..'z'|'A'..'Z'|'_'|'-'|'0'..'9')+;
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 990
RULE_ID : ('a'..'z'|'A'..'Z'|'_'|'-'|' '|'0'..'9')+;
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1097
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 992
RULE_IDLIST : (RULE_ID ',')* RULE_ID;
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1099
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 994
RULE_STRING : ('"' ('\\' ('b'|'t'|'n'|'f'|'r'|'"'|'\''|'\\')|~(('\\'|'"')))* '"'|'\'' ('\\' ('b'|'t'|'n'|'f'|'r'|'"'|'\''|'\\')|~(('\\'|'\'')))* '\'');
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1101
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 996
RULE_ANY_OTHER : .;
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1103
// $ANTLR src "../org.wesnoth.wml/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 998
RULE_PATH : (('a'..'z'|'A'..'Z'|'_'|'.'|'-'|'0'..'9')+ '/')* ('a'..'z'|'A'..'Z'|'_'|'.'|'-'|'0'..'9')+ '/'?;

View file

@ -18,20 +18,20 @@ public class WMLGrammarAccess extends AbstractGrammarElementFinder {
public class RootElements extends AbstractParserRuleElementFinder {
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Root");
private final UnorderedGroup cUnorderedGroup = (UnorderedGroup)rule.eContents().get(1);
private final Assignment cTextdomainsAssignment_0 = (Assignment)cUnorderedGroup.eContents().get(0);
private final Group cGroup = (Group)rule.eContents().get(1);
private final Assignment cTextdomainsAssignment_0 = (Assignment)cGroup.eContents().get(0);
private final RuleCall cTextdomainsTextDomainParserRuleCall_0_0 = (RuleCall)cTextdomainsAssignment_0.eContents().get(0);
private final Assignment cPreprocAssignment_1 = (Assignment)cUnorderedGroup.eContents().get(1);
private final Assignment cPreprocAssignment_1 = (Assignment)cGroup.eContents().get(1);
private final RuleCall cPreprocPreprocessorParserRuleCall_1_0 = (RuleCall)cPreprocAssignment_1.eContents().get(0);
private final Assignment cRootsAssignment_2 = (Assignment)cUnorderedGroup.eContents().get(2);
private final Assignment cRootsAssignment_2 = (Assignment)cGroup.eContents().get(2);
private final RuleCall cRootsRootTypeParserRuleCall_2_0 = (RuleCall)cRootsAssignment_2.eContents().get(0);
//Root:
// textdomains+=TextDomain* & preproc+=Preprocessor* & roots+=RootType*;
// textdomains+=TextDomain* preproc+=Preprocessor* roots+=RootType*;
public ParserRule getRule() { return rule; }
//textdomains+=TextDomain* & preproc+=Preprocessor* & roots+=RootType*
public UnorderedGroup getUnorderedGroup() { return cUnorderedGroup; }
//textdomains+=TextDomain* preproc+=Preprocessor* roots+=RootType*
public Group getGroup() { return cGroup; }
//textdomains+=TextDomain*
public Assignment getTextdomainsAssignment_0() { return cTextdomainsAssignment_0; }
@ -100,25 +100,25 @@ public class WMLGrammarAccess extends AbstractGrammarElementFinder {
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "Macro");
private final Group cGroup = (Group)rule.eContents().get(1);
private final Keyword cLeftCurlyBracketKeyword_0 = (Keyword)cGroup.eContents().get(0);
private final Assignment cMacroNameAssignment_1 = (Assignment)cGroup.eContents().get(1);
private final RuleCall cMacroNameIDTerminalRuleCall_1_0 = (RuleCall)cMacroNameAssignment_1.eContents().get(0);
private final Assignment cMacroContentAssignment_1 = (Assignment)cGroup.eContents().get(1);
private final RuleCall cMacroContentIDTerminalRuleCall_1_0 = (RuleCall)cMacroContentAssignment_1.eContents().get(0);
private final Keyword cRightCurlyBracketKeyword_2 = (Keyword)cGroup.eContents().get(2);
//Macro:
// "{" macroName=ID "}";
// "{" macroContent+=ID+ "}";
public ParserRule getRule() { return rule; }
//"{" macroName=ID "}"
//"{" macroContent+=ID+ "}"
public Group getGroup() { return cGroup; }
//"{"
public Keyword getLeftCurlyBracketKeyword_0() { return cLeftCurlyBracketKeyword_0; }
//macroName=ID
public Assignment getMacroNameAssignment_1() { return cMacroNameAssignment_1; }
//macroContent+=ID+
public Assignment getMacroContentAssignment_1() { return cMacroContentAssignment_1; }
//ID
public RuleCall getMacroNameIDTerminalRuleCall_1_0() { return cMacroNameIDTerminalRuleCall_1_0; }
public RuleCall getMacroContentIDTerminalRuleCall_1_0() { return cMacroContentIDTerminalRuleCall_1_0; }
//"}"
public Keyword getRightCurlyBracketKeyword_2() { return cRightCurlyBracketKeyword_2; }
@ -162,82 +162,74 @@ public class WMLGrammarAccess extends AbstractGrammarElementFinder {
public class RootTypeElements extends AbstractParserRuleElementFinder {
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "RootType");
private final UnorderedGroup cUnorderedGroup = (UnorderedGroup)rule.eContents().get(1);
private final Group cGroup_0 = (Group)cUnorderedGroup.eContents().get(0);
private final Keyword cLeftSquareBracketKeyword_0_0 = (Keyword)cGroup_0.eContents().get(0);
private final Assignment cStartTagAssignment_0_1 = (Assignment)cGroup_0.eContents().get(1);
private final RuleCall cStartTagRootTagParserRuleCall_0_1_0 = (RuleCall)cStartTagAssignment_0_1.eContents().get(0);
private final Keyword cRightSquareBracketKeyword_0_2 = (Keyword)cGroup_0.eContents().get(2);
private final Assignment cSubTypesAssignment_0_3 = (Assignment)cGroup_0.eContents().get(3);
private final RuleCall cSubTypesRootTypeParserRuleCall_0_3_0 = (RuleCall)cSubTypesAssignment_0_3.eContents().get(0);
private final Assignment cAtAssignment_1 = (Assignment)cUnorderedGroup.eContents().get(1);
private final RuleCall cAtAttributesParserRuleCall_1_0 = (RuleCall)cAtAssignment_1.eContents().get(0);
private final Group cGroup_2 = (Group)cUnorderedGroup.eContents().get(2);
private final Assignment cOkpreprocAssignment_2_0 = (Assignment)cGroup_2.eContents().get(0);
private final RuleCall cOkpreprocPreprocessorParserRuleCall_2_0_0 = (RuleCall)cOkpreprocAssignment_2_0.eContents().get(0);
private final Keyword cLeftSquareBracketKeyword_2_1 = (Keyword)cGroup_2.eContents().get(1);
private final Keyword cSolidusKeyword_2_2 = (Keyword)cGroup_2.eContents().get(2);
private final Assignment cEndTagAssignment_2_3 = (Assignment)cGroup_2.eContents().get(3);
private final RuleCall cEndTagRootTagParserRuleCall_2_3_0 = (RuleCall)cEndTagAssignment_2_3.eContents().get(0);
private final Keyword cRightSquareBracketKeyword_2_4 = (Keyword)cGroup_2.eContents().get(4);
private final Group cGroup = (Group)rule.eContents().get(1);
private final Keyword cLeftSquareBracketKeyword_0 = (Keyword)cGroup.eContents().get(0);
private final Assignment cStartTagAssignment_1 = (Assignment)cGroup.eContents().get(1);
private final RuleCall cStartTagRootTagParserRuleCall_1_0 = (RuleCall)cStartTagAssignment_1.eContents().get(0);
private final Keyword cRightSquareBracketKeyword_2 = (Keyword)cGroup.eContents().get(2);
private final Assignment cSubTypesAssignment_3 = (Assignment)cGroup.eContents().get(3);
private final RuleCall cSubTypesRootTypeParserRuleCall_3_0 = (RuleCall)cSubTypesAssignment_3.eContents().get(0);
private final Assignment cAtAssignment_4 = (Assignment)cGroup.eContents().get(4);
private final RuleCall cAtAttributesParserRuleCall_4_0 = (RuleCall)cAtAssignment_4.eContents().get(0);
private final Assignment cOkpreprocAssignment_5 = (Assignment)cGroup.eContents().get(5);
private final RuleCall cOkpreprocPreprocessorParserRuleCall_5_0 = (RuleCall)cOkpreprocAssignment_5.eContents().get(0);
private final Keyword cLeftSquareBracketKeyword_6 = (Keyword)cGroup.eContents().get(6);
private final Keyword cSolidusKeyword_7 = (Keyword)cGroup.eContents().get(7);
private final Assignment cEndTagAssignment_8 = (Assignment)cGroup.eContents().get(8);
private final RuleCall cEndTagRootTagParserRuleCall_8_0 = (RuleCall)cEndTagAssignment_8.eContents().get(0);
private final Keyword cRightSquareBracketKeyword_9 = (Keyword)cGroup.eContents().get(9);
//RootType:
// "[" startTag=RootTag "]" subTypes+=RootType* & at+=Attributes* & okpreproc+=Preprocessor* "[" "/" endTag=RootTag "]";
// "[" startTag=RootTag "]" subTypes+=RootType* at+=Attributes* okpreproc+=Preprocessor* "[" "/" endTag=RootTag "]";
public ParserRule getRule() { return rule; }
//"[" startTag=RootTag "]" subTypes+=RootType* & at+=Attributes* & okpreproc+=Preprocessor* "[" "/" endTag=RootTag "]"
public UnorderedGroup getUnorderedGroup() { return cUnorderedGroup; }
//"[" startTag=RootTag "]" subTypes+=RootType*
public Group getGroup_0() { return cGroup_0; }
//"[" startTag=RootTag "]" subTypes+=RootType* at+=Attributes* okpreproc+=Preprocessor* "[" "/" endTag=RootTag "]"
public Group getGroup() { return cGroup; }
//"["
public Keyword getLeftSquareBracketKeyword_0_0() { return cLeftSquareBracketKeyword_0_0; }
public Keyword getLeftSquareBracketKeyword_0() { return cLeftSquareBracketKeyword_0; }
//startTag=RootTag
public Assignment getStartTagAssignment_0_1() { return cStartTagAssignment_0_1; }
public Assignment getStartTagAssignment_1() { return cStartTagAssignment_1; }
//RootTag
public RuleCall getStartTagRootTagParserRuleCall_0_1_0() { return cStartTagRootTagParserRuleCall_0_1_0; }
public RuleCall getStartTagRootTagParserRuleCall_1_0() { return cStartTagRootTagParserRuleCall_1_0; }
//"]"
public Keyword getRightSquareBracketKeyword_0_2() { return cRightSquareBracketKeyword_0_2; }
public Keyword getRightSquareBracketKeyword_2() { return cRightSquareBracketKeyword_2; }
//subTypes+=RootType*
public Assignment getSubTypesAssignment_0_3() { return cSubTypesAssignment_0_3; }
public Assignment getSubTypesAssignment_3() { return cSubTypesAssignment_3; }
//RootType
public RuleCall getSubTypesRootTypeParserRuleCall_0_3_0() { return cSubTypesRootTypeParserRuleCall_0_3_0; }
public RuleCall getSubTypesRootTypeParserRuleCall_3_0() { return cSubTypesRootTypeParserRuleCall_3_0; }
//at+=Attributes*
public Assignment getAtAssignment_1() { return cAtAssignment_1; }
public Assignment getAtAssignment_4() { return cAtAssignment_4; }
//Attributes
public RuleCall getAtAttributesParserRuleCall_1_0() { return cAtAttributesParserRuleCall_1_0; }
//okpreproc+=Preprocessor* "[" "/" endTag=RootTag "]"
public Group getGroup_2() { return cGroup_2; }
public RuleCall getAtAttributesParserRuleCall_4_0() { return cAtAttributesParserRuleCall_4_0; }
//okpreproc+=Preprocessor*
public Assignment getOkpreprocAssignment_2_0() { return cOkpreprocAssignment_2_0; }
public Assignment getOkpreprocAssignment_5() { return cOkpreprocAssignment_5; }
//Preprocessor
public RuleCall getOkpreprocPreprocessorParserRuleCall_2_0_0() { return cOkpreprocPreprocessorParserRuleCall_2_0_0; }
public RuleCall getOkpreprocPreprocessorParserRuleCall_5_0() { return cOkpreprocPreprocessorParserRuleCall_5_0; }
//"["
public Keyword getLeftSquareBracketKeyword_2_1() { return cLeftSquareBracketKeyword_2_1; }
public Keyword getLeftSquareBracketKeyword_6() { return cLeftSquareBracketKeyword_6; }
//"/"
public Keyword getSolidusKeyword_2_2() { return cSolidusKeyword_2_2; }
public Keyword getSolidusKeyword_7() { return cSolidusKeyword_7; }
//endTag=RootTag
public Assignment getEndTagAssignment_2_3() { return cEndTagAssignment_2_3; }
public Assignment getEndTagAssignment_8() { return cEndTagAssignment_8; }
//RootTag
public RuleCall getEndTagRootTagParserRuleCall_2_3_0() { return cEndTagRootTagParserRuleCall_2_3_0; }
public RuleCall getEndTagRootTagParserRuleCall_8_0() { return cEndTagRootTagParserRuleCall_8_0; }
//"]"
public Keyword getRightSquareBracketKeyword_2_4() { return cRightSquareBracketKeyword_2_4; }
public Keyword getRightSquareBracketKeyword_9() { return cRightSquareBracketKeyword_9; }
}
public class RootTagElements extends AbstractParserRuleElementFinder {
@ -333,17 +325,17 @@ public class WMLGrammarAccess extends AbstractGrammarElementFinder {
private final Keyword cEqualsSignKeyword_1 = (Keyword)cGroup.eContents().get(1);
private final Assignment cAttrValueAssignment_2 = (Assignment)cGroup.eContents().get(2);
private final Alternatives cAttrValueAlternatives_2_0 = (Alternatives)cAttrValueAssignment_2.eContents().get(0);
private final RuleCall cAttrValueIDTerminalRuleCall_2_0_0 = (RuleCall)cAttrValueAlternatives_2_0.eContents().get(0);
private final RuleCall cAttrValueIDLISTTerminalRuleCall_2_0_1 = (RuleCall)cAttrValueAlternatives_2_0.eContents().get(1);
private final RuleCall cAttrValueTSTRINGParserRuleCall_2_0_2 = (RuleCall)cAttrValueAlternatives_2_0.eContents().get(2);
private final RuleCall cAttrValueSTRINGTerminalRuleCall_2_0_3 = (RuleCall)cAttrValueAlternatives_2_0.eContents().get(3);
private final RuleCall cAttrValuePATHTerminalRuleCall_2_0_4 = (RuleCall)cAttrValueAlternatives_2_0.eContents().get(4);
private final RuleCall cAttrValueTSTRINGParserRuleCall_2_0_0 = (RuleCall)cAttrValueAlternatives_2_0.eContents().get(0);
private final RuleCall cAttrValueSTRINGTerminalRuleCall_2_0_1 = (RuleCall)cAttrValueAlternatives_2_0.eContents().get(1);
private final RuleCall cAttrValuePATHTerminalRuleCall_2_0_2 = (RuleCall)cAttrValueAlternatives_2_0.eContents().get(2);
private final RuleCall cAttrValueIDTerminalRuleCall_2_0_3 = (RuleCall)cAttrValueAlternatives_2_0.eContents().get(3);
private final RuleCall cAttrValueIDLISTTerminalRuleCall_2_0_4 = (RuleCall)cAttrValueAlternatives_2_0.eContents().get(4);
//Attributes:
// attrName=ID "=" attrValue=(ID | IDLIST | TSTRING | STRING | PATH);
// attrName=ID "=" attrValue=(TSTRING | STRING | PATH | ID | IDLIST);
public ParserRule getRule() { return rule; }
//attrName=ID "=" attrValue=(ID | IDLIST | TSTRING | STRING | PATH)
//attrName=ID "=" attrValue=(TSTRING | STRING | PATH | ID | IDLIST)
public Group getGroup() { return cGroup; }
//attrName=ID
@ -355,26 +347,26 @@ public class WMLGrammarAccess extends AbstractGrammarElementFinder {
//"="
public Keyword getEqualsSignKeyword_1() { return cEqualsSignKeyword_1; }
//attrValue=(ID | IDLIST | TSTRING | STRING | PATH)
//attrValue=(TSTRING | STRING | PATH | ID | IDLIST)
public Assignment getAttrValueAssignment_2() { return cAttrValueAssignment_2; }
//ID | IDLIST | TSTRING | STRING | PATH
//TSTRING | STRING | PATH | ID | IDLIST
public Alternatives getAttrValueAlternatives_2_0() { return cAttrValueAlternatives_2_0; }
//ID
public RuleCall getAttrValueIDTerminalRuleCall_2_0_0() { return cAttrValueIDTerminalRuleCall_2_0_0; }
//IDLIST
public RuleCall getAttrValueIDLISTTerminalRuleCall_2_0_1() { return cAttrValueIDLISTTerminalRuleCall_2_0_1; }
//TSTRING
public RuleCall getAttrValueTSTRINGParserRuleCall_2_0_2() { return cAttrValueTSTRINGParserRuleCall_2_0_2; }
public RuleCall getAttrValueTSTRINGParserRuleCall_2_0_0() { return cAttrValueTSTRINGParserRuleCall_2_0_0; }
//STRING
public RuleCall getAttrValueSTRINGTerminalRuleCall_2_0_3() { return cAttrValueSTRINGTerminalRuleCall_2_0_3; }
public RuleCall getAttrValueSTRINGTerminalRuleCall_2_0_1() { return cAttrValueSTRINGTerminalRuleCall_2_0_1; }
//PATH
public RuleCall getAttrValuePATHTerminalRuleCall_2_0_4() { return cAttrValuePATHTerminalRuleCall_2_0_4; }
public RuleCall getAttrValuePATHTerminalRuleCall_2_0_2() { return cAttrValuePATHTerminalRuleCall_2_0_2; }
//ID
public RuleCall getAttrValueIDTerminalRuleCall_2_0_3() { return cAttrValueIDTerminalRuleCall_2_0_3; }
//IDLIST
public RuleCall getAttrValueIDLISTTerminalRuleCall_2_0_4() { return cAttrValueIDLISTTerminalRuleCall_2_0_4; }
}
public class TSTRINGElements extends AbstractParserRuleElementFinder {
@ -454,7 +446,7 @@ public class WMLGrammarAccess extends AbstractGrammarElementFinder {
//Root:
// textdomains+=TextDomain* & preproc+=Preprocessor* & roots+=RootType*;
// textdomains+=TextDomain* preproc+=Preprocessor* roots+=RootType*;
public RootElements getRootAccess() {
return (pRoot != null) ? pRoot : (pRoot = new RootElements());
}
@ -484,7 +476,7 @@ public class WMLGrammarAccess extends AbstractGrammarElementFinder {
}
//Macro:
// "{" macroName=ID "}";
// "{" macroContent+=ID+ "}";
public MacroElements getMacroAccess() {
return (pMacro != null) ? pMacro : (pMacro = new MacroElements());
}
@ -504,7 +496,7 @@ public class WMLGrammarAccess extends AbstractGrammarElementFinder {
}
//RootType:
// "[" startTag=RootTag "]" subTypes+=RootType* & at+=Attributes* & okpreproc+=Preprocessor* "[" "/" endTag=RootTag "]";
// "[" startTag=RootTag "]" subTypes+=RootType* at+=Attributes* okpreproc+=Preprocessor* "[" "/" endTag=RootTag "]";
public RootTypeElements getRootTypeAccess() {
return (pRootType != null) ? pRootType : (pRootType = new RootTypeElements());
}
@ -555,7 +547,7 @@ public class WMLGrammarAccess extends AbstractGrammarElementFinder {
}
//Attributes:
// attrName=ID "=" attrValue=(ID | IDLIST | TSTRING | STRING | PATH);
// attrName=ID "=" attrValue=(TSTRING | STRING | PATH | ID | IDLIST);
public AttributesElements getAttributesAccess() {
return (pAttributes != null) ? pAttributes : (pAttributes = new AttributesElements());
}
@ -601,7 +593,7 @@ public class WMLGrammarAccess extends AbstractGrammarElementFinder {
//// no multiline comment defined on WML,
//// terminal ML_COMMENT: '#' !('\n'|'\r')* ('\r'? '\n')?;
//terminal ID:
// ("a".."z" | "A".."Z" | "_" | "-" | "0".."9")+;
// ("a".."z" | "A".."Z" | "_" | "-" | " " | "0".."9")+;
public TerminalRule getIDRule() {
return (tID != null) ? tID : (tID = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "ID"));
}

View file

@ -5,6 +5,7 @@
*/
package org.wesnoth.wML;
import org.eclipse.emf.common.util.EList;
/**
* <!-- begin-user-doc -->
@ -14,7 +15,7 @@ package org.wesnoth.wML;
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.wesnoth.wML.Macro#getMacroName <em>Macro Name</em>}</li>
* <li>{@link org.wesnoth.wML.Macro#getMacroContent <em>Macro Content</em>}</li>
* </ul>
* </p>
*
@ -25,29 +26,19 @@ package org.wesnoth.wML;
public interface Macro extends Preprocessor
{
/**
* Returns the value of the '<em><b>Macro Name</b></em>' attribute.
* Returns the value of the '<em><b>Macro Content</b></em>' attribute list.
* The list contents are of type {@link java.lang.String}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Macro Name</em>' attribute isn't clear,
* If the meaning of the '<em>Macro Content</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>Macro Name</em>' attribute.
* @see #setMacroName(String)
* @see org.wesnoth.wML.WMLPackage#getMacro_MacroName()
* @model
* @return the value of the '<em>Macro Content</em>' attribute list.
* @see org.wesnoth.wML.WMLPackage#getMacro_MacroContent()
* @model unique="false"
* @generated
*/
String getMacroName();
/**
* Sets the value of the '{@link org.wesnoth.wML.Macro#getMacroName <em>Macro Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Macro Name</em>' attribute.
* @see #getMacroName()
* @generated
*/
void setMacroName(String value);
EList<String> getMacroContent();
} // Macro

View file

@ -163,13 +163,13 @@ public interface WMLPackage extends EPackage
int MACRO = 3;
/**
* The feature id for the '<em><b>Macro Name</b></em>' attribute.
* The feature id for the '<em><b>Macro Content</b></em>' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int MACRO__MACRO_NAME = PREPROCESSOR_FEATURE_COUNT + 0;
int MACRO__MACRO_CONTENT = PREPROCESSOR_FEATURE_COUNT + 0;
/**
* The number of structural features of the '<em>Macro</em>' class.
@ -488,15 +488,15 @@ public interface WMLPackage extends EPackage
EClass getMacro();
/**
* Returns the meta object for the attribute '{@link org.wesnoth.wML.Macro#getMacroName <em>Macro Name</em>}'.
* Returns the meta object for the attribute list '{@link org.wesnoth.wML.Macro#getMacroContent <em>Macro Content</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Macro Name</em>'.
* @see org.wesnoth.wML.Macro#getMacroName()
* @return the meta object for the attribute list '<em>Macro Content</em>'.
* @see org.wesnoth.wML.Macro#getMacroContent()
* @see #getMacro()
* @generated
*/
EAttribute getMacro_MacroName();
EAttribute getMacro_MacroContent();
/**
* Returns the meta object for class '{@link org.wesnoth.wML.PathInclude <em>Path Include</em>}'.
@ -764,12 +764,12 @@ public interface WMLPackage extends EPackage
EClass MACRO = eINSTANCE.getMacro();
/**
* The meta object literal for the '<em><b>Macro Name</b></em>' attribute feature.
* The meta object literal for the '<em><b>Macro Content</b></em>' attribute list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute MACRO__MACRO_NAME = eINSTANCE.getMacro_MacroName();
EAttribute MACRO__MACRO_CONTENT = eINSTANCE.getMacro_MacroContent();
/**
* The meta object literal for the '{@link org.wesnoth.wML.impl.PathIncludeImpl <em>Path Include</em>}' class.

View file

@ -5,11 +5,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.Macro;
import org.wesnoth.wML.WMLPackage;
@ -21,7 +23,7 @@ import org.wesnoth.wML.WMLPackage;
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.wesnoth.wML.impl.MacroImpl#getMacroName <em>Macro Name</em>}</li>
* <li>{@link org.wesnoth.wML.impl.MacroImpl#getMacroContent <em>Macro Content</em>}</li>
* </ul>
* </p>
*
@ -30,24 +32,14 @@ import org.wesnoth.wML.WMLPackage;
public class MacroImpl extends PreprocessorImpl implements Macro
{
/**
* The default value of the '{@link #getMacroName() <em>Macro Name</em>}' attribute.
* The cached value of the '{@link #getMacroContent() <em>Macro Content</em>}' attribute list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getMacroName()
* @see #getMacroContent()
* @generated
* @ordered
*/
protected static final String MACRO_NAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getMacroName() <em>Macro Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getMacroName()
* @generated
* @ordered
*/
protected String macroName = MACRO_NAME_EDEFAULT;
protected EList<String> macroContent;
/**
* <!-- begin-user-doc -->
@ -75,22 +67,13 @@ public class MacroImpl extends PreprocessorImpl implements Macro
* <!-- end-user-doc -->
* @generated
*/
public String getMacroName()
public EList<String> getMacroContent()
{
return macroName;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setMacroName(String newMacroName)
{
String oldMacroName = macroName;
macroName = newMacroName;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, WMLPackage.MACRO__MACRO_NAME, oldMacroName, macroName));
if (macroContent == null)
{
macroContent = new EDataTypeEList<String>(String.class, this, WMLPackage.MACRO__MACRO_CONTENT);
}
return macroContent;
}
/**
@ -103,8 +86,8 @@ public class MacroImpl extends PreprocessorImpl implements Macro
{
switch (featureID)
{
case WMLPackage.MACRO__MACRO_NAME:
return getMacroName();
case WMLPackage.MACRO__MACRO_CONTENT:
return getMacroContent();
}
return super.eGet(featureID, resolve, coreType);
}
@ -114,13 +97,15 @@ public class MacroImpl extends PreprocessorImpl implements Macro
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue)
{
switch (featureID)
{
case WMLPackage.MACRO__MACRO_NAME:
setMacroName((String)newValue);
case WMLPackage.MACRO__MACRO_CONTENT:
getMacroContent().clear();
getMacroContent().addAll((Collection<? extends String>)newValue);
return;
}
super.eSet(featureID, newValue);
@ -136,8 +121,8 @@ public class MacroImpl extends PreprocessorImpl implements Macro
{
switch (featureID)
{
case WMLPackage.MACRO__MACRO_NAME:
setMacroName(MACRO_NAME_EDEFAULT);
case WMLPackage.MACRO__MACRO_CONTENT:
getMacroContent().clear();
return;
}
super.eUnset(featureID);
@ -153,8 +138,8 @@ public class MacroImpl extends PreprocessorImpl implements Macro
{
switch (featureID)
{
case WMLPackage.MACRO__MACRO_NAME:
return MACRO_NAME_EDEFAULT == null ? macroName != null : !MACRO_NAME_EDEFAULT.equals(macroName);
case WMLPackage.MACRO__MACRO_CONTENT:
return macroContent != null && !macroContent.isEmpty();
}
return super.eIsSet(featureID);
}
@ -170,8 +155,8 @@ public class MacroImpl extends PreprocessorImpl implements Macro
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (macroName: ");
result.append(macroName);
result.append(" (macroContent: ");
result.append(macroContent);
result.append(')');
return result.toString();
}

View file

@ -251,7 +251,7 @@ public class WMLPackageImpl extends EPackageImpl implements WMLPackage
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getMacro_MacroName()
public EAttribute getMacro_MacroContent()
{
return (EAttribute)macroEClass.getEStructuralFeatures().get(0);
}
@ -457,7 +457,7 @@ public class WMLPackageImpl extends EPackageImpl implements WMLPackage
preprocessorEClass = createEClass(PREPROCESSOR);
macroEClass = createEClass(MACRO);
createEAttribute(macroEClass, MACRO__MACRO_NAME);
createEAttribute(macroEClass, MACRO__MACRO_CONTENT);
pathIncludeEClass = createEClass(PATH_INCLUDE);
createEAttribute(pathIncludeEClass, PATH_INCLUDE__PATH);
@ -528,7 +528,7 @@ public class WMLPackageImpl extends EPackageImpl implements WMLPackage
initEClass(preprocessorEClass, Preprocessor.class, "Preprocessor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(macroEClass, Macro.class, "Macro", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getMacro_MacroName(), ecorePackage.getEString(), "macroName", null, 0, 1, Macro.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getMacro_MacroContent(), ecorePackage.getEString(), "macroContent", null, 0, -1, Macro.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(pathIncludeEClass, PathInclude.class, "PathInclude", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getPathInclude_Path(), ecorePackage.getEString(), "path", null, 0, 1, PathInclude.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);