// ------------------------------------------------------------------------------
//  <auto-generated>
//      This code was generated by Berp (http://https://github.com/gasparnagy/berp/).
// 
//      Changes to this file may cause incorrect behavior and will be lost if
//      the code is regenerated.
//  </auto-generated>
// ------------------------------------------------------------------------------


#import "GHParser.h"

#import "GHAstBuilder.h"
#import "GHToken.h"
#import "GHParserException.h"

@implementation GHParserContext

@synthesize tokenScanner;
@synthesize tokenMatcher;
@synthesize tokenQueue;
@synthesize errors;

@end

@implementation GHParser
{
    id<GHAstBuilderProtocol>    astBuilder;
}

@synthesize stopAtFirstError;

- (id)init
{
    return [self initWithAstBuilder: [[GHAstBuilder alloc] init]];
}

- (id)initWithAstBuilder:(id<GHAstBuilderProtocol>)theAstBuilder
{
    if (self = [super init])
    {
        astBuilder = theAstBuilder;
    }

    return self;
}

- (id)parseWithTokenScanner:(id<GHTokenScannerProtocol>)theTokenScanner
{
    return [self parseWithTokenScanner: theTokenScanner tokenMatcher: [[GHTokenMatcher alloc] init]];
}

- (id)parseWithTokenScanner:(id<GHTokenScannerProtocol>)theTokenScanner tokenMatcher:(id<GHTokenMatcherProtocol>)theTokenMatcher
{
    [theTokenMatcher reset];
    [astBuilder reset];

    GHParserContext * context = [[GHParserContext alloc] init];
    [context setTokenScanner: theTokenScanner];
    [context setTokenMatcher: theTokenMatcher];
    [context setTokenQueue: [[NSMutableArray<GHToken *> alloc] init]];
    [context setErrors: [[NSMutableArray<GHParserException *> alloc] init]];

    [self startRuleWithContext: context ruleType: GHRuleTypeGherkinDocument];
    NSUInteger state = 0;
    GHToken * token;
    do
    {
        token = [self readTokenWithContext: context];
        state = [self matchToken: token withState: state context: context];
    } while(![token isEOF]);

    [self endRuleWithContext: context ruleType: GHRuleTypeGherkinDocument];

    if ([[context errors] count])
    {
        @throw [[GHCompositeParserException alloc] initWithErrors: [context errors]];
    }

    return [self resultWithContext: context];
}

- (void)addError:(GHParserException *)theParserError withContext:(GHParserContext *)theContext
{
    [[theContext errors] addObject: theParserError];
    if ([[theContext errors] count] > 10)
        @throw [[GHCompositeParserException alloc] initWithErrors: [theContext errors]];
}

- (void)handleAstErrorWithContext:(GHParserContext *)theContext actionBlock:(void (^)(void))theActionBlock
{
    [self handleExternalErrorWithContext: theContext actionBlock: ^() { theActionBlock(); return YES; } defaultValue: NO];
}

- (BOOL)handleExternalErrorWithContext:(GHParserContext *)theContext actionBlock:(BOOL (^)(void))theActionBlock defaultValue:(BOOL)theDefaultValue
{
    if (stopAtFirstError)
    {
        return theActionBlock();
    }

    @try
    {
        return theActionBlock();
    }
    @catch (GHCompositeParserException * compositeParserException)
    {
        for (GHParserException * error in [compositeParserException errors])
        {
            [self addError: error withContext: theContext];
        }
    }
    @catch (GHParserException * error)
    {
        [self addError: error withContext: theContext];
    }
    return theDefaultValue;
}

- (void)buildWithContext:(GHParserContext *)theContext token:(GHToken *)theToken
{
    [self handleAstErrorWithContext: theContext actionBlock: ^() { [self->astBuilder buildWithToken: theToken]; }];
}

- (void)startRuleWithContext:(GHParserContext *)theContext ruleType:(GHRuleType)theRuleType
{
    [self handleAstErrorWithContext: theContext actionBlock: ^() { [self->astBuilder startRuleWithType: theRuleType]; }];
}

- (void)endRuleWithContext:(GHParserContext *)theContext ruleType:(GHRuleType)theRuleType
{
    [self handleAstErrorWithContext: theContext actionBlock: ^() { [self->astBuilder endRuleWithType: theRuleType]; }];
}

- (id)resultWithContext:(GHParserContext *)theContext
{
    return [astBuilder result];
}

- (GHToken *)readTokenWithContext:(GHParserContext *)theContext
{
    if ([[theContext tokenQueue] count] > 0)
    {
        id firstObject = [[theContext tokenQueue] firstObject];
        [[theContext tokenQueue] removeObjectAtIndex: 0];
        return firstObject;
    }
    else
        return [[theContext tokenScanner] read];
}


- (BOOL)matchEOFWithContext:(GHParserContext *)theContext token:(GHToken *)theToken
{
    return [self handleExternalErrorWithContext: theContext actionBlock: ^() { return [[theContext tokenMatcher] matchEOFWithToken: theToken]; } defaultValue: NO];
}
- (BOOL)matchEmptyWithContext:(GHParserContext *)theContext token:(GHToken *)theToken
{
    if ([theToken isEOF]) return NO;
    return [self handleExternalErrorWithContext: theContext actionBlock: ^() { return [[theContext tokenMatcher] matchEmptyWithToken: theToken]; } defaultValue: NO];
}
- (BOOL)matchCommentWithContext:(GHParserContext *)theContext token:(GHToken *)theToken
{
    if ([theToken isEOF]) return NO;
    return [self handleExternalErrorWithContext: theContext actionBlock: ^() { return [[theContext tokenMatcher] matchCommentWithToken: theToken]; } defaultValue: NO];
}
- (BOOL)matchTagLineWithContext:(GHParserContext *)theContext token:(GHToken *)theToken
{
    if ([theToken isEOF]) return NO;
    return [self handleExternalErrorWithContext: theContext actionBlock: ^() { return [[theContext tokenMatcher] matchTagLineWithToken: theToken]; } defaultValue: NO];
}
- (BOOL)matchFeatureLineWithContext:(GHParserContext *)theContext token:(GHToken *)theToken
{
    if ([theToken isEOF]) return NO;
    return [self handleExternalErrorWithContext: theContext actionBlock: ^() { return [[theContext tokenMatcher] matchFeatureLineWithToken: theToken]; } defaultValue: NO];
}
- (BOOL)matchRuleLineWithContext:(GHParserContext *)theContext token:(GHToken *)theToken
{
    if ([theToken isEOF]) return NO;
    return [self handleExternalErrorWithContext: theContext actionBlock: ^() { return [[theContext tokenMatcher] matchRuleLineWithToken: theToken]; } defaultValue: NO];
}
- (BOOL)matchBackgroundLineWithContext:(GHParserContext *)theContext token:(GHToken *)theToken
{
    if ([theToken isEOF]) return NO;
    return [self handleExternalErrorWithContext: theContext actionBlock: ^() { return [[theContext tokenMatcher] matchBackgroundLineWithToken: theToken]; } defaultValue: NO];
}
- (BOOL)matchScenarioLineWithContext:(GHParserContext *)theContext token:(GHToken *)theToken
{
    if ([theToken isEOF]) return NO;
    return [self handleExternalErrorWithContext: theContext actionBlock: ^() { return [[theContext tokenMatcher] matchScenarioLineWithToken: theToken]; } defaultValue: NO];
}
- (BOOL)matchExamplesLineWithContext:(GHParserContext *)theContext token:(GHToken *)theToken
{
    if ([theToken isEOF]) return NO;
    return [self handleExternalErrorWithContext: theContext actionBlock: ^() { return [[theContext tokenMatcher] matchExamplesLineWithToken: theToken]; } defaultValue: NO];
}
- (BOOL)matchStepLineWithContext:(GHParserContext *)theContext token:(GHToken *)theToken
{
    if ([theToken isEOF]) return NO;
    return [self handleExternalErrorWithContext: theContext actionBlock: ^() { return [[theContext tokenMatcher] matchStepLineWithToken: theToken]; } defaultValue: NO];
}
- (BOOL)matchDocStringSeparatorWithContext:(GHParserContext *)theContext token:(GHToken *)theToken
{
    if ([theToken isEOF]) return NO;
    return [self handleExternalErrorWithContext: theContext actionBlock: ^() { return [[theContext tokenMatcher] matchDocStringSeparatorWithToken: theToken]; } defaultValue: NO];
}
- (BOOL)matchTableRowWithContext:(GHParserContext *)theContext token:(GHToken *)theToken
{
    if ([theToken isEOF]) return NO;
    return [self handleExternalErrorWithContext: theContext actionBlock: ^() { return [[theContext tokenMatcher] matchTableRowWithToken: theToken]; } defaultValue: NO];
}
- (BOOL)matchLanguageWithContext:(GHParserContext *)theContext token:(GHToken *)theToken
{
    if ([theToken isEOF]) return NO;
    return [self handleExternalErrorWithContext: theContext actionBlock: ^() { return [[theContext tokenMatcher] matchLanguageWithToken: theToken]; } defaultValue: NO];
}
- (BOOL)matchOtherWithContext:(GHParserContext *)theContext token:(GHToken *)theToken
{
    if ([theToken isEOF]) return NO;
    return [self handleExternalErrorWithContext: theContext actionBlock: ^() { return [[theContext tokenMatcher] matchOtherWithToken: theToken]; } defaultValue: NO];
}
- (NSUInteger)matchToken:(GHToken *)theToken withState:(NSUInteger)theState context:(GHParserContext *)theContext
{
    NSUInteger newState;
    switch (theState)
    {
        case 0:
            newState = [self matchTokenAt_0: theToken context: theContext];
            break;
        case 1:
            newState = [self matchTokenAt_1: theToken context: theContext];
            break;
        case 2:
            newState = [self matchTokenAt_2: theToken context: theContext];
            break;
        case 3:
            newState = [self matchTokenAt_3: theToken context: theContext];
            break;
        case 4:
            newState = [self matchTokenAt_4: theToken context: theContext];
            break;
        case 5:
            newState = [self matchTokenAt_5: theToken context: theContext];
            break;
        case 6:
            newState = [self matchTokenAt_6: theToken context: theContext];
            break;
        case 7:
            newState = [self matchTokenAt_7: theToken context: theContext];
            break;
        case 8:
            newState = [self matchTokenAt_8: theToken context: theContext];
            break;
        case 9:
            newState = [self matchTokenAt_9: theToken context: theContext];
            break;
        case 10:
            newState = [self matchTokenAt_10: theToken context: theContext];
            break;
        case 11:
            newState = [self matchTokenAt_11: theToken context: theContext];
            break;
        case 12:
            newState = [self matchTokenAt_12: theToken context: theContext];
            break;
        case 13:
            newState = [self matchTokenAt_13: theToken context: theContext];
            break;
        case 14:
            newState = [self matchTokenAt_14: theToken context: theContext];
            break;
        case 15:
            newState = [self matchTokenAt_15: theToken context: theContext];
            break;
        case 16:
            newState = [self matchTokenAt_16: theToken context: theContext];
            break;
        case 17:
            newState = [self matchTokenAt_17: theToken context: theContext];
            break;
        case 18:
            newState = [self matchTokenAt_18: theToken context: theContext];
            break;
        case 19:
            newState = [self matchTokenAt_19: theToken context: theContext];
            break;
        case 20:
            newState = [self matchTokenAt_20: theToken context: theContext];
            break;
        case 21:
            newState = [self matchTokenAt_21: theToken context: theContext];
            break;
        case 22:
            newState = [self matchTokenAt_22: theToken context: theContext];
            break;
        case 23:
            newState = [self matchTokenAt_23: theToken context: theContext];
            break;
        case 24:
            newState = [self matchTokenAt_24: theToken context: theContext];
            break;
        case 25:
            newState = [self matchTokenAt_25: theToken context: theContext];
            break;
        case 26:
            newState = [self matchTokenAt_26: theToken context: theContext];
            break;
        case 27:
            newState = [self matchTokenAt_27: theToken context: theContext];
            break;
        case 28:
            newState = [self matchTokenAt_28: theToken context: theContext];
            break;
        case 29:
            newState = [self matchTokenAt_29: theToken context: theContext];
            break;
        case 30:
            newState = [self matchTokenAt_30: theToken context: theContext];
            break;
        case 31:
            newState = [self matchTokenAt_31: theToken context: theContext];
            break;
        case 32:
            newState = [self matchTokenAt_32: theToken context: theContext];
            break;
        case 33:
            newState = [self matchTokenAt_33: theToken context: theContext];
            break;
        case 34:
            newState = [self matchTokenAt_34: theToken context: theContext];
            break;
        case 35:
            newState = [self matchTokenAt_35: theToken context: theContext];
            break;
        case 36:
            newState = [self matchTokenAt_36: theToken context: theContext];
            break;
        case 37:
            newState = [self matchTokenAt_37: theToken context: theContext];
            break;
        case 38:
            newState = [self matchTokenAt_38: theToken context: theContext];
            break;
        case 39:
            newState = [self matchTokenAt_39: theToken context: theContext];
            break;
        case 40:
            newState = [self matchTokenAt_40: theToken context: theContext];
            break;
        case 41:
            newState = [self matchTokenAt_41: theToken context: theContext];
            break;
        case 43:
            newState = [self matchTokenAt_43: theToken context: theContext];
            break;
        case 44:
            newState = [self matchTokenAt_44: theToken context: theContext];
            break;
        case 45:
            newState = [self matchTokenAt_45: theToken context: theContext];
            break;
        case 46:
            newState = [self matchTokenAt_46: theToken context: theContext];
            break;
        case 47:
            newState = [self matchTokenAt_47: theToken context: theContext];
            break;
        case 48:
            newState = [self matchTokenAt_48: theToken context: theContext];
            break;
        case 49:
            newState = [self matchTokenAt_49: theToken context: theContext];
            break;
        case 50:
            newState = [self matchTokenAt_50: theToken context: theContext];
            break;
        default:
            @throw [NSException exceptionWithName: NSInvalidArgumentException reason: [@"Unknown state: " stringByAppendingFormat: @"%d", (int)theState] userInfo: nil];
    }
    return newState;
}


// Start
- (int)matchTokenAt_0:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchLanguageWithContext: theContext token: theToken])
    {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeFeatureHeader];
        [self buildWithContext: theContext token: theToken];
        return 1;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeFeatureHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 2;
    }
    if ([self matchFeatureLineWithContext: theContext token: theToken])
    {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeFeatureHeader];
        [self buildWithContext: theContext token: theToken];
        return 3;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 0;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 0;
    }

    NSString * stateComment = @"State: 0 - Start";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#Language", @"#TagLine", @"#FeatureLine", @"#Comment", @"#Empty", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 0;
}

// GherkinDocument:0>Feature:0>FeatureHeader:0>#Language:0
- (int)matchTokenAt_1:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 2;
    }
    if ([self matchFeatureLineWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 3;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 1;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 1;
    }

    NSString * stateComment = @"State: 1 - GherkinDocument:0>Feature:0>FeatureHeader:0>#Language:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#TagLine", @"#FeatureLine", @"#Comment", @"#Empty", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 1;
}

// GherkinDocument:0>Feature:0>FeatureHeader:1>Tags:0>#TagLine:0
- (int)matchTokenAt_2:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 2;
    }
    if ([self matchFeatureLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 3;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 2;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 2;
    }

    NSString * stateComment = @"State: 2 - GherkinDocument:0>Feature:0>FeatureHeader:1>Tags:0>#TagLine:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#TagLine", @"#FeatureLine", @"#Comment", @"#Empty", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 2;
}

// GherkinDocument:0>Feature:0>FeatureHeader:2>#FeatureLine:0
- (int)matchTokenAt_3:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeatureHeader];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 3;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 5;
    }
    if ([self matchBackgroundLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeatureHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self buildWithContext: theContext token: theToken];
        return 6;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeatureHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 11;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeatureHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeatureHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 12;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeatureHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchOtherWithContext: theContext token: theToken])
    {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self buildWithContext: theContext token: theToken];
        return 4;
    }

    NSString * stateComment = @"State: 3 - GherkinDocument:0>Feature:0>FeatureHeader:2>#FeatureLine:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#Empty", @"#Comment", @"#BackgroundLine", @"#TagLine", @"#ScenarioLine", @"#RuleLine", @"#Other", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 3;
}

// GherkinDocument:0>Feature:0>FeatureHeader:3>DescriptionHelper:1>Description:0>#Other:0
- (int)matchTokenAt_4:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeatureHeader];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self buildWithContext: theContext token: theToken];
        return 5;
    }
    if ([self matchBackgroundLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeatureHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self buildWithContext: theContext token: theToken];
        return 6;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeatureHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 11;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeatureHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeatureHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 12;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeatureHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchOtherWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 4;
    }

    NSString * stateComment = @"State: 4 - GherkinDocument:0>Feature:0>FeatureHeader:3>DescriptionHelper:1>Description:0>#Other:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#Comment", @"#BackgroundLine", @"#TagLine", @"#ScenarioLine", @"#RuleLine", @"#Other", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 4;
}

// GherkinDocument:0>Feature:0>FeatureHeader:3>DescriptionHelper:2>#Comment:0
- (int)matchTokenAt_5:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeatureHeader];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 5;
    }
    if ([self matchBackgroundLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeatureHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self buildWithContext: theContext token: theToken];
        return 6;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeatureHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 11;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeatureHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeatureHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 12;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeatureHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 5;
    }

    NSString * stateComment = @"State: 5 - GherkinDocument:0>Feature:0>FeatureHeader:3>DescriptionHelper:2>#Comment:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#Comment", @"#BackgroundLine", @"#TagLine", @"#ScenarioLine", @"#RuleLine", @"#Empty", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 5;
}

// GherkinDocument:0>Feature:1>Background:0>#BackgroundLine:0
- (int)matchTokenAt_6:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 6;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 8;
    }
    if ([self matchStepLineWithContext: theContext token: theToken])
    {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self buildWithContext: theContext token: theToken];
        return 9;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 11;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 12;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchOtherWithContext: theContext token: theToken])
    {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self buildWithContext: theContext token: theToken];
        return 7;
    }

    NSString * stateComment = @"State: 6 - GherkinDocument:0>Feature:1>Background:0>#BackgroundLine:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#Empty", @"#Comment", @"#StepLine", @"#TagLine", @"#ScenarioLine", @"#RuleLine", @"#Other", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 6;
}

// GherkinDocument:0>Feature:1>Background:1>DescriptionHelper:1>Description:0>#Other:0
- (int)matchTokenAt_7:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self buildWithContext: theContext token: theToken];
        return 8;
    }
    if ([self matchStepLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self buildWithContext: theContext token: theToken];
        return 9;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 11;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 12;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchOtherWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 7;
    }

    NSString * stateComment = @"State: 7 - GherkinDocument:0>Feature:1>Background:1>DescriptionHelper:1>Description:0>#Other:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#Comment", @"#StepLine", @"#TagLine", @"#ScenarioLine", @"#RuleLine", @"#Other", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 7;
}

// GherkinDocument:0>Feature:1>Background:1>DescriptionHelper:2>#Comment:0
- (int)matchTokenAt_8:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 8;
    }
    if ([self matchStepLineWithContext: theContext token: theToken])
    {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self buildWithContext: theContext token: theToken];
        return 9;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 11;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 12;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 8;
    }

    NSString * stateComment = @"State: 8 - GherkinDocument:0>Feature:1>Background:1>DescriptionHelper:2>#Comment:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#Comment", @"#StepLine", @"#TagLine", @"#ScenarioLine", @"#RuleLine", @"#Empty", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 8;
}

// GherkinDocument:0>Feature:1>Background:2>Step:0>#StepLine:0
- (int)matchTokenAt_9:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchTableRowWithContext: theContext token: theToken])
    {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeDataTable];
        [self buildWithContext: theContext token: theToken];
        return 10;
    }
    if ([self matchDocStringSeparatorWithContext: theContext token: theToken])
    {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeDocString];
        [self buildWithContext: theContext token: theToken];
        return 49;
    }
    if ([self matchStepLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self buildWithContext: theContext token: theToken];
        return 9;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 11;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 12;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 9;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 9;
    }

    NSString * stateComment = @"State: 9 - GherkinDocument:0>Feature:1>Background:2>Step:0>#StepLine:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#TableRow", @"#DocStringSeparator", @"#StepLine", @"#TagLine", @"#ScenarioLine", @"#RuleLine", @"#Comment", @"#Empty", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 9;
}

// GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0
- (int)matchTokenAt_10:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDataTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchTableRowWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 10;
    }
    if ([self matchStepLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDataTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self buildWithContext: theContext token: theToken];
        return 9;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDataTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 11;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDataTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDataTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 12;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDataTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 10;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 10;
    }

    NSString * stateComment = @"State: 10 - GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#TableRow", @"#StepLine", @"#TagLine", @"#ScenarioLine", @"#RuleLine", @"#Comment", @"#Empty", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 10;
}

// GherkinDocument:0>Feature:2>ScenarioDefinition:0>Tags:0>#TagLine:0
- (int)matchTokenAt_11:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 11;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 12;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 11;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 11;
    }

    NSString * stateComment = @"State: 11 - GherkinDocument:0>Feature:2>ScenarioDefinition:0>Tags:0>#TagLine:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#TagLine", @"#ScenarioLine", @"#Comment", @"#Empty", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 11;
}

// GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:0>#ScenarioLine:0
- (int)matchTokenAt_12:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 12;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 14;
    }
    if ([self matchStepLineWithContext: theContext token: theToken])
    {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self buildWithContext: theContext token: theToken];
        return 15;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_1: theContext token: theToken])
        {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 17;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 11;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchExamplesLineWithContext: theContext token: theToken])
    {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self buildWithContext: theContext token: theToken];
        return 18;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 12;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchOtherWithContext: theContext token: theToken])
    {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self buildWithContext: theContext token: theToken];
        return 13;
    }

    NSString * stateComment = @"State: 12 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:0>#ScenarioLine:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#Empty", @"#Comment", @"#StepLine", @"#TagLine", @"#ExamplesLine", @"#ScenarioLine", @"#RuleLine", @"#Other", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 12;
}

// GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:1>Description:0>#Other:0
- (int)matchTokenAt_13:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self buildWithContext: theContext token: theToken];
        return 14;
    }
    if ([self matchStepLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self buildWithContext: theContext token: theToken];
        return 15;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_1: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 17;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 11;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchExamplesLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self buildWithContext: theContext token: theToken];
        return 18;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 12;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchOtherWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 13;
    }

    NSString * stateComment = @"State: 13 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:1>Description:0>#Other:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#Comment", @"#StepLine", @"#TagLine", @"#ExamplesLine", @"#ScenarioLine", @"#RuleLine", @"#Other", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 13;
}

// GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:2>#Comment:0
- (int)matchTokenAt_14:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 14;
    }
    if ([self matchStepLineWithContext: theContext token: theToken])
    {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self buildWithContext: theContext token: theToken];
        return 15;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_1: theContext token: theToken])
        {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 17;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 11;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchExamplesLineWithContext: theContext token: theToken])
    {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self buildWithContext: theContext token: theToken];
        return 18;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 12;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 14;
    }

    NSString * stateComment = @"State: 14 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:2>#Comment:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#Comment", @"#StepLine", @"#TagLine", @"#ExamplesLine", @"#ScenarioLine", @"#RuleLine", @"#Empty", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 14;
}

// GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:0>#StepLine:0
- (int)matchTokenAt_15:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchTableRowWithContext: theContext token: theToken])
    {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeDataTable];
        [self buildWithContext: theContext token: theToken];
        return 16;
    }
    if ([self matchDocStringSeparatorWithContext: theContext token: theToken])
    {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeDocString];
        [self buildWithContext: theContext token: theToken];
        return 47;
    }
    if ([self matchStepLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self buildWithContext: theContext token: theToken];
        return 15;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_1: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 17;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 11;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchExamplesLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self buildWithContext: theContext token: theToken];
        return 18;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 12;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 15;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 15;
    }

    NSString * stateComment = @"State: 15 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:0>#StepLine:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#TableRow", @"#DocStringSeparator", @"#StepLine", @"#TagLine", @"#ExamplesLine", @"#ScenarioLine", @"#RuleLine", @"#Comment", @"#Empty", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 15;
}

// GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0
- (int)matchTokenAt_16:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDataTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchTableRowWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 16;
    }
    if ([self matchStepLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDataTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self buildWithContext: theContext token: theToken];
        return 15;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_1: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDataTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 17;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDataTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 11;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDataTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchExamplesLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDataTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self buildWithContext: theContext token: theToken];
        return 18;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDataTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 12;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDataTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 16;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 16;
    }

    NSString * stateComment = @"State: 16 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#TableRow", @"#StepLine", @"#TagLine", @"#ExamplesLine", @"#ScenarioLine", @"#RuleLine", @"#Comment", @"#Empty", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 16;
}

// GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:0>Tags:0>#TagLine:0
- (int)matchTokenAt_17:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 17;
    }
    if ([self matchExamplesLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self buildWithContext: theContext token: theToken];
        return 18;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 17;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 17;
    }

    NSString * stateComment = @"State: 17 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:0>Tags:0>#TagLine:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#TagLine", @"#ExamplesLine", @"#Comment", @"#Empty", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 17;
}

// GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:0>#ExamplesLine:0
- (int)matchTokenAt_18:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 18;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 20;
    }
    if ([self matchTableRowWithContext: theContext token: theToken])
    {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesTable];
        [self buildWithContext: theContext token: theToken];
        return 21;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_1: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 17;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 11;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchExamplesLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self buildWithContext: theContext token: theToken];
        return 18;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 12;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchOtherWithContext: theContext token: theToken])
    {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self buildWithContext: theContext token: theToken];
        return 19;
    }

    NSString * stateComment = @"State: 18 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:0>#ExamplesLine:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#Empty", @"#Comment", @"#TableRow", @"#TagLine", @"#ExamplesLine", @"#ScenarioLine", @"#RuleLine", @"#Other", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 18;
}

// GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:1>Description:0>#Other:0
- (int)matchTokenAt_19:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self buildWithContext: theContext token: theToken];
        return 20;
    }
    if ([self matchTableRowWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesTable];
        [self buildWithContext: theContext token: theToken];
        return 21;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_1: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 17;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 11;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchExamplesLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self buildWithContext: theContext token: theToken];
        return 18;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 12;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchOtherWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 19;
    }

    NSString * stateComment = @"State: 19 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:1>Description:0>#Other:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#Comment", @"#TableRow", @"#TagLine", @"#ExamplesLine", @"#ScenarioLine", @"#RuleLine", @"#Other", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 19;
}

// GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:2>#Comment:0
- (int)matchTokenAt_20:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 20;
    }
    if ([self matchTableRowWithContext: theContext token: theToken])
    {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesTable];
        [self buildWithContext: theContext token: theToken];
        return 21;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_1: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 17;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 11;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchExamplesLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self buildWithContext: theContext token: theToken];
        return 18;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 12;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 20;
    }

    NSString * stateComment = @"State: 20 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:2>#Comment:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#Comment", @"#TableRow", @"#TagLine", @"#ExamplesLine", @"#ScenarioLine", @"#RuleLine", @"#Empty", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 20;
}

// GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:2>ExamplesTable:0>#TableRow:0
- (int)matchTokenAt_21:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchTableRowWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 21;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_1: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 17;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 11;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchExamplesLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self buildWithContext: theContext token: theToken];
        return 18;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 12;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 21;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 21;
    }

    NSString * stateComment = @"State: 21 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:2>ExamplesTable:0>#TableRow:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#TableRow", @"#TagLine", @"#ExamplesLine", @"#ScenarioLine", @"#RuleLine", @"#Comment", @"#Empty", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 21;
}

// GherkinDocument:0>Feature:3>Rule:0>RuleHeader:0>Tags:0>#TagLine:0
- (int)matchTokenAt_22:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 22;
    }

    NSString * stateComment = @"State: 22 - GherkinDocument:0>Feature:3>Rule:0>RuleHeader:0>Tags:0>#TagLine:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#TagLine", @"#RuleLine", @"#Comment", @"#Empty", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 22;
}

// GherkinDocument:0>Feature:3>Rule:0>RuleHeader:1>#RuleLine:0
- (int)matchTokenAt_23:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 25;
    }
    if ([self matchBackgroundLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self buildWithContext: theContext token: theToken];
        return 26;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 31;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 32;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchOtherWithContext: theContext token: theToken])
    {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self buildWithContext: theContext token: theToken];
        return 24;
    }

    NSString * stateComment = @"State: 23 - GherkinDocument:0>Feature:3>Rule:0>RuleHeader:1>#RuleLine:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#Empty", @"#Comment", @"#BackgroundLine", @"#TagLine", @"#ScenarioLine", @"#RuleLine", @"#Other", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 23;
}

// GherkinDocument:0>Feature:3>Rule:0>RuleHeader:2>DescriptionHelper:1>Description:0>#Other:0
- (int)matchTokenAt_24:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self buildWithContext: theContext token: theToken];
        return 25;
    }
    if ([self matchBackgroundLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self buildWithContext: theContext token: theToken];
        return 26;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 31;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 32;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchOtherWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 24;
    }

    NSString * stateComment = @"State: 24 - GherkinDocument:0>Feature:3>Rule:0>RuleHeader:2>DescriptionHelper:1>Description:0>#Other:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#Comment", @"#BackgroundLine", @"#TagLine", @"#ScenarioLine", @"#RuleLine", @"#Other", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 24;
}

// GherkinDocument:0>Feature:3>Rule:0>RuleHeader:2>DescriptionHelper:2>#Comment:0
- (int)matchTokenAt_25:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 25;
    }
    if ([self matchBackgroundLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self buildWithContext: theContext token: theToken];
        return 26;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 31;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 32;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 25;
    }

    NSString * stateComment = @"State: 25 - GherkinDocument:0>Feature:3>Rule:0>RuleHeader:2>DescriptionHelper:2>#Comment:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#Comment", @"#BackgroundLine", @"#TagLine", @"#ScenarioLine", @"#RuleLine", @"#Empty", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 25;
}

// GherkinDocument:0>Feature:3>Rule:1>Background:0>#BackgroundLine:0
- (int)matchTokenAt_26:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 26;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 28;
    }
    if ([self matchStepLineWithContext: theContext token: theToken])
    {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self buildWithContext: theContext token: theToken];
        return 29;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 31;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 32;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchOtherWithContext: theContext token: theToken])
    {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self buildWithContext: theContext token: theToken];
        return 27;
    }

    NSString * stateComment = @"State: 26 - GherkinDocument:0>Feature:3>Rule:1>Background:0>#BackgroundLine:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#Empty", @"#Comment", @"#StepLine", @"#TagLine", @"#ScenarioLine", @"#RuleLine", @"#Other", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 26;
}

// GherkinDocument:0>Feature:3>Rule:1>Background:1>DescriptionHelper:1>Description:0>#Other:0
- (int)matchTokenAt_27:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self buildWithContext: theContext token: theToken];
        return 28;
    }
    if ([self matchStepLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self buildWithContext: theContext token: theToken];
        return 29;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 31;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 32;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchOtherWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 27;
    }

    NSString * stateComment = @"State: 27 - GherkinDocument:0>Feature:3>Rule:1>Background:1>DescriptionHelper:1>Description:0>#Other:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#Comment", @"#StepLine", @"#TagLine", @"#ScenarioLine", @"#RuleLine", @"#Other", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 27;
}

// GherkinDocument:0>Feature:3>Rule:1>Background:1>DescriptionHelper:2>#Comment:0
- (int)matchTokenAt_28:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 28;
    }
    if ([self matchStepLineWithContext: theContext token: theToken])
    {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self buildWithContext: theContext token: theToken];
        return 29;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 31;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 32;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 28;
    }

    NSString * stateComment = @"State: 28 - GherkinDocument:0>Feature:3>Rule:1>Background:1>DescriptionHelper:2>#Comment:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#Comment", @"#StepLine", @"#TagLine", @"#ScenarioLine", @"#RuleLine", @"#Empty", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 28;
}

// GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:0>#StepLine:0
- (int)matchTokenAt_29:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchTableRowWithContext: theContext token: theToken])
    {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeDataTable];
        [self buildWithContext: theContext token: theToken];
        return 30;
    }
    if ([self matchDocStringSeparatorWithContext: theContext token: theToken])
    {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeDocString];
        [self buildWithContext: theContext token: theToken];
        return 45;
    }
    if ([self matchStepLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self buildWithContext: theContext token: theToken];
        return 29;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 31;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 32;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 29;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 29;
    }

    NSString * stateComment = @"State: 29 - GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:0>#StepLine:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#TableRow", @"#DocStringSeparator", @"#StepLine", @"#TagLine", @"#ScenarioLine", @"#RuleLine", @"#Comment", @"#Empty", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 29;
}

// GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0
- (int)matchTokenAt_30:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDataTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchTableRowWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 30;
    }
    if ([self matchStepLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDataTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self buildWithContext: theContext token: theToken];
        return 29;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDataTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 31;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDataTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDataTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 32;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDataTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 30;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 30;
    }

    NSString * stateComment = @"State: 30 - GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#TableRow", @"#StepLine", @"#TagLine", @"#ScenarioLine", @"#RuleLine", @"#Comment", @"#Empty", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 30;
}

// GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:0>Tags:0>#TagLine:0
- (int)matchTokenAt_31:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 31;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 32;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 31;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 31;
    }

    NSString * stateComment = @"State: 31 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:0>Tags:0>#TagLine:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#TagLine", @"#ScenarioLine", @"#Comment", @"#Empty", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 31;
}

// GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:0>#ScenarioLine:0
- (int)matchTokenAt_32:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 32;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 34;
    }
    if ([self matchStepLineWithContext: theContext token: theToken])
    {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self buildWithContext: theContext token: theToken];
        return 35;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_1: theContext token: theToken])
        {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 37;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 31;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchExamplesLineWithContext: theContext token: theToken])
    {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self buildWithContext: theContext token: theToken];
        return 38;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 32;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchOtherWithContext: theContext token: theToken])
    {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self buildWithContext: theContext token: theToken];
        return 33;
    }

    NSString * stateComment = @"State: 32 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:0>#ScenarioLine:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#Empty", @"#Comment", @"#StepLine", @"#TagLine", @"#ExamplesLine", @"#ScenarioLine", @"#RuleLine", @"#Other", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 32;
}

// GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:1>Description:0>#Other:0
- (int)matchTokenAt_33:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self buildWithContext: theContext token: theToken];
        return 34;
    }
    if ([self matchStepLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self buildWithContext: theContext token: theToken];
        return 35;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_1: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 37;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 31;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchExamplesLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self buildWithContext: theContext token: theToken];
        return 38;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 32;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchOtherWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 33;
    }

    NSString * stateComment = @"State: 33 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:1>Description:0>#Other:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#Comment", @"#StepLine", @"#TagLine", @"#ExamplesLine", @"#ScenarioLine", @"#RuleLine", @"#Other", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 33;
}

// GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:2>#Comment:0
- (int)matchTokenAt_34:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 34;
    }
    if ([self matchStepLineWithContext: theContext token: theToken])
    {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self buildWithContext: theContext token: theToken];
        return 35;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_1: theContext token: theToken])
        {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 37;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 31;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchExamplesLineWithContext: theContext token: theToken])
    {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self buildWithContext: theContext token: theToken];
        return 38;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 32;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 34;
    }

    NSString * stateComment = @"State: 34 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:2>#Comment:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#Comment", @"#StepLine", @"#TagLine", @"#ExamplesLine", @"#ScenarioLine", @"#RuleLine", @"#Empty", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 34;
}

// GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:0>#StepLine:0
- (int)matchTokenAt_35:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchTableRowWithContext: theContext token: theToken])
    {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeDataTable];
        [self buildWithContext: theContext token: theToken];
        return 36;
    }
    if ([self matchDocStringSeparatorWithContext: theContext token: theToken])
    {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeDocString];
        [self buildWithContext: theContext token: theToken];
        return 43;
    }
    if ([self matchStepLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self buildWithContext: theContext token: theToken];
        return 35;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_1: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 37;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 31;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchExamplesLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self buildWithContext: theContext token: theToken];
        return 38;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 32;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 35;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 35;
    }

    NSString * stateComment = @"State: 35 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:0>#StepLine:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#TableRow", @"#DocStringSeparator", @"#StepLine", @"#TagLine", @"#ExamplesLine", @"#ScenarioLine", @"#RuleLine", @"#Comment", @"#Empty", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 35;
}

// GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0
- (int)matchTokenAt_36:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDataTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchTableRowWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 36;
    }
    if ([self matchStepLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDataTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self buildWithContext: theContext token: theToken];
        return 35;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_1: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDataTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 37;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDataTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 31;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDataTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchExamplesLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDataTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self buildWithContext: theContext token: theToken];
        return 38;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDataTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 32;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDataTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 36;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 36;
    }

    NSString * stateComment = @"State: 36 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#TableRow", @"#StepLine", @"#TagLine", @"#ExamplesLine", @"#ScenarioLine", @"#RuleLine", @"#Comment", @"#Empty", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 36;
}

// GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:0>Tags:0>#TagLine:0
- (int)matchTokenAt_37:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 37;
    }
    if ([self matchExamplesLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self buildWithContext: theContext token: theToken];
        return 38;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 37;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 37;
    }

    NSString * stateComment = @"State: 37 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:0>Tags:0>#TagLine:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#TagLine", @"#ExamplesLine", @"#Comment", @"#Empty", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 37;
}

// GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:0>#ExamplesLine:0
- (int)matchTokenAt_38:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 38;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 40;
    }
    if ([self matchTableRowWithContext: theContext token: theToken])
    {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesTable];
        [self buildWithContext: theContext token: theToken];
        return 41;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_1: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 37;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 31;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchExamplesLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self buildWithContext: theContext token: theToken];
        return 38;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 32;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchOtherWithContext: theContext token: theToken])
    {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self buildWithContext: theContext token: theToken];
        return 39;
    }

    NSString * stateComment = @"State: 38 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:0>#ExamplesLine:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#Empty", @"#Comment", @"#TableRow", @"#TagLine", @"#ExamplesLine", @"#ScenarioLine", @"#RuleLine", @"#Other", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 38;
}

// GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:1>Description:0>#Other:0
- (int)matchTokenAt_39:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self buildWithContext: theContext token: theToken];
        return 40;
    }
    if ([self matchTableRowWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesTable];
        [self buildWithContext: theContext token: theToken];
        return 41;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_1: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 37;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 31;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchExamplesLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self buildWithContext: theContext token: theToken];
        return 38;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 32;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDescription];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchOtherWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 39;
    }

    NSString * stateComment = @"State: 39 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:1>Description:0>#Other:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#Comment", @"#TableRow", @"#TagLine", @"#ExamplesLine", @"#ScenarioLine", @"#RuleLine", @"#Other", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 39;
}

// GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:2>#Comment:0
- (int)matchTokenAt_40:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 40;
    }
    if ([self matchTableRowWithContext: theContext token: theToken])
    {
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesTable];
        [self buildWithContext: theContext token: theToken];
        return 41;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_1: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 37;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 31;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchExamplesLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self buildWithContext: theContext token: theToken];
        return 38;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 32;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 40;
    }

    NSString * stateComment = @"State: 40 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:2>#Comment:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#Comment", @"#TableRow", @"#TagLine", @"#ExamplesLine", @"#ScenarioLine", @"#RuleLine", @"#Empty", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 40;
}

// GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:2>ExamplesTable:0>#TableRow:0
- (int)matchTokenAt_41:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchTableRowWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 41;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_1: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 37;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 31;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchExamplesLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self buildWithContext: theContext token: theToken];
        return 38;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 32;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesTable];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 41;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 41;
    }

    NSString * stateComment = @"State: 41 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:2>ExamplesTable:0>#TableRow:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#TableRow", @"#TagLine", @"#ExamplesLine", @"#ScenarioLine", @"#RuleLine", @"#Comment", @"#Empty", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 41;
}

// GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0
- (int)matchTokenAt_43:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchDocStringSeparatorWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 44;
    }
    if ([self matchOtherWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 43;
    }

    NSString * stateComment = @"State: 43 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#DocStringSeparator", @"#Other", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 43;
}

// GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0
- (int)matchTokenAt_44:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDocString];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchStepLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDocString];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self buildWithContext: theContext token: theToken];
        return 35;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_1: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDocString];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 37;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDocString];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 31;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDocString];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchExamplesLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDocString];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self buildWithContext: theContext token: theToken];
        return 38;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDocString];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 32;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDocString];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 44;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 44;
    }

    NSString * stateComment = @"State: 44 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#StepLine", @"#TagLine", @"#ExamplesLine", @"#ScenarioLine", @"#RuleLine", @"#Comment", @"#Empty", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 44;
}

// GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0
- (int)matchTokenAt_45:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchDocStringSeparatorWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 46;
    }
    if ([self matchOtherWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 45;
    }

    NSString * stateComment = @"State: 45 - GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#DocStringSeparator", @"#Other", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 45;
}

// GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0
- (int)matchTokenAt_46:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDocString];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchStepLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDocString];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self buildWithContext: theContext token: theToken];
        return 29;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDocString];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 31;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDocString];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDocString];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 32;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDocString];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 46;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 46;
    }

    NSString * stateComment = @"State: 46 - GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#StepLine", @"#TagLine", @"#ScenarioLine", @"#RuleLine", @"#Comment", @"#Empty", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 46;
}

// GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0
- (int)matchTokenAt_47:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchDocStringSeparatorWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 48;
    }
    if ([self matchOtherWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 47;
    }

    NSString * stateComment = @"State: 47 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#DocStringSeparator", @"#Other", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 47;
}

// GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0
- (int)matchTokenAt_48:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDocString];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchStepLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDocString];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self buildWithContext: theContext token: theToken];
        return 15;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_1: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDocString];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 17;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDocString];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 11;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDocString];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchExamplesLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDocString];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamplesDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeExamples];
        [self buildWithContext: theContext token: theToken];
        return 18;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDocString];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 12;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDocString];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 48;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 48;
    }

    NSString * stateComment = @"State: 48 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#StepLine", @"#TagLine", @"#ExamplesLine", @"#ScenarioLine", @"#RuleLine", @"#Comment", @"#Empty", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 48;
}

// GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0
- (int)matchTokenAt_49:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchDocStringSeparatorWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 50;
    }
    if ([self matchOtherWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 49;
    }

    NSString * stateComment = @"State: 49 - GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#DocStringSeparator", @"#Other", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 49;
}

// GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0
- (int)matchTokenAt_50:(GHToken *)theToken context:(GHParserContext *)theContext
{
    if ([self matchEOFWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDocString];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeFeature];
        [self buildWithContext: theContext token: theToken];
        return 42;
    }
    if ([self matchStepLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDocString];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self buildWithContext: theContext token: theToken];
        return 9;
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        if ([self lookAheadWithContext_0: theContext token: theToken])
        {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDocString];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 11;
        }
    }
    if ([self matchTagLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDocString];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeTags];
        [self buildWithContext: theContext token: theToken];
        return 22;
    }
    if ([self matchScenarioLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDocString];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenarioDefinition];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeScenario];
        [self buildWithContext: theContext token: theToken];
        return 12;
    }
    if ([self matchRuleLineWithContext: theContext token: theToken])
    {
        [self endRuleWithContext: theContext ruleType: GHRuleTypeDocString];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeStep];
        [self endRuleWithContext: theContext ruleType: GHRuleTypeBackground];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRule];
        [self startRuleWithContext: theContext ruleType: GHRuleTypeRuleHeader];
        [self buildWithContext: theContext token: theToken];
        return 23;
    }
    if ([self matchCommentWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 50;
    }
    if ([self matchEmptyWithContext: theContext token: theToken])
    {
        [self buildWithContext: theContext token: theToken];
        return 50;
    }

    NSString * stateComment = @"State: 50 - GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0";
    [theToken detach];
    NSArray<NSString *> * expectedTokens = [[NSArray<NSString *> alloc] initWithObjects: @"#EOF", @"#StepLine", @"#TagLine", @"#ScenarioLine", @"#RuleLine", @"#Comment", @"#Empty", nil];
    id error = [theToken isEOF] ? (GHParserException *)[[GHUnexpectedEOFException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment] : [[GHUnexpectedTokenException alloc] initWithToken: theToken expectedTokenTypes: expectedTokens stateComment: stateComment];
    if (stopAtFirstError)
        @throw error;
    
    [self addError: error withContext: theContext];
    return 50;
}


- (BOOL)lookAheadWithContext_0:(GHParserContext *)theContext token:(GHToken *)currentToken
{
    [currentToken detach];
    GHToken * theToken;
    NSMutableArray<GHToken *> * tokenBuffer = [[NSMutableArray<GHToken *> alloc] init];
    BOOL match = NO;
    do
    {
        theToken = [self readTokenWithContext: theContext];
        [theToken detach];
        [tokenBuffer addObject: theToken];

        if (NO
            || [self matchScenarioLineWithContext: theContext token: theToken]
)
        {
            match = YES;
            break;
        }
    } while (NO
        || [self matchEmptyWithContext: theContext token: theToken]
        || [self matchCommentWithContext: theContext token: theToken]
        || [self matchTagLineWithContext: theContext token: theToken]
);
    for (GHToken * token in tokenBuffer)
    {
        [[theContext tokenQueue] addObject: token];
    }
    return match;
}

- (BOOL)lookAheadWithContext_1:(GHParserContext *)theContext token:(GHToken *)currentToken
{
    [currentToken detach];
    GHToken * theToken;
    NSMutableArray<GHToken *> * tokenBuffer = [[NSMutableArray<GHToken *> alloc] init];
    BOOL match = NO;
    do
    {
        theToken = [self readTokenWithContext: theContext];
        [theToken detach];
        [tokenBuffer addObject: theToken];

        if (NO
            || [self matchExamplesLineWithContext: theContext token: theToken]
)
        {
            match = YES;
            break;
        }
    } while (NO
        || [self matchEmptyWithContext: theContext token: theToken]
        || [self matchCommentWithContext: theContext token: theToken]
        || [self matchTagLineWithContext: theContext token: theToken]
);
    for (GHToken * token in tokenBuffer)
    {
        [[theContext tokenQueue] addObject: token];
    }
    return match;
}

@end