summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormclay2008-11-06 16:33:28 (EST)
committer sefftinge2008-11-06 16:33:28 (EST)
commit28c35dc131252f7516ea14a52919ad56600c6892 (patch)
treee2ae394fdaadf7212a19ee66ad0163f7ce329edb
parent53b613734084d59c6fcdb675309008ce5fb81b77 (diff)
downloadorg.eclipse.xtext-28c35dc131252f7516ea14a52919ad56600c6892.zip
org.eclipse.xtext-28c35dc131252f7516ea14a52919ad56600c6892.tar.gz
org.eclipse.xtext-28c35dc131252f7516ea14a52919ad56600c6892.tar.bz2
add: started with CA related tests for ParseTreeUtil from bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=253707 [UI] Content Assist - Unittests
-rw-r--r--plugins/org.eclipse.xtext.ui.common/src/org/eclipse/xtext/ui/common/editor/codecompletion/DefaultContentAssistProcessor.java232
-rw-r--r--plugins/org.eclipse.xtext.ui.common/src/org/eclipse/xtext/ui/common/editor/codecompletion/ProposalCandidateResolverSwitch.java130
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalLangALexer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalLangAParser.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/internal/InternalDummyLanguageLexer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/internal/InternalDummyLanguageParser.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/internal/InternalConcreteTestLanguageLexer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/internal/InternalConcreteTestLanguageParser.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTestLexer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTestParser.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/internal/InternalXtextGrammarTestLexer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/internal/InternalXtextGrammarTestParser.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalComplexReconstrTestLexer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalComplexReconstrTestParser.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalSimpleReconstrTestLexer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalSimpleReconstrTestParser.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ReferenceGrammar.ecore15
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi68
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalActionTestLanguageLexer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalActionTestLanguageParser.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLexerLanguageLexer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLexerLanguageParser.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLookaheadLanguageLexer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLookaheadLanguageParser.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalOptionalEmptyLanguageLexer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalOptionalEmptyLanguageParser.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g144
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.tokens13
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammarLexer.java575
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammarParser.java828
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar__.g17
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalSimpleExpressionsLexer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalSimpleExpressionsParser.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTestLanguageLexer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTestLanguageParser.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parsetree/reconstr/ReferenceGrammarParseTreeConstructor.java509
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/services/ReferenceGrammarGrammarAccess.java4
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/internal/InternalBug250313Lexer.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/internal/InternalBug250313Parser.java2
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/XtextTestChecks.chk7
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/crossrefs/LangAChecks.chk7
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/dummy/DummyLangChecks.chk7
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/AutoTestSuite.java1
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/FooChecks.chk7
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/metamodelreferencing/tests/SimpleTestChecks.chk7
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parsetree/ParseTreeUtilTest.java160
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parsetree/reconstr/ComplexrewritetestChecks.chk7
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parsetree/reconstr/SimplerewritetestChecks.chk7
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/ActionLangChecks.chk7
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/LexerLangChecks.chk7
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/LookaheadLangChecks.chk7
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/OptionalEmptyChecks.chk7
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/ReferenceGrammar.xtext8
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/ReferenceGrammarChecks.chk7
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/SimpleExpressionsChecks.chk7
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/TestLangChecks.chk7
-rw-r--r--tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/valueconverter/Bug250313Checks.chk7
57 files changed, 2186 insertions, 679 deletions
diff --git a/plugins/org.eclipse.xtext.ui.common/src/org/eclipse/xtext/ui/common/editor/codecompletion/DefaultContentAssistProcessor.java b/plugins/org.eclipse.xtext.ui.common/src/org/eclipse/xtext/ui/common/editor/codecompletion/DefaultContentAssistProcessor.java
index c972925..53fed4e 100644
--- a/plugins/org.eclipse.xtext.ui.common/src/org/eclipse/xtext/ui/common/editor/codecompletion/DefaultContentAssistProcessor.java
+++ b/plugins/org.eclipse.xtext.ui.common/src/org/eclipse/xtext/ui/common/editor/codecompletion/DefaultContentAssistProcessor.java
@@ -6,14 +6,12 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
-import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.log4j.Logger;
import org.eclipse.core.runtime.Assert;
-import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.ITextViewer;
@@ -25,10 +23,8 @@ import org.eclipse.jface.text.contentassist.IContextInformationValidator;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.xtext.AbstractElement;
import org.eclipse.xtext.AbstractRule;
-import org.eclipse.xtext.Alternatives;
import org.eclipse.xtext.Assignment;
import org.eclipse.xtext.GrammarUtil;
-import org.eclipse.xtext.Group;
import org.eclipse.xtext.Keyword;
import org.eclipse.xtext.ParserRule;
import org.eclipse.xtext.RuleCall;
@@ -63,10 +59,18 @@ public class DefaultContentAssistProcessor implements IContentAssistProcessor {
* offset and calls the respective methods on the proposal provider.
*/
public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, final int offset) {
+
+ ICompletionProposal[] completionProposals = null;
+
if (proposalProvider != null) {
+
+
IDocument document = viewer.getDocument();
+
if (document instanceof XtextDocument) {
-
+
+ List<ICompletionProposal> completionProposalList = new ArrayList<ICompletionProposal>();
+
XtextDocument xtextDocument = (XtextDocument) document;
CompositeNode rootNode = xtextDocument.readOnly(new UnitOfWork<CompositeNode>() {
@@ -76,14 +80,12 @@ public class DefaultContentAssistProcessor implements IContentAssistProcessor {
return parseResult.getRootNode();
}
});
+
Assert.isNotNull(rootNode);
- // last COMPLETE node element with associated grammar element
AbstractNode lastCompleteNode = ParseTreeUtil.getLastCompleteNodeByOffset(rootNode, offset);
- // node at CURRENT cursor pos. with or without grammar element
+
LeafNode currentLeafNode = (LeafNode) ParseTreeUtil.getCurrentNodeByOffset(rootNode, offset);
- // get associated grammar element
- AbstractElement grammarElement = ParseTreeUtil.getGrammarElementFromNode(lastCompleteNode);
String prefix = "";
StyledText textWidget = viewer.getTextWidget();
@@ -93,28 +95,26 @@ public class DefaultContentAssistProcessor implements IContentAssistProcessor {
prefix = textWidget.getText(currentLeafNode.getOffset(), boundedOffset);
}
- List<ICompletionProposal> completionProposalList = new ArrayList<ICompletionProposal>();
-
- Set<AbstractElement> calculatePossibleElementSet = calculatePossibleElementSet(lastCompleteNode,
- grammarElement);
- for (Iterator<AbstractElement> iterator = calculatePossibleElementSet.iterator(); iterator.hasNext();) {
- AbstractElement nextElement = iterator.next();
-
- List<EObject> resolvedElementOrRuleList = resolveElement(nextElement);
+ Set<AbstractElement> nextValidElementSet = ParseTreeUtil.getElementSetValidFromOffset(rootNode,lastCompleteNode, offset);
+
+ for (List<EObject> resolvedElementOrRuleList : new ProposalCandidateResolverSwitch(nextValidElementSet)) {
- collectCompletionProposalList(resolvedElementOrRuleList, completionProposalList, xtextDocument,
+ List<ICompletionProposal> collectedCompletionProposalList = collectCompletionProposalList(resolvedElementOrRuleList, xtextDocument,
lastCompleteNode, prefix, offset);
+
+ completionProposalList.addAll(collectedCompletionProposalList);
}
if (completionProposalList != null) {
List<? extends ICompletionProposal> sortAndFilter = proposalProvider
.sortAndFilter(completionProposalList);
- return (ICompletionProposal[]) sortAndFilter.toArray(new ICompletionProposal[] {});
+ completionProposals = sortAndFilter.toArray(new ICompletionProposal[] {});
}
}
}
- return null;
+
+ return completionProposals;
}
public char[] getCompletionProposalAutoActivationCharacters() {
@@ -137,160 +137,11 @@ public class DefaultContentAssistProcessor implements IContentAssistProcessor {
return new ContextInformationValidator(this);
}
- protected final List<EObject> resolveElement(AbstractElement abstractElement) {
-
- List<EObject> elementList = new ArrayList<EObject>();
-
- if (abstractElement instanceof Alternatives) {
- for (AbstractElement alternativeElement : ((Alternatives) abstractElement).getGroups()) {
- elementList.addAll(resolveElement(alternativeElement));
- }
- }
- else if (abstractElement instanceof Group) {
- boolean includeNext = true;
- for (Iterator<AbstractElement> iterator = ((Group) abstractElement).getAbstractTokens().iterator(); iterator
- .hasNext()
- && includeNext;) {
- AbstractElement groupElement = iterator.next();
- elementList.addAll(resolveElement(groupElement));
- includeNext = GrammarUtil.isOptionalCardinality(groupElement);
- }
-
- }
- else if (abstractElement instanceof Assignment) {
-
- Assignment assignment = (Assignment) abstractElement;
-
- if (assignment.getTerminal() instanceof RuleCall) {
- elementList.addAll(resolveElement(assignment.getTerminal()));
- }
- else if (assignment.getTerminal() instanceof Alternatives) {
- elementList.addAll(resolveElement(assignment.getTerminal()));
- }
-
- elementList.add(assignment);
-
- }
- else if (abstractElement instanceof RuleCall) {
-
- elementList.add(abstractElement);
-
- AbstractRule abstractRule = GrammarUtil.calledRule((RuleCall) abstractElement);
-
- if (abstractRule instanceof ParserRule) {
- elementList.addAll(resolveElement(((ParserRule) abstractRule).getAlternatives()));
- }
- }
- else {
- elementList.add(abstractElement);
- }
- return elementList;
- }
-
- protected final Set<AbstractElement> calculatePossibleElementSet(AbstractNode contextNode,
- AbstractElement grammarElement) {
-
- Assert.isNotNull(contextNode, "parameter 'contextNode' must not be null");
- Assert.isNotNull(grammarElement, "parameter 'grammarElement' must not be null");
-
- Set<AbstractElement> elementSet = new LinkedHashSet<AbstractElement>();
-
- if (grammarElement.eContainer() instanceof ParserRule) {
-
- /**
- * we have completed the rule of the current context.continue at the
- * parent context
- */
- boolean hasLeafNodes = false;
-
- for (Iterator<LeafNode> iterator = contextNode.getLeafNodes().listIterator(); !hasLeafNodes
- && iterator.hasNext(); hasLeafNodes = !iterator.next().isHidden()) {
- ;
- }
-
- contextNode = contextNode.getParent();
-
- while (contextNode != null && contextNode.getGrammarElement() == null) {
- contextNode = contextNode.getParent();
- }
-
- if (null != contextNode) {
-
- elementSet.addAll(calculatePossibleElementSet(contextNode, ParseTreeUtil
- .getGrammarElementFromNode(contextNode)));
-
- }
- else if (grammarElement.eContainer() instanceof ParserRule) {
-
- if (!hasLeafNodes || GrammarUtil.isMultipleCardinality(grammarElement)) {
- elementSet.add(grammarElement);
- }
- }
- }
- else if (grammarElement.eContainer() instanceof Alternatives) {
- /**
- * one out of the alternatives is already fullfilled so we can
- * simply skip and proceed to the parent
- */
-
- elementSet.addAll(calculatePossibleElementSet(contextNode, (AbstractElement) grammarElement.eContainer()));
-
- }
- else if (grammarElement.eContainer() instanceof Group) {
-
- EList<AbstractElement> contents = ((Group) grammarElement.eContainer()).getAbstractTokens();
-
- int indexOf = contents.indexOf(grammarElement) + 1;
-
- int size = contents.size();
-
- // add the current one if has an oneOrMore cardinality
- if (GrammarUtil.isOneOrMoreCardinality(grammarElement)) {
- elementSet.add(grammarElement);
- }
-
- /**
- * start at the current (maybe the last) or at the following one
- * with optional cardinality and add all following with optional
- * cardinality
- */
- AbstractElement last = GrammarUtil.isAnyCardinality(grammarElement) || indexOf == size ? grammarElement
- : contents.get(indexOf++);
-
- while (GrammarUtil.isOptionalCardinality(last) && indexOf < size) {
- elementSet.add(last);
- last = indexOf < size ? contents.get(indexOf++) : last;
- }
-
- // always add the following if available or the last one if has an
- // any cardinality
- if (last != grammarElement || GrammarUtil.isAnyCardinality(last)) {
- elementSet.add(last);
- }
-
- // ask parent groups only if we've completed the whole group
- if (indexOf == size) {
-
- boolean startedAtlastGrammarElementInGroup = last == grammarElement;
-
- if (startedAtlastGrammarElementInGroup || GrammarUtil.isOptionalCardinality(last)) {
-
- elementSet.addAll(calculatePossibleElementSet(contextNode, (AbstractElement) grammarElement
- .eContainer()));
- }
- }
- }
- else {
- elementSet.addAll(calculatePossibleElementSet(contextNode, (AbstractElement) grammarElement.eContainer()));
-
- }
-
- return elementSet;
- }
-
- private void collectCompletionProposalList(List<EObject> resolvedElementOrRuleList,
- List<ICompletionProposal> completionProposalList, IDocument document, AbstractNode currentLeafNode,
+ private List<ICompletionProposal> collectCompletionProposalList(List<EObject> resolvedElementOrRuleList, IDocument document, AbstractNode currentLeafNode,
String prefix, final int offset) {
+
+ List<ICompletionProposal> completionProposalList = new ArrayList<ICompletionProposal>();
+
for (Iterator<EObject> elementOrRuleIterator = resolvedElementOrRuleList.iterator(); elementOrRuleIterator
.hasNext();) {
EObject abstractElement = elementOrRuleIterator.next();
@@ -353,10 +204,8 @@ public class DefaultContentAssistProcessor implements IContentAssistProcessor {
}
}
}
- }
-
- private final String firstLetterCapitalized(String name) {
- return name.substring(0, 1).toUpperCase() + name.substring(1);
+
+ return completionProposalList;
}
private final Method findMethod(Class<?> clazz, String name, Class<?>... paramTypes) {
@@ -381,6 +230,18 @@ public class DefaultContentAssistProcessor implements IContentAssistProcessor {
}
return result;
}
+
+ @SuppressWarnings("unchecked")
+ private final Collection<ICompletionProposal> invokeMethod(Method method, Object target, Object... args) {
+
+ try {
+ return (Collection<ICompletionProposal>) method.invoke(target, args);
+ }
+ catch (Exception ex) {
+ handleReflectionException(ex);
+ }
+ throw new IllegalStateException("huh?");
+ }
private void handleReflectionException(Exception ex) {
if (ex instanceof NoSuchMethodException) {
@@ -414,18 +275,6 @@ public class DefaultContentAssistProcessor implements IContentAssistProcessor {
handleUnexpectedException(ex);
}
- @SuppressWarnings("unchecked")
- private final Collection<ICompletionProposal> invokeMethod(Method method, Object target, Object... args) {
-
- try {
- return (Collection<ICompletionProposal>) method.invoke(target, args);
- }
- catch (Exception ex) {
- handleReflectionException(ex);
- }
- throw new IllegalStateException("huh?");
- }
-
private boolean equalOrAssignableTypes(Class<?>[] a, Class<?>[] a2) {
if (a == a2) {
return true;
@@ -451,5 +300,10 @@ public class DefaultContentAssistProcessor implements IContentAssistProcessor {
}
return true;
}
+
+ private final String firstLetterCapitalized(String name) {
+ return name.substring(0, 1).toUpperCase() + name.substring(1);
+ }
+
}
diff --git a/plugins/org.eclipse.xtext.ui.common/src/org/eclipse/xtext/ui/common/editor/codecompletion/ProposalCandidateResolverSwitch.java b/plugins/org.eclipse.xtext.ui.common/src/org/eclipse/xtext/ui/common/editor/codecompletion/ProposalCandidateResolverSwitch.java
new file mode 100644
index 0000000..4028f49
--- /dev/null
+++ b/plugins/org.eclipse.xtext.ui.common/src/org/eclipse/xtext/ui/common/editor/codecompletion/ProposalCandidateResolverSwitch.java
@@ -0,0 +1,130 @@
+/*******************************************************************************
+ * Copyright (c) 2008 itemis AG (http://www.itemis.eu) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *******************************************************************************/
+package org.eclipse.xtext.ui.common.editor.codecompletion;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtext.AbstractElement;
+import org.eclipse.xtext.AbstractRule;
+import org.eclipse.xtext.Alternatives;
+import org.eclipse.xtext.Assignment;
+import org.eclipse.xtext.GrammarUtil;
+import org.eclipse.xtext.Group;
+import org.eclipse.xtext.ParserRule;
+import org.eclipse.xtext.RuleCall;
+import org.eclipse.xtext.util.XtextSwitch;
+
+/**
+ * Represents <b>Switch</b> for the model's inheritance hierarchy to resolve
+ * potential completion proposal candidate's.
+ *
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)} instead of
+ * typical <code>if (x instanceof y)</code> code blocks.
+ *
+ * @author Michael Clay - Initial contribution and API
+ * @see org.eclipse.xtext.util.XtextSwitch
+ */
+public class ProposalCandidateResolverSwitch extends XtextSwitch<List<EObject>> implements Iterable<List<EObject>> {
+
+ private Iterator<? extends EObject> delegatingIterator;
+
+ /**
+ * @param elementCollection
+ * to iterate and resolve
+ */
+ public ProposalCandidateResolverSwitch(Collection<? extends EObject> elementCollection) {
+ this.delegatingIterator = elementCollection.iterator();
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see java.lang.Iterable#iterator()
+ */
+ public Iterator<List<EObject>> iterator() {
+ return new Iterator<List<EObject>>() {
+ public boolean hasNext() {
+ return delegatingIterator.hasNext();
+ }
+
+ public List<EObject> next() {
+ return doSwitch(delegatingIterator.next());
+ }
+
+ public void remove() {
+ delegatingIterator.remove();
+ }
+
+ };
+ }
+
+ @Override
+ public List<EObject> caseAlternatives(Alternatives alternatives) {
+ List<EObject> elementList = new ArrayList<EObject>();
+ for (AbstractElement alternativeElement : alternatives.getGroups()) {
+ addWithNullCheck(elementList, doSwitch(alternativeElement));
+ }
+ return elementList;
+ }
+
+ @Override
+ public List<EObject> caseGroup(Group group) {
+ List<EObject> elementList = new ArrayList<EObject>();
+ boolean includeNext = true;
+ for (Iterator<AbstractElement> iterator = group.getAbstractTokens().iterator(); iterator.hasNext()
+ && includeNext;) {
+ AbstractElement groupElement = iterator.next();
+ addWithNullCheck(elementList, doSwitch(groupElement));
+ includeNext = GrammarUtil.isOptionalCardinality(groupElement);
+ }
+ return elementList;
+ }
+
+ @Override
+ public List<EObject> caseAssignment(Assignment assignment) {
+ List<EObject> elementList = new ArrayList<EObject>();
+ if (assignment.getTerminal() instanceof RuleCall) {
+ addWithNullCheck(elementList, doSwitch(assignment.getTerminal()));
+ }
+ else if (assignment.getTerminal() instanceof Alternatives) {
+ addWithNullCheck(elementList, doSwitch(assignment.getTerminal()));
+ }
+ elementList.add(assignment);
+ return elementList;
+ }
+
+ @Override
+ public List<EObject> caseRuleCall(RuleCall ruleCall) {
+ List<EObject> elementList = new ArrayList<EObject>();
+ elementList.add(ruleCall);
+
+ AbstractRule abstractRule = GrammarUtil.calledRule(ruleCall);
+
+ if (abstractRule instanceof ParserRule) {
+ addWithNullCheck(elementList, doSwitch(((ParserRule) abstractRule).getAlternatives()));
+ }
+ return elementList;
+ }
+
+ @Override
+ public List<EObject> defaultCase(EObject object) {
+ return Collections.singletonList(object);
+ }
+
+ private void addWithNullCheck(List<EObject> source, List<EObject> list) {
+ if (null != list) {
+ source.addAll(list);
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalLangALexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalLangALexer.java
index 671858d..63ec71b 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalLangALexer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalLangALexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalLangA.g 2008-11-03 16:11:00
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalLangA.g 2008-11-06 21:59:05
package org.eclipse.xtext.crossrefs.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalLangAParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalLangAParser.java
index 05a30e3..0eb8381 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalLangAParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalLangAParser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalLangA.g 2008-11-03 16:10:59
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/crossrefs/parser/internal/InternalLangA.g 2008-11-06 21:59:04
package org.eclipse.xtext.crossrefs.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/internal/InternalDummyLanguageLexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/internal/InternalDummyLanguageLexer.java
index d632c2b..5344c76 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/internal/InternalDummyLanguageLexer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/internal/InternalDummyLanguageLexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/dummy/parser/internal/InternalDummyLanguage.g 2008-11-03 16:11:04
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/dummy/parser/internal/InternalDummyLanguage.g 2008-11-06 21:59:08
package org.eclipse.xtext.dummy.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/internal/InternalDummyLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/internal/InternalDummyLanguageParser.java
index 5dd333f..8da9eb3 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/internal/InternalDummyLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/dummy/parser/internal/InternalDummyLanguageParser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/dummy/parser/internal/InternalDummyLanguage.g 2008-11-03 16:11:03
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/dummy/parser/internal/InternalDummyLanguage.g 2008-11-06 21:59:08
package org.eclipse.xtext.dummy.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/internal/InternalConcreteTestLanguageLexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/internal/InternalConcreteTestLanguageLexer.java
index 0c32515..e795e40 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/internal/InternalConcreteTestLanguageLexer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/internal/InternalConcreteTestLanguageLexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/grammarinheritance/parser/internal/InternalConcreteTestLanguage.g 2008-11-03 16:11:01
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/grammarinheritance/parser/internal/InternalConcreteTestLanguage.g 2008-11-06 21:59:05
package org.eclipse.xtext.grammarinheritance.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/internal/InternalConcreteTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/internal/InternalConcreteTestLanguageParser.java
index 5de5e7e..c29c105 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/internal/InternalConcreteTestLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/grammarinheritance/parser/internal/InternalConcreteTestLanguageParser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/grammarinheritance/parser/internal/InternalConcreteTestLanguage.g 2008-11-03 16:11:00
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/grammarinheritance/parser/internal/InternalConcreteTestLanguage.g 2008-11-06 21:59:05
package org.eclipse.xtext.grammarinheritance.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTestLexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTestLexer.java
index 3da314b..c12c931 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTestLexer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTestLexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g 2008-11-03 16:11:03
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g 2008-11-06 21:59:07
package org.eclipse.xtext.metamodelreferencing.tests.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTestParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTestParser.java
index afde522..1a39a2e 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTestParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTestParser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g 2008-11-03 16:11:03
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/metamodelreferencing/tests/parser/internal/InternalMetamodelRefTest.g 2008-11-06 21:59:07
package org.eclipse.xtext.metamodelreferencing.tests.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/internal/InternalXtextGrammarTestLexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/internal/InternalXtextGrammarTestLexer.java
index d842113..4e7dd2e 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/internal/InternalXtextGrammarTestLexer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/internal/InternalXtextGrammarTestLexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/parser/internal/InternalXtextGrammarTest.g 2008-11-03 16:11:02
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/parser/internal/InternalXtextGrammarTest.g 2008-11-06 21:59:07
package org.eclipse.xtext.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/internal/InternalXtextGrammarTestParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/internal/InternalXtextGrammarTestParser.java
index c7765cf..390bccc 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/internal/InternalXtextGrammarTestParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parser/internal/InternalXtextGrammarTestParser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/parser/internal/InternalXtextGrammarTest.g 2008-11-03 16:11:02
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/parser/internal/InternalXtextGrammarTest.g 2008-11-06 21:59:06
package org.eclipse.xtext.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalComplexReconstrTestLexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalComplexReconstrTestLexer.java
index 968318d..f69ded3 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalComplexReconstrTestLexer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalComplexReconstrTestLexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalComplexReconstrTest.g 2008-11-03 16:11:06
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalComplexReconstrTest.g 2008-11-06 21:59:10
package org.eclipse.xtext.parsetree.reconstr.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalComplexReconstrTestParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalComplexReconstrTestParser.java
index 24899f4..0776840 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalComplexReconstrTestParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalComplexReconstrTestParser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalComplexReconstrTest.g 2008-11-03 16:11:06
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalComplexReconstrTest.g 2008-11-06 21:59:10
package org.eclipse.xtext.parsetree.reconstr.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalSimpleReconstrTestLexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalSimpleReconstrTestLexer.java
index 02320bf..c91d197 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalSimpleReconstrTestLexer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalSimpleReconstrTestLexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalSimpleReconstrTest.g 2008-11-03 16:11:05
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalSimpleReconstrTest.g 2008-11-06 21:59:09
package org.eclipse.xtext.parsetree.reconstr.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalSimpleReconstrTestParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalSimpleReconstrTestParser.java
index ba400e0..71fdb5d 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalSimpleReconstrTestParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalSimpleReconstrTestParser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalSimpleReconstrTest.g 2008-11-03 16:11:05
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/parsetree/reconstr/parser/internal/InternalSimpleReconstrTest.g 2008-11-06 21:59:09
package org.eclipse.xtext.parsetree.reconstr.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ReferenceGrammar.ecore b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ReferenceGrammar.ecore
index f89e8cf..d5d6059 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ReferenceGrammar.ecore
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ReferenceGrammar.ecore
@@ -10,14 +10,15 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="kinder" upperBound="-1" eType="//Kind" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="erzieher" upperBound="-1" eType="//Erwachsener" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="spielzeuge" upperBound="-1" eType="//Spielzeug" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="familie" upperBound="-1" eType="//Familie" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Person">
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="name">
- <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- </eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="age">
<eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
</eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Kind" eSuperTypes="//Person"/>
<eClassifiers xsi:type="ecore:EClass" name="Erwachsener" eSuperTypes="//Person"/>
@@ -28,4 +29,12 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="farbe" eType="//Farbe" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Farbe"/>
+ <eClassifiers xsi:type="ecore:EClass" name="Familie">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name">
+ <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="mutter" eType="//Erwachsener"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="vater" eType="//Erwachsener"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="kinder" upperBound="-1" eType="//Kind"/>
+ </eClassifiers>
</ecore:EPackage>
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi
index 3857796..f128888 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi
@@ -25,15 +25,20 @@
</abstractTokens>
<abstractTokens xsi:type="xtext:Alternatives" cardinality="*">
<groups xsi:type="xtext:Alternatives">
- <groups xsi:type="xtext:Assignment" operator="+=" feature="kinder">
- <terminal xsi:type="xtext:RuleCall" name="Kind"/>
+ <groups xsi:type="xtext:Alternatives">
+ <groups xsi:type="xtext:Assignment" operator="+=" feature="kinder">
+ <terminal xsi:type="xtext:RuleCall" name="Kind"/>
+ </groups>
+ <groups xsi:type="xtext:Assignment" operator="+=" feature="erzieher">
+ <terminal xsi:type="xtext:RuleCall" name="Erwachsener"/>
+ </groups>
</groups>
- <groups xsi:type="xtext:Assignment" operator="+=" feature="erzieher">
- <terminal xsi:type="xtext:RuleCall" name="Erwachsener"/>
+ <groups xsi:type="xtext:Assignment" operator="+=" feature="spielzeuge">
+ <terminal xsi:type="xtext:RuleCall" name="Spielzeug"/>
</groups>
</groups>
- <groups xsi:type="xtext:Assignment" operator="+=" feature="spielzeuge">
- <terminal xsi:type="xtext:RuleCall" name="Spielzeug"/>
+ <groups xsi:type="xtext:Assignment" operator="+=" feature="familie">
+ <terminal xsi:type="xtext:RuleCall" name="Familie"/>
</groups>
</abstractTokens>
</abstractTokens>
@@ -115,4 +120,55 @@
<groups xsi:type="xtext:Keyword" value="GR&#xdc;N"/>
</alternatives>
</rules>
+ <rules xsi:type="xtext:ParserRule" name="Familie">
+ <alternatives xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Group">
+ <abstractTokens xsi:type="xtext:Keyword" value="familie"/>
+ <abstractTokens xsi:type="xtext:Keyword" value="("/>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="name">
+ <terminal xsi:type="xtext:Alternatives">
+ <groups xsi:type="xtext:Alternatives">
+ <groups xsi:type="xtext:Keyword" value="keyword"/>
+ <groups xsi:type="xtext:RuleCall" name="STRING"/>
+ </groups>
+ <groups xsi:type="xtext:RuleCall" name="ID"/>
+ </terminal>
+ </abstractTokens>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="mutter">
+ <terminal xsi:type="xtext:CrossReference">
+ <type name="Erwachsener"/>
+ </terminal>
+ </abstractTokens>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Assignment" operator="=" feature="vater">
+ <terminal xsi:type="xtext:CrossReference">
+ <type name="Erwachsener"/>
+ </terminal>
+ </abstractTokens>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="kinder">
+ <terminal xsi:type="xtext:CrossReference">
+ <type name="Kind"/>
+ </terminal>
+ </abstractTokens>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Group" cardinality="*">
+ <abstractTokens xsi:type="xtext:Keyword" value=","/>
+ <abstractTokens xsi:type="xtext:Assignment" operator="+=" feature="kinder">
+ <terminal xsi:type="xtext:CrossReference">
+ <type name="Kind"/>
+ </terminal>
+ </abstractTokens>
+ </abstractTokens>
+ </abstractTokens>
+ <abstractTokens xsi:type="xtext:Keyword" value=")"/>
+ </alternatives>
+ </rules>
</xtext:Grammar>
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalActionTestLanguageLexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalActionTestLanguageLexer.java
index 308142f..ce12843 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalActionTestLanguageLexer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalActionTestLanguageLexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalActionTestLanguage.g 2008-11-03 16:11:08
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalActionTestLanguage.g 2008-11-06 21:59:11
package org.eclipse.xtext.testlanguages.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalActionTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalActionTestLanguageParser.java
index 0a60bf2..a08763d 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalActionTestLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalActionTestLanguageParser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalActionTestLanguage.g 2008-11-03 16:11:07
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalActionTestLanguage.g 2008-11-06 21:59:11
package org.eclipse.xtext.testlanguages.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLexerLanguageLexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLexerLanguageLexer.java
index d58700f..4e6d289 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLexerLanguageLexer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLexerLanguageLexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLexerLanguage.g 2008-11-03 16:11:07
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLexerLanguage.g 2008-11-06 21:59:10
package org.eclipse.xtext.testlanguages.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLexerLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLexerLanguageParser.java
index a7c646a..58e13eb 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLexerLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLexerLanguageParser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLexerLanguage.g 2008-11-03 16:11:06
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLexerLanguage.g 2008-11-06 21:59:10
package org.eclipse.xtext.testlanguages.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLookaheadLanguageLexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLookaheadLanguageLexer.java
index 86362dd..4c32a2a 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLookaheadLanguageLexer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLookaheadLanguageLexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLookaheadLanguage.g 2008-11-03 16:11:09
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLookaheadLanguage.g 2008-11-06 21:59:15
package org.eclipse.xtext.testlanguages.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLookaheadLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLookaheadLanguageParser.java
index 7c8fd91..ae40aad 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLookaheadLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLookaheadLanguageParser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLookaheadLanguage.g 2008-11-03 16:11:09
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalLookaheadLanguage.g 2008-11-06 21:59:14
package org.eclipse.xtext.testlanguages.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalOptionalEmptyLanguageLexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalOptionalEmptyLanguageLexer.java
index 6e2c375..9b8d558 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalOptionalEmptyLanguageLexer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalOptionalEmptyLanguageLexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalOptionalEmptyLanguage.g 2008-11-03 16:11:08
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalOptionalEmptyLanguage.g 2008-11-06 21:59:12
package org.eclipse.xtext.testlanguages.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalOptionalEmptyLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalOptionalEmptyLanguageParser.java
index 8d1671a..f5de313 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalOptionalEmptyLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalOptionalEmptyLanguageParser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalOptionalEmptyLanguage.g 2008-11-03 16:11:08
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalOptionalEmptyLanguage.g 2008-11-06 21:59:12
package org.eclipse.xtext.testlanguages.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g
index 7a18e25..061fdd1 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g
@@ -110,11 +110,11 @@ ruleSpielplatz returns [EObject current=null]
{
createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1" /* xtext::Keyword */, null);
}
-)(((
+)((((
{
- currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.1/@groups.0/@groups.0/@terminal" /* xtext::RuleCall */, currentNode);
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.1/@groups.0/@groups.0/@groups.0/@terminal" /* xtext::RuleCall */, currentNode);
}
lv_kinder=ruleKind
{
@@ -132,7 +132,7 @@ ruleSpielplatz returns [EObject current=null]
{
- currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.1/@groups.0/@groups.1/@terminal" /* xtext::RuleCall */, currentNode);
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.1/@groups.0/@groups.0/@groups.1/@terminal" /* xtext::RuleCall */, currentNode);
}
lv_erzieher=ruleErwachsener
{
@@ -150,7 +150,7 @@ ruleSpielplatz returns [EObject current=null]
{
- currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.1/@groups.1/@terminal" /* xtext::RuleCall */, currentNode);
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.1/@groups.0/@groups.1/@terminal" /* xtext::RuleCall */, currentNode);
}
lv_spielzeuge=ruleSpielzeug
{
@@ -163,6 +163,24 @@ ruleSpielplatz returns [EObject current=null]
factory.add($current, "spielzeuge", lv_spielzeuge,null);
}
+))
+ |(
+
+
+ {
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.1/@groups.1/@terminal" /* xtext::RuleCall */, currentNode);
+ }
+ lv_familie=ruleFamilie
+ {
+ currentNode = currentNode.getParent();
+ if ($current==null) {
+ $current = factory.create("Spielplatz");
+ associateNodeWithAstElement(currentNode, $current);
+ }
+
+ factory.add($current, "familie", lv_familie,null);
+ }
+
))*)'}'
{
createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.0/@alternatives/@abstractTokens.1" /* xtext::Keyword */, null);
@@ -389,6 +407,124 @@ ruleFarbe returns [EObject current=null]
+// Entry rule entryRuleFamilie
+entryRuleFamilie returns [EObject current=null] :
+ { currentNode = createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6" /* xtext::ParserRule */, currentNode); }
+ iv_ruleFamilie=ruleFamilie
+ { $current=$iv_ruleFamilie.current; }
+ EOF
+;
+
+// Rule Familie
+ruleFamilie returns [EObject current=null]
+ @init { EObject temp=null; setCurrentLookahead(); resetLookahead(); }
+ @after { resetLookahead(); }:
+((((((('familie'
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0" /* xtext::Keyword */, null);
+ }
+'('
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1" /* xtext::Keyword */, null);
+ }
+)(
+
+ lv_name=(('keyword'
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1/@terminal/@groups.0/@groups.0" /* xtext::Keyword */, "name");
+ }
+
+ |RULE_STRING
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1/@terminal/@groups.0/@groups.1" /* xtext::RuleCall */, "name");
+ }
+)
+ |RULE_ID
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1/@terminal/@groups.1" /* xtext::RuleCall */, "name");
+ }
+)
+ {
+ if ($current==null) {
+ $current = factory.create("Familie");
+ associateNodeWithAstElement(currentNode, $current);
+ }
+
+ factory.set($current, "name", input.LT(-1),null);
+ }
+
+))(
+
+
+ {
+ if ($current==null) {
+ $current = factory.create("Familie");
+ associateNodeWithAstElement(currentNode, $current);
+ }
+ }
+(
+ RULE_ID {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1/@terminal" /* xtext::CrossReference */, "mutter");
+ }
+)
+
+))(
+
+
+ {
+ if ($current==null) {
+ $current = factory.create("Familie");
+ associateNodeWithAstElement(currentNode, $current);
+ }
+ }
+(
+ RULE_ID {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1/@terminal" /* xtext::CrossReference */, "vater");
+ }
+)
+
+))(
+
+
+ {
+ if ($current==null) {
+ $current = factory.create("Familie");
+ associateNodeWithAstElement(currentNode, $current);
+ }
+ }
+(
+ RULE_ID {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1/@terminal" /* xtext::CrossReference */, "kinder");
+ }
+)
+
+))(','
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.1/@abstractTokens.0" /* xtext::Keyword */, null);
+ }
+(
+
+
+ {
+ if ($current==null) {
+ $current = factory.create("Familie");
+ associateNodeWithAstElement(currentNode, $current);
+ }
+ }
+(
+ RULE_ID {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.1/@abstractTokens.1/@terminal" /* xtext::CrossReference */, "kinder");
+ }
+)
+
+))*)')'
+ {
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.1" /* xtext::Keyword */, null);
+ }
+);
+
+
+
RULE_ID : ('^')?('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.tokens b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.tokens
index e60a061..b5cbecf 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.tokens
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.tokens
@@ -5,15 +5,18 @@ RULE_INT=4
RULE_STRING=5
RULE_ANY_OTHER=10
RULE_SL_COMMENT=8
-'('=15
'ROT'=19
'spielzeug'=18
-')'=16
'spielplatz'=11
+')'=16
'GRÜN'=22
-'erwachsener'=17
-'BLAU'=20
'kind'=14
+'{'=12
'GELB'=21
+','=25
+'keyword'=24
+'('=15
+'familie'=23
+'erwachsener'=17
+'BLAU'=20
'}'=13
-'{'=12
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammarLexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammarLexer.java
index 12f5bf1..468fbc6 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammarLexer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammarLexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g 2008-11-03 16:11:08
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g 2008-11-06 21:59:13
package org.eclipse.xtext.testlanguages.parser.internal;
@@ -21,18 +21,21 @@ public class InternalReferenceGrammarLexer extends Lexer {
public static final int T11=11;
public static final int RULE_STRING=5;
public static final int T12=12;
+ public static final int T23=23;
public static final int T13=13;
public static final int T20=20;
+ public static final int T25=25;
public static final int T18=18;
public static final int RULE_WS=9;
public static final int T15=15;
public static final int RULE_INT=4;
public static final int EOF=-1;
public static final int T17=17;
- public static final int Tokens=23;
+ public static final int Tokens=26;
public static final int RULE_ANY_OTHER=10;
public static final int T16=16;
public static final int RULE_SL_COMMENT=8;
+ public static final int T24=24;
public static final int T19=19;
public InternalReferenceGrammarLexer() {;}
public InternalReferenceGrammarLexer(CharStream input) {
@@ -264,14 +267,70 @@ public class InternalReferenceGrammarLexer extends Lexer {
}
// $ANTLR end T22
+ // $ANTLR start T23
+ public final void mT23() throws RecognitionException {
+ try {
+ int _type = T23;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:22:5: ( 'familie' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:22:7: 'familie'
+ {
+ match("familie");
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end T23
+
+ // $ANTLR start T24
+ public final void mT24() throws RecognitionException {
+ try {
+ int _type = T24;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:23:5: ( 'keyword' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:23:7: 'keyword'
+ {
+ match("keyword");
+
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end T24
+
+ // $ANTLR start T25
+ public final void mT25() throws RecognitionException {
+ try {
+ int _type = T25;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:24:5: ( ',' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:24:7: ','
+ {
+ match(',');
+
+ }
+
+ this.type = _type;
+ }
+ finally {
+ }
+ }
+ // $ANTLR end T25
+
// $ANTLR start RULE_ID
public final void mRULE_ID() throws RecognitionException {
try {
int _type = RULE_ID;
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:393:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* )
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:393:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:529:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:529:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
{
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:393:11: ( '^' )?
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:529:11: ( '^' )?
int alt1=2;
int LA1_0 = input.LA(1);
@@ -280,7 +339,7 @@ public class InternalReferenceGrammarLexer extends Lexer {
}
switch (alt1) {
case 1 :
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:393:12: '^'
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:529:12: '^'
{
match('^');
@@ -299,7 +358,7 @@ public class InternalReferenceGrammarLexer extends Lexer {
recover(mse); throw mse;
}
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:393:41: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:529:41: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
loop2:
do {
int alt2=2;
@@ -347,10 +406,10 @@ public class InternalReferenceGrammarLexer extends Lexer {
public final void mRULE_INT() throws RecognitionException {
try {
int _type = RULE_INT;
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:395:10: ( ( '0' .. '9' )+ )
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:395:12: ( '0' .. '9' )+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:531:10: ( ( '0' .. '9' )+ )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:531:12: ( '0' .. '9' )+
{
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:395:12: ( '0' .. '9' )+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:531:12: ( '0' .. '9' )+
int cnt3=0;
loop3:
do {
@@ -364,7 +423,7 @@ public class InternalReferenceGrammarLexer extends Lexer {
switch (alt3) {
case 1 :
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:395:13: '0' .. '9'
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:531:13: '0' .. '9'
{
matchRange('0','9');
@@ -394,7 +453,7 @@ public class InternalReferenceGrammarLexer extends Lexer {
public final void mRULE_STRING() throws RecognitionException {
try {
int _type = RULE_STRING;
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:397:13: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\"' ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\\'' ) )* '\\'' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:533:13: ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\"' ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\\'' ) )* '\\'' )
int alt6=2;
int LA6_0 = input.LA(1);
@@ -406,16 +465,16 @@ public class InternalReferenceGrammarLexer extends Lexer {
}
else {
NoViableAltException nvae =
- new NoViableAltException("397:1: RULE_STRING : ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\"' ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\\'' ) )* '\\'' );", 6, 0, input);
+ new NoViableAltException("533:1: RULE_STRING : ( '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\"' ) )* '\"' | '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\\'' ) )* '\\'' );", 6, 0, input);
throw nvae;
}
switch (alt6) {
case 1 :
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:397:15: '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\"' ) )* '\"'
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:533:15: '\"' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\"' ) )* '\"'
{
match('\"');
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:397:19: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\"' ) )*
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:533:19: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\"' ) )*
loop4:
do {
int alt4=3;
@@ -431,7 +490,7 @@ public class InternalReferenceGrammarLexer extends Lexer {
switch (alt4) {
case 1 :
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:397:21: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:533: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' ) {
@@ -448,7 +507,7 @@ public class InternalReferenceGrammarLexer extends Lexer {
}
break;
case 2 :
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:397:65: ~ ( '\\\\' | '\"' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:533:65: ~ ( '\\\\' | '\"' )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
input.consume();
@@ -474,10 +533,10 @@ public class InternalReferenceGrammarLexer extends Lexer {
}
break;
case 2 :
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:397:101: '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\\'' ) )* '\\''
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:533:101: '\\'' ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\\'' ) )* '\\''
{
match('\'');
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:397:106: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\\'' ) )*
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:533:106: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | ~ ( '\\\\' | '\\'' ) )*
loop5:
do {
int alt5=3;
@@ -493,7 +552,7 @@ public class InternalReferenceGrammarLexer extends Lexer {
switch (alt5) {
case 1 :
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:397:108: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:533:108: '\\\\' ( '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' ) {
@@ -510,7 +569,7 @@ public class InternalReferenceGrammarLexer extends Lexer {
}
break;
case 2 :
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:397:152: ~ ( '\\\\' | '\\'' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:533:152: ~ ( '\\\\' | '\\'' )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
input.consume();
@@ -548,12 +607,12 @@ public class InternalReferenceGrammarLexer extends Lexer {
public final void mRULE_ML_COMMENT() throws RecognitionException {
try {
int _type = RULE_ML_COMMENT;
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:399:17: ( '/*' ( options {greedy=false; } : . )* '*/' )
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:399:19: '/*' ( options {greedy=false; } : . )* '*/'
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:535:17: ( '/*' ( options {greedy=false; } : . )* '*/' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:535:19: '/*' ( options {greedy=false; } : . )* '*/'
{
match("/*");
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:399:24: ( options {greedy=false; } : . )*
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:535:24: ( options {greedy=false; } : . )*
loop7:
do {
int alt7=2;
@@ -578,7 +637,7 @@ public class InternalReferenceGrammarLexer extends Lexer {
switch (alt7) {
case 1 :
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:399:52: .
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:535:52: .
{
matchAny();
@@ -607,12 +666,12 @@ public class InternalReferenceGrammarLexer extends Lexer {
public final void mRULE_SL_COMMENT() throws RecognitionException {
try {
int _type = RULE_SL_COMMENT;
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:401:17: ( '//' (~ ( '\\n' | '\\r' ) )* ( ( '\\r' )? '\\n' )? )
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:401:19: '//' (~ ( '\\n' | '\\r' ) )* ( ( '\\r' )? '\\n' )?
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:537:17: ( '//' (~ ( '\\n' | '\\r' ) )* ( ( '\\r' )? '\\n' )? )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:537:19: '//' (~ ( '\\n' | '\\r' ) )* ( ( '\\r' )? '\\n' )?
{
match("//");
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:401:24: (~ ( '\\n' | '\\r' ) )*
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:537:24: (~ ( '\\n' | '\\r' ) )*
loop8:
do {
int alt8=2;
@@ -625,7 +684,7 @@ public class InternalReferenceGrammarLexer extends Lexer {
switch (alt8) {
case 1 :
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:401:24: ~ ( '\\n' | '\\r' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:537:24: ~ ( '\\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();
@@ -646,7 +705,7 @@ public class InternalReferenceGrammarLexer extends Lexer {
}
} while (true);
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:401:38: ( ( '\\r' )? '\\n' )?
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:537:38: ( ( '\\r' )? '\\n' )?
int alt10=2;
int LA10_0 = input.LA(1);
@@ -655,9 +714,9 @@ public class InternalReferenceGrammarLexer extends Lexer {
}
switch (alt10) {
case 1 :
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:401:39: ( '\\r' )? '\\n'
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:537:39: ( '\\r' )? '\\n'
{
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:401:39: ( '\\r' )?
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:537:39: ( '\\r' )?
int alt9=2;
int LA9_0 = input.LA(1);
@@ -666,7 +725,7 @@ public class InternalReferenceGrammarLexer extends Lexer {
}
switch (alt9) {
case 1 :
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:401:39: '\\r'
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:537:39: '\\r'
{
match('\r');
@@ -697,10 +756,10 @@ public class InternalReferenceGrammarLexer extends Lexer {
public final void mRULE_WS() throws RecognitionException {
try {
int _type = RULE_WS;
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:403:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:403:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:539:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:539:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
{
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:403:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:539:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
int cnt11=0;
loop11:
do {
@@ -754,8 +813,8 @@ public class InternalReferenceGrammarLexer extends Lexer {
public final void mRULE_ANY_OTHER() throws RecognitionException {
try {
int _type = RULE_ANY_OTHER;
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:405:16: ( . )
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:405:18: .
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:541:16: ( . )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:541:18: .
{
matchAny();
@@ -769,103 +828,103 @@ public class InternalReferenceGrammarLexer extends Lexer {
// $ANTLR end RULE_ANY_OTHER
public void mTokens() throws RecognitionException {
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:1:8: ( T11 | T12 | T13 | T14 | T15 | T16 | T17 | T18 | T19 | T20 | T21 | T22 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER )
- int alt12=19;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:1:8: ( T11 | T12 | T13 | T14 | T15 | T16 | T17 | T18 | T19 | T20 | T21 | T22 | T23 | T24 | T25 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER )
+ int alt12=22;
int LA12_0 = input.LA(1);
if ( (LA12_0=='s') ) {
int LA12_1 = input.LA(2);
if ( (LA12_1=='p') ) {
- int LA12_19 = input.LA(3);
+ int LA12_21 = input.LA(3);
- if ( (LA12_19=='i') ) {
- int LA12_36 = input.LA(4);
+ if ( (LA12_21=='i') ) {
+ int LA12_41 = input.LA(4);
- if ( (LA12_36=='e') ) {
- int LA12_43 = input.LA(5);
+ if ( (LA12_41=='e') ) {
+ int LA12_50 = input.LA(5);
- if ( (LA12_43=='l') ) {
+ if ( (LA12_50=='l') ) {
switch ( input.LA(6) ) {
- case 'z':
+ case 'p':
{
- int LA12_54 = input.LA(7);
+ int LA12_65 = input.LA(7);
+
+ if ( (LA12_65=='l') ) {
+ int LA12_70 = input.LA(8);
- if ( (LA12_54=='e') ) {
- int LA12_57 = input.LA(8);
+ if ( (LA12_70=='a') ) {
+ int LA12_75 = input.LA(9);
- if ( (LA12_57=='u') ) {
- int LA12_60 = input.LA(9);
+ if ( (LA12_75=='t') ) {
+ int LA12_80 = input.LA(10);
- if ( (LA12_60=='g') ) {
- int LA12_63 = input.LA(10);
+ if ( (LA12_80=='z') ) {
+ int LA12_83 = input.LA(11);
- if ( ((LA12_63>='0' && LA12_63<='9')||(LA12_63>='A' && LA12_63<='Z')||LA12_63=='_'||(LA12_63>='a' && LA12_63<='z')) ) {
- alt12=13;
+ if ( ((LA12_83>='0' && LA12_83<='9')||(LA12_83>='A' && LA12_83<='Z')||LA12_83=='_'||(LA12_83>='a' && LA12_83<='z')) ) {
+ alt12=16;
+ }
+ else {
+ alt12=1;}
}
else {
- alt12=8;}
+ alt12=16;}
}
else {
- alt12=13;}
+ alt12=16;}
}
else {
- alt12=13;}
+ alt12=16;}
}
else {
- alt12=13;}
+ alt12=16;}
}
break;
- case 'p':
+ case 'z':
{
- int LA12_55 = input.LA(7);
-
- if ( (LA12_55=='l') ) {
- int LA12_58 = input.LA(8);
+ int LA12_66 = input.LA(7);
- if ( (LA12_58=='a') ) {
- int LA12_61 = input.LA(9);
+ if ( (LA12_66=='e') ) {
+ int LA12_71 = input.LA(8);
- if ( (LA12_61=='t') ) {
- int LA12_64 = input.LA(10);
+ if ( (LA12_71=='u') ) {
+ int LA12_76 = input.LA(9);
- if ( (LA12_64=='z') ) {
- int LA12_67 = input.LA(11);
+ if ( (LA12_76=='g') ) {
+ int LA12_81 = input.LA(10);
- if ( ((LA12_67>='0' && LA12_67<='9')||(LA12_67>='A' && LA12_67<='Z')||LA12_67=='_'||(LA12_67>='a' && LA12_67<='z')) ) {
- alt12=13;
- }
- else {
- alt12=1;}
+ if ( ((LA12_81>='0' && LA12_81<='9')||(LA12_81>='A' && LA12_81<='Z')||LA12_81=='_'||(LA12_81>='a' && LA12_81<='z')) ) {
+ alt12=16;
}
else {
- alt12=13;}
+ alt12=8;}
}
else {
- alt12=13;}
+ alt12=16;}
}
else {
- alt12=13;}
+ alt12=16;}
}
else {
- alt12=13;}
+ alt12=16;}
}
break;
default:
- alt12=13;}
+ alt12=16;}
}
else {
- alt12=13;}
+ alt12=16;}
}
else {
- alt12=13;}
+ alt12=16;}
}
else {
- alt12=13;}
+ alt12=16;}
}
else {
- alt12=13;}
+ alt12=16;}
}
else if ( (LA12_0=='{') ) {
alt12=2;
@@ -874,31 +933,74 @@ public class InternalReferenceGrammarLexer extends Lexer {
alt12=3;
}
else if ( (LA12_0=='k') ) {
- int LA12_4 = input.LA(2);
+ switch ( input.LA(2) ) {
+ case 'e':
+ {
+ int LA12_25 = input.LA(3);
+
+ if ( (LA12_25=='y') ) {
+ int LA12_42 = input.LA(4);
+
+ if ( (LA12_42=='w') ) {
+ int LA12_51 = input.LA(5);
+
+ if ( (LA12_51=='o') ) {
+ int LA12_59 = input.LA(6);
+
+ if ( (LA12_59=='r') ) {
+ int LA12_67 = input.LA(7);
- if ( (LA12_4=='i') ) {
- int LA12_23 = input.LA(3);
+ if ( (LA12_67=='d') ) {
+ int LA12_72 = input.LA(8);
- if ( (LA12_23=='n') ) {
- int LA12_37 = input.LA(4);
+ if ( ((LA12_72>='0' && LA12_72<='9')||(LA12_72>='A' && LA12_72<='Z')||LA12_72=='_'||(LA12_72>='a' && LA12_72<='z')) ) {
+ alt12=16;
+ }
+ else {
+ alt12=14;}
+ }
+ else {
+ alt12=16;}
+ }
+ else {
+ alt12=16;}
+ }
+ else {
+ alt12=16;}
+ }
+ else {
+ alt12=16;}
+ }
+ else {
+ alt12=16;}
+ }
+ break;
+ case 'i':
+ {
+ int LA12_26 = input.LA(3);
+
+ if ( (LA12_26=='n') ) {
+ int LA12_43 = input.LA(4);
- if ( (LA12_37=='d') ) {
- int LA12_44 = input.LA(5);
+ if ( (LA12_43=='d') ) {
+ int LA12_52 = input.LA(5);
- if ( ((LA12_44>='0' && LA12_44<='9')||(LA12_44>='A' && LA12_44<='Z')||LA12_44=='_'||(LA12_44>='a' && LA12_44<='z')) ) {
- alt12=13;
+ if ( ((LA12_52>='0' && LA12_52<='9')||(LA12_52>='A' && LA12_52<='Z')||LA12_52=='_'||(LA12_52>='a' && LA12_52<='z')) ) {
+ alt12=16;
}
else {
alt12=4;}
}
else {
- alt12=13;}
+ alt12=16;}
}
else {
- alt12=13;}
- }
- else {
- alt12=13;}
+ alt12=16;}
+ }
+ break;
+ default:
+ alt12=16;}
+
}
else if ( (LA12_0=='(') ) {
alt12=5;
@@ -910,217 +1012,265 @@ public class InternalReferenceGrammarLexer extends Lexer {
int LA12_7 = input.LA(2);
if ( (LA12_7=='r') ) {
- int LA12_26 = input.LA(3);
+ int LA12_29 = input.LA(3);
- if ( (LA12_26=='w') ) {
- int LA12_38 = input.LA(4);
+ if ( (LA12_29=='w') ) {
+ int LA12_44 = input.LA(4);
- if ( (LA12_38=='a') ) {
- int LA12_45 = input.LA(5);
+ if ( (LA12_44=='a') ) {
+ int LA12_53 = input.LA(5);
- if ( (LA12_45=='c') ) {
- int LA12_51 = input.LA(6);
+ if ( (LA12_53=='c') ) {
+ int LA12_61 = input.LA(6);
- if ( (LA12_51=='h') ) {
- int LA12_56 = input.LA(7);
+ if ( (LA12_61=='h') ) {
+ int LA12_68 = input.LA(7);
- if ( (LA12_56=='s') ) {
- int LA12_59 = input.LA(8);
+ if ( (LA12_68=='s') ) {
+ int LA12_73 = input.LA(8);
- if ( (LA12_59=='e') ) {
- int LA12_62 = input.LA(9);
+ if ( (LA12_73=='e') ) {
+ int LA12_78 = input.LA(9);
- if ( (LA12_62=='n') ) {
- int LA12_65 = input.LA(10);
+ if ( (LA12_78=='n') ) {
+ int LA12_82 = input.LA(10);
- if ( (LA12_65=='e') ) {
- int LA12_68 = input.LA(11);
+ if ( (LA12_82=='e') ) {
+ int LA12_85 = input.LA(11);
- if ( (LA12_68=='r') ) {
- int LA12_70 = input.LA(12);
+ if ( (LA12_85=='r') ) {
+ int LA12_87 = input.LA(12);
- if ( ((LA12_70>='0' && LA12_70<='9')||(LA12_70>='A' && LA12_70<='Z')||LA12_70=='_'||(LA12_70>='a' && LA12_70<='z')) ) {
- alt12=13;
+ if ( ((LA12_87>='0' && LA12_87<='9')||(LA12_87>='A' && LA12_87<='Z')||LA12_87=='_'||(LA12_87>='a' && LA12_87<='z')) ) {
+ alt12=16;
}
else {
alt12=7;}
}
else {
- alt12=13;}
+ alt12=16;}
}
else {
- alt12=13;}
+ alt12=16;}
}
else {
- alt12=13;}
+ alt12=16;}
}
else {
- alt12=13;}
+ alt12=16;}
}
else {
- alt12=13;}
+ alt12=16;}
}
else {
- alt12=13;}
+ alt12=16;}
}
else {
- alt12=13;}
+ alt12=16;}
}
else {
- alt12=13;}
+ alt12=16;}
}
else {
- alt12=13;}
+ alt12=16;}
}
else {
- alt12=13;}
+ alt12=16;}
}
else if ( (LA12_0=='R') ) {
int LA12_8 = input.LA(2);
if ( (LA12_8=='O') ) {
- int LA12_27 = input.LA(3);
+ int LA12_30 = input.LA(3);
- if ( (LA12_27=='T') ) {
- int LA12_39 = input.LA(4);
+ if ( (LA12_30=='T') ) {
+ int LA12_45 = input.LA(4);
- if ( ((LA12_39>='0' && LA12_39<='9')||(LA12_39>='A' && LA12_39<='Z')||LA12_39=='_'||(LA12_39>='a' && LA12_39<='z')) ) {
- alt12=13;
+ if ( ((LA12_45>='0' && LA12_45<='9')||(LA12_45>='A' && LA12_45<='Z')||LA12_45=='_'||(LA12_45>='a' && LA12_45<='z')) ) {
+ alt12=16;
}
else {
alt12=9;}
}
else {
- alt12=13;}
+ alt12=16;}
}
else {
- alt12=13;}
+ alt12=16;}
}
else if ( (LA12_0=='B') ) {
int LA12_9 = input.LA(2);
if ( (LA12_9=='L') ) {
- int LA12_28 = input.LA(3);
+ int LA12_31 = input.LA(3);
- if ( (LA12_28=='A') ) {
- int LA12_40 = input.LA(4);
+ if ( (LA12_31=='A') ) {
+ int LA12_46 = input.LA(4);
- if ( (LA12_40=='U') ) {
- int LA12_47 = input.LA(5);
+ if ( (LA12_46=='U') ) {
+ int LA12_55 = input.LA(5);
- if ( ((LA12_47>='0' && LA12_47<='9')||(LA12_47>='A' && LA12_47<='Z')||LA12_47=='_'||(LA12_47>='a' && LA12_47<='z')) ) {
- alt12=13;
+ if ( ((LA12_55>='0' && LA12_55<='9')||(LA12_55>='A' && LA12_55<='Z')||LA12_55=='_'||(LA12_55>='a' && LA12_55<='z')) ) {
+ alt12=16;
}
else {
alt12=10;}
}
else {
- alt12=13;}
+ alt12=16;}
}
else {
- alt12=13;}
+ alt12=16;}
}
else {
- alt12=13;}
+ alt12=16;}
}
else if ( (LA12_0=='G') ) {
switch ( input.LA(2) ) {
+ case 'R':
+ {
+ int LA12_32 = input.LA(3);
+
+ if ( (LA12_32=='\u00DC') ) {
+ alt12=12;
+ }
+ else {
+ alt12=16;}
+ }
+ break;
case 'E':
{
- int LA12_29 = input.LA(3);
+ int LA12_33 = input.LA(3);
- if ( (LA12_29=='L') ) {
- int LA12_41 = input.LA(4);
+ if ( (LA12_33=='L') ) {
+ int LA12_48 = input.LA(4);
- if ( (LA12_41=='B') ) {
- int LA12_48 = input.LA(5);
+ if ( (LA12_48=='B') ) {
+ int LA12_56 = input.LA(5);
- if ( ((LA12_48>='0' && LA12_48<='9')||(LA12_48>='A' && LA12_48<='Z')||LA12_48=='_'||(LA12_48>='a' && LA12_48<='z')) ) {
- alt12=13;
+ if ( ((LA12_56>='0' && LA12_56<='9')||(LA12_56>='A' && LA12_56<='Z')||LA12_56=='_'||(LA12_56>='a' && LA12_56<='z')) ) {
+ alt12=16;
}
else {
alt12=11;}
}
else {
- alt12=13;}
+ alt12=16;}
}
else {
- alt12=13;}
+ alt12=16;}
}
break;
- case 'R':
- {
- int LA12_30 = input.LA(3);
+ default:
+ alt12=16;}
- if ( (LA12_30=='\u00DC') ) {
- alt12=12;
+ }
+ else if ( (LA12_0=='f') ) {
+ int LA12_11 = input.LA(2);
+
+ if ( (LA12_11=='a') ) {
+ int LA12_34 = input.LA(3);
+
+ if ( (LA12_34=='m') ) {
+ int LA12_49 = input.LA(4);
+
+ if ( (LA12_49=='i') ) {
+ int LA12_57 = input.LA(5);
+
+ if ( (LA12_57=='l') ) {
+ int LA12_64 = input.LA(6);
+
+ if ( (LA12_64=='i') ) {
+ int LA12_69 = input.LA(7);
+
+ if ( (LA12_69=='e') ) {
+ int LA12_74 = input.LA(8);
+
+ if ( ((LA12_74>='0' && LA12_74<='9')||(LA12_74>='A' && LA12_74<='Z')||LA12_74=='_'||(LA12_74>='a' && LA12_74<='z')) ) {
+ alt12=16;
+ }
+ else {
+ alt12=13;}
+ }
+ else {
+ alt12=16;}
+ }
+ else {
+ alt12=16;}
+ }
+ else {
+ alt12=16;}
+ }
+ else {
+ alt12=16;}
}
else {
- alt12=13;}
- }
- break;
- default:
- alt12=13;}
-
+ alt12=16;}
+ }
+ else {
+ alt12=16;}
+ }
+ else if ( (LA12_0==',') ) {
+ alt12=15;
}
else if ( (LA12_0=='^') ) {
- int LA12_11 = input.LA(2);
+ int LA12_13 = input.LA(2);
- if ( ((LA12_11>='A' && LA12_11<='Z')||LA12_11=='_'||(LA12_11>='a' && LA12_11<='z')) ) {
- alt12=13;
+ if ( ((LA12_13>='A' && LA12_13<='Z')||LA12_13=='_'||(LA12_13>='a' && LA12_13<='z')) ) {
+ alt12=16;
}
else {
- alt12=19;}
+ alt12=22;}
}
- else if ( (LA12_0=='A'||(LA12_0>='C' && LA12_0<='F')||(LA12_0>='H' && LA12_0<='Q')||(LA12_0>='S' && LA12_0<='Z')||LA12_0=='_'||(LA12_0>='a' && LA12_0<='d')||(LA12_0>='f' && LA12_0<='j')||(LA12_0>='l' && LA12_0<='r')||(LA12_0>='t' && LA12_0<='z')) ) {
- alt12=13;
+ else if ( (LA12_0=='A'||(LA12_0>='C' && LA12_0<='F')||(LA12_0>='H' && LA12_0<='Q')||(LA12_0>='S' && LA12_0<='Z')||LA12_0=='_'||(LA12_0>='a' && LA12_0<='d')||(LA12_0>='g' && LA12_0<='j')||(LA12_0>='l' && LA12_0<='r')||(LA12_0>='t' && LA12_0<='z')) ) {
+ alt12=16;
}
else if ( ((LA12_0>='0' && LA12_0<='9')) ) {
- alt12=14;
+ alt12=17;
}
else if ( (LA12_0=='\"') ) {
- int LA12_14 = input.LA(2);
+ int LA12_16 = input.LA(2);
- if ( ((LA12_14>='\u0000' && LA12_14<='\uFFFE')) ) {
- alt12=15;
+ if ( ((LA12_16>='\u0000' && LA12_16<='\uFFFE')) ) {
+ alt12=18;
}
else {
- alt12=19;}
+ alt12=22;}
}
else if ( (LA12_0=='\'') ) {
- int LA12_15 = input.LA(2);
+ int LA12_17 = input.LA(2);
- if ( ((LA12_15>='\u0000' && LA12_15<='\uFFFE')) ) {
- alt12=15;
+ if ( ((LA12_17>='\u0000' && LA12_17<='\uFFFE')) ) {
+ alt12=18;
}
else {
- alt12=19;}
+ alt12=22;}
}
else if ( (LA12_0=='/') ) {
switch ( input.LA(2) ) {
case '*':
{
- alt12=16;
+ alt12=19;
}
break;
case '/':
{
- alt12=17;
+ alt12=20;
}
break;
default:
- alt12=19;}
+ alt12=22;}
}
else if ( ((LA12_0>='\t' && LA12_0<='\n')||LA12_0=='\r'||LA12_0==' ') ) {
- alt12=18;
+ alt12=21;
}
- else if ( ((LA12_0>='\u0000' && LA12_0<='\b')||(LA12_0>='\u000B' && LA12_0<='\f')||(LA12_0>='\u000E' && LA12_0<='\u001F')||LA12_0=='!'||(LA12_0>='#' && LA12_0<='&')||(LA12_0>='*' && LA12_0<='.')||(LA12_0>=':' && LA12_0<='@')||(LA12_0>='[' && LA12_0<=']')||LA12_0=='`'||LA12_0=='|'||(LA12_0>='~' && LA12_0<='\uFFFE')) ) {
- alt12=19;
+ else if ( ((LA12_0>='\u0000' && LA12_0<='\b')||(LA12_0>='\u000B' && LA12_0<='\f')||(LA12_0>='\u000E' && LA12_0<='\u001F')||LA12_0=='!'||(LA12_0>='#' && LA12_0<='&')||(LA12_0>='*' && LA12_0<='+')||(LA12_0>='-' && LA12_0<='.')||(LA12_0>=':' && LA12_0<='@')||(LA12_0>='[' && LA12_0<=']')||LA12_0=='`'||LA12_0=='|'||(LA12_0>='~' && LA12_0<='\uFFFE')) ) {
+ alt12=22;
}
else {
NoViableAltException nvae =
- new NoViableAltException("1:1: Tokens : ( T11 | T12 | T13 | T14 | T15 | T16 | T17 | T18 | T19 | T20 | T21 | T22 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER );", 12, 0, input);
+ new NoViableAltException("1:1: Tokens : ( T11 | T12 | T13 | T14 | T15 | T16 | T17 | T18 | T19 | T20 | T21 | T22 | T23 | T24 | T25 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER );", 12, 0, input);
throw nvae;
}
@@ -1210,49 +1360,70 @@ public class InternalReferenceGrammarLexer extends Lexer {
}
break;
case 13 :
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:1:58: RULE_ID
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:1:58: T23
{
- mRULE_ID();
+ mT23();
}
break;
case 14 :
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:1:66: RULE_INT
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:1:62: T24
{
- mRULE_INT();
+ mT24();
}
break;
case 15 :
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:1:75: RULE_STRING
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:1:66: T25
{
- mRULE_STRING();
+ mT25();
}
break;
case 16 :
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:1:87: RULE_ML_COMMENT
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:1:70: RULE_ID
{
- mRULE_ML_COMMENT();
+ mRULE_ID();
}
break;
case 17 :
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:1:103: RULE_SL_COMMENT
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:1:78: RULE_INT
{
- mRULE_SL_COMMENT();
+ mRULE_INT();
}
break;
case 18 :
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:1:119: RULE_WS
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:1:87: RULE_STRING
{
- mRULE_WS();
+ mRULE_STRING();
}
break;
case 19 :
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:1:127: RULE_ANY_OTHER
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:1:99: RULE_ML_COMMENT
+ {
+ mRULE_ML_COMMENT();
+
+ }
+ break;
+ case 20 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:1:115: RULE_SL_COMMENT
+ {
+ mRULE_SL_COMMENT();
+
+ }
+ break;
+ case 21 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:1:131: RULE_WS
+ {
+ mRULE_WS();
+
+ }
+ break;
+ case 22 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:1:139: RULE_ANY_OTHER
{
mRULE_ANY_OTHER();
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammarParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammarParser.java
index bdc83a4..6e65557 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammarParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammarParser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g 2008-11-03 16:11:08
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g 2008-11-06 21:59:13
package org.eclipse.xtext.testlanguages.parser.internal;
@@ -20,7 +20,7 @@ import java.util.ArrayList;
public class InternalReferenceGrammarParser extends AbstractAntlrParser {
public static final String[] tokenNames = new String[] {
- "<invalid>", "<EOR>", "<DOWN>", "<UP>", "RULE_INT", "RULE_STRING", "RULE_ID", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER", "'spielplatz'", "'{'", "'}'", "'kind'", "'('", "')'", "'erwachsener'", "'spielzeug'", "'ROT'", "'BLAU'", "'GELB'", "'GRÜN'"
+ "<invalid>", "<EOR>", "<DOWN>", "<UP>", "RULE_INT", "RULE_STRING", "RULE_ID", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER", "'spielplatz'", "'{'", "'}'", "'kind'", "'('", "')'", "'erwachsener'", "'spielzeug'", "'ROT'", "'BLAU'", "'GELB'", "'GRÜN'", "'familie'", "'keyword'", "','"
};
public static final int RULE_ML_COMMENT=7;
public static final int RULE_ID=6;
@@ -96,7 +96,7 @@ public class InternalReferenceGrammarParser extends AbstractAntlrParser {
// $ANTLR start ruleSpielplatz
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:70:1: ruleSpielplatz returns [EObject current=null] : ( ( ( ( ( 'spielplatz' (lv_groesse= RULE_INT ) ) (lv_beschreibung= RULE_STRING )? ) '{' ) ( ( (lv_kinder= ruleKind ) | (lv_erzieher= ruleErwachsener ) ) | (lv_spielzeuge= ruleSpielzeug ) )* ) '}' )? ;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:70:1: ruleSpielplatz returns [EObject current=null] : ( ( ( ( ( 'spielplatz' (lv_groesse= RULE_INT ) ) (lv_beschreibung= RULE_STRING )? ) '{' ) ( ( ( (lv_kinder= ruleKind ) | (lv_erzieher= ruleErwachsener ) ) | (lv_spielzeuge= ruleSpielzeug ) ) | (lv_familie= ruleFamilie ) )* ) '}' )? ;
public final EObject ruleSpielplatz() throws RecognitionException {
EObject current = null;
@@ -108,25 +108,27 @@ public class InternalReferenceGrammarParser extends AbstractAntlrParser {
EObject lv_spielzeuge = null;
+ EObject lv_familie = null;
+
EObject temp=null; setCurrentLookahead(); resetLookahead();
try {
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:72:33: ( ( ( ( ( ( 'spielplatz' (lv_groesse= RULE_INT ) ) (lv_beschreibung= RULE_STRING )? ) '{' ) ( ( (lv_kinder= ruleKind ) | (lv_erzieher= ruleErwachsener ) ) | (lv_spielzeuge= ruleSpielzeug ) )* ) '}' )? )
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:73:1: ( ( ( ( ( 'spielplatz' (lv_groesse= RULE_INT ) ) (lv_beschreibung= RULE_STRING )? ) '{' ) ( ( (lv_kinder= ruleKind ) | (lv_erzieher= ruleErwachsener ) ) | (lv_spielzeuge= ruleSpielzeug ) )* ) '}' )?
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:72:33: ( ( ( ( ( ( 'spielplatz' (lv_groesse= RULE_INT ) ) (lv_beschreibung= RULE_STRING )? ) '{' ) ( ( ( (lv_kinder= ruleKind ) | (lv_erzieher= ruleErwachsener ) ) | (lv_spielzeuge= ruleSpielzeug ) ) | (lv_familie= ruleFamilie ) )* ) '}' )? )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:73:1: ( ( ( ( ( 'spielplatz' (lv_groesse= RULE_INT ) ) (lv_beschreibung= RULE_STRING )? ) '{' ) ( ( ( (lv_kinder= ruleKind ) | (lv_erzieher= ruleErwachsener ) ) | (lv_spielzeuge= ruleSpielzeug ) ) | (lv_familie= ruleFamilie ) )* ) '}' )?
{
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:73:1: ( ( ( ( ( 'spielplatz' (lv_groesse= RULE_INT ) ) (lv_beschreibung= RULE_STRING )? ) '{' ) ( ( (lv_kinder= ruleKind ) | (lv_erzieher= ruleErwachsener ) ) | (lv_spielzeuge= ruleSpielzeug ) )* ) '}' )?
- int alt4=2;
- int LA4_0 = input.LA(1);
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:73:1: ( ( ( ( ( 'spielplatz' (lv_groesse= RULE_INT ) ) (lv_beschreibung= RULE_STRING )? ) '{' ) ( ( ( (lv_kinder= ruleKind ) | (lv_erzieher= ruleErwachsener ) ) | (lv_spielzeuge= ruleSpielzeug ) ) | (lv_familie= ruleFamilie ) )* ) '}' )?
+ int alt5=2;
+ int LA5_0 = input.LA(1);
- if ( (LA4_0==11) ) {
- alt4=1;
+ if ( (LA5_0==11) ) {
+ alt5=1;
}
- switch (alt4) {
+ switch (alt5) {
case 1 :
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:73:2: ( ( ( ( 'spielplatz' (lv_groesse= RULE_INT ) ) (lv_beschreibung= RULE_STRING )? ) '{' ) ( ( (lv_kinder= ruleKind ) | (lv_erzieher= ruleErwachsener ) ) | (lv_spielzeuge= ruleSpielzeug ) )* ) '}'
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:73:2: ( ( ( ( 'spielplatz' (lv_groesse= RULE_INT ) ) (lv_beschreibung= RULE_STRING )? ) '{' ) ( ( ( (lv_kinder= ruleKind ) | (lv_erzieher= ruleErwachsener ) ) | (lv_spielzeuge= ruleSpielzeug ) ) | (lv_familie= ruleFamilie ) )* ) '}'
{
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:73:2: ( ( ( ( 'spielplatz' (lv_groesse= RULE_INT ) ) (lv_beschreibung= RULE_STRING )? ) '{' ) ( ( (lv_kinder= ruleKind ) | (lv_erzieher= ruleErwachsener ) ) | (lv_spielzeuge= ruleSpielzeug ) )* )
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:73:3: ( ( ( 'spielplatz' (lv_groesse= RULE_INT ) ) (lv_beschreibung= RULE_STRING )? ) '{' ) ( ( (lv_kinder= ruleKind ) | (lv_erzieher= ruleErwachsener ) ) | (lv_spielzeuge= ruleSpielzeug ) )*
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:73:2: ( ( ( ( 'spielplatz' (lv_groesse= RULE_INT ) ) (lv_beschreibung= RULE_STRING )? ) '{' ) ( ( ( (lv_kinder= ruleKind ) | (lv_erzieher= ruleErwachsener ) ) | (lv_spielzeuge= ruleSpielzeug ) ) | (lv_familie= ruleFamilie ) )* )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:73:3: ( ( ( 'spielplatz' (lv_groesse= RULE_INT ) ) (lv_beschreibung= RULE_STRING )? ) '{' ) ( ( ( (lv_kinder= ruleKind ) | (lv_erzieher= ruleErwachsener ) ) | (lv_spielzeuge= ruleSpielzeug ) ) | (lv_familie= ruleFamilie ) )*
{
// ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:73:3: ( ( ( 'spielplatz' (lv_groesse= RULE_INT ) ) (lv_beschreibung= RULE_STRING )? ) '{' )
// ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:73:4: ( ( 'spielplatz' (lv_groesse= RULE_INT ) ) (lv_beschreibung= RULE_STRING )? ) '{'
@@ -203,63 +205,117 @@ public class InternalReferenceGrammarParser extends AbstractAntlrParser {
}
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:113:2: ( ( (lv_kinder= ruleKind ) | (lv_erzieher= ruleErwachsener ) ) | (lv_spielzeuge= ruleSpielzeug ) )*
- loop3:
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:113:2: ( ( ( (lv_kinder= ruleKind ) | (lv_erzieher= ruleErwachsener ) ) | (lv_spielzeuge= ruleSpielzeug ) ) | (lv_familie= ruleFamilie ) )*
+ loop4:
do {
- int alt3=3;
- int LA3_0 = input.LA(1);
+ int alt4=3;
+ int LA4_0 = input.LA(1);
- if ( (LA3_0==14||LA3_0==17) ) {
- alt3=1;
+ if ( (LA4_0==14||(LA4_0>=17 && LA4_0<=18)) ) {
+ alt4=1;
}
- else if ( (LA3_0==18) ) {
- alt3=2;
+ else if ( (LA4_0==23) ) {
+ alt4=2;
}
- switch (alt3) {
+ switch (alt4) {
case 1 :
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:113:3: ( (lv_kinder= ruleKind ) | (lv_erzieher= ruleErwachsener ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:113:3: ( ( (lv_kinder= ruleKind ) | (lv_erzieher= ruleErwachsener ) ) | (lv_spielzeuge= ruleSpielzeug ) )
{
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:113:3: ( (lv_kinder= ruleKind ) | (lv_erzieher= ruleErwachsener ) )
- int alt2=2;
- int LA2_0 = input.LA(1);
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:113:3: ( ( (lv_kinder= ruleKind ) | (lv_erzieher= ruleErwachsener ) ) | (lv_spielzeuge= ruleSpielzeug ) )
+ int alt3=2;
+ int LA3_0 = input.LA(1);
- if ( (LA2_0==14) ) {
- alt2=1;
+ if ( (LA3_0==14||LA3_0==17) ) {
+ alt3=1;
}
- else if ( (LA2_0==17) ) {
- alt2=2;
+ else if ( (LA3_0==18) ) {
+ alt3=2;
}
else {
NoViableAltException nvae =
- new NoViableAltException("113:3: ( (lv_kinder= ruleKind ) | (lv_erzieher= ruleErwachsener ) )", 2, 0, input);
+ new NoViableAltException("113:3: ( ( (lv_kinder= ruleKind ) | (lv_erzieher= ruleErwachsener ) ) | (lv_spielzeuge= ruleSpielzeug ) )", 3, 0, input);
throw nvae;
}
- switch (alt2) {
+ switch (alt3) {
case 1 :
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:113:4: (lv_kinder= ruleKind )
- {
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:113:4: (lv_kinder= ruleKind )
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:116:6: lv_kinder= ruleKind
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:113:4: ( (lv_kinder= ruleKind ) | (lv_erzieher= ruleErwachsener ) )
{
-
- currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.1/@groups.0/@groups.0/@terminal" /* xtext::RuleCall */, currentNode);
-
- pushFollow(FOLLOW_ruleKind_in_ruleSpielplatz231);
- lv_kinder=ruleKind();
- _fsp--;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:113:4: ( (lv_kinder= ruleKind ) | (lv_erzieher= ruleErwachsener ) )
+ int alt2=2;
+ int LA2_0 = input.LA(1);
+ if ( (LA2_0==14) ) {
+ alt2=1;
+ }
+ else if ( (LA2_0==17) ) {
+ alt2=2;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("113:4: ( (lv_kinder= ruleKind ) | (lv_erzieher= ruleErwachsener ) )", 2, 0, input);
- currentNode = currentNode.getParent();
- if (current==null) {
- current = factory.create("Spielplatz");
- associateNodeWithAstElement(currentNode, current);
- }
-
- factory.add(current, "kinder", lv_kinder,null);
-
+ throw nvae;
+ }
+ switch (alt2) {
+ case 1 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:113:5: (lv_kinder= ruleKind )
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:113:5: (lv_kinder= ruleKind )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:116:6: lv_kinder= ruleKind
+ {
+
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.1/@groups.0/@groups.0/@groups.0/@terminal" /* xtext::RuleCall */, currentNode);
+
+ pushFollow(FOLLOW_ruleKind_in_ruleSpielplatz232);
+ lv_kinder=ruleKind();
+ _fsp--;
+
+
+ currentNode = currentNode.getParent();
+ if (current==null) {
+ current = factory.create("Spielplatz");
+ associateNodeWithAstElement(currentNode, current);
+ }
+
+ factory.add(current, "kinder", lv_kinder,null);
+
+
+ }
+
+
+ }
+ break;
+ case 2 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:131:6: (lv_erzieher= ruleErwachsener )
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:131:6: (lv_erzieher= ruleErwachsener )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:134:6: lv_erzieher= ruleErwachsener
+ {
+
+ currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.1/@groups.0/@groups.0/@groups.1/@terminal" /* xtext::RuleCall */, currentNode);
+
+ pushFollow(FOLLOW_ruleErwachsener_in_ruleSpielplatz276);
+ lv_erzieher=ruleErwachsener();
+ _fsp--;
+
+
+ currentNode = currentNode.getParent();
+ if (current==null) {
+ current = factory.create("Spielplatz");
+ associateNodeWithAstElement(currentNode, current);
+ }
+
+ factory.add(current, "erzieher", lv_erzieher,null);
+
+
+ }
+
+
+ }
+ break;
}
@@ -267,16 +323,16 @@ public class InternalReferenceGrammarParser extends AbstractAntlrParser {
}
break;
case 2 :
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:131:6: (lv_erzieher= ruleErwachsener )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:149:6: (lv_spielzeuge= ruleSpielzeug )
{
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:131:6: (lv_erzieher= ruleErwachsener )
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:134:6: lv_erzieher= ruleErwachsener
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:149:6: (lv_spielzeuge= ruleSpielzeug )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:152:6: lv_spielzeuge= ruleSpielzeug
{
currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.1/@groups.0/@groups.1/@terminal" /* xtext::RuleCall */, currentNode);
- pushFollow(FOLLOW_ruleErwachsener_in_ruleSpielplatz275);
- lv_erzieher=ruleErwachsener();
+ pushFollow(FOLLOW_ruleSpielzeug_in_ruleSpielplatz321);
+ lv_spielzeuge=ruleSpielzeug();
_fsp--;
@@ -286,7 +342,7 @@ public class InternalReferenceGrammarParser extends AbstractAntlrParser {
associateNodeWithAstElement(currentNode, current);
}
- factory.add(current, "erzieher", lv_erzieher,null);
+ factory.add(current, "spielzeuge", lv_spielzeuge,null);
}
@@ -301,16 +357,16 @@ public class InternalReferenceGrammarParser extends AbstractAntlrParser {
}
break;
case 2 :
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:149:6: (lv_spielzeuge= ruleSpielzeug )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:167:6: (lv_familie= ruleFamilie )
{
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:149:6: (lv_spielzeuge= ruleSpielzeug )
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:152:6: lv_spielzeuge= ruleSpielzeug
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:167:6: (lv_familie= ruleFamilie )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:170:6: lv_familie= ruleFamilie
{
currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.1/@groups.1/@terminal" /* xtext::RuleCall */, currentNode);
- pushFollow(FOLLOW_ruleSpielzeug_in_ruleSpielplatz320);
- lv_spielzeuge=ruleSpielzeug();
+ pushFollow(FOLLOW_ruleFamilie_in_ruleSpielplatz366);
+ lv_familie=ruleFamilie();
_fsp--;
@@ -320,7 +376,7 @@ public class InternalReferenceGrammarParser extends AbstractAntlrParser {
associateNodeWithAstElement(currentNode, current);
}
- factory.add(current, "spielzeuge", lv_spielzeuge,null);
+ factory.add(current, "familie", lv_familie,null);
}
@@ -330,14 +386,14 @@ public class InternalReferenceGrammarParser extends AbstractAntlrParser {
break;
default :
- break loop3;
+ break loop4;
}
} while (true);
}
- match(input,13,FOLLOW_13_in_ruleSpielplatz336);
+ match(input,13,FOLLOW_13_in_ruleSpielplatz382);
createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.0/@alternatives/@abstractTokens.1" /* xtext::Keyword */, null);
@@ -365,7 +421,7 @@ public class InternalReferenceGrammarParser extends AbstractAntlrParser {
// $ANTLR start entryRuleKind
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:177:1: entryRuleKind returns [EObject current=null] : iv_ruleKind= ruleKind EOF ;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:195:1: entryRuleKind returns [EObject current=null] : iv_ruleKind= ruleKind EOF ;
public final EObject entryRuleKind() throws RecognitionException {
EObject current = null;
@@ -373,16 +429,16 @@ public class InternalReferenceGrammarParser extends AbstractAntlrParser {
try {
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:177:46: (iv_ruleKind= ruleKind EOF )
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:178:2: iv_ruleKind= ruleKind EOF
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:195:46: (iv_ruleKind= ruleKind EOF )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:196:2: iv_ruleKind= ruleKind EOF
{
currentNode = createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.2" /* xtext::ParserRule */, currentNode);
- pushFollow(FOLLOW_ruleKind_in_entryRuleKind374);
+ pushFollow(FOLLOW_ruleKind_in_entryRuleKind420);
iv_ruleKind=ruleKind();
_fsp--;
current =iv_ruleKind;
- match(input,EOF,FOLLOW_EOF_in_entryRuleKind384);
+ match(input,EOF,FOLLOW_EOF_in_entryRuleKind430);
}
@@ -400,7 +456,7 @@ public class InternalReferenceGrammarParser extends AbstractAntlrParser {
// $ANTLR start ruleKind
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:185:1: ruleKind returns [EObject current=null] : ( ( ( ( 'kind' '(' ) (lv_name= RULE_ID ) ) (lv_age= RULE_INT ) ) ')' ) ;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:203:1: ruleKind returns [EObject current=null] : ( ( ( ( 'kind' '(' ) (lv_name= RULE_ID ) ) (lv_age= RULE_INT ) ) ')' ) ;
public final EObject ruleKind() throws RecognitionException {
EObject current = null;
@@ -409,37 +465,37 @@ public class InternalReferenceGrammarParser extends AbstractAntlrParser {
EObject temp=null; setCurrentLookahead(); resetLookahead();
try {
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:187:33: ( ( ( ( ( 'kind' '(' ) (lv_name= RULE_ID ) ) (lv_age= RULE_INT ) ) ')' ) )
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:188:1: ( ( ( ( 'kind' '(' ) (lv_name= RULE_ID ) ) (lv_age= RULE_INT ) ) ')' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:205:33: ( ( ( ( ( 'kind' '(' ) (lv_name= RULE_ID ) ) (lv_age= RULE_INT ) ) ')' ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:206:1: ( ( ( ( 'kind' '(' ) (lv_name= RULE_ID ) ) (lv_age= RULE_INT ) ) ')' )
{
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:188:1: ( ( ( ( 'kind' '(' ) (lv_name= RULE_ID ) ) (lv_age= RULE_INT ) ) ')' )
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:188:2: ( ( ( 'kind' '(' ) (lv_name= RULE_ID ) ) (lv_age= RULE_INT ) ) ')'
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:206:1: ( ( ( ( 'kind' '(' ) (lv_name= RULE_ID ) ) (lv_age= RULE_INT ) ) ')' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:206:2: ( ( ( 'kind' '(' ) (lv_name= RULE_ID ) ) (lv_age= RULE_INT ) ) ')'
{
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:188:2: ( ( ( 'kind' '(' ) (lv_name= RULE_ID ) ) (lv_age= RULE_INT ) )
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:188:3: ( ( 'kind' '(' ) (lv_name= RULE_ID ) ) (lv_age= RULE_INT )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:206:2: ( ( ( 'kind' '(' ) (lv_name= RULE_ID ) ) (lv_age= RULE_INT ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:206:3: ( ( 'kind' '(' ) (lv_name= RULE_ID ) ) (lv_age= RULE_INT )
{
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:188:3: ( ( 'kind' '(' ) (lv_name= RULE_ID ) )
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:188:4: ( 'kind' '(' ) (lv_name= RULE_ID )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:206:3: ( ( 'kind' '(' ) (lv_name= RULE_ID ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:206:4: ( 'kind' '(' ) (lv_name= RULE_ID )
{
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:188:4: ( 'kind' '(' )
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:188:5: 'kind' '('
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:206:4: ( 'kind' '(' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:206:5: 'kind' '('
{
- match(input,14,FOLLOW_14_in_ruleKind421);
+ match(input,14,FOLLOW_14_in_ruleKind467);
createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.2/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0" /* xtext::Keyword */, null);
- match(input,15,FOLLOW_15_in_ruleKind430);
+ match(input,15,FOLLOW_15_in_ruleKind476);
createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.2/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1" /* xtext::Keyword */, null);
}
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:196:2: (lv_name= RULE_ID )
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:198:6: lv_name= RULE_ID
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:214:2: (lv_name= RULE_ID )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:216:6: lv_name= RULE_ID
{
lv_name=(Token)input.LT(1);
- match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleKind452);
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleKind498);
createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.2/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1/@terminal" /* xtext::RuleCall */, "name");
@@ -457,11 +513,11 @@ public class InternalReferenceGrammarParser extends AbstractAntlrParser {
}
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:212:3: (lv_age= RULE_INT )
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:214:6: lv_age= RULE_INT
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:230:3: (lv_age= RULE_INT )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:232:6: lv_age= RULE_INT
{
lv_age=(Token)input.LT(1);
- match(input,RULE_INT,FOLLOW_RULE_INT_in_ruleKind485);
+ match(input,RULE_INT,FOLLOW_RULE_INT_in_ruleKind531);
createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.2/@alternatives/@abstractTokens.0/@abstractTokens.1/@terminal" /* xtext::RuleCall */, "age");
@@ -479,7 +535,7 @@ public class InternalReferenceGrammarParser extends AbstractAntlrParser {
}
- match(input,16,FOLLOW_16_in_ruleKind506);
+ match(input,16,FOLLOW_16_in_ruleKind552);
createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.2/@alternatives/@abstractTokens.1" /* xtext::Keyword */, null);
@@ -504,7 +560,7 @@ public class InternalReferenceGrammarParser extends AbstractAntlrParser {
// $ANTLR start entryRuleErwachsener
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:237:1: entryRuleErwachsener returns [EObject current=null] : iv_ruleErwachsener= ruleErwachsener EOF ;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:255:1: entryRuleErwachsener returns [EObject current=null] : iv_ruleErwachsener= ruleErwachsener EOF ;
public final EObject entryRuleErwachsener() throws RecognitionException {
EObject current = null;
@@ -512,16 +568,16 @@ public class InternalReferenceGrammarParser extends AbstractAntlrParser {
try {
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:237:53: (iv_ruleErwachsener= ruleErwachsener EOF )
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:238:2: iv_ruleErwachsener= ruleErwachsener EOF
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:255:53: (iv_ruleErwachsener= ruleErwachsener EOF )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:256:2: iv_ruleErwachsener= ruleErwachsener EOF
{
currentNode = createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.3" /* xtext::ParserRule */, currentNode);
- pushFollow(FOLLOW_ruleErwachsener_in_entryRuleErwachsener541);
+ pushFollow(FOLLOW_ruleErwachsener_in_entryRuleErwachsener587);
iv_ruleErwachsener=ruleErwachsener();
_fsp--;
current =iv_ruleErwachsener;
- match(input,EOF,FOLLOW_EOF_in_entryRuleErwachsener551);
+ match(input,EOF,FOLLOW_EOF_in_entryRuleErwachsener597);
}
@@ -539,7 +595,7 @@ public class InternalReferenceGrammarParser extends AbstractAntlrParser {
// $ANTLR start ruleErwachsener
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:245:1: ruleErwachsener returns [EObject current=null] : ( ( ( ( 'erwachsener' '(' ) (lv_name= RULE_ID ) ) (lv_age= RULE_INT ) ) ')' ) ;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:263:1: ruleErwachsener returns [EObject current=null] : ( ( ( ( 'erwachsener' '(' ) (lv_name= RULE_ID ) ) (lv_age= RULE_INT ) ) ')' ) ;
public final EObject ruleErwachsener() throws RecognitionException {
EObject current = null;
@@ -548,37 +604,37 @@ public class InternalReferenceGrammarParser extends AbstractAntlrParser {
EObject temp=null; setCurrentLookahead(); resetLookahead();
try {
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:247:33: ( ( ( ( ( 'erwachsener' '(' ) (lv_name= RULE_ID ) ) (lv_age= RULE_INT ) ) ')' ) )
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:248:1: ( ( ( ( 'erwachsener' '(' ) (lv_name= RULE_ID ) ) (lv_age= RULE_INT ) ) ')' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:265:33: ( ( ( ( ( 'erwachsener' '(' ) (lv_name= RULE_ID ) ) (lv_age= RULE_INT ) ) ')' ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:266:1: ( ( ( ( 'erwachsener' '(' ) (lv_name= RULE_ID ) ) (lv_age= RULE_INT ) ) ')' )
{
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:248:1: ( ( ( ( 'erwachsener' '(' ) (lv_name= RULE_ID ) ) (lv_age= RULE_INT ) ) ')' )
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:248:2: ( ( ( 'erwachsener' '(' ) (lv_name= RULE_ID ) ) (lv_age= RULE_INT ) ) ')'
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:266:1: ( ( ( ( 'erwachsener' '(' ) (lv_name= RULE_ID ) ) (lv_age= RULE_INT ) ) ')' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:266:2: ( ( ( 'erwachsener' '(' ) (lv_name= RULE_ID ) ) (lv_age= RULE_INT ) ) ')'
{
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:248:2: ( ( ( 'erwachsener' '(' ) (lv_name= RULE_ID ) ) (lv_age= RULE_INT ) )
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:248:3: ( ( 'erwachsener' '(' ) (lv_name= RULE_ID ) ) (lv_age= RULE_INT )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:266:2: ( ( ( 'erwachsener' '(' ) (lv_name= RULE_ID ) ) (lv_age= RULE_INT ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:266:3: ( ( 'erwachsener' '(' ) (lv_name= RULE_ID ) ) (lv_age= RULE_INT )
{
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:248:3: ( ( 'erwachsener' '(' ) (lv_name= RULE_ID ) )
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:248:4: ( 'erwachsener' '(' ) (lv_name= RULE_ID )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:266:3: ( ( 'erwachsener' '(' ) (lv_name= RULE_ID ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:266:4: ( 'erwachsener' '(' ) (lv_name= RULE_ID )
{
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:248:4: ( 'erwachsener' '(' )
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:248:5: 'erwachsener' '('
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:266:4: ( 'erwachsener' '(' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:266:5: 'erwachsener' '('
{
- match(input,17,FOLLOW_17_in_ruleErwachsener588);
+ match(input,17,FOLLOW_17_in_ruleErwachsener634);
createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.3/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0" /* xtext::Keyword */, null);
- match(input,15,FOLLOW_15_in_ruleErwachsener597);
+ match(input,15,FOLLOW_15_in_ruleErwachsener643);
createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.3/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1" /* xtext::Keyword */, null);
}
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:256:2: (lv_name= RULE_ID )
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:258:6: lv_name= RULE_ID
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:274:2: (lv_name= RULE_ID )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:276:6: lv_name= RULE_ID
{
lv_name=(Token)input.LT(1);
- match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleErwachsener619);
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleErwachsener665);
createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.3/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1/@terminal" /* xtext::RuleCall */, "name");
@@ -596,11 +652,11 @@ public class InternalReferenceGrammarParser extends AbstractAntlrParser {
}
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:272:3: (lv_age= RULE_INT )
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:274:6: lv_age= RULE_INT
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:290:3: (lv_age= RULE_INT )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:292:6: lv_age= RULE_INT
{
lv_age=(Token)input.LT(1);
- match(input,RULE_INT,FOLLOW_RULE_INT_in_ruleErwachsener652);
+ match(input,RULE_INT,FOLLOW_RULE_INT_in_ruleErwachsener698);
createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.3/@alternatives/@abstractTokens.0/@abstractTokens.1/@terminal" /* xtext::RuleCall */, "age");
@@ -618,7 +674,7 @@ public class InternalReferenceGrammarParser extends AbstractAntlrParser {
}
- match(input,16,FOLLOW_16_in_ruleErwachsener673);
+ match(input,16,FOLLOW_16_in_ruleErwachsener719);
createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.3/@alternatives/@abstractTokens.1" /* xtext::Keyword */, null);
@@ -643,7 +699,7 @@ public class InternalReferenceGrammarParser extends AbstractAntlrParser {
// $ANTLR start entryRuleSpielzeug
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:297:1: entryRuleSpielzeug returns [EObject current=null] : iv_ruleSpielzeug= ruleSpielzeug EOF ;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:315:1: entryRuleSpielzeug returns [EObject current=null] : iv_ruleSpielzeug= ruleSpielzeug EOF ;
public final EObject entryRuleSpielzeug() throws RecognitionException {
EObject current = null;
@@ -651,16 +707,16 @@ public class InternalReferenceGrammarParser extends AbstractAntlrParser {
try {
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:297:51: (iv_ruleSpielzeug= ruleSpielzeug EOF )
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:298:2: iv_ruleSpielzeug= ruleSpielzeug EOF
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:315:51: (iv_ruleSpielzeug= ruleSpielzeug EOF )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:316:2: iv_ruleSpielzeug= ruleSpielzeug EOF
{
currentNode = createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.4" /* xtext::ParserRule */, currentNode);
- pushFollow(FOLLOW_ruleSpielzeug_in_entryRuleSpielzeug708);
+ pushFollow(FOLLOW_ruleSpielzeug_in_entryRuleSpielzeug754);
iv_ruleSpielzeug=ruleSpielzeug();
_fsp--;
current =iv_ruleSpielzeug;
- match(input,EOF,FOLLOW_EOF_in_entryRuleSpielzeug718);
+ match(input,EOF,FOLLOW_EOF_in_entryRuleSpielzeug764);
}
@@ -678,7 +734,7 @@ public class InternalReferenceGrammarParser extends AbstractAntlrParser {
// $ANTLR start ruleSpielzeug
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:305:1: ruleSpielzeug returns [EObject current=null] : ( ( ( ( 'spielzeug' '(' ) (lv_name= RULE_ID ) ) (lv_farbe= ruleFarbe ) ) ')' ) ;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:323:1: ruleSpielzeug returns [EObject current=null] : ( ( ( ( 'spielzeug' '(' ) (lv_name= RULE_ID ) ) (lv_farbe= ruleFarbe ) ) ')' ) ;
public final EObject ruleSpielzeug() throws RecognitionException {
EObject current = null;
@@ -688,37 +744,37 @@ public class InternalReferenceGrammarParser extends AbstractAntlrParser {
EObject temp=null; setCurrentLookahead(); resetLookahead();
try {
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:307:33: ( ( ( ( ( 'spielzeug' '(' ) (lv_name= RULE_ID ) ) (lv_farbe= ruleFarbe ) ) ')' ) )
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:308:1: ( ( ( ( 'spielzeug' '(' ) (lv_name= RULE_ID ) ) (lv_farbe= ruleFarbe ) ) ')' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:325:33: ( ( ( ( ( 'spielzeug' '(' ) (lv_name= RULE_ID ) ) (lv_farbe= ruleFarbe ) ) ')' ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:326:1: ( ( ( ( 'spielzeug' '(' ) (lv_name= RULE_ID ) ) (lv_farbe= ruleFarbe ) ) ')' )
{
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:308:1: ( ( ( ( 'spielzeug' '(' ) (lv_name= RULE_ID ) ) (lv_farbe= ruleFarbe ) ) ')' )
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:308:2: ( ( ( 'spielzeug' '(' ) (lv_name= RULE_ID ) ) (lv_farbe= ruleFarbe ) ) ')'
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:326:1: ( ( ( ( 'spielzeug' '(' ) (lv_name= RULE_ID ) ) (lv_farbe= ruleFarbe ) ) ')' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:326:2: ( ( ( 'spielzeug' '(' ) (lv_name= RULE_ID ) ) (lv_farbe= ruleFarbe ) ) ')'
{
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:308:2: ( ( ( 'spielzeug' '(' ) (lv_name= RULE_ID ) ) (lv_farbe= ruleFarbe ) )
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:308:3: ( ( 'spielzeug' '(' ) (lv_name= RULE_ID ) ) (lv_farbe= ruleFarbe )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:326:2: ( ( ( 'spielzeug' '(' ) (lv_name= RULE_ID ) ) (lv_farbe= ruleFarbe ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:326:3: ( ( 'spielzeug' '(' ) (lv_name= RULE_ID ) ) (lv_farbe= ruleFarbe )
{
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:308:3: ( ( 'spielzeug' '(' ) (lv_name= RULE_ID ) )
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:308:4: ( 'spielzeug' '(' ) (lv_name= RULE_ID )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:326:3: ( ( 'spielzeug' '(' ) (lv_name= RULE_ID ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:326:4: ( 'spielzeug' '(' ) (lv_name= RULE_ID )
{
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:308:4: ( 'spielzeug' '(' )
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:308:5: 'spielzeug' '('
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:326:4: ( 'spielzeug' '(' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:326:5: 'spielzeug' '('
{
- match(input,18,FOLLOW_18_in_ruleSpielzeug755);
+ match(input,18,FOLLOW_18_in_ruleSpielzeug801);
createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.4/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0" /* xtext::Keyword */, null);
- match(input,15,FOLLOW_15_in_ruleSpielzeug764);
+ match(input,15,FOLLOW_15_in_ruleSpielzeug810);
createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.4/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1" /* xtext::Keyword */, null);
}
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:316:2: (lv_name= RULE_ID )
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:318:6: lv_name= RULE_ID
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:334:2: (lv_name= RULE_ID )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:336:6: lv_name= RULE_ID
{
lv_name=(Token)input.LT(1);
- match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleSpielzeug786);
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleSpielzeug832);
createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.4/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1/@terminal" /* xtext::RuleCall */, "name");
@@ -736,13 +792,13 @@ public class InternalReferenceGrammarParser extends AbstractAntlrParser {
}
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:332:3: (lv_farbe= ruleFarbe )
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:335:6: lv_farbe= ruleFarbe
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:350:3: (lv_farbe= ruleFarbe )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:353:6: lv_farbe= ruleFarbe
{
currentNode=createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.4/@alternatives/@abstractTokens.0/@abstractTokens.1/@terminal" /* xtext::RuleCall */, currentNode);
- pushFollow(FOLLOW_ruleFarbe_in_ruleSpielzeug832);
+ pushFollow(FOLLOW_ruleFarbe_in_ruleSpielzeug878);
lv_farbe=ruleFarbe();
_fsp--;
@@ -761,7 +817,7 @@ public class InternalReferenceGrammarParser extends AbstractAntlrParser {
}
- match(input,16,FOLLOW_16_in_ruleSpielzeug846);
+ match(input,16,FOLLOW_16_in_ruleSpielzeug892);
createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.4/@alternatives/@abstractTokens.1" /* xtext::Keyword */, null);
@@ -786,7 +842,7 @@ public class InternalReferenceGrammarParser extends AbstractAntlrParser {
// $ANTLR start entryRuleFarbe
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:358:1: entryRuleFarbe returns [EObject current=null] : iv_ruleFarbe= ruleFarbe EOF ;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:376:1: entryRuleFarbe returns [EObject current=null] : iv_ruleFarbe= ruleFarbe EOF ;
public final EObject entryRuleFarbe() throws RecognitionException {
EObject current = null;
@@ -794,16 +850,16 @@ public class InternalReferenceGrammarParser extends AbstractAntlrParser {
try {
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:358:47: (iv_ruleFarbe= ruleFarbe EOF )
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:359:2: iv_ruleFarbe= ruleFarbe EOF
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:376:47: (iv_ruleFarbe= ruleFarbe EOF )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:377:2: iv_ruleFarbe= ruleFarbe EOF
{
currentNode = createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.5" /* xtext::ParserRule */, currentNode);
- pushFollow(FOLLOW_ruleFarbe_in_entryRuleFarbe881);
+ pushFollow(FOLLOW_ruleFarbe_in_entryRuleFarbe927);
iv_ruleFarbe=ruleFarbe();
_fsp--;
current =iv_ruleFarbe;
- match(input,EOF,FOLLOW_EOF_in_entryRuleFarbe891);
+ match(input,EOF,FOLLOW_EOF_in_entryRuleFarbe937);
}
@@ -821,76 +877,76 @@ public class InternalReferenceGrammarParser extends AbstractAntlrParser {
// $ANTLR start ruleFarbe
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:366:1: ruleFarbe returns [EObject current=null] : ( ( ( 'ROT' | 'BLAU' ) | 'GELB' ) | 'GRÜN' ) ;
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:384:1: ruleFarbe returns [EObject current=null] : ( ( ( 'ROT' | 'BLAU' ) | 'GELB' ) | 'GRÜN' ) ;
public final EObject ruleFarbe() throws RecognitionException {
EObject current = null;
EObject temp=null; setCurrentLookahead(); resetLookahead();
try {
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:368:33: ( ( ( ( 'ROT' | 'BLAU' ) | 'GELB' ) | 'GRÜN' ) )
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:369:1: ( ( ( 'ROT' | 'BLAU' ) | 'GELB' ) | 'GRÜN' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:386:33: ( ( ( ( 'ROT' | 'BLAU' ) | 'GELB' ) | 'GRÜN' ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:387:1: ( ( ( 'ROT' | 'BLAU' ) | 'GELB' ) | 'GRÜN' )
{
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:369:1: ( ( ( 'ROT' | 'BLAU' ) | 'GELB' ) | 'GRÜN' )
- int alt7=2;
- int LA7_0 = input.LA(1);
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:387:1: ( ( ( 'ROT' | 'BLAU' ) | 'GELB' ) | 'GRÜN' )
+ int alt8=2;
+ int LA8_0 = input.LA(1);
- if ( ((LA7_0>=19 && LA7_0<=21)) ) {
- alt7=1;
+ if ( ((LA8_0>=19 && LA8_0<=21)) ) {
+ alt8=1;
}
- else if ( (LA7_0==22) ) {
- alt7=2;
+ else if ( (LA8_0==22) ) {
+ alt8=2;
}
else {
NoViableAltException nvae =
- new NoViableAltException("369:1: ( ( ( 'ROT' | 'BLAU' ) | 'GELB' ) | 'GRÜN' )", 7, 0, input);
+ new NoViableAltException("387:1: ( ( ( 'ROT' | 'BLAU' ) | 'GELB' ) | 'GRÜN' )", 8, 0, input);
throw nvae;
}
- switch (alt7) {
+ switch (alt8) {
case 1 :
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:369:2: ( ( 'ROT' | 'BLAU' ) | 'GELB' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:387:2: ( ( 'ROT' | 'BLAU' ) | 'GELB' )
{
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:369:2: ( ( 'ROT' | 'BLAU' ) | 'GELB' )
- int alt6=2;
- int LA6_0 = input.LA(1);
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:387:2: ( ( 'ROT' | 'BLAU' ) | 'GELB' )
+ int alt7=2;
+ int LA7_0 = input.LA(1);
- if ( ((LA6_0>=19 && LA6_0<=20)) ) {
- alt6=1;
+ if ( ((LA7_0>=19 && LA7_0<=20)) ) {
+ alt7=1;
}
- else if ( (LA6_0==21) ) {
- alt6=2;
+ else if ( (LA7_0==21) ) {
+ alt7=2;
}
else {
NoViableAltException nvae =
- new NoViableAltException("369:2: ( ( 'ROT' | 'BLAU' ) | 'GELB' )", 6, 0, input);
+ new NoViableAltException("387:2: ( ( 'ROT' | 'BLAU' ) | 'GELB' )", 7, 0, input);
throw nvae;
}
- switch (alt6) {
+ switch (alt7) {
case 1 :
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:369:3: ( 'ROT' | 'BLAU' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:387:3: ( 'ROT' | 'BLAU' )
{
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:369:3: ( 'ROT' | 'BLAU' )
- int alt5=2;
- int LA5_0 = input.LA(1);
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:387:3: ( 'ROT' | 'BLAU' )
+ int alt6=2;
+ int LA6_0 = input.LA(1);
- if ( (LA5_0==19) ) {
- alt5=1;
+ if ( (LA6_0==19) ) {
+ alt6=1;
}
- else if ( (LA5_0==20) ) {
- alt5=2;
+ else if ( (LA6_0==20) ) {
+ alt6=2;
}
else {
NoViableAltException nvae =
- new NoViableAltException("369:3: ( 'ROT' | 'BLAU' )", 5, 0, input);
+ new NoViableAltException("387:3: ( 'ROT' | 'BLAU' )", 6, 0, input);
throw nvae;
}
- switch (alt5) {
+ switch (alt6) {
case 1 :
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:369:4: 'ROT'
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:387:4: 'ROT'
{
- match(input,19,FOLLOW_19_in_ruleFarbe927);
+ match(input,19,FOLLOW_19_in_ruleFarbe973);
createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.5/@alternatives/@groups.0/@groups.0/@groups.0" /* xtext::Keyword */, null);
@@ -898,9 +954,9 @@ public class InternalReferenceGrammarParser extends AbstractAntlrParser {
}
break;
case 2 :
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:374:6: 'BLAU'
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:392:6: 'BLAU'
{
- match(input,20,FOLLOW_20_in_ruleFarbe942);
+ match(input,20,FOLLOW_20_in_ruleFarbe988);
createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.5/@alternatives/@groups.0/@groups.0/@groups.1" /* xtext::Keyword */, null);
@@ -914,9 +970,9 @@ public class InternalReferenceGrammarParser extends AbstractAntlrParser {
}
break;
case 2 :
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:379:6: 'GELB'
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:397:6: 'GELB'
{
- match(input,21,FOLLOW_21_in_ruleFarbe958);
+ match(input,21,FOLLOW_21_in_ruleFarbe1004);
createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.5/@alternatives/@groups.0/@groups.1" /* xtext::Keyword */, null);
@@ -930,9 +986,9 @@ public class InternalReferenceGrammarParser extends AbstractAntlrParser {
}
break;
case 2 :
- // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:384:6: 'GRÜN'
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:402:6: 'GRÜN'
{
- match(input,22,FOLLOW_22_in_ruleFarbe974);
+ match(input,22,FOLLOW_22_in_ruleFarbe1020);
createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.5/@alternatives/@groups.1" /* xtext::Keyword */, null);
@@ -959,6 +1015,330 @@ public class InternalReferenceGrammarParser extends AbstractAntlrParser {
// $ANTLR end ruleFarbe
+ // $ANTLR start entryRuleFamilie
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:411:1: entryRuleFamilie returns [EObject current=null] : iv_ruleFamilie= ruleFamilie EOF ;
+ public final EObject entryRuleFamilie() throws RecognitionException {
+ EObject current = null;
+
+ EObject iv_ruleFamilie = null;
+
+
+ try {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:411:49: (iv_ruleFamilie= ruleFamilie EOF )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:412:2: iv_ruleFamilie= ruleFamilie EOF
+ {
+ currentNode = createCompositeNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6" /* xtext::ParserRule */, currentNode);
+ pushFollow(FOLLOW_ruleFamilie_in_entryRuleFamilie1055);
+ iv_ruleFamilie=ruleFamilie();
+ _fsp--;
+
+ current =iv_ruleFamilie;
+ match(input,EOF,FOLLOW_EOF_in_entryRuleFamilie1065);
+
+ }
+
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end entryRuleFamilie
+
+
+ // $ANTLR start ruleFamilie
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:419:1: ruleFamilie returns [EObject current=null] : ( ( ( ( ( ( ( 'familie' '(' ) (lv_name= ( ( 'keyword' | RULE_STRING ) | RULE_ID ) ) ) ( ( RULE_ID ) ) ) ( ( RULE_ID ) ) ) ( ( RULE_ID ) ) ) ( ',' ( ( RULE_ID ) ) )* ) ')' ) ;
+ public final EObject ruleFamilie() throws RecognitionException {
+ EObject current = null;
+
+ Token lv_name=null;
+
+ EObject temp=null; setCurrentLookahead(); resetLookahead();
+ try {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:421:33: ( ( ( ( ( ( ( ( 'familie' '(' ) (lv_name= ( ( 'keyword' | RULE_STRING ) | RULE_ID ) ) ) ( ( RULE_ID ) ) ) ( ( RULE_ID ) ) ) ( ( RULE_ID ) ) ) ( ',' ( ( RULE_ID ) ) )* ) ')' ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:422:1: ( ( ( ( ( ( ( 'familie' '(' ) (lv_name= ( ( 'keyword' | RULE_STRING ) | RULE_ID ) ) ) ( ( RULE_ID ) ) ) ( ( RULE_ID ) ) ) ( ( RULE_ID ) ) ) ( ',' ( ( RULE_ID ) ) )* ) ')' )
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:422:1: ( ( ( ( ( ( ( 'familie' '(' ) (lv_name= ( ( 'keyword' | RULE_STRING ) | RULE_ID ) ) ) ( ( RULE_ID ) ) ) ( ( RULE_ID ) ) ) ( ( RULE_ID ) ) ) ( ',' ( ( RULE_ID ) ) )* ) ')' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:422:2: ( ( ( ( ( ( 'familie' '(' ) (lv_name= ( ( 'keyword' | RULE_STRING ) | RULE_ID ) ) ) ( ( RULE_ID ) ) ) ( ( RULE_ID ) ) ) ( ( RULE_ID ) ) ) ( ',' ( ( RULE_ID ) ) )* ) ')'
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:422:2: ( ( ( ( ( ( 'familie' '(' ) (lv_name= ( ( 'keyword' | RULE_STRING ) | RULE_ID ) ) ) ( ( RULE_ID ) ) ) ( ( RULE_ID ) ) ) ( ( RULE_ID ) ) ) ( ',' ( ( RULE_ID ) ) )* )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:422:3: ( ( ( ( ( 'familie' '(' ) (lv_name= ( ( 'keyword' | RULE_STRING ) | RULE_ID ) ) ) ( ( RULE_ID ) ) ) ( ( RULE_ID ) ) ) ( ( RULE_ID ) ) ) ( ',' ( ( RULE_ID ) ) )*
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:422:3: ( ( ( ( ( 'familie' '(' ) (lv_name= ( ( 'keyword' | RULE_STRING ) | RULE_ID ) ) ) ( ( RULE_ID ) ) ) ( ( RULE_ID ) ) ) ( ( RULE_ID ) ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:422:4: ( ( ( ( 'familie' '(' ) (lv_name= ( ( 'keyword' | RULE_STRING ) | RULE_ID ) ) ) ( ( RULE_ID ) ) ) ( ( RULE_ID ) ) ) ( ( RULE_ID ) )
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:422:4: ( ( ( ( 'familie' '(' ) (lv_name= ( ( 'keyword' | RULE_STRING ) | RULE_ID ) ) ) ( ( RULE_ID ) ) ) ( ( RULE_ID ) ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:422:5: ( ( ( 'familie' '(' ) (lv_name= ( ( 'keyword' | RULE_STRING ) | RULE_ID ) ) ) ( ( RULE_ID ) ) ) ( ( RULE_ID ) )
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:422:5: ( ( ( 'familie' '(' ) (lv_name= ( ( 'keyword' | RULE_STRING ) | RULE_ID ) ) ) ( ( RULE_ID ) ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:422:6: ( ( 'familie' '(' ) (lv_name= ( ( 'keyword' | RULE_STRING ) | RULE_ID ) ) ) ( ( RULE_ID ) )
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:422:6: ( ( 'familie' '(' ) (lv_name= ( ( 'keyword' | RULE_STRING ) | RULE_ID ) ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:422:7: ( 'familie' '(' ) (lv_name= ( ( 'keyword' | RULE_STRING ) | RULE_ID ) )
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:422:7: ( 'familie' '(' )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:422:8: 'familie' '('
+ {
+ match(input,23,FOLLOW_23_in_ruleFamilie1105);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0" /* xtext::Keyword */, null);
+
+ match(input,15,FOLLOW_15_in_ruleFamilie1114);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1" /* xtext::Keyword */, null);
+
+
+ }
+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:430:2: (lv_name= ( ( 'keyword' | RULE_STRING ) | RULE_ID ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:432:6: lv_name= ( ( 'keyword' | RULE_STRING ) | RULE_ID )
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:432:14: ( ( 'keyword' | RULE_STRING ) | RULE_ID )
+ int alt10=2;
+ int LA10_0 = input.LA(1);
+
+ if ( (LA10_0==RULE_STRING||LA10_0==24) ) {
+ alt10=1;
+ }
+ else if ( (LA10_0==RULE_ID) ) {
+ alt10=2;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("432:14: ( ( 'keyword' | RULE_STRING ) | RULE_ID )", 10, 0, input);
+
+ throw nvae;
+ }
+ switch (alt10) {
+ case 1 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:432:15: ( 'keyword' | RULE_STRING )
+ {
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:432:15: ( 'keyword' | RULE_STRING )
+ int alt9=2;
+ int LA9_0 = input.LA(1);
+
+ if ( (LA9_0==24) ) {
+ alt9=1;
+ }
+ else if ( (LA9_0==RULE_STRING) ) {
+ alt9=2;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("432:15: ( 'keyword' | RULE_STRING )", 9, 0, input);
+
+ throw nvae;
+ }
+ switch (alt9) {
+ case 1 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:432:16: 'keyword'
+ {
+ match(input,24,FOLLOW_24_in_ruleFamilie1138);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1/@terminal/@groups.0/@groups.0" /* xtext::Keyword */, "name");
+
+
+ }
+ break;
+ case 2 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:437:6: RULE_STRING
+ {
+ match(input,RULE_STRING,FOLLOW_RULE_STRING_in_ruleFamilie1153);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1/@terminal/@groups.0/@groups.1" /* xtext::RuleCall */, "name");
+
+
+ }
+ break;
+
+ }
+
+
+ }
+ break;
+ case 2 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:442:6: RULE_ID
+ {
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleFamilie1168);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1/@terminal/@groups.1" /* xtext::RuleCall */, "name");
+
+
+ }
+ break;
+
+ }
+
+
+ if (current==null) {
+ current = factory.create("Familie");
+ associateNodeWithAstElement(currentNode, current);
+ }
+
+ factory.set(current, "name", input.LT(-1),null);
+
+
+ }
+
+
+ }
+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:456:3: ( ( RULE_ID ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:459:3: ( RULE_ID )
+ {
+
+ if (current==null) {
+ current = factory.create("Familie");
+ associateNodeWithAstElement(currentNode, current);
+ }
+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:465:1: ( RULE_ID )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:466:2: RULE_ID
+ {
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleFamilie1205);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1/@terminal" /* xtext::CrossReference */, "mutter");
+
+
+ }
+
+
+ }
+
+
+ }
+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:471:3: ( ( RULE_ID ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:474:3: ( RULE_ID )
+ {
+
+ if (current==null) {
+ current = factory.create("Familie");
+ associateNodeWithAstElement(currentNode, current);
+ }
+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:480:1: ( RULE_ID )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:481:2: RULE_ID
+ {
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleFamilie1234);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1/@terminal" /* xtext::CrossReference */, "vater");
+
+
+ }
+
+
+ }
+
+
+ }
+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:486:3: ( ( RULE_ID ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:489:3: ( RULE_ID )
+ {
+
+ if (current==null) {
+ current = factory.create("Familie");
+ associateNodeWithAstElement(currentNode, current);
+ }
+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:495:1: ( RULE_ID )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:496:2: RULE_ID
+ {
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleFamilie1263);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1/@terminal" /* xtext::CrossReference */, "kinder");
+
+
+ }
+
+
+ }
+
+
+ }
+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:501:3: ( ',' ( ( RULE_ID ) ) )*
+ loop11:
+ do {
+ int alt11=2;
+ int LA11_0 = input.LA(1);
+
+ if ( (LA11_0==25) ) {
+ alt11=1;
+ }
+
+
+ switch (alt11) {
+ case 1 :
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:501:4: ',' ( ( RULE_ID ) )
+ {
+ match(input,25,FOLLOW_25_in_ruleFamilie1278);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.1/@abstractTokens.0" /* xtext::Keyword */, null);
+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:505:1: ( ( RULE_ID ) )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:508:3: ( RULE_ID )
+ {
+
+ if (current==null) {
+ current = factory.create("Familie");
+ associateNodeWithAstElement(currentNode, current);
+ }
+
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:514:1: ( RULE_ID )
+ // ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g:515:2: RULE_ID
+ {
+ match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleFamilie1302);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.1/@abstractTokens.1/@terminal" /* xtext::CrossReference */, "kinder");
+
+
+ }
+
+
+ }
+
+
+ }
+ break;
+
+ default :
+ break loop11;
+ }
+ } while (true);
+
+
+ }
+
+ match(input,16,FOLLOW_16_in_ruleFamilie1318);
+
+ createLeafNode("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.1" /* xtext::Keyword */, null);
+
+
+ }
+
+
+ }
+
+ resetLookahead();
+ }
+
+ catch (RecognitionException re) {
+ recover(input,re);
+ appendSkippedTokens();
+ }
+ finally {
+ }
+ return current;
+ }
+ // $ANTLR end ruleFamilie
+
+
public static final BitSet FOLLOW_ruleSpielplatz_in_entryRuleSpielplatz70 = new BitSet(new long[]{0x0000000000000000L});
@@ -966,37 +1346,51 @@ public class InternalReferenceGrammarParser extends AbstractAntlrParser {
public static final BitSet FOLLOW_11_in_ruleSpielplatz118 = new BitSet(new long[]{0x0000000000000010L});
public static final BitSet FOLLOW_RULE_INT_in_ruleSpielplatz139 = new BitSet(new long[]{0x0000000000001020L});
public static final BitSet FOLLOW_RULE_STRING_in_ruleSpielplatz172 = new BitSet(new long[]{0x0000000000001000L});
- public static final BitSet FOLLOW_12_in_ruleSpielplatz194 = new BitSet(new long[]{0x0000000000066000L});
- public static final BitSet FOLLOW_ruleKind_in_ruleSpielplatz231 = new BitSet(new long[]{0x0000000000066000L});
- public static final BitSet FOLLOW_ruleErwachsener_in_ruleSpielplatz275 = new BitSet(new long[]{0x0000000000066000L});
- public static final BitSet FOLLOW_ruleSpielzeug_in_ruleSpielplatz320 = new BitSet(new long[]{0x0000000000066000L});
- public static final BitSet FOLLOW_13_in_ruleSpielplatz336 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_ruleKind_in_entryRuleKind374 = new BitSet(new long[]{0x0000000000000000L});
- public static final BitSet FOLLOW_EOF_in_entryRuleKind384 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_14_in_ruleKind421 = new BitSet(new long[]{0x0000000000008000L});
- public static final BitSet FOLLOW_15_in_ruleKind430 = new BitSet(new long[]{0x0000000000000040L});
- public static final BitSet FOLLOW_RULE_ID_in_ruleKind452 = new BitSet(new long[]{0x0000000000000010L});
- public static final BitSet FOLLOW_RULE_INT_in_ruleKind485 = new BitSet(new long[]{0x0000000000010000L});
- public static final BitSet FOLLOW_16_in_ruleKind506 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_ruleErwachsener_in_entryRuleErwachsener541 = new BitSet(new long[]{0x0000000000000000L});
- public static final BitSet FOLLOW_EOF_in_entryRuleErwachsener551 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_17_in_ruleErwachsener588 = new BitSet(new long[]{0x0000000000008000L});
- public static final BitSet FOLLOW_15_in_ruleErwachsener597 = new BitSet(new long[]{0x0000000000000040L});
- public static final BitSet FOLLOW_RULE_ID_in_ruleErwachsener619 = new BitSet(new long[]{0x0000000000000010L});
- public static final BitSet FOLLOW_RULE_INT_in_ruleErwachsener652 = new BitSet(new long[]{0x0000000000010000L});
- public static final BitSet FOLLOW_16_in_ruleErwachsener673 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_ruleSpielzeug_in_entryRuleSpielzeug708 = new BitSet(new long[]{0x0000000000000000L});
- public static final BitSet FOLLOW_EOF_in_entryRuleSpielzeug718 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_18_in_ruleSpielzeug755 = new BitSet(new long[]{0x0000000000008000L});
- public static final BitSet FOLLOW_15_in_ruleSpielzeug764 = new BitSet(new long[]{0x0000000000000040L});
- public static final BitSet FOLLOW_RULE_ID_in_ruleSpielzeug786 = new BitSet(new long[]{0x0000000000780000L});
- public static final BitSet FOLLOW_ruleFarbe_in_ruleSpielzeug832 = new BitSet(new long[]{0x0000000000010000L});
- public static final BitSet FOLLOW_16_in_ruleSpielzeug846 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_ruleFarbe_in_entryRuleFarbe881 = new BitSet(new long[]{0x0000000000000000L});
- public static final BitSet FOLLOW_EOF_in_entryRuleFarbe891 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_19_in_ruleFarbe927 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_20_in_ruleFarbe942 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_21_in_ruleFarbe958 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_22_in_ruleFarbe974 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_12_in_ruleSpielplatz194 = new BitSet(new long[]{0x0000000000866000L});
+ public static final BitSet FOLLOW_ruleKind_in_ruleSpielplatz232 = new BitSet(new long[]{0x0000000000866000L});
+ public static final BitSet FOLLOW_ruleErwachsener_in_ruleSpielplatz276 = new BitSet(new long[]{0x0000000000866000L});
+ public static final BitSet FOLLOW_ruleSpielzeug_in_ruleSpielplatz321 = new BitSet(new long[]{0x0000000000866000L});
+ public static final BitSet FOLLOW_ruleFamilie_in_ruleSpielplatz366 = new BitSet(new long[]{0x0000000000866000L});
+ public static final BitSet FOLLOW_13_in_ruleSpielplatz382 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleKind_in_entryRuleKind420 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleKind430 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_14_in_ruleKind467 = new BitSet(new long[]{0x0000000000008000L});
+ public static final BitSet FOLLOW_15_in_ruleKind476 = new BitSet(new long[]{0x0000000000000040L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleKind498 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_RULE_INT_in_ruleKind531 = new BitSet(new long[]{0x0000000000010000L});
+ public static final BitSet FOLLOW_16_in_ruleKind552 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleErwachsener_in_entryRuleErwachsener587 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleErwachsener597 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_17_in_ruleErwachsener634 = new BitSet(new long[]{0x0000000000008000L});
+ public static final BitSet FOLLOW_15_in_ruleErwachsener643 = new BitSet(new long[]{0x0000000000000040L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleErwachsener665 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_RULE_INT_in_ruleErwachsener698 = new BitSet(new long[]{0x0000000000010000L});
+ public static final BitSet FOLLOW_16_in_ruleErwachsener719 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleSpielzeug_in_entryRuleSpielzeug754 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleSpielzeug764 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_18_in_ruleSpielzeug801 = new BitSet(new long[]{0x0000000000008000L});
+ public static final BitSet FOLLOW_15_in_ruleSpielzeug810 = new BitSet(new long[]{0x0000000000000040L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleSpielzeug832 = new BitSet(new long[]{0x0000000000780000L});
+ public static final BitSet FOLLOW_ruleFarbe_in_ruleSpielzeug878 = new BitSet(new long[]{0x0000000000010000L});
+ public static final BitSet FOLLOW_16_in_ruleSpielzeug892 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleFarbe_in_entryRuleFarbe927 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleFarbe937 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_19_in_ruleFarbe973 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_20_in_ruleFarbe988 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_21_in_ruleFarbe1004 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_22_in_ruleFarbe1020 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ruleFamilie_in_entryRuleFamilie1055 = new BitSet(new long[]{0x0000000000000000L});
+ public static final BitSet FOLLOW_EOF_in_entryRuleFamilie1065 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_23_in_ruleFamilie1105 = new BitSet(new long[]{0x0000000000008000L});
+ public static final BitSet FOLLOW_15_in_ruleFamilie1114 = new BitSet(new long[]{0x0000000001000060L});
+ public static final BitSet FOLLOW_24_in_ruleFamilie1138 = new BitSet(new long[]{0x0000000000000040L});
+ public static final BitSet FOLLOW_RULE_STRING_in_ruleFamilie1153 = new BitSet(new long[]{0x0000000000000040L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleFamilie1168 = new BitSet(new long[]{0x0000000000000040L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleFamilie1205 = new BitSet(new long[]{0x0000000000000040L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleFamilie1234 = new BitSet(new long[]{0x0000000000000040L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleFamilie1263 = new BitSet(new long[]{0x0000000002010000L});
+ public static final BitSet FOLLOW_25_in_ruleFamilie1278 = new BitSet(new long[]{0x0000000000000040L});
+ public static final BitSet FOLLOW_RULE_ID_in_ruleFamilie1302 = new BitSet(new long[]{0x0000000002010000L});
+ public static final BitSet FOLLOW_16_in_ruleFamilie1318 = new BitSet(new long[]{0x0000000000000002L});
} \ No newline at end of file
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar__.g b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar__.g
index 2fae3b9..bfe7748 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar__.g
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar__.g
@@ -19,26 +19,29 @@ T19 : 'ROT' ;
T20 : 'BLAU' ;
T21 : 'GELB' ;
T22 : 'GRÜN' ;
+T23 : 'familie' ;
+T24 : 'keyword' ;
+T25 : ',' ;
-// $ANTLR src "./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g" 393
+// $ANTLR src "./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g" 529
RULE_ID : ('^')?('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*;
-// $ANTLR src "./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g" 395
+// $ANTLR src "./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g" 531
RULE_INT : ('0'..'9')+;
-// $ANTLR src "./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g" 397
+// $ANTLR src "./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g" 533
RULE_STRING : '"' ( '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\') | ~('\\'|'"') )* '"' | '\'' ( '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\') | ~('\\'|'\'') )* '\'';
-// $ANTLR src "./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g" 399
+// $ANTLR src "./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g" 535
RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )* '*/' {$channel=HIDDEN;};
-// $ANTLR src "./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g" 401
+// $ANTLR src "./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g" 537
RULE_SL_COMMENT : '//' ~('\n'|'\r')* ('\r'? '\n')? {$channel=HIDDEN;};
-// $ANTLR src "./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g" 403
+// $ANTLR src "./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g" 539
RULE_WS : (' '|'\t'|'\r'|'\n')+ {$channel=HIDDEN;};
-// $ANTLR src "./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g" 405
+// $ANTLR src "./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalReferenceGrammar.g" 541
RULE_ANY_OTHER : .;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalSimpleExpressionsLexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalSimpleExpressionsLexer.java
index 726cced..9f99816 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalSimpleExpressionsLexer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalSimpleExpressionsLexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalSimpleExpressions.g 2008-11-03 16:11:07
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalSimpleExpressions.g 2008-11-06 21:59:11
package org.eclipse.xtext.testlanguages.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalSimpleExpressionsParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalSimpleExpressionsParser.java
index f49b67f..a7133c4 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalSimpleExpressionsParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalSimpleExpressionsParser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalSimpleExpressions.g 2008-11-03 16:11:07
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalSimpleExpressions.g 2008-11-06 21:59:11
package org.eclipse.xtext.testlanguages.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTestLanguageLexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTestLanguageLexer.java
index 86e1f96..e7dd642 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTestLanguageLexer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTestLanguageLexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTestLanguage.g 2008-11-03 16:11:04
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTestLanguage.g 2008-11-06 21:59:08
package org.eclipse.xtext.testlanguages.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTestLanguageParser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTestLanguageParser.java
index f2ee5e0..d2705ac 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTestLanguageParser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTestLanguageParser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTestLanguage.g 2008-11-03 16:11:04
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/testlanguages/parser/internal/InternalTestLanguage.g 2008-11-06 21:59:08
package org.eclipse.xtext.testlanguages.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parsetree/reconstr/ReferenceGrammarParseTreeConstructor.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parsetree/reconstr/ReferenceGrammarParseTreeConstructor.java
index f9e10a6..e489109 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parsetree/reconstr/ReferenceGrammarParseTreeConstructor.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/parsetree/reconstr/ReferenceGrammarParseTreeConstructor.java
@@ -28,17 +28,18 @@ public class ReferenceGrammarParseTreeConstructor extends AbstractParseTreeConst
if(inst.isInstanceOf("Erwachsener") && (s = new Erwachsener_Group(inst, null).firstSolution()) != null) return s;
if(inst.isInstanceOf("Spielzeug") && (s = new Spielzeug_Group(inst, null).firstSolution()) != null) return s;
if(inst.isInstanceOf("Farbe") && (s = new Farbe_Alternatives(inst, null).firstSolution()) != null) return s;
+ if(inst.isInstanceOf("Familie") && (s = new Familie_Group(inst, null).firstSolution()) != null) return s;
return null;
}
/************ begin Rule Spielplatz ****************
*
- * Spielplatz : ( 'spielplatz' groesse = INT ( beschreibung = STRING ) ? '{' ( kinder += Kind | erzieher += Erwachsener | spielzeuge += Spielzeug ) * '}' ) ? ;
+ * Spielplatz : ( 'spielplatz' groesse = INT ( beschreibung = STRING ) ? '{' ( kinder += Kind | erzieher += Erwachsener | spielzeuge += Spielzeug | familie += Familie ) * '}' ) ? ;
*
**/
-// ( 'spielplatz' groesse = INT ( beschreibung = STRING ) ? '{' ( kinder += Kind | erzieher += Erwachsener | spielzeuge += Spielzeug ) * '}' ) ?
+// ( 'spielplatz' groesse = INT ( beschreibung = STRING ) ? '{' ( kinder += Kind | erzieher += Erwachsener | spielzeuge += Spielzeug | familie += Familie ) * '}' ) ?
protected class Spielplatz_Group extends GroupToken {
public Spielplatz_Group(IInstanceDescription curr, AbstractToken pred) {
@@ -66,7 +67,7 @@ protected class Spielplatz_Group extends GroupToken {
}
}
-// 'spielplatz' groesse = INT ( beschreibung = STRING ) ? '{' ( kinder += Kind | erzieher += Erwachsener | spielzeuge += Spielzeug ) *
+// 'spielplatz' groesse = INT ( beschreibung = STRING ) ? '{' ( kinder += Kind | erzieher += Erwachsener | spielzeuge += Spielzeug | familie += Familie ) *
protected class Spielplatz_0_Group extends GroupToken {
public Spielplatz_0_Group(IInstanceDescription curr, AbstractToken pred) {
@@ -251,7 +252,7 @@ protected class Spielplatz_0_0_1_Keyword extends KeywordToken {
}
-// ( kinder += Kind | erzieher += Erwachsener | spielzeuge += Spielzeug ) *
+// ( kinder += Kind | erzieher += Erwachsener | spielzeuge += Spielzeug | familie += Familie ) *
protected class Spielplatz_0_1_Alternatives extends AlternativesToken {
public Spielplatz_0_1_Alternatives(IInstanceDescription curr, AbstractToken pred) {
@@ -263,7 +264,7 @@ protected class Spielplatz_0_1_Alternatives extends AlternativesToken {
}
protected Solution createSolution() {
- AbstractToken t = (first) ? new Spielplatz_0_1_1_Assignment_spielzeuge(current, this) : new Spielplatz_0_1_0_Alternatives(current, this);
+ AbstractToken t = (first) ? new Spielplatz_0_1_1_Assignment_familie(current, this) : new Spielplatz_0_1_0_Alternatives(current, this);
Solution s = t.firstSolution();
if(s == null && activateNextSolution()) s = createSolution();
if(s == null) return null;
@@ -272,7 +273,7 @@ protected class Spielplatz_0_1_Alternatives extends AlternativesToken {
}
}
-// kinder += Kind | erzieher += Erwachsener
+// kinder += Kind | erzieher += Erwachsener | spielzeuge += Spielzeug
protected class Spielplatz_0_1_0_Alternatives extends AlternativesToken {
public Spielplatz_0_1_0_Alternatives(IInstanceDescription curr, AbstractToken pred) {
@@ -284,7 +285,28 @@ protected class Spielplatz_0_1_0_Alternatives extends AlternativesToken {
}
protected Solution createSolution() {
- AbstractToken t = (first) ? new Spielplatz_0_1_0_1_Assignment_erzieher(current, this) : new Spielplatz_0_1_0_0_Assignment_kinder(current, this);
+ AbstractToken t = (first) ? new Spielplatz_0_1_0_1_Assignment_spielzeuge(current, this) : new Spielplatz_0_1_0_0_Alternatives(current, this);
+ Solution s = t.firstSolution();
+ if(s == null && activateNextSolution()) s = createSolution();
+ if(s == null) return null;
+ last = s.getPredecessor();
+ return s;
+ }
+}
+
+// kinder += Kind | erzieher += Erwachsener
+protected class Spielplatz_0_1_0_0_Alternatives extends AlternativesToken {
+
+ public Spielplatz_0_1_0_0_Alternatives(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Alternatives getGrammarElement() {
+ return (Alternatives)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.1/@groups.0/@groups.0");
+ }
+
+ protected Solution createSolution() {
+ AbstractToken t = (first) ? new Spielplatz_0_1_0_0_1_Assignment_erzieher(current, this) : new Spielplatz_0_1_0_0_0_Assignment_kinder(current, this);
Solution s = t.firstSolution();
if(s == null && activateNextSolution()) s = createSolution();
if(s == null) return null;
@@ -294,14 +316,14 @@ protected class Spielplatz_0_1_0_Alternatives extends AlternativesToken {
}
// kinder += Kind
-protected class Spielplatz_0_1_0_0_Assignment_kinder extends AssignmentToken {
+protected class Spielplatz_0_1_0_0_0_Assignment_kinder extends AssignmentToken {
- public Spielplatz_0_1_0_0_Assignment_kinder(IInstanceDescription curr, AbstractToken pred) {
+ public Spielplatz_0_1_0_0_0_Assignment_kinder(IInstanceDescription curr, AbstractToken pred) {
super(curr, pred, !IS_MANY, IS_REQUIRED);
}
public Assignment getGrammarElement() {
- return (Assignment)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.1/@groups.0/@groups.0");
+ return (Assignment)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.1/@groups.0/@groups.0/@groups.0");
}
protected Solution createSolution() {
@@ -322,14 +344,14 @@ protected class Spielplatz_0_1_0_0_Assignment_kinder extends AssignmentToken {
}
// erzieher += Erwachsener
-protected class Spielplatz_0_1_0_1_Assignment_erzieher extends AssignmentToken {
+protected class Spielplatz_0_1_0_0_1_Assignment_erzieher extends AssignmentToken {
- public Spielplatz_0_1_0_1_Assignment_erzieher(IInstanceDescription curr, AbstractToken pred) {
+ public Spielplatz_0_1_0_0_1_Assignment_erzieher(IInstanceDescription curr, AbstractToken pred) {
super(curr, pred, !IS_MANY, IS_REQUIRED);
}
public Assignment getGrammarElement() {
- return (Assignment)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.1/@groups.0/@groups.1");
+ return (Assignment)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.1/@groups.0/@groups.0/@groups.1");
}
protected Solution createSolution() {
@@ -351,14 +373,14 @@ protected class Spielplatz_0_1_0_1_Assignment_erzieher extends AssignmentToken
// spielzeuge += Spielzeug
-protected class Spielplatz_0_1_1_Assignment_spielzeuge extends AssignmentToken {
+protected class Spielplatz_0_1_0_1_Assignment_spielzeuge extends AssignmentToken {
- public Spielplatz_0_1_1_Assignment_spielzeuge(IInstanceDescription curr, AbstractToken pred) {
+ public Spielplatz_0_1_0_1_Assignment_spielzeuge(IInstanceDescription curr, AbstractToken pred) {
super(curr, pred, !IS_MANY, IS_REQUIRED);
}
public Assignment getGrammarElement() {
- return (Assignment)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.1/@groups.1");
+ return (Assignment)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.1/@groups.0/@groups.1");
}
protected Solution createSolution() {
@@ -379,6 +401,35 @@ protected class Spielplatz_0_1_1_Assignment_spielzeuge extends AssignmentToken
}
+// familie += Familie
+protected class Spielplatz_0_1_1_Assignment_familie extends AssignmentToken {
+
+ public Spielplatz_0_1_1_Assignment_familie(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Assignment getGrammarElement() {
+ return (Assignment)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.0/@alternatives/@abstractTokens.0/@abstractTokens.1/@groups.1");
+ }
+
+ protected Solution createSolution() {
+ if((value = current.getConsumable("familie",required)) == null) return null;
+ IInstanceDescription obj = current.cloneAndConsume("familie");
+ if(value instanceof EObject) { // xtext::RuleCall
+ IInstanceDescription param = getDescr((EObject)value);
+ if(param.isInstanceOf("Familie")) {
+ Solution s = new Familie_Group(param, this).firstSolution();
+ if(s != null) {
+ type = AssignmentType.PRC;
+ return new Solution(obj,s.getPredecessor());
+ }
+ }
+ }
+ return null;
+ }
+}
+
+
// '}'
protected class Spielplatz_1_Keyword extends KeywordToken {
@@ -1211,4 +1262,430 @@ protected class Farbe_1_Keyword_GRN extends KeywordToken {
/************ end Rule Farbe ****************/
+/************ begin Rule Familie ****************
+ *
+ * Familie : 'familie' '(' name = ( 'keyword' | STRING | ID ) mutter = [ Erwachsener ] vater = [ Erwachsener ] kinder += [ Kind ] ( ',' kinder += [ Kind ] ) * ')' ;
+ *
+ **/
+
+
+// 'familie' '(' name = ( 'keyword' | STRING | ID ) mutter = [ Erwachsener ] vater = [ Erwachsener ] kinder += [ Kind ] ( ',' kinder += [ Kind ] ) * ')'
+protected class Familie_Group extends GroupToken {
+
+ public Familie_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new Familie_1_Keyword(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new Familie_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// 'familie' '(' name = ( 'keyword' | STRING | ID ) mutter = [ Erwachsener ] vater = [ Erwachsener ] kinder += [ Kind ] ( ',' kinder += [ Kind ] ) *
+protected class Familie_0_Group extends GroupToken {
+
+ public Familie_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new Familie_0_1_Group(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new Familie_0_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// 'familie' '(' name = ( 'keyword' | STRING | ID ) mutter = [ Erwachsener ] vater = [ Erwachsener ] kinder += [ Kind ]
+protected class Familie_0_0_Group extends GroupToken {
+
+ public Familie_0_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.0");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new Familie_0_0_1_Assignment_kinder(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new Familie_0_0_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// 'familie' '(' name = ( 'keyword' | STRING | ID ) mutter = [ Erwachsener ] vater = [ Erwachsener ]
+protected class Familie_0_0_0_Group extends GroupToken {
+
+ public Familie_0_0_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new Familie_0_0_0_1_Assignment_vater(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new Familie_0_0_0_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// 'familie' '(' name = ( 'keyword' | STRING | ID ) mutter = [ Erwachsener ]
+protected class Familie_0_0_0_0_Group extends GroupToken {
+
+ public Familie_0_0_0_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new Familie_0_0_0_0_1_Assignment_mutter(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new Familie_0_0_0_0_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// 'familie' '(' name = ( 'keyword' | STRING | ID )
+protected class Familie_0_0_0_0_0_Group extends GroupToken {
+
+ public Familie_0_0_0_0_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new Familie_0_0_0_0_0_1_Assignment_name(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new Familie_0_0_0_0_0_0_Group(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// 'familie' '('
+protected class Familie_0_0_0_0_0_0_Group extends GroupToken {
+
+ public Familie_0_0_0_0_0_0_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new Familie_0_0_0_0_0_0_1_Keyword(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new Familie_0_0_0_0_0_0_0_Keyword_familie(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// 'familie'
+protected class Familie_0_0_0_0_0_0_0_Keyword_familie extends KeywordToken {
+
+ public Familie_0_0_0_0_0_0_0_Keyword_familie(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0");
+ }
+}
+
+// '('
+protected class Familie_0_0_0_0_0_0_1_Keyword extends KeywordToken {
+
+ public Familie_0_0_0_0_0_0_1_Keyword(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1");
+ }
+}
+
+
+// name = ( 'keyword' | STRING | ID )
+protected class Familie_0_0_0_0_0_1_Assignment_name extends AssignmentToken {
+
+ public Familie_0_0_0_0_0_1_Assignment_name(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Assignment getGrammarElement() {
+ return (Assignment)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1");
+ }
+
+ protected Solution createSolution() {
+ if((value = current.getConsumable("name",required)) == null) return null;
+ IInstanceDescription obj = current.cloneAndConsume("name");
+ if("keyword".equals(value)) { // xtext::Keyword
+ type = AssignmentType.KW;
+ element = (AbstractElement)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1/@terminal/@groups.0/@groups.0");
+ return new Solution(obj);
+ }
+ if(true) { // xtext::RuleCall FIXME: check if value is valid for lexer rule
+ type = AssignmentType.LRC;
+ element = (AbstractElement)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1/@terminal/@groups.0/@groups.1");
+ return new Solution(obj);
+ }
+ if(true) { // xtext::RuleCall FIXME: check if value is valid for lexer rule
+ type = AssignmentType.LRC;
+ element = (AbstractElement)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1/@terminal/@groups.1");
+ return new Solution(obj);
+ }
+ return null;
+ }
+}
+
+
+// mutter = [ Erwachsener ]
+protected class Familie_0_0_0_0_1_Assignment_mutter extends AssignmentToken {
+
+ public Familie_0_0_0_0_1_Assignment_mutter(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Assignment getGrammarElement() {
+ return (Assignment)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1");
+ }
+
+ protected Solution createSolution() {
+ if((value = current.getConsumable("mutter",required)) == null) return null;
+ IInstanceDescription obj = current.cloneAndConsume("mutter");
+ if(value instanceof EObject) { // xtext::CrossReference
+ IInstanceDescription param = getDescr((EObject)value);
+ if(param.isInstanceOf("Erwachsener")) {
+ type = AssignmentType.CR;
+ element = (AbstractElement)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1/@terminal");
+ return new Solution(obj);
+ }
+ }
+ return null;
+ }
+}
+
+
+// vater = [ Erwachsener ]
+protected class Familie_0_0_0_1_Assignment_vater extends AssignmentToken {
+
+ public Familie_0_0_0_1_Assignment_vater(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Assignment getGrammarElement() {
+ return (Assignment)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1");
+ }
+
+ protected Solution createSolution() {
+ if((value = current.getConsumable("vater",required)) == null) return null;
+ IInstanceDescription obj = current.cloneAndConsume("vater");
+ if(value instanceof EObject) { // xtext::CrossReference
+ IInstanceDescription param = getDescr((EObject)value);
+ if(param.isInstanceOf("Erwachsener")) {
+ type = AssignmentType.CR;
+ element = (AbstractElement)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1/@terminal");
+ return new Solution(obj);
+ }
+ }
+ return null;
+ }
+}
+
+
+// kinder += [ Kind ]
+protected class Familie_0_0_1_Assignment_kinder extends AssignmentToken {
+
+ public Familie_0_0_1_Assignment_kinder(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Assignment getGrammarElement() {
+ return (Assignment)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1");
+ }
+
+ protected Solution createSolution() {
+ if((value = current.getConsumable("kinder",required)) == null) return null;
+ IInstanceDescription obj = current.cloneAndConsume("kinder");
+ if(value instanceof EObject) { // xtext::CrossReference
+ IInstanceDescription param = getDescr((EObject)value);
+ if(param.isInstanceOf("Kind")) {
+ type = AssignmentType.CR;
+ element = (AbstractElement)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.0/@abstractTokens.1/@terminal");
+ return new Solution(obj);
+ }
+ }
+ return null;
+ }
+}
+
+
+// ( ',' kinder += [ Kind ] ) *
+protected class Familie_0_1_Group extends GroupToken {
+
+ public Familie_0_1_Group(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, IS_MANY, !IS_REQUIRED);
+ }
+
+ public Group getGrammarElement() {
+ return (Group)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.1");
+ }
+
+ protected Solution createSolution() {
+ Solution s1 = new Familie_0_1_1_Assignment_kinder(current, this).firstSolution();
+ while(s1 != null) {
+ Solution s2 = new Familie_0_1_0_Keyword(s1.getCurrent(), s1.getPredecessor()).firstSolution();
+ if(s2 == null) {
+ s1 = s1.getPredecessor().nextSolution(this);
+ if(s1 == null) return null;
+ } else {
+ last = s2.getPredecessor();
+ return s2;
+ }
+ }
+ return null;
+
+ }
+}
+
+// ','
+protected class Familie_0_1_0_Keyword extends KeywordToken {
+
+ public Familie_0_1_0_Keyword(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.1/@abstractTokens.0");
+ }
+}
+
+// kinder += [ Kind ]
+protected class Familie_0_1_1_Assignment_kinder extends AssignmentToken {
+
+ public Familie_0_1_1_Assignment_kinder(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Assignment getGrammarElement() {
+ return (Assignment)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.1/@abstractTokens.1");
+ }
+
+ protected Solution createSolution() {
+ if((value = current.getConsumable("kinder",required)) == null) return null;
+ IInstanceDescription obj = current.cloneAndConsume("kinder");
+ if(value instanceof EObject) { // xtext::CrossReference
+ IInstanceDescription param = getDescr((EObject)value);
+ if(param.isInstanceOf("Kind")) {
+ type = AssignmentType.CR;
+ element = (AbstractElement)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.0/@abstractTokens.1/@abstractTokens.1/@terminal");
+ return new Solution(obj);
+ }
+ }
+ return null;
+ }
+}
+
+
+
+// ')'
+protected class Familie_1_Keyword extends KeywordToken {
+
+ public Familie_1_Keyword(IInstanceDescription curr, AbstractToken pred) {
+ super(curr, pred, !IS_MANY, IS_REQUIRED);
+ }
+
+ public Keyword getGrammarElement() {
+ return (Keyword)getGrammarEle("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6/@alternatives/@abstractTokens.1");
+ }
+}
+
+
+/************ end Rule Familie ****************/
+
}
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/services/ReferenceGrammarGrammarAccess.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/services/ReferenceGrammarGrammarAccess.java
index f63d5e4..0ba2ff0 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/services/ReferenceGrammarGrammarAccess.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/testlanguages/services/ReferenceGrammarGrammarAccess.java
@@ -48,6 +48,10 @@ public class ReferenceGrammarGrammarAccess extends BaseEPackageAccess implements
return (ParserRule) getGrammar().eResource().getResourceSet().getEObject(URI.createURI("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.5"),true);
}
+ public ParserRule pr_Familie() {
+ return (ParserRule) getGrammar().eResource().getResourceSet().getEObject(URI.createURI("classpath:/org/eclipse/xtext/testlanguages/ReferenceGrammar.xmi#//@rules.6"),true);
+ }
+
public LexerRule lr_ID() {
return (LexerRule) getGrammar().eResource().getResourceSet().getEObject(URI.createURI("classpath:/org/eclipse/xtext/builtin/XtextBuiltin.xmi#//@rules.0"),true);
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/internal/InternalBug250313Lexer.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/internal/InternalBug250313Lexer.java
index 90d8886..35e3ac4 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/internal/InternalBug250313Lexer.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/internal/InternalBug250313Lexer.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/valueconverter/parser/internal/InternalBug250313.g 2008-11-03 16:11:09
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/valueconverter/parser/internal/InternalBug250313.g 2008-11-06 21:59:15
package org.eclipse.xtext.valueconverter.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/internal/InternalBug250313Parser.java b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/internal/InternalBug250313Parser.java
index 528a1ed..2e77147 100644
--- a/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/internal/InternalBug250313Parser.java
+++ b/tests/org.eclipse.xtext.generator.tests/src-gen/org/eclipse/xtext/valueconverter/parser/internal/InternalBug250313Parser.java
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/valueconverter/parser/internal/InternalBug250313.g 2008-11-03 16:11:09
+// $ANTLR 3.0.1 ./src-gen/org/eclipse/xtext/valueconverter/parser/internal/InternalBug250313.g 2008-11-06 21:59:15
package org.eclipse.xtext.valueconverter.parser.internal;
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/XtextTestChecks.chk b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/XtextTestChecks.chk
new file mode 100644
index 0000000..19aa846
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/XtextTestChecks.chk
@@ -0,0 +1,7 @@
+import XtextTest;
+/*
+ * this check file is used to specify constraints for the derived metamodels
+ * example:
+ * context Entity WARNING "Entity names should start with a capital" :
+ * name.toFirstUpper() == name;
+ */
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/crossrefs/LangAChecks.chk b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/crossrefs/LangAChecks.chk
new file mode 100644
index 0000000..5ad239f
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/crossrefs/LangAChecks.chk
@@ -0,0 +1,7 @@
+import langA;
+/*
+ * this check file is used to specify constraints for the derived metamodels
+ * example:
+ * context Entity WARNING "Entity names should start with a capital" :
+ * name.toFirstUpper() == name;
+ */
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/dummy/DummyLangChecks.chk b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/dummy/DummyLangChecks.chk
new file mode 100644
index 0000000..8413e77
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/dummy/DummyLangChecks.chk
@@ -0,0 +1,7 @@
+import DummyLang;
+/*
+ * this check file is used to specify constraints for the derived metamodels
+ * example:
+ * context Entity WARNING "Entity names should start with a capital" :
+ * name.toFirstUpper() == name;
+ */
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/AutoTestSuite.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/AutoTestSuite.java
index 026821d..72d0993 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/AutoTestSuite.java
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/generator/AutoTestSuite.java
@@ -39,6 +39,7 @@ public class AutoTestSuite {
suite.addTestSuite(org.eclipse.xtext.parsetree.reconstr.ComplexReconstrTest.class);
suite.addTestSuite(org.eclipse.xtext.parsetree.reconstr.SimpleReconstrTest.class);
suite.addTestSuite(org.eclipse.xtext.parsetree.reconstr.WhitespacePreservingCallbackTest.class);
+ suite.addTestSuite(org.eclipse.xtext.parsetree.ParseTreeUtilTest.class);
suite.addTestSuite(org.eclipse.xtext.reference.CommentOnEofBug_234135_Test.class);
suite.addTestSuite(org.eclipse.xtext.reference.LeafNodeBug_234132_Test.class);
suite.addTestSuite(org.eclipse.xtext.resource.metamodel.Xtext2EcoreTransformerTests.class);
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/FooChecks.chk b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/FooChecks.chk
new file mode 100644
index 0000000..a5b7ffd
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/grammarinheritance/FooChecks.chk
@@ -0,0 +1,7 @@
+import foo;
+/*
+ * this check file is used to specify constraints for the derived metamodels
+ * example:
+ * context Entity WARNING "Entity names should start with a capital" :
+ * name.toFirstUpper() == name;
+ */
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/metamodelreferencing/tests/SimpleTestChecks.chk b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/metamodelreferencing/tests/SimpleTestChecks.chk
new file mode 100644
index 0000000..fc42718
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/metamodelreferencing/tests/SimpleTestChecks.chk
@@ -0,0 +1,7 @@
+import SimpleTest;
+/*
+ * this check file is used to specify constraints for the derived metamodels
+ * example:
+ * context Entity WARNING "Entity names should start with a capital" :
+ * name.toFirstUpper() == name;
+ */
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parsetree/ParseTreeUtilTest.java b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parsetree/ParseTreeUtilTest.java
new file mode 100644
index 0000000..a1b40e9
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parsetree/ParseTreeUtilTest.java
@@ -0,0 +1,160 @@
+/*******************************************************************************
+ * Copyright (c) 2008 itemis AG (http://www.itemis.eu) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ *******************************************************************************/
+package org.eclipse.xtext.parsetree;
+
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.eclipse.xtext.AbstractElement;
+import org.eclipse.xtext.Alternatives;
+import org.eclipse.xtext.Assignment;
+import org.eclipse.xtext.Group;
+import org.eclipse.xtext.Keyword;
+import org.eclipse.xtext.RuleCall;
+import org.eclipse.xtext.testlanguages.ReferenceGrammarStandaloneSetup;
+import org.eclipse.xtext.tests.AbstractGeneratorTest;
+
+/**
+ * Unit test for <code>ParseTreeUtil</code>.
+ *
+ * @author Michael Clay - Initial contribution and API
+ * @see ParseTreeUtil
+ */
+public class ParseTreeUtilTest extends AbstractGeneratorTest {
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ with(ReferenceGrammarStandaloneSetup.class);
+ }
+
+ public void testFetGrammarElementFromNode() throws Exception {
+ String text = "spielplatz 1 \"junit\" { ";
+ CompositeNode rootNode = getRootNode(text);
+ AbstractNode lastCompleteNodeByOffset = ParseTreeUtil.getLastCompleteNodeByOffset(rootNode, text.length());
+ AbstractElement grammarElementFromNode = ParseTreeUtil.getGrammarElementFromNode(lastCompleteNodeByOffset);
+ assertTrue("expect Keyword as last complete grammar element", grammarElementFromNode instanceof Keyword);
+
+ text = "spielplatz 1 \"junit\" { kind (k1 ";
+ rootNode = getRootNode(text);
+ lastCompleteNodeByOffset = ParseTreeUtil.getLastCompleteNodeByOffset(rootNode, text.length());
+ grammarElementFromNode = ParseTreeUtil.getGrammarElementFromNode(lastCompleteNodeByOffset);
+ assertTrue("expect Keyword as last complete grammar element", grammarElementFromNode instanceof RuleCall);
+ }
+
+ public void testGetLastCompleteNodeByOffset() throws Exception {
+ String text = "spielplatz 1 \"junit\" { ";
+ CompositeNode rootNode = getRootNode(text);
+ AbstractNode lastCompleteNodeByOffset = ParseTreeUtil.getLastCompleteNodeByOffset(rootNode, text.length());
+ assertTrue("expect leafnode as last complete element", lastCompleteNodeByOffset instanceof LeafNode);
+ assertEquals("expect leafnode with text '{'", ((LeafNode) lastCompleteNodeByOffset).getText(), "{");
+ }
+
+ public void testGetCurrentNodeByOffset() throws Exception {
+
+ String text = "spielplatz 1 \"junit\" { kin ";
+ CompositeNode rootNode = getRootNode(text);
+ LeafNode currentNodeByOffset = ParseTreeUtil.getCurrentNodeByOffset(rootNode, 26);
+ assertEquals("expect leafnode with text 'kin'", currentNodeByOffset.getText(), "kin");
+
+ text = "spielplatz 1 \"junit\" { kind (";
+ rootNode = getRootNode(text);
+ currentNodeByOffset = ParseTreeUtil.getCurrentNodeByOffset(rootNode, text.length());
+ assertEquals("expect leafnode with text '('", currentNodeByOffset.getText(), "(");
+
+ text = "spielplatz 1 \"junit\" { kind ( ";
+ rootNode = getRootNode(text);
+ currentNodeByOffset = ParseTreeUtil.getCurrentNodeByOffset(rootNode, text.length());
+ assertEquals("expect leafnode with WS text '__'", currentNodeByOffset.getText(), " ");
+
+ text = "spielplatz 1 \"junit\" { kind (";
+ rootNode = getRootNode(text);
+ currentNodeByOffset = ParseTreeUtil.getCurrentNodeByOffset(rootNode, text.length() - 1);
+ assertEquals("expect leafnode with WS text '_'", currentNodeByOffset.getText(), " ");
+
+ text = "spielplatz 1 \"junit\" { kind (";
+ rootNode = getRootNode(text);
+ currentNodeByOffset = ParseTreeUtil.getCurrentNodeByOffset(rootNode, 0);
+ assertEquals("expect leafnode with WS text 'spielplatz'", currentNodeByOffset.getText(), "spielplatz");
+
+ }
+
+ public void testGetElementSetValidFromOffsetEmptyText() throws Exception {
+ String text = "";
+ CompositeNode rootNode = getRootNode(text);
+ Set<AbstractElement> elementSetValidFromOffset = ParseTreeUtil.getElementSetValidFromOffset(rootNode, text
+ .length());
+ assertEquals("expect only 1 item", 1, elementSetValidFromOffset.size());
+ assertEqualsClass(elementSetValidFromOffset, Group.class);
+ }
+
+ public void testGetElementSetValidFromOffset() throws Exception {
+ String text = "spielplatz ";
+ CompositeNode rootNode = getRootNode(text);
+ Set<AbstractElement> elementSetValidFromOffset = ParseTreeUtil.getElementSetValidFromOffset(rootNode, text
+ .length());
+ assertEquals("expect only 1 item", 1, elementSetValidFromOffset.size());
+ assertEqualsClass(elementSetValidFromOffset, Assignment.class);
+
+ // Keyword Assignment [Assignment|Keyword]
+ text = "spielplatz 1 ";
+ rootNode = getRootNode(text);
+ elementSetValidFromOffset = ParseTreeUtil.getElementSetValidFromOffset(rootNode, text.length());
+ assertEquals("expect only 2 items", 2, elementSetValidFromOffset.size());
+ assertEqualsClass(elementSetValidFromOffset, Assignment.class, Keyword.class);
+
+ // Keyword Assignment Assignment [Keyword]
+ text = "spielplatz 1 \"junit\" ";
+ rootNode = getRootNode(text);
+ elementSetValidFromOffset = ParseTreeUtil.getElementSetValidFromOffset(rootNode, text.length());
+ assertEquals("expect only 1 item", 1, elementSetValidFromOffset.size());
+ assertEqualsClass(elementSetValidFromOffset, Keyword.class);
+
+ // Keyword Assignment Assignment Keyword [Alternatives|Keyword]
+ text = "spielplatz 1 \"junit\" { ";
+ rootNode = getRootNode(text);
+ elementSetValidFromOffset = ParseTreeUtil.getElementSetValidFromOffset(rootNode, text.length());
+ assertEquals("expect only 2 items", 2, elementSetValidFromOffset.size());
+ assertEqualsClass(elementSetValidFromOffset, Alternatives.class, Keyword.class);
+
+ // Keyword Assignment Assignment Keyword [Keyword]
+ text = "spielplatz 1 \"junit\" { kind ";
+ rootNode = getRootNode(text);
+ elementSetValidFromOffset = ParseTreeUtil.getElementSetValidFromOffset(rootNode, text.length());
+ assertEquals("expect only 1 item", 1, elementSetValidFromOffset.size());
+ assertEqualsClass(elementSetValidFromOffset, Keyword.class);
+
+ // Keyword Assignment Assignment Keyword Keyword [Assignment]
+ text = "spielplatz 1 \"junit\" { kind ( ";
+ rootNode = getRootNode(text);
+ elementSetValidFromOffset = ParseTreeUtil.getElementSetValidFromOffset(rootNode, text.length());
+ assertEquals("expect only 1 item", 1, elementSetValidFromOffset.size());
+ assertEqualsClass(elementSetValidFromOffset, Assignment.class);
+
+ // Keyword Assignment Assignment Keyword
+ text = "spielplatz 1 \"junit\" { kind (kind1 0) kind (kind2 0) erwachsener (e1 1) erwachsener (e2 2) familie ( asd ";
+ rootNode = getRootNode(text);
+ elementSetValidFromOffset = ParseTreeUtil.getElementSetValidFromOffset(rootNode, text.length());
+ assertEquals("expect only 1 item", 1, elementSetValidFromOffset.size());
+ assertEqualsClass(elementSetValidFromOffset, Assignment.class);
+ }
+
+ private void assertEqualsClass(Set<AbstractElement> set, Class<?>... expectedClass) {
+ assertEquals("size of abstract element set must equal class array", set.size(), expectedClass.length);
+ Iterator<Class<?>> classIterator = Arrays.asList(expectedClass).iterator();
+ for (Iterator<AbstractElement> iterator = set.iterator(); iterator.hasNext();) {
+ AbstractElement abstractElement = iterator.next();
+ Class<?> nextClass = classIterator.next();
+ assertTrue("class '" + nextClass + "' must be assignable from '" + abstractElement.getClass() + "'",
+ nextClass.isAssignableFrom(abstractElement.getClass()));
+ }
+ }
+
+}
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parsetree/reconstr/ComplexrewritetestChecks.chk b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parsetree/reconstr/ComplexrewritetestChecks.chk
new file mode 100644
index 0000000..90527f6
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parsetree/reconstr/ComplexrewritetestChecks.chk
@@ -0,0 +1,7 @@
+import complexrewritetest;
+/*
+ * this check file is used to specify constraints for the derived metamodels
+ * example:
+ * context Entity WARNING "Entity names should start with a capital" :
+ * name.toFirstUpper() == name;
+ */
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parsetree/reconstr/SimplerewritetestChecks.chk b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parsetree/reconstr/SimplerewritetestChecks.chk
new file mode 100644
index 0000000..61c838a
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/parsetree/reconstr/SimplerewritetestChecks.chk
@@ -0,0 +1,7 @@
+import simplerewritetest;
+/*
+ * this check file is used to specify constraints for the derived metamodels
+ * example:
+ * context Entity WARNING "Entity names should start with a capital" :
+ * name.toFirstUpper() == name;
+ */
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/ActionLangChecks.chk b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/ActionLangChecks.chk
new file mode 100644
index 0000000..b55714c
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/ActionLangChecks.chk
@@ -0,0 +1,7 @@
+import ActionLang;
+/*
+ * this check file is used to specify constraints for the derived metamodels
+ * example:
+ * context Entity WARNING "Entity names should start with a capital" :
+ * name.toFirstUpper() == name;
+ */
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/LexerLangChecks.chk b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/LexerLangChecks.chk
new file mode 100644
index 0000000..895c2f2
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/LexerLangChecks.chk
@@ -0,0 +1,7 @@
+import LexerLang;
+/*
+ * this check file is used to specify constraints for the derived metamodels
+ * example:
+ * context Entity WARNING "Entity names should start with a capital" :
+ * name.toFirstUpper() == name;
+ */
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/LookaheadLangChecks.chk b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/LookaheadLangChecks.chk
new file mode 100644
index 0000000..57d375e
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/LookaheadLangChecks.chk
@@ -0,0 +1,7 @@
+import LookaheadLang;
+/*
+ * this check file is used to specify constraints for the derived metamodels
+ * example:
+ * context Entity WARNING "Entity names should start with a capital" :
+ * name.toFirstUpper() == name;
+ */
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/OptionalEmptyChecks.chk b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/OptionalEmptyChecks.chk
new file mode 100644
index 0000000..db74b61
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/OptionalEmptyChecks.chk
@@ -0,0 +1,7 @@
+import OptionalEmpty;
+/*
+ * this check file is used to specify constraints for the derived metamodels
+ * example:
+ * context Entity WARNING "Entity names should start with a capital" :
+ * name.toFirstUpper() == name;
+ */
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/ReferenceGrammar.xtext b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/ReferenceGrammar.xtext
index e7db3ed..ff404e1 100644
--- a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/ReferenceGrammar.xtext
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/ReferenceGrammar.xtext
@@ -10,7 +10,7 @@ language org.eclipse.xtext.testlanguages.ReferenceGrammar
generate ReferenceGrammar "http://eclipse.org/xtext/reference/ReferenceGrammar"
Spielplatz :
- ( "spielplatz" groesse = INT ( beschreibung = STRING ) ? "{" ( kinder += Kind | erzieher += Erwachsener | spielzeuge += Spielzeug ) * "}" ) ? ;
+ ( "spielplatz" groesse = INT ( beschreibung = STRING ) ? "{" ( kinder += Kind | erzieher += Erwachsener | spielzeuge += Spielzeug | familie += Familie ) * "}" ) ? ;
Person :
Kind | Erwachsener ;
@@ -25,4 +25,8 @@ generate ReferenceGrammar "http://eclipse.org/xtext/reference/ReferenceGrammar"
"spielzeug" "(" name = ID farbe = Farbe ")" ;
Farbe :
- "ROT" | "BLAU" | "GELB" | "GRÜN" ; \ No newline at end of file
+ "ROT" | "BLAU" | "GELB" | "GRÜN" ;
+
+ Familie :
+ "familie" "(" name=("keyword" | STRING | ID) mutter=[Erwachsener] vater=[Erwachsener] kinder+=[Kind] ("," kinder+=[Kind])* ")" ;
+ \ No newline at end of file
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/ReferenceGrammarChecks.chk b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/ReferenceGrammarChecks.chk
new file mode 100644
index 0000000..035f18a
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/ReferenceGrammarChecks.chk
@@ -0,0 +1,7 @@
+import ReferenceGrammar;
+/*
+ * this check file is used to specify constraints for the derived metamodels
+ * example:
+ * context Entity WARNING "Entity names should start with a capital" :
+ * name.toFirstUpper() == name;
+ */
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/SimpleExpressionsChecks.chk b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/SimpleExpressionsChecks.chk
new file mode 100644
index 0000000..25ab1b1
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/SimpleExpressionsChecks.chk
@@ -0,0 +1,7 @@
+import simpleExpressions;
+/*
+ * this check file is used to specify constraints for the derived metamodels
+ * example:
+ * context Entity WARNING "Entity names should start with a capital" :
+ * name.toFirstUpper() == name;
+ */
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/TestLangChecks.chk b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/TestLangChecks.chk
new file mode 100644
index 0000000..31cdc09
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/testlanguages/TestLangChecks.chk
@@ -0,0 +1,7 @@
+import TestLang;
+/*
+ * this check file is used to specify constraints for the derived metamodels
+ * example:
+ * context Entity WARNING "Entity names should start with a capital" :
+ * name.toFirstUpper() == name;
+ */
diff --git a/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/valueconverter/Bug250313Checks.chk b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/valueconverter/Bug250313Checks.chk
new file mode 100644
index 0000000..6ed0765
--- /dev/null
+++ b/tests/org.eclipse.xtext.generator.tests/src/org/eclipse/xtext/valueconverter/Bug250313Checks.chk
@@ -0,0 +1,7 @@
+import bug250313;
+/*
+ * this check file is used to specify constraints for the derived metamodels
+ * example:
+ * context Entity WARNING "Entity names should start with a capital" :
+ * name.toFirstUpper() == name;
+ */