/** Actually parse org.netbeans.modules.scala.core.rats.ParserScala.CaseClause. */
private Result pCaseClause$1(final int yyStart) throws IOException {
Result yyResult;
int yyBase;
int yyOption1;
Node yyOpValue1;
Node yyValue;
ParseError yyError = ParseError.DUMMY;
// Alternative 1.
yyResult = pSKIP_N(yyStart);
yyError = yyResult.select(yyError);
if (yyResult.hasValue()) {
yyBase = yyResult.index;
yyResult = pkey(yyBase);
if (yyResult.hasValue("case")) {
yyResult = pENTER_NL_DISABLE(yyResult.index);
yyError = yyResult.select(yyError);
if (yyResult.hasValue()) {
final int yyChoice1 = yyResult.index;
// Nested alternative 1.
yyResult = pCaseClause$$Choice1(yyChoice1);
yyError = yyResult.select(yyError);
if (yyResult.hasValue()) {
Object v$g$1 = yyResult.semanticValue();
yyBase = yyResult.index;
yyResult = pkey(yyBase);
if (yyResult.hasValue(":")) {
yyResult = pFunTypeInCaseClause(yyResult.index);
yyError = yyResult.select(yyError);
if (yyResult.hasValue()) {
Node v$g$2 = yyResult.semanticValue();
yyResult = pEXIT_NL_DISABLE(yyResult.index);
yyError = yyResult.select(yyError);
if (yyResult.hasValue()) {
yyResult = pBlock(yyResult.index);
yyError = yyResult.select(yyError);
if (yyResult.hasValue()) {
Node v$g$3 = yyResult.semanticValue();
yyValue = GNode.create("CaseClause", v$g$1, v$g$2, v$g$3);
yyValue.setLocation(location(yyStart));
return yyResult.createValue(yyValue, yyError);
}
}
}
} else {
yyError = yyError.select("':' expected", yyBase);
}
}
// Nested alternative 2.
yyResult = pPattern(yyChoice1);
yyError = yyResult.select(yyError);
if (yyResult.hasValue()) {
Node v$g$4 = yyResult.semanticValue();
yyResult = p$$Shared2(yyResult.index);
yyError = yyResult.select(yyError);
if (yyResult.hasValue()) {
yyOption1 = yyResult.index;
yyOpValue1 = null;
yyResult = pGuard(yyOption1);
yyError = yyResult.select(yyError, yyOption1);
if (yyResult.hasValue()) {
Node v$el$3 = yyResult.semanticValue();
yyOption1 = yyResult.index;
yyOpValue1 = v$el$3;
}
{ // Start scope for v$g$5.
Node v$g$5 = yyOpValue1;
yyBase = yyOption1;
yyResult = pkey(yyBase);
if (yyResult.hasValue("=>")) {
yyResult = pEXIT_NL_DISABLE(yyResult.index);
yyError = yyResult.select(yyError);
if (yyResult.hasValue()) {
yyResult = pBlock(yyResult.index);
yyError = yyResult.select(yyError);
if (yyResult.hasValue()) {
Node v$g$6 = yyResult.semanticValue();
yyValue = GNode.create("CaseClause", v$g$4, v$g$5, v$g$6);
yyValue.setLocation(location(yyStart));
return yyResult.createValue(yyValue, yyError);