use of org.eclipse.xtext.parser.parameters.parametersTestLanguage.ParserRuleParameters in project xtext-core by eclipse.
the class AbstractParametersParsingTest method testScenario11_keyword_keyword.
@Test
public void testScenario11_keyword_keyword() {
try {
final ParserRuleParameters instance = this.getModel("#11 keyword keyword");
Assert.assertEquals("keyword", instance.getScenario().getFirst());
} catch (Throwable _e) {
throw Exceptions.sneakyThrow(_e);
}
}
use of org.eclipse.xtext.parser.parameters.parametersTestLanguage.ParserRuleParameters in project xtext-core by eclipse.
the class AbstractParametersParsingTest method testScenario6_id.
@Test
public void testScenario6_id() {
try {
final ParserRuleParameters instance = this.getModel("#6 id");
Assert.assertEquals("id", instance.getScenario().getFirst());
} catch (Throwable _e) {
throw Exceptions.sneakyThrow(_e);
}
}
use of org.eclipse.xtext.parser.parameters.parametersTestLanguage.ParserRuleParameters in project xtext-core by eclipse.
the class ParametersTestLanguageExSemanticSequencer method sequence.
@Override
public void sequence(ISerializationContext context, EObject semanticObject) {
EPackage epackage = semanticObject.eClass().getEPackage();
ParserRule rule = context.getParserRule();
Action action = context.getAssignedAction();
Set<Parameter> parameters = context.getEnabledBooleanParameters();
if (epackage == ParametersTestLanguagePackage.eINSTANCE)
switch(semanticObject.eClass().getClassifierID()) {
case ParametersTestLanguagePackage.PARSER_RULE_PARAMETERS:
sequence_ParserRuleParameters(context, (ParserRuleParameters) semanticObject);
return;
case ParametersTestLanguagePackage.SCENARIO:
if (rule == grammarAccess.getScenario1Rule() && (parameters.isEmpty()) || rule == grammarAccess.getParametersTestLanguageScenario1Rule() && (parameters.isEmpty())) {
sequence_Scenario1$Param$false$(context, (Scenario) semanticObject);
return;
} else if (rule == grammarAccess.getScenario1Rule() && (ImmutableSet.of(grammarAccess.getScenario1Rule().getParameters().get(0)).equals(parameters)) || rule == grammarAccess.getParametersTestLanguageScenario1Rule() && (ImmutableSet.of(grammarAccess.getParametersTestLanguageScenario1Rule().getParameters().get(0)).equals(parameters))) {
sequence_Scenario1$Param$true$(context, (Scenario) semanticObject);
return;
} else if (rule == grammarAccess.getScenario2Rule()) {
sequence_Scenario2(context, (Scenario) semanticObject);
return;
} else if (rule == grammarAccess.getScenario3Rule()) {
sequence_Scenario3(context, (Scenario) semanticObject);
return;
} else if (rule == grammarAccess.getScenario4Rule()) {
sequence_Scenario4(context, (Scenario) semanticObject);
return;
} else
break;
}
if (errorAcceptor != null)
errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
use of org.eclipse.xtext.parser.parameters.parametersTestLanguage.ParserRuleParameters in project xtext-core by eclipse.
the class ParametersTestLanguageSemanticSequencer method sequence.
@Override
public void sequence(ISerializationContext context, EObject semanticObject) {
EPackage epackage = semanticObject.eClass().getEPackage();
ParserRule rule = context.getParserRule();
Action action = context.getAssignedAction();
Set<Parameter> parameters = context.getEnabledBooleanParameters();
if (epackage == ParametersTestLanguagePackage.eINSTANCE)
switch(semanticObject.eClass().getClassifierID()) {
case ParametersTestLanguagePackage.PARSER_RULE_PARAMETERS:
sequence_ParserRuleParameters(context, (ParserRuleParameters) semanticObject);
return;
case ParametersTestLanguagePackage.SCENARIO:
if (rule == grammarAccess.getScenario1Rule() && (parameters.isEmpty())) {
sequence_Scenario1$Param$false$(context, (Scenario) semanticObject);
return;
} else if (rule == grammarAccess.getScenario1Rule() && (ImmutableSet.of(grammarAccess.getScenario1Rule().getParameters().get(0)).equals(parameters))) {
sequence_Scenario1$Param$true$(context, (Scenario) semanticObject);
return;
} else if (rule == grammarAccess.getScenario2Rule()) {
sequence_Scenario2(context, (Scenario) semanticObject);
return;
} else if (rule == grammarAccess.getScenario3Rule()) {
sequence_Scenario3(context, (Scenario) semanticObject);
return;
} else if (rule == grammarAccess.getScenario4Rule()) {
sequence_Scenario4(context, (Scenario) semanticObject);
return;
} else
break;
}
if (errorAcceptor != null)
errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
use of org.eclipse.xtext.parser.parameters.parametersTestLanguage.ParserRuleParameters in project xtext-core by eclipse.
the class TwoParametersTestLanguageSemanticSequencer method sequence.
@Override
public void sequence(ISerializationContext context, EObject semanticObject) {
EPackage epackage = semanticObject.eClass().getEPackage();
ParserRule rule = context.getParserRule();
Action action = context.getAssignedAction();
Set<Parameter> parameters = context.getEnabledBooleanParameters();
if (epackage == ParametersTestLanguagePackage.eINSTANCE)
switch(semanticObject.eClass().getClassifierID()) {
case ParametersTestLanguagePackage.PARSER_RULE_PARAMETERS:
sequence_ParserRuleParameters(context, (ParserRuleParameters) semanticObject);
return;
case ParametersTestLanguagePackage.SCENARIO:
if (rule == grammarAccess.getScenario1Rule() && (parameters.isEmpty())) {
sequence_Scenario1$Param$false$(context, (Scenario) semanticObject);
return;
} else if (rule == grammarAccess.getScenario1Rule() && (ImmutableSet.of(grammarAccess.getScenario1Rule().getParameters().get(0)).equals(parameters))) {
sequence_Scenario1$Param$true$(context, (Scenario) semanticObject);
return;
} else if (rule == grammarAccess.getScenario2Rule()) {
sequence_Scenario2(context, (Scenario) semanticObject);
return;
} else if (rule == grammarAccess.getScenario3Rule()) {
sequence_Scenario3(context, (Scenario) semanticObject);
return;
} else if (rule == grammarAccess.getScenario4Rule()) {
sequence_Scenario4(context, (Scenario) semanticObject);
return;
} else if (rule == grammarAccess.getScenario5Rule() && (ImmutableSet.of(grammarAccess.getScenario5Rule().getParameters().get(0), grammarAccess.getScenario5Rule().getParameters().get(1)).equals(parameters))) {
sequence_Scenario5$A$true$B$true$(context, (Scenario) semanticObject);
return;
} else if (rule == grammarAccess.getScenario5Rule() && (ImmutableSet.of(grammarAccess.getScenario5Rule().getParameters().get(0)).equals(parameters) || ImmutableSet.of(grammarAccess.getScenario5Rule().getParameters().get(1)).equals(parameters) || parameters.isEmpty())) {
sequence_Scenario5(context, (Scenario) semanticObject);
return;
} else if (rule == grammarAccess.getScenario6Rule()) {
sequence_Scenario6(context, (Scenario) semanticObject);
return;
} else if (rule == grammarAccess.getScenario7Rule()) {
sequence_Scenario7(context, (Scenario) semanticObject);
return;
} else if (rule == grammarAccess.getScenario8Rule()) {
sequence_Scenario8(context, (Scenario) semanticObject);
return;
} else
break;
}
if (errorAcceptor != null)
errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Aggregations