Skip to content
Snippets Groups Projects
Commit 9c37d791 authored by Markus Hamann's avatar Markus Hamann
Browse files

Add first version of the pipeline

parent e87dab8b
No related branches found
No related tags found
No related merge requests found
Showing
with 11595 additions and 0 deletions
'-'=23
'->'=24
'/'=27
'StateMachine'=14
'['=25
']'=26
'do:'=19
'end'=21
'entry:'=18
'exit:'=20
'start'=22
'state'=17
'{'=15
'}'=16
RULE_ANY_OTHER=13
RULE_CALL=6
RULE_FINALSTATENAME=8
RULE_ID=5
RULE_INITIALSTATENAME=7
RULE_INT=9
RULE_ML_COMMENT=10
RULE_SL_COMMENT=11
RULE_STRING=4
RULE_WS=12
T__14=14
T__15=15
T__16=16
T__17=17
T__18=18
T__19=19
T__20=20
T__21=21
T__22=22
T__23=23
T__24=24
T__25=25
T__26=26
T__27=27
source.. = src/,\
src-gen/,\
xtend-gen/
bin.includes = .,\
META-INF/
bin.excludes = **/*.xtend
swt.most.statemachine.xtext.ide.ParserIdeSetup
/*
* generated by Xtext 2.35.0
*/
package swt.most.statemachine.xtext.ide;
import com.google.inject.Binder;
import com.google.inject.name.Names;
import org.eclipse.xtext.ide.DefaultIdeModule;
import org.eclipse.xtext.ide.LexerIdeBindings;
import org.eclipse.xtext.ide.editor.contentassist.FQNPrefixMatcher;
import org.eclipse.xtext.ide.editor.contentassist.IPrefixMatcher;
import org.eclipse.xtext.ide.editor.contentassist.IProposalConflictHelper;
import org.eclipse.xtext.ide.editor.contentassist.antlr.AntlrProposalConflictHelper;
import org.eclipse.xtext.ide.editor.contentassist.antlr.IContentAssistParser;
import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.Lexer;
import org.eclipse.xtext.ide.refactoring.IRenameStrategy2;
import org.eclipse.xtext.ide.server.rename.IRenameService2;
import org.eclipse.xtext.ide.server.rename.RenameService2;
import swt.most.statemachine.xtext.ide.contentassist.antlr.ParserParser;
import swt.most.statemachine.xtext.ide.contentassist.antlr.internal.InternalParserLexer;
/**
* Manual modifications go to {@link ParserIdeModule}.
*/
@SuppressWarnings("all")
public abstract class AbstractParserIdeModule extends DefaultIdeModule {
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public void configureContentAssistLexer(Binder binder) {
binder.bind(Lexer.class)
.annotatedWith(Names.named(LexerIdeBindings.CONTENT_ASSIST))
.to(InternalParserLexer.class);
}
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public Class<? extends IContentAssistParser> bindIContentAssistParser() {
return ParserParser.class;
}
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
public Class<? extends IProposalConflictHelper> bindIProposalConflictHelper() {
return AntlrProposalConflictHelper.class;
}
// contributed by org.eclipse.xtext.xtext.generator.exporting.QualifiedNamesFragment2
public Class<? extends IPrefixMatcher> bindIPrefixMatcher() {
return FQNPrefixMatcher.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2
public Class<? extends IRenameService2> bindIRenameService2() {
return RenameService2.class;
}
// contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2
public Class<? extends IRenameStrategy2> bindIRenameStrategy2() {
return IRenameStrategy2.DefaultImpl.class;
}
}
/*
* generated by Xtext 2.35.0
*/
package swt.most.statemachine.xtext.ide.contentassist.antlr;
import com.google.common.collect.ImmutableMap;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import java.util.Map;
import org.eclipse.xtext.AbstractElement;
import org.eclipse.xtext.ide.editor.contentassist.antlr.AbstractContentAssistParser;
import swt.most.statemachine.xtext.ide.contentassist.antlr.internal.InternalParserParser;
import swt.most.statemachine.xtext.services.ParserGrammarAccess;
public class ParserParser extends AbstractContentAssistParser {
@Singleton
public static final class NameMappings {
private final Map<AbstractElement, String> mappings;
@Inject
public NameMappings(ParserGrammarAccess grammarAccess) {
ImmutableMap.Builder<AbstractElement, String> builder = ImmutableMap.builder();
init(builder, grammarAccess);
this.mappings = builder.build();
}
public String getRuleName(AbstractElement element) {
return mappings.get(element);
}
private static void init(ImmutableMap.Builder<AbstractElement, String> builder, ParserGrammarAccess grammarAccess) {
builder.put(grammarAccess.getStateMachineAccess().getAlternatives_5(), "rule__StateMachine__Alternatives_5");
builder.put(grammarAccess.getStateAccess().getAlternatives(), "rule__State__Alternatives");
builder.put(grammarAccess.getActivityContentAccess().getAlternatives(), "rule__ActivityContent__Alternatives");
builder.put(grammarAccess.getEStringAccess().getAlternatives(), "rule__EString__Alternatives");
builder.put(grammarAccess.getStateMachineAccess().getGroup(), "rule__StateMachine__Group__0");
builder.put(grammarAccess.getNormalStateAccess().getGroup(), "rule__NormalState__Group__0");
builder.put(grammarAccess.getNormalStateAccess().getGroup_3(), "rule__NormalState__Group_3__0");
builder.put(grammarAccess.getNormalStateAccess().getGroup_3_1(), "rule__NormalState__Group_3_1__0");
builder.put(grammarAccess.getNormalStateAccess().getGroup_3_2(), "rule__NormalState__Group_3_2__0");
builder.put(grammarAccess.getNormalStateAccess().getGroup_3_3(), "rule__NormalState__Group_3_3__0");
builder.put(grammarAccess.getFinalStateAccess().getGroup(), "rule__FinalState__Group__0");
builder.put(grammarAccess.getInitialStateAccess().getGroup(), "rule__InitialState__Group__0");
builder.put(grammarAccess.getTransitionAccess().getGroup(), "rule__Transition__Group__0");
builder.put(grammarAccess.getTransitionAccess().getGroup_4(), "rule__Transition__Group_4__0");
builder.put(grammarAccess.getTransitionAccess().getGroup_5(), "rule__Transition__Group_5__0");
builder.put(grammarAccess.getActionAccess().getGroup(), "rule__Action__Group__0");
builder.put(grammarAccess.getTriggerAccess().getGroup(), "rule__Trigger__Group__0");
builder.put(grammarAccess.getGuardAccess().getGroup(), "rule__Guard__Group__0");
builder.put(grammarAccess.getStateMachineAccess().getNameAssignment_2(), "rule__StateMachine__NameAssignment_2");
builder.put(grammarAccess.getStateMachineAccess().getInitialstateAssignment_4(), "rule__StateMachine__InitialstateAssignment_4");
builder.put(grammarAccess.getStateMachineAccess().getStatesAssignment_5_0(), "rule__StateMachine__StatesAssignment_5_0");
builder.put(grammarAccess.getStateMachineAccess().getFinalstatesAssignment_5_1(), "rule__StateMachine__FinalstatesAssignment_5_1");
builder.put(grammarAccess.getStateMachineAccess().getTransitionsAssignment_5_2(), "rule__StateMachine__TransitionsAssignment_5_2");
builder.put(grammarAccess.getNormalStateAccess().getNameAssignment_2(), "rule__NormalState__NameAssignment_2");
builder.put(grammarAccess.getNormalStateAccess().getEntry_Assignment_3_1_1(), "rule__NormalState__Entry_Assignment_3_1_1");
builder.put(grammarAccess.getNormalStateAccess().getDo_Assignment_3_2_1(), "rule__NormalState__Do_Assignment_3_2_1");
builder.put(grammarAccess.getNormalStateAccess().getExit_Assignment_3_3_1(), "rule__NormalState__Exit_Assignment_3_3_1");
builder.put(grammarAccess.getFinalStateAccess().getNameAssignment_2(), "rule__FinalState__NameAssignment_2");
builder.put(grammarAccess.getInitialStateAccess().getNameAssignment_2(), "rule__InitialState__NameAssignment_2");
builder.put(grammarAccess.getTransitionAccess().getFromAssignment_1(), "rule__Transition__FromAssignment_1");
builder.put(grammarAccess.getTransitionAccess().getTriggerAssignment_3(), "rule__Transition__TriggerAssignment_3");
builder.put(grammarAccess.getTransitionAccess().getGuardAssignment_4_1(), "rule__Transition__GuardAssignment_4_1");
builder.put(grammarAccess.getTransitionAccess().getActionAssignment_5_1(), "rule__Transition__ActionAssignment_5_1");
builder.put(grammarAccess.getTransitionAccess().getToAssignment_7(), "rule__Transition__ToAssignment_7");
builder.put(grammarAccess.getActionAccess().getContentAssignment_1(), "rule__Action__ContentAssignment_1");
builder.put(grammarAccess.getTriggerAccess().getContentAssignment_1(), "rule__Trigger__ContentAssignment_1");
builder.put(grammarAccess.getGuardAccess().getContentAssignment_1(), "rule__Guard__ContentAssignment_1");
}
}
@Inject
private NameMappings nameMappings;
@Inject
private ParserGrammarAccess grammarAccess;
@Override
protected InternalParserParser createParser() {
InternalParserParser result = new InternalParserParser(null);
result.setGrammarAccess(grammarAccess);
return result;
}
@Override
protected String getRuleName(AbstractElement element) {
return nameMappings.getRuleName(element);
}
@Override
protected String[] getInitialHiddenTokens() {
return new String[] { "RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT" };
}
public ParserGrammarAccess getGrammarAccess() {
return this.grammarAccess;
}
public void setGrammarAccess(ParserGrammarAccess grammarAccess) {
this.grammarAccess = grammarAccess;
}
public NameMappings getNameMappings() {
return nameMappings;
}
public void setNameMappings(NameMappings nameMappings) {
this.nameMappings = nameMappings;
}
}
/*
* generated by Xtext 2.35.0
*/
package swt.most.statemachine.xtext.ide.contentassist.antlr;
import java.util.Collection;
import java.util.Collections;
import org.eclipse.xtext.AbstractRule;
import org.eclipse.xtext.ide.editor.contentassist.antlr.FollowElement;
import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser;
import org.eclipse.xtext.util.PolymorphicDispatcher;
public class PartialParserContentAssistParser extends ParserParser {
private AbstractRule rule;
@Override
public void initializeFor(AbstractRule rule) {
this.rule = rule;
}
@Override
protected Collection<FollowElement> getFollowElements(AbstractInternalContentAssistParser parser) {
if (rule == null || rule.eIsProxy())
return Collections.emptyList();
String methodName = "entryRule" + rule.getName();
PolymorphicDispatcher<Collection<FollowElement>> dispatcher =
new PolymorphicDispatcher<Collection<FollowElement>>(methodName, 0, 0, Collections.singletonList(parser));
dispatcher.invoke();
return parser.getFollowElements();
}
}
'-'=23
'->'=24
'/'=27
'StateMachine'=14
'['=25
']'=26
'do:'=19
'end'=21
'entry:'=18
'exit:'=20
'start'=22
'state'=17
'{'=15
'}'=16
RULE_ANY_OTHER=13
RULE_CALL=6
RULE_FINALSTATENAME=8
RULE_ID=5
RULE_INITIALSTATENAME=7
RULE_INT=9
RULE_ML_COMMENT=10
RULE_SL_COMMENT=11
RULE_STRING=4
RULE_WS=12
T__14=14
T__15=15
T__16=16
T__17=17
T__18=18
T__19=19
T__20=20
T__21=21
T__22=22
T__23=23
T__24=24
T__25=25
T__26=26
T__27=27
/*
* generated by Xtext 2.35.0
*/
package swt.most.statemachine.xtext.ide;
/**
* Use this class to register ide components.
*/
public class ParserIdeModule extends AbstractParserIdeModule {
}
/*
* generated by Xtext 2.35.0
*/
package swt.most.statemachine.xtext.ide;
import com.google.inject.Guice;
import com.google.inject.Injector;
import org.eclipse.xtext.util.Modules2;
import swt.most.statemachine.xtext.ParserRuntimeModule;
import swt.most.statemachine.xtext.ParserStandaloneSetup;
/**
* Initialization support for running Xtext languages as language servers.
*/
public class ParserIdeSetup extends ParserStandaloneSetup {
@Override
public Injector createInjector() {
return Guice.createInjector(Modules2.mixin(new ParserRuntimeModule(), new ParserIdeModule()));
}
}
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="src-gen"/>
<classpathentry kind="src" path="xtend-gen"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment