eclipse plugin: Re-generate the grammar for the upgrade to xtext 2.0
This commit is contained in:
parent
8424a402c8
commit
75092c8b56
23 changed files with 16096 additions and 15659 deletions
|
@ -139,7 +139,6 @@
|
|||
|
||||
|
||||
|
||||
|
||||
<!-- Quick Outline -->
|
||||
<extension
|
||||
point="org.eclipse.ui.handlers">
|
||||
|
|
|
@ -23,21 +23,11 @@ public abstract class AbstractWMLUiModule extends DefaultUiModule {
|
|||
return org.eclipse.xtext.ui.shared.Access.getJavaProjectsState();
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
|
||||
public Class<? extends org.eclipse.jface.text.rules.ITokenScanner> bindITokenScanner() {
|
||||
return org.eclipse.xtext.ui.editor.syntaxcoloring.antlr.AntlrTokenScanner.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
|
||||
public Class<? extends org.eclipse.xtext.ui.editor.contentassist.IProposalConflictHelper> bindIProposalConflictHelper() {
|
||||
return org.eclipse.xtext.ui.editor.contentassist.antlr.AntlrProposalConflictHelper.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
|
||||
public Class<? extends org.eclipse.xtext.ui.editor.IDamagerRepairer> bindIDamagerRepairer() {
|
||||
return org.eclipse.xtext.ui.editor.FastDamagerRepairer.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
|
||||
public void configureHighlightingLexer(com.google.inject.Binder binder) {
|
||||
binder.bind(org.eclipse.xtext.parser.antlr.Lexer.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.ui.LexerUIBindings.HIGHLIGHTING)).to(org.wesnoth.parser.antlr.internal.InternalWMLLexer.class);
|
||||
|
@ -53,9 +43,14 @@ public abstract class AbstractWMLUiModule extends DefaultUiModule {
|
|||
return org.eclipse.xtext.ui.editor.contentassist.FQNPrefixMatcher.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.exporting.QualifiedNamesFragment
|
||||
public Class<? extends org.eclipse.xtext.ui.refactoring.IDependentElementsCalculator> bindIDependentElementsCalculator() {
|
||||
return org.eclipse.xtext.ui.refactoring.impl.DefaultDependentElementsCalculator.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
|
||||
public void configureIResourceDescriptionsBuilderScope(com.google.inject.Binder binder) {
|
||||
binder.bind(org.eclipse.xtext.resource.IResourceDescriptions.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.scoping.impl.AbstractGlobalScopeProvider.NAMED_BUILDER_SCOPE)).to(org.eclipse.xtext.builder.builderState.ShadowingResourceDescriptions.class);
|
||||
binder.bind(org.eclipse.xtext.resource.IResourceDescriptions.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(org.eclipse.xtext.builder.clustering.CurrentDescriptions.ResourceSetAware.class);
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
|
||||
|
@ -83,14 +78,14 @@ public abstract class AbstractWMLUiModule extends DefaultUiModule {
|
|||
binder.bind(org.eclipse.jface.viewers.ILabelProvider.class).annotatedWith(org.eclipse.xtext.ui.resource.ResourceServiceDescriptionLabelProvider.class).to(org.wesnoth.ui.labeling.WMLDescriptionLabelProvider.class);
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.ui.generator.outline.TransformerFragment
|
||||
public Class<? extends org.eclipse.xtext.ui.editor.outline.transformer.ISemanticModelTransformer> bindISemanticModelTransformer() {
|
||||
return org.wesnoth.ui.outline.WMLTransformer.class;
|
||||
// contributed by org.eclipse.xtext.ui.generator.outline.OutlineTreeProviderFragment
|
||||
public Class<? extends org.eclipse.xtext.ui.editor.outline.IOutlineTreeProvider> bindIOutlineTreeProvider() {
|
||||
return org.wesnoth.ui.outline.WMLOutlineTreeProvider.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.ui.generator.outline.OutlineNodeAdapterFactoryFragment
|
||||
public Class<? extends org.eclipse.xtext.ui.editor.outline.actions.IContentOutlineNodeAdapterFactory> bindIContentOutlineNodeAdapterFactory() {
|
||||
return org.wesnoth.ui.outline.WMLOutlineNodeAdapterFactory.class;
|
||||
// contributed by org.eclipse.xtext.ui.generator.outline.OutlineTreeProviderFragment
|
||||
public Class<? extends org.eclipse.xtext.ui.editor.outline.impl.IOutlineTreeStructureProvider> bindIOutlineTreeStructureProvider() {
|
||||
return org.wesnoth.ui.outline.WMLOutlineTreeProvider.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.ui.generator.quickfix.QuickfixProviderFragment
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
|
||||
/*
|
||||
* generated by Xtext
|
||||
*/
|
||||
|
||||
package org.wesnoth.ui;
|
||||
|
||||
import org.eclipse.xtext.ui.guice.AbstractGuiceAwareExecutableExtensionFactory;
|
||||
|
@ -11,7 +9,8 @@ import org.osgi.framework.Bundle;
|
|||
import com.google.inject.Injector;
|
||||
|
||||
/**
|
||||
*@generated
|
||||
* This class was generated. Customizations should only happen in a newly
|
||||
* introduced subclass.
|
||||
*/
|
||||
public class WMLExecutableExtensionFactory extends AbstractGuiceAwareExecutableExtensionFactory {
|
||||
|
||||
|
|
|
@ -1,31 +1,46 @@
|
|||
RULE_LUA_CODE=18
|
||||
RULE_IFDEF=6
|
||||
RULE_ID=10
|
||||
RULE_ANY_OTHER=12
|
||||
RULE_IFNDEF=7
|
||||
RULE_EOL=4
|
||||
RULE_TEXTDOMAIN=17
|
||||
RULE_IFNHAVE=9
|
||||
RULE_SL_COMMENT=5
|
||||
RULE_STRING=11
|
||||
RULE_ENDIF=16
|
||||
RULE_DEFINE=13
|
||||
RULE_ENDDEF=14
|
||||
RULE_IFHAVE=8
|
||||
RULE_WS=19
|
||||
RULE_ELSE=15
|
||||
'$'=24
|
||||
'}'=34
|
||||
'~'=21
|
||||
'/'=25
|
||||
'{'=33
|
||||
'='=28
|
||||
'('=26
|
||||
'['=29
|
||||
'[/'=32
|
||||
'+'=31
|
||||
'_'=20
|
||||
'.'=22
|
||||
')'=27
|
||||
'./'=23
|
||||
']'=30
|
||||
RULE_LUA_CODE=18
|
||||
RULE_ID=10
|
||||
RULE_IFDEF=6
|
||||
T__29=29
|
||||
T__28=28
|
||||
T__27=27
|
||||
T__26=26
|
||||
T__25=25
|
||||
T__24=24
|
||||
T__23=23
|
||||
T__22=22
|
||||
RULE_ANY_OTHER=12
|
||||
T__21=21
|
||||
T__20=20
|
||||
RULE_IFNDEF=7
|
||||
RULE_EOL=4
|
||||
RULE_TEXTDOMAIN=17
|
||||
RULE_IFNHAVE=9
|
||||
RULE_SL_COMMENT=5
|
||||
T__30=30
|
||||
T__31=31
|
||||
RULE_STRING=11
|
||||
T__32=32
|
||||
T__33=33
|
||||
RULE_ENDIF=16
|
||||
T__34=34
|
||||
RULE_DEFINE=13
|
||||
RULE_ENDDEF=14
|
||||
RULE_IFHAVE=8
|
||||
RULE_WS=19
|
||||
RULE_ELSE=15
|
||||
'$'=24
|
||||
'}'=34
|
||||
'~'=21
|
||||
'/'=25
|
||||
'{'=33
|
||||
'='=28
|
||||
'('=26
|
||||
'['=29
|
||||
'[/'=32
|
||||
'+'=31
|
||||
'_'=20
|
||||
'.'=22
|
||||
')'=27
|
||||
'./'=23
|
||||
']'=30
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,74 +0,0 @@
|
|||
lexer grammar InternalWML;
|
||||
@header {
|
||||
package org.wesnoth.ui.contentassist.antlr.internal;
|
||||
|
||||
// Hack: Use our own Lexer superclass by means of import.
|
||||
// Currently there is no other way to specify the superclass for the lexer.
|
||||
import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.Lexer;
|
||||
}
|
||||
|
||||
T20 : '_' ;
|
||||
T21 : '~' ;
|
||||
T22 : '.' ;
|
||||
T23 : './' ;
|
||||
T24 : '$' ;
|
||||
T25 : '/' ;
|
||||
T26 : '(' ;
|
||||
T27 : ')' ;
|
||||
T28 : '=' ;
|
||||
T29 : '[' ;
|
||||
T30 : ']' ;
|
||||
T31 : '+' ;
|
||||
T32 : '[/' ;
|
||||
T33 : '{' ;
|
||||
T34 : '}' ;
|
||||
|
||||
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2602
|
||||
RULE_LUA_CODE : '<<' ( options {greedy=false;} : . )*'>>';
|
||||
|
||||
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2604
|
||||
RULE_IFHAVE : '#ifhave' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
||||
|
||||
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2606
|
||||
RULE_IFNHAVE : '#ifnhave' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
||||
|
||||
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2608
|
||||
RULE_IFDEF : '#ifdef' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
||||
|
||||
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2610
|
||||
RULE_IFNDEF : '#ifndef' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
||||
|
||||
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2612
|
||||
RULE_ELSE : '#else' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
||||
|
||||
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2614
|
||||
RULE_ENDIF : '#endif' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
||||
|
||||
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2616
|
||||
RULE_DEFINE : '#define' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
||||
|
||||
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2618
|
||||
RULE_ENDDEF : '#enddef' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
||||
|
||||
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2620
|
||||
RULE_TEXTDOMAIN : '#textdomain' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
||||
|
||||
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2622
|
||||
RULE_STRING : '"' ('\\' ('b'|'t'|'n'|'f'|'r'|'"'|'\''|'\\')|~(('\\'|'"')))* '"';
|
||||
|
||||
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2624
|
||||
RULE_ID : ('a'..'z'|'A'..'Z'|'0'..'9'|'_'|'-'|',')+;
|
||||
|
||||
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2626
|
||||
RULE_EOL : ('\r'|'\n');
|
||||
|
||||
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2628
|
||||
RULE_WS : (' '|'\t')+;
|
||||
|
||||
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2630
|
||||
RULE_ANY_OTHER : .;
|
||||
|
||||
// $ANTLR src "../org.wesnoth.ui/src-gen/org/wesnoth/ui/contentassist/antlr/internal/InternalWML.g" 2632
|
||||
RULE_SL_COMMENT : '#' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
||||
|
||||
|
|
@ -1,24 +1,25 @@
|
|||
|
||||
/*
|
||||
* generated by Xtext
|
||||
*/
|
||||
package org.wesnoth.ui.internal;
|
||||
|
||||
import static com.google.inject.util.Modules.override;
|
||||
import static com.google.inject.Guice.createInjector;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
import com.google.inject.Guice;
|
||||
import com.google.inject.Injector;
|
||||
import com.google.inject.Module;
|
||||
import com.google.inject.util.Modules;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* Generated
|
||||
* This class was generated. Customizations should only happen in a newly
|
||||
* introduced subclass.
|
||||
*/
|
||||
public class WMLActivator extends AbstractUIPlugin {
|
||||
|
||||
|
@ -34,10 +35,7 @@ public class WMLActivator extends AbstractUIPlugin {
|
|||
super.start(context);
|
||||
INSTANCE = this;
|
||||
try {
|
||||
|
||||
injectors.put("org.wesnoth.WML", Guice.createInjector(
|
||||
Modules.override(Modules.override(getRuntimeModule("org.wesnoth.WML")).with(getUiModule("org.wesnoth.WML"))).with(getSharedStateModule())
|
||||
));
|
||||
registerInjectorFor("org.wesnoth.WML");
|
||||
|
||||
} catch (Exception e) {
|
||||
Logger.getLogger(getClass()).error(e.getMessage(), e);
|
||||
|
@ -45,20 +43,31 @@ public class WMLActivator extends AbstractUIPlugin {
|
|||
}
|
||||
}
|
||||
|
||||
protected void registerInjectorFor(String language) throws Exception {
|
||||
injectors.put(language, createInjector(
|
||||
override(override(getRuntimeModule(language)).with(getSharedStateModule())).with(getUiModule(language))));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stop(BundleContext context) throws Exception {
|
||||
injectors.clear();
|
||||
INSTANCE = null;
|
||||
super.stop(context);
|
||||
}
|
||||
|
||||
public static WMLActivator getInstance() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
protected Module getRuntimeModule(String grammar) {
|
||||
|
||||
if ("org.wesnoth.WML".equals(grammar)) {
|
||||
return new org.wesnoth.WMLRuntimeModule();
|
||||
}
|
||||
|
||||
throw new IllegalArgumentException(grammar);
|
||||
}
|
||||
|
||||
protected Module getUiModule(String grammar) {
|
||||
|
||||
if ("org.wesnoth.WML".equals(grammar)) {
|
||||
return new org.wesnoth.ui.WMLUiModule(this);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
/*
|
||||
* generated by Xtext
|
||||
*/
|
||||
package org.wesnoth.ui.outline;
|
||||
|
||||
import org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider;
|
||||
|
||||
/**
|
||||
* customization of the default outline structure
|
||||
*
|
||||
*/
|
||||
public class WMLOutlineTreeProvider extends DefaultOutlineTreeProvider {
|
||||
|
||||
}
|
|
@ -14,5 +14,4 @@
|
|||
|
||||
|
||||
|
||||
|
||||
</plugin>
|
||||
|
|
|
@ -45,7 +45,7 @@ public abstract class AbstractWMLRuntimeModule extends DefaultRuntimeModule {
|
|||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
|
||||
public Class<? extends org.eclipse.xtext.parser.antlr.IAntlrParser> bindIAntlrParser() {
|
||||
public Class<? extends org.eclipse.xtext.parser.IParser> bindIParser() {
|
||||
return org.wesnoth.parser.antlr.WMLParser.class;
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ public abstract class AbstractWMLRuntimeModule extends DefaultRuntimeModule {
|
|||
|
||||
// contributed by org.eclipse.xtext.generator.scoping.AbstractScopingFragment
|
||||
public void configureIScopeProviderDelegate(com.google.inject.Binder binder) {
|
||||
binder.bind(org.eclipse.xtext.scoping.IScopeProvider.class).annotatedWith(com.google.inject.name.Names.named("org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider.delegate")).to(org.eclipse.xtext.scoping.impl.ImportedNamespaceAwareLocalScopeProvider.class);
|
||||
binder.bind(org.eclipse.xtext.scoping.IScopeProvider.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider.NAMED_DELEGATE)).to(org.eclipse.xtext.scoping.impl.ImportedNamespaceAwareLocalScopeProvider.class);
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.scoping.AbstractScopingFragment
|
||||
|
@ -99,6 +99,11 @@ public abstract class AbstractWMLRuntimeModule extends DefaultRuntimeModule {
|
|||
return org.eclipse.xtext.scoping.impl.DefaultGlobalScopeProvider.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.scoping.AbstractScopingFragment
|
||||
public void configureIgnoreCaseLinking(com.google.inject.Binder binder) {
|
||||
binder.bindConstant().annotatedWith(org.eclipse.xtext.scoping.IgnoreCaseLinking.class).to(false);
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.exporting.QualifiedNamesFragment
|
||||
public Class<? extends org.eclipse.xtext.naming.IQualifiedNameProvider> bindIQualifiedNameProvider() {
|
||||
return org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider.class;
|
||||
|
@ -121,7 +126,7 @@ public abstract class AbstractWMLRuntimeModule extends DefaultRuntimeModule {
|
|||
|
||||
// contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
|
||||
public void configureIResourceDescriptionsBuilderScope(com.google.inject.Binder binder) {
|
||||
binder.bind(org.eclipse.xtext.resource.IResourceDescriptions.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.scoping.impl.AbstractGlobalScopeProvider.NAMED_BUILDER_SCOPE)).to(org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions.class);
|
||||
binder.bind(org.eclipse.xtext.resource.IResourceDescriptions.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions.class);
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.generator.formatting.FormatterFragment
|
||||
|
|
|
@ -5,55 +5,62 @@
|
|||
nsURI="http://www.wesnoth.org/WML" nsPrefix="wml">
|
||||
<eClassifiers xsi:type="ecore:EClass" name="WMLRoot">
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="Expressions" upperBound="-1"
|
||||
eType="#//WMLRootExpression" containment="true"/>
|
||||
eType="ecore:EClass platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLRootExpression"
|
||||
containment="true"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="WMLTag" eSuperTypes="#//WMLRootExpression">
|
||||
<eClassifiers xsi:type="ecore:EClass" name="WMLTag" eSuperTypes="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLRootExpression">
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="plus" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
|
||||
defaultValueLiteral=""/>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="Expressions" upperBound="-1"
|
||||
eType="#//WMLExpression" containment="true"/>
|
||||
eType="ecore:EClass platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLExpression"
|
||||
containment="true"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="endName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="WMLKey" eSuperTypes="#//WMLExpression">
|
||||
<eClassifiers xsi:type="ecore:EClass" name="WMLKey" eSuperTypes="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLExpression">
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="value" upperBound="-1"
|
||||
eType="#//WMLKeyValue" containment="true"/>
|
||||
eType="ecore:EClass platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLKeyValue"
|
||||
containment="true"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="eol" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="WMLKeyValue"/>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="WMLMacroCall" eSuperTypes="#//WMLKeyValue #//WMLMacroCallParameter #//WMLRootExpression">
|
||||
<eClassifiers xsi:type="ecore:EClass" name="WMLMacroCall" eSuperTypes="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLKeyValue platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLMacroCallParameter platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLRootExpression">
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="point" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
|
||||
defaultValueLiteral=""/>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="relative" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
|
||||
defaultValueLiteral=""/>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="Parameters" upperBound="-1"
|
||||
eType="#//WMLMacroCallParameter" containment="true"/>
|
||||
eType="ecore:EClass platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLMacroCallParameter"
|
||||
containment="true"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="WMLMacroCallParameter"/>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="WMLArrayCall" eSuperTypes="#//WMLKeyValue">
|
||||
<eClassifiers xsi:type="ecore:EClass" name="WMLArrayCall" eSuperTypes="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLKeyValue">
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="value" unique="false" upperBound="-1"
|
||||
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="WMLMacroDefine" eSuperTypes="#//WMLRootExpression">
|
||||
<eClassifiers xsi:type="ecore:EClass" name="WMLMacroDefine" eSuperTypes="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLRootExpression">
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="Expressions" upperBound="-1"
|
||||
eType="#//WMLValuedExpression" containment="true"/>
|
||||
eType="ecore:EClass platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLValuedExpression"
|
||||
containment="true"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="endName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="WMLPreprocIF" eSuperTypes="#//WMLRootExpression">
|
||||
<eClassifiers xsi:type="ecore:EClass" name="WMLPreprocIF" eSuperTypes="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLRootExpression">
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="Expressions" upperBound="-1"
|
||||
eType="#//WMLValuedExpression" containment="true"/>
|
||||
eType="ecore:EClass platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLValuedExpression"
|
||||
containment="true"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="Elses" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="ElseExpressions" upperBound="-1"
|
||||
eType="#//WMLValuedExpression" containment="true"/>
|
||||
eType="ecore:EClass platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLValuedExpression"
|
||||
containment="true"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="endName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="WMLRootExpression" eSuperTypes="#//WMLExpression"/>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="WMLExpression" eSuperTypes="#//WMLValuedExpression">
|
||||
<eClassifiers xsi:type="ecore:EClass" name="WMLRootExpression" eSuperTypes="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLExpression"/>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="WMLExpression" eSuperTypes="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLValuedExpression">
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
|
||||
defaultValueLiteral=""/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="WMLValuedExpression"/>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="WMLTextdomain" eSuperTypes="#//WMLRootExpression"/>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="WMLLuaCode" eSuperTypes="#//WMLKeyValue">
|
||||
<eClassifiers xsi:type="ecore:EClass" name="WMLTextdomain" eSuperTypes="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLRootExpression"/>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="WMLLuaCode" eSuperTypes="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLKeyValue">
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
</eClassifiers>
|
||||
</ecore:EPackage>
|
||||
|
|
|
@ -7,47 +7,47 @@
|
|||
rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" complianceLevel="5.0"
|
||||
copyrightFields="false" editPluginID="org.wesnoth.edit" editorPluginID="org.wesnoth.editor">
|
||||
<genPackages prefix="Wml" basePackage="org.wesnoth" disposableProviderFactory="true"
|
||||
ecorePackage="WML.ecore#/">
|
||||
<genClasses ecoreClass="WML.ecore#//WMLRoot">
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference WML.ecore#//WMLRoot/Expressions"/>
|
||||
ecorePackage="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#/">
|
||||
<genClasses ecoreClass="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLRoot">
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLRoot/Expressions"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="WML.ecore#//WMLTag">
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute WML.ecore#//WMLTag/plus"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference WML.ecore#//WMLTag/Expressions"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute WML.ecore#//WMLTag/endName"/>
|
||||
<genClasses ecoreClass="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLTag">
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLTag/plus"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLTag/Expressions"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLTag/endName"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="WML.ecore#//WMLKey">
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference WML.ecore#//WMLKey/value"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute WML.ecore#//WMLKey/eol"/>
|
||||
<genClasses ecoreClass="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLKey">
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLKey/value"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLKey/eol"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="WML.ecore#//WMLKeyValue"/>
|
||||
<genClasses ecoreClass="WML.ecore#//WMLMacroCall">
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute WML.ecore#//WMLMacroCall/point"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute WML.ecore#//WMLMacroCall/relative"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference WML.ecore#//WMLMacroCall/Parameters"/>
|
||||
<genClasses ecoreClass="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLKeyValue"/>
|
||||
<genClasses ecoreClass="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLMacroCall">
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLMacroCall/point"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLMacroCall/relative"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLMacroCall/Parameters"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="WML.ecore#//WMLMacroCallParameter"/>
|
||||
<genClasses ecoreClass="WML.ecore#//WMLArrayCall">
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute WML.ecore#//WMLArrayCall/value"/>
|
||||
<genClasses ecoreClass="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLMacroCallParameter"/>
|
||||
<genClasses ecoreClass="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLArrayCall">
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLArrayCall/value"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="WML.ecore#//WMLMacroDefine">
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference WML.ecore#//WMLMacroDefine/Expressions"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute WML.ecore#//WMLMacroDefine/endName"/>
|
||||
<genClasses ecoreClass="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLMacroDefine">
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLMacroDefine/Expressions"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLMacroDefine/endName"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="WML.ecore#//WMLPreprocIF">
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference WML.ecore#//WMLPreprocIF/Expressions"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute WML.ecore#//WMLPreprocIF/Elses"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference WML.ecore#//WMLPreprocIF/ElseExpressions"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute WML.ecore#//WMLPreprocIF/endName"/>
|
||||
<genClasses ecoreClass="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLPreprocIF">
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLPreprocIF/Expressions"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLPreprocIF/Elses"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLPreprocIF/ElseExpressions"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLPreprocIF/endName"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="WML.ecore#//WMLRootExpression"/>
|
||||
<genClasses ecoreClass="WML.ecore#//WMLExpression">
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute WML.ecore#//WMLExpression/name"/>
|
||||
<genClasses ecoreClass="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLRootExpression"/>
|
||||
<genClasses ecoreClass="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLExpression">
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLExpression/name"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="WML.ecore#//WMLValuedExpression"/>
|
||||
<genClasses ecoreClass="WML.ecore#//WMLTextdomain"/>
|
||||
<genClasses ecoreClass="WML.ecore#//WMLLuaCode">
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute WML.ecore#//WMLLuaCode/value"/>
|
||||
<genClasses ecoreClass="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLValuedExpression"/>
|
||||
<genClasses ecoreClass="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLTextdomain"/>
|
||||
<genClasses ecoreClass="platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLLuaCode">
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute platform:/resource/org.wesnoth/src-gen/org/wesnoth/WML.ecore#//WMLLuaCode/value"/>
|
||||
</genClasses>
|
||||
</genPackages>
|
||||
</genmodel:GenModel>
|
||||
|
|
|
@ -47,6 +47,5 @@ public class WMLStandaloneSetupGenerated implements ISetup {
|
|||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,14 +3,9 @@
|
|||
*/
|
||||
package org.wesnoth.parser.antlr;
|
||||
|
||||
import org.antlr.runtime.CharStream;
|
||||
import org.antlr.runtime.TokenSource;
|
||||
import org.eclipse.xtext.parser.IParseResult;
|
||||
import org.eclipse.xtext.parser.ParseException;
|
||||
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
|
||||
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
|
||||
import org.wesnoth.services.WMLGrammarAccess;
|
||||
|
||||
public class WMLParser extends org.eclipse.xtext.parser.antlr.AbstractAntlrParser {
|
||||
|
@ -19,25 +14,13 @@ public class WMLParser extends org.eclipse.xtext.parser.antlr.AbstractAntlrParse
|
|||
private WMLGrammarAccess grammarAccess;
|
||||
|
||||
@Override
|
||||
protected IParseResult parse(String ruleName, CharStream in) {
|
||||
TokenSource tokenSource = createLexer(in);
|
||||
XtextTokenStream tokenStream = createTokenStream(tokenSource);
|
||||
protected void setInitialHiddenTokens(XtextTokenStream tokenStream) {
|
||||
tokenStream.setInitialHiddenTokens("RULE_EOL", "RULE_WS", "RULE_SL_COMMENT");
|
||||
org.wesnoth.parser.antlr.internal.InternalWMLParser parser = createParser(tokenStream);
|
||||
parser.setTokenTypeMap(getTokenDefProvider().getTokenDefMap());
|
||||
parser.setSyntaxErrorProvider(getSyntaxErrorProvider());
|
||||
parser.setUnorderedGroupHelper(getUnorderedGroupHelper().get());
|
||||
try {
|
||||
if(ruleName != null)
|
||||
return parser.parse(ruleName);
|
||||
return parser.parse();
|
||||
} catch (Exception re) {
|
||||
throw new ParseException(re.getMessage(),re);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected org.wesnoth.parser.antlr.internal.InternalWMLParser createParser(XtextTokenStream stream) {
|
||||
return new org.wesnoth.parser.antlr.internal.InternalWMLParser(stream, getElementFactory(), getGrammarAccess());
|
||||
return new org.wesnoth.parser.antlr.internal.InternalWMLParser(stream, getGrammarAccess());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,31 +1,46 @@
|
|||
RULE_LUA_CODE=16
|
||||
RULE_ID=4
|
||||
RULE_IFDEF=9
|
||||
RULE_ANY_OTHER=18
|
||||
RULE_IFNDEF=10
|
||||
RULE_EOL=5
|
||||
RULE_TEXTDOMAIN=15
|
||||
RULE_IFNHAVE=12
|
||||
RULE_SL_COMMENT=6
|
||||
RULE_STRING=17
|
||||
RULE_ENDIF=14
|
||||
RULE_DEFINE=7
|
||||
RULE_ENDDEF=8
|
||||
RULE_IFHAVE=11
|
||||
RULE_WS=19
|
||||
RULE_ELSE=13
|
||||
'$'=31
|
||||
'}'=28
|
||||
'~'=27
|
||||
'/'=32
|
||||
'{'=25
|
||||
'='=24
|
||||
'('=33
|
||||
'['=20
|
||||
'[/'=23
|
||||
'+'=21
|
||||
'_'=29
|
||||
')'=34
|
||||
'.'=30
|
||||
']'=22
|
||||
'./'=26
|
||||
RULE_LUA_CODE=16
|
||||
RULE_IFDEF=9
|
||||
RULE_ID=4
|
||||
T__29=29
|
||||
T__28=28
|
||||
T__27=27
|
||||
T__26=26
|
||||
T__25=25
|
||||
T__24=24
|
||||
T__23=23
|
||||
T__22=22
|
||||
RULE_ANY_OTHER=18
|
||||
T__21=21
|
||||
T__20=20
|
||||
RULE_IFNDEF=10
|
||||
RULE_EOL=5
|
||||
RULE_TEXTDOMAIN=15
|
||||
RULE_IFNHAVE=12
|
||||
RULE_SL_COMMENT=6
|
||||
T__30=30
|
||||
T__31=31
|
||||
RULE_STRING=17
|
||||
T__32=32
|
||||
T__33=33
|
||||
RULE_ENDIF=14
|
||||
T__34=34
|
||||
RULE_DEFINE=7
|
||||
RULE_ENDDEF=8
|
||||
RULE_IFHAVE=11
|
||||
RULE_WS=19
|
||||
RULE_ELSE=13
|
||||
'$'=31
|
||||
'}'=28
|
||||
'~'=27
|
||||
'/'=32
|
||||
'{'=25
|
||||
'='=24
|
||||
'('=33
|
||||
'['=20
|
||||
'[/'=23
|
||||
'+'=21
|
||||
'_'=29
|
||||
')'=34
|
||||
'.'=30
|
||||
']'=22
|
||||
'./'=26
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,74 +0,0 @@
|
|||
lexer grammar InternalWML;
|
||||
@header {
|
||||
package org.wesnoth.parser.antlr.internal;
|
||||
|
||||
// Hack: Use our own Lexer superclass by means of import.
|
||||
// Currently there is no other way to specify the superclass for the lexer.
|
||||
import org.eclipse.xtext.parser.antlr.Lexer;
|
||||
}
|
||||
|
||||
T20 : '[' ;
|
||||
T21 : '+' ;
|
||||
T22 : ']' ;
|
||||
T23 : '[/' ;
|
||||
T24 : '=' ;
|
||||
T25 : '{' ;
|
||||
T26 : './' ;
|
||||
T27 : '~' ;
|
||||
T28 : '}' ;
|
||||
T29 : '_' ;
|
||||
T30 : '.' ;
|
||||
T31 : '$' ;
|
||||
T32 : '/' ;
|
||||
T33 : '(' ;
|
||||
T34 : ')' ;
|
||||
|
||||
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1493
|
||||
RULE_LUA_CODE : '<<' ( options {greedy=false;} : . )*'>>';
|
||||
|
||||
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1495
|
||||
RULE_IFHAVE : '#ifhave' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
||||
|
||||
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1497
|
||||
RULE_IFNHAVE : '#ifnhave' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
||||
|
||||
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1499
|
||||
RULE_IFDEF : '#ifdef' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
||||
|
||||
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1501
|
||||
RULE_IFNDEF : '#ifndef' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
||||
|
||||
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1503
|
||||
RULE_ELSE : '#else' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
||||
|
||||
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1505
|
||||
RULE_ENDIF : '#endif' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
||||
|
||||
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1507
|
||||
RULE_DEFINE : '#define' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
||||
|
||||
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1509
|
||||
RULE_ENDDEF : '#enddef' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
||||
|
||||
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1511
|
||||
RULE_TEXTDOMAIN : '#textdomain' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
||||
|
||||
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1513
|
||||
RULE_STRING : '"' ('\\' ('b'|'t'|'n'|'f'|'r'|'"'|'\''|'\\')|~(('\\'|'"')))* '"';
|
||||
|
||||
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1515
|
||||
RULE_ID : ('a'..'z'|'A'..'Z'|'0'..'9'|'_'|'-'|',')+;
|
||||
|
||||
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1517
|
||||
RULE_EOL : ('\r'|'\n');
|
||||
|
||||
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1519
|
||||
RULE_WS : (' '|'\t')+;
|
||||
|
||||
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1521
|
||||
RULE_ANY_OTHER : .;
|
||||
|
||||
// $ANTLR src "../org.wesnoth/src-gen/org/wesnoth/parser/antlr/internal/InternalWML.g" 1523
|
||||
RULE_SL_COMMENT : '#' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
||||
|
||||
|
|
@ -10,7 +10,7 @@ import org.eclipse.xtext.validation.ComposedChecks;
|
|||
@ComposedChecks(validators= {org.eclipse.xtext.validation.ImportUriValidator.class})
|
||||
public class AbstractWMLJavaValidator extends AbstractDeclarativeValidator {
|
||||
|
||||
@Override
|
||||
@Override
|
||||
protected List<EPackage> getEPackages() {
|
||||
List<EPackage> result = new ArrayList<EPackage>();
|
||||
result.add(org.wesnoth.wml.WmlPackage.eINSTANCE);
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
*/
|
||||
package org.wesnoth.wml.util;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.emf.ecore.EClass;
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
import org.eclipse.emf.ecore.EPackage;
|
||||
|
||||
import org.eclipse.emf.ecore.util.Switch;
|
||||
|
||||
import org.wesnoth.wml.*;
|
||||
|
||||
|
@ -26,7 +26,7 @@ import org.wesnoth.wml.*;
|
|||
* @see org.wesnoth.wml.WmlPackage
|
||||
* @generated
|
||||
*/
|
||||
public class WmlSwitch<T>
|
||||
public class WmlSwitch<T> extends Switch<T>
|
||||
{
|
||||
/**
|
||||
* The cached model package
|
||||
|
@ -51,38 +51,17 @@ public class WmlSwitch<T>
|
|||
}
|
||||
|
||||
/**
|
||||
* Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
|
||||
* Checks whether this is a switch for the given package.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the first non-null result returned by a <code>caseXXX</code> call.
|
||||
* @parameter ePackage the package in question.
|
||||
* @return whether this is a switch for the given package.
|
||||
* @generated
|
||||
*/
|
||||
public T doSwitch(EObject theEObject)
|
||||
@Override
|
||||
protected boolean isSwitchFor(EPackage ePackage)
|
||||
{
|
||||
return doSwitch(theEObject.eClass(), theEObject);
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the first non-null result returned by a <code>caseXXX</code> call.
|
||||
* @generated
|
||||
*/
|
||||
protected T doSwitch(EClass theEClass, EObject theEObject)
|
||||
{
|
||||
if (theEClass.eContainer() == modelPackage)
|
||||
{
|
||||
return doSwitch(theEClass.getClassifierID(), theEObject);
|
||||
}
|
||||
else
|
||||
{
|
||||
List<EClass> eSuperTypes = theEClass.getESuperTypes();
|
||||
return
|
||||
eSuperTypes.isEmpty() ?
|
||||
defaultCase(theEObject) :
|
||||
doSwitch(eSuperTypes.get(0), theEObject);
|
||||
}
|
||||
return ePackage == modelPackage;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -92,6 +71,7 @@ public class WmlSwitch<T>
|
|||
* @return the first non-null result returned by a <code>caseXXX</code> call.
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected T doSwitch(int classifierID, EObject theEObject)
|
||||
{
|
||||
switch (classifierID)
|
||||
|
@ -457,6 +437,7 @@ public class WmlSwitch<T>
|
|||
* @see #doSwitch(org.eclipse.emf.ecore.EObject)
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public T defaultCase(EObject object)
|
||||
{
|
||||
return null;
|
||||
|
|
|
@ -77,8 +77,7 @@ Workflow {
|
|||
fragment = labeling.LabelProviderFragment {}
|
||||
|
||||
// outline API
|
||||
fragment = outline.TransformerFragment {}
|
||||
fragment = outline.OutlineNodeAdapterFactoryFragment {}
|
||||
fragment = outline.OutlineTreeProviderFragment {}
|
||||
fragment = outline.QuickOutlineFragment {}
|
||||
|
||||
// quickfix API
|
||||
|
|
Loading…
Add table
Reference in a new issue