Best Python code snippet using gherkin-python
parser.py
Source:parser.py  
...98            return context.token_queue.popleft()99        else:100            return context.token_scanner.read()101    def match_EOF(self, context, token):102        return self.handle_external_error(context, False, token, context.token_matcher.match_EOF)103    def match_Empty(self, context, token):104        if token.eof():105            return False106        return self.handle_external_error(context, False, token, context.token_matcher.match_Empty)107    def match_Comment(self, context, token):108        if token.eof():109            return False110        return self.handle_external_error(context, False, token, context.token_matcher.match_Comment)111    def match_TagLine(self, context, token):112        if token.eof():113            return False114        return self.handle_external_error(context, False, token, context.token_matcher.match_TagLine)115    def match_FeatureLine(self, context, token):116        if token.eof():117            return False118        return self.handle_external_error(context, False, token, context.token_matcher.match_FeatureLine)119    def match_BackgroundLine(self, context, token):120        if token.eof():121            return False122        return self.handle_external_error(context, False, token, context.token_matcher.match_BackgroundLine)123    def match_ScenarioLine(self, context, token):124        if token.eof():125            return False126        return self.handle_external_error(context, False, token, context.token_matcher.match_ScenarioLine)127    def match_ScenarioOutlineLine(self, context, token):128        if token.eof():129            return False130        return self.handle_external_error(context, False, token, context.token_matcher.match_ScenarioOutlineLine)131    def match_ExamplesLine(self, context, token):132        if token.eof():133            return False134        return self.handle_external_error(context, False, token, context.token_matcher.match_ExamplesLine)135    def match_StepLine(self, context, token):136        if token.eof():137            return False138        return self.handle_external_error(context, False, token, context.token_matcher.match_StepLine)139    def match_DocStringSeparator(self, context, token):140        if token.eof():141            return False142        return self.handle_external_error(context, False, token, context.token_matcher.match_DocStringSeparator)143    def match_TableRow(self, context, token):144        if token.eof():145            return False146        return self.handle_external_error(context, False, token, context.token_matcher.match_TableRow)147    def match_Language(self, context, token):148        if token.eof():149            return False150        return self.handle_external_error(context, False, token, context.token_matcher.match_Language)151    def match_Other(self, context, token):152        if token.eof():153            return False154        return self.handle_external_error(context, False, token, context.token_matcher.match_Other)155    def match_token(self, state, token, context):156        state_map = {157            0: self.match_token_at_0,158            1: self.match_token_at_1,159            2: self.match_token_at_2,160            3: self.match_token_at_3,161            4: self.match_token_at_4,162            5: self.match_token_at_5,163            6: self.match_token_at_6,164            7: self.match_token_at_7,165            8: self.match_token_at_8,166            9: self.match_token_at_9,167            10: self.match_token_at_10,168            11: self.match_token_at_11,169            12: self.match_token_at_12,170            13: self.match_token_at_13,171            14: self.match_token_at_14,172            15: self.match_token_at_15,173            16: self.match_token_at_16,174            17: self.match_token_at_17,175            18: self.match_token_at_18,176            19: self.match_token_at_19,177            20: self.match_token_at_20,178            21: self.match_token_at_21,179            22: self.match_token_at_22,180            23: self.match_token_at_23,181            24: self.match_token_at_24,182            25: self.match_token_at_25,183            26: self.match_token_at_26,184            28: self.match_token_at_28,185            29: self.match_token_at_29,186            30: self.match_token_at_30,187            31: self.match_token_at_31,188            32: self.match_token_at_32,189            33: self.match_token_at_33,190        }191        if state in state_map:192            return state_map[state](token, context)193        else:194            raise RuntimeError("Unknown state: " + str(state))195    # Start196    def match_token_at_0(self, token, context):197        if self.match_Language(context, token):198                self.start_rule(context, 'Feature_Header')199                self.build(context, token)200                return 1201        if self.match_TagLine(context, token):202                self.start_rule(context, 'Feature_Header')203                self.start_rule(context, 'Tags')204                self.build(context, token)205                return 2206        if self.match_FeatureLine(context, token):207                self.start_rule(context, 'Feature_Header')208                self.build(context, token)209                return 3210        if self.match_Comment(context, token):211                self.build(context, token)212                return 0213        if self.match_Empty(context, token):214                self.build(context, token)215                return 0216        state_comment = "State: 0 - Start"217        token.detach218        expected_tokens = ["#Language", "#TagLine", "#FeatureLine", "#Comment", "#Empty"]219        error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)220        if (self.stop_at_first_error):221            raise error222        self.add_error(context, error)223        return 0224    # Feature:0>Feature_Header:0>#Language:0225    def match_token_at_1(self, token, context):226        if self.match_TagLine(context, token):227                self.start_rule(context, 'Tags')228                self.build(context, token)229                return 2230        if self.match_FeatureLine(context, token):231                self.build(context, token)232                return 3233        if self.match_Comment(context, token):234                self.build(context, token)235                return 1236        if self.match_Empty(context, token):237                self.build(context, token)238                return 1239        state_comment = "State: 1 - Feature:0>Feature_Header:0>#Language:0"240        token.detach241        expected_tokens = ["#TagLine", "#FeatureLine", "#Comment", "#Empty"]242        error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)243        if (self.stop_at_first_error):244            raise error245        self.add_error(context, error)246        return 1247    # Feature:0>Feature_Header:1>Tags:0>#TagLine:0248    def match_token_at_2(self, token, context):249        if self.match_TagLine(context, token):250                self.build(context, token)251                return 2252        if self.match_FeatureLine(context, token):253                self.end_rule(context, 'Tags')254                self.build(context, token)255                return 3256        if self.match_Comment(context, token):257                self.build(context, token)258                return 2259        if self.match_Empty(context, token):260                self.build(context, token)261                return 2262        state_comment = "State: 2 - Feature:0>Feature_Header:1>Tags:0>#TagLine:0"263        token.detach264        expected_tokens = ["#TagLine", "#FeatureLine", "#Comment", "#Empty"]265        error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)266        if (self.stop_at_first_error):267            raise error268        self.add_error(context, error)269        return 2270    # Feature:0>Feature_Header:2>#FeatureLine:0271    def match_token_at_3(self, token, context):272        if self.match_EOF(context, token):273                self.end_rule(context, 'Feature_Header')274                self.build(context, token)275                return 27276        if self.match_Empty(context, token):277                self.build(context, token)278                return 3279        if self.match_Comment(context, token):280                self.build(context, token)281                return 5282        if self.match_BackgroundLine(context, token):283                self.end_rule(context, 'Feature_Header')284                self.start_rule(context, 'Background')285                self.build(context, token)286                return 6287        if self.match_TagLine(context, token):288                self.end_rule(context, 'Feature_Header')289                self.start_rule(context, 'Scenario_Definition')290                self.start_rule(context, 'Tags')291                self.build(context, token)292                return 11293        if self.match_ScenarioLine(context, token):294                self.end_rule(context, 'Feature_Header')295                self.start_rule(context, 'Scenario_Definition')296                self.start_rule(context, 'Scenario')297                self.build(context, token)298                return 12299        if self.match_ScenarioOutlineLine(context, token):300                self.end_rule(context, 'Feature_Header')301                self.start_rule(context, 'Scenario_Definition')302                self.start_rule(context, 'ScenarioOutline')303                self.build(context, token)304                return 17305        if self.match_Other(context, token):306                self.start_rule(context, 'Description')307                self.build(context, token)308                return 4309        state_comment = "State: 3 - Feature:0>Feature_Header:2>#FeatureLine:0"310        token.detach311        expected_tokens = ["#EOF", "#Empty", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"]312        error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)313        if (self.stop_at_first_error):314            raise error315        self.add_error(context, error)316        return 3317    # Feature:0>Feature_Header:3>Feature_Description:0>Description_Helper:1>Description:0>#Other:0318    def match_token_at_4(self, token, context):319        if self.match_EOF(context, token):320                self.end_rule(context, 'Description')321                self.end_rule(context, 'Feature_Header')322                self.build(context, token)323                return 27324        if self.match_Comment(context, token):325                self.end_rule(context, 'Description')326                self.build(context, token)327                return 5328        if self.match_BackgroundLine(context, token):329                self.end_rule(context, 'Description')330                self.end_rule(context, 'Feature_Header')331                self.start_rule(context, 'Background')332                self.build(context, token)333                return 6334        if self.match_TagLine(context, token):335                self.end_rule(context, 'Description')336                self.end_rule(context, 'Feature_Header')337                self.start_rule(context, 'Scenario_Definition')338                self.start_rule(context, 'Tags')339                self.build(context, token)340                return 11341        if self.match_ScenarioLine(context, token):342                self.end_rule(context, 'Description')343                self.end_rule(context, 'Feature_Header')344                self.start_rule(context, 'Scenario_Definition')345                self.start_rule(context, 'Scenario')346                self.build(context, token)347                return 12348        if self.match_ScenarioOutlineLine(context, token):349                self.end_rule(context, 'Description')350                self.end_rule(context, 'Feature_Header')351                self.start_rule(context, 'Scenario_Definition')352                self.start_rule(context, 'ScenarioOutline')353                self.build(context, token)354                return 17355        if self.match_Other(context, token):356                self.build(context, token)357                return 4358        state_comment = "State: 4 - Feature:0>Feature_Header:3>Feature_Description:0>Description_Helper:1>Description:0>#Other:0"359        token.detach360        expected_tokens = ["#EOF", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"]361        error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)362        if (self.stop_at_first_error):363            raise error364        self.add_error(context, error)365        return 4366    # Feature:0>Feature_Header:3>Feature_Description:0>Description_Helper:2>#Comment:0367    def match_token_at_5(self, token, context):368        if self.match_EOF(context, token):369                self.end_rule(context, 'Feature_Header')370                self.build(context, token)371                return 27372        if self.match_Comment(context, token):373                self.build(context, token)374                return 5375        if self.match_BackgroundLine(context, token):376                self.end_rule(context, 'Feature_Header')377                self.start_rule(context, 'Background')378                self.build(context, token)379                return 6380        if self.match_TagLine(context, token):381                self.end_rule(context, 'Feature_Header')382                self.start_rule(context, 'Scenario_Definition')383                self.start_rule(context, 'Tags')384                self.build(context, token)385                return 11386        if self.match_ScenarioLine(context, token):387                self.end_rule(context, 'Feature_Header')388                self.start_rule(context, 'Scenario_Definition')389                self.start_rule(context, 'Scenario')390                self.build(context, token)391                return 12392        if self.match_ScenarioOutlineLine(context, token):393                self.end_rule(context, 'Feature_Header')394                self.start_rule(context, 'Scenario_Definition')395                self.start_rule(context, 'ScenarioOutline')396                self.build(context, token)397                return 17398        if self.match_Empty(context, token):399                self.build(context, token)400                return 5401        state_comment = "State: 5 - Feature:0>Feature_Header:3>Feature_Description:0>Description_Helper:2>#Comment:0"402        token.detach403        expected_tokens = ["#EOF", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Empty"]404        error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)405        if (self.stop_at_first_error):406            raise error407        self.add_error(context, error)408        return 5409    # Feature:1>Background:0>#BackgroundLine:0410    def match_token_at_6(self, token, context):411        if self.match_EOF(context, token):412                self.end_rule(context, 'Background')413                self.build(context, token)414                return 27415        if self.match_Empty(context, token):416                self.build(context, token)417                return 6418        if self.match_Comment(context, token):419                self.build(context, token)420                return 8421        if self.match_StepLine(context, token):422                self.start_rule(context, 'Step')423                self.build(context, token)424                return 9425        if self.match_TagLine(context, token):426                self.end_rule(context, 'Background')427                self.start_rule(context, 'Scenario_Definition')428                self.start_rule(context, 'Tags')429                self.build(context, token)430                return 11431        if self.match_ScenarioLine(context, token):432                self.end_rule(context, 'Background')433                self.start_rule(context, 'Scenario_Definition')434                self.start_rule(context, 'Scenario')435                self.build(context, token)436                return 12437        if self.match_ScenarioOutlineLine(context, token):438                self.end_rule(context, 'Background')439                self.start_rule(context, 'Scenario_Definition')440                self.start_rule(context, 'ScenarioOutline')441                self.build(context, token)442                return 17443        if self.match_Other(context, token):444                self.start_rule(context, 'Description')445                self.build(context, token)446                return 7447        state_comment = "State: 6 - Feature:1>Background:0>#BackgroundLine:0"448        token.detach449        expected_tokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"]450        error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)451        if (self.stop_at_first_error):452            raise error453        self.add_error(context, error)454        return 6455    # Feature:1>Background:1>Background_Description:0>Description_Helper:1>Description:0>#Other:0456    def match_token_at_7(self, token, context):457        if self.match_EOF(context, token):458                self.end_rule(context, 'Description')459                self.end_rule(context, 'Background')460                self.build(context, token)461                return 27462        if self.match_Comment(context, token):463                self.end_rule(context, 'Description')464                self.build(context, token)465                return 8466        if self.match_StepLine(context, token):467                self.end_rule(context, 'Description')468                self.start_rule(context, 'Step')469                self.build(context, token)470                return 9471        if self.match_TagLine(context, token):472                self.end_rule(context, 'Description')473                self.end_rule(context, 'Background')474                self.start_rule(context, 'Scenario_Definition')475                self.start_rule(context, 'Tags')476                self.build(context, token)477                return 11478        if self.match_ScenarioLine(context, token):479                self.end_rule(context, 'Description')480                self.end_rule(context, 'Background')481                self.start_rule(context, 'Scenario_Definition')482                self.start_rule(context, 'Scenario')483                self.build(context, token)484                return 12485        if self.match_ScenarioOutlineLine(context, token):486                self.end_rule(context, 'Description')487                self.end_rule(context, 'Background')488                self.start_rule(context, 'Scenario_Definition')489                self.start_rule(context, 'ScenarioOutline')490                self.build(context, token)491                return 17492        if self.match_Other(context, token):493                self.build(context, token)494                return 7495        state_comment = "State: 7 - Feature:1>Background:1>Background_Description:0>Description_Helper:1>Description:0>#Other:0"496        token.detach497        expected_tokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"]498        error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)499        if (self.stop_at_first_error):500            raise error501        self.add_error(context, error)502        return 7503    # Feature:1>Background:1>Background_Description:0>Description_Helper:2>#Comment:0504    def match_token_at_8(self, token, context):505        if self.match_EOF(context, token):506                self.end_rule(context, 'Background')507                self.build(context, token)508                return 27509        if self.match_Comment(context, token):510                self.build(context, token)511                return 8512        if self.match_StepLine(context, token):513                self.start_rule(context, 'Step')514                self.build(context, token)515                return 9516        if self.match_TagLine(context, token):517                self.end_rule(context, 'Background')518                self.start_rule(context, 'Scenario_Definition')519                self.start_rule(context, 'Tags')520                self.build(context, token)521                return 11522        if self.match_ScenarioLine(context, token):523                self.end_rule(context, 'Background')524                self.start_rule(context, 'Scenario_Definition')525                self.start_rule(context, 'Scenario')526                self.build(context, token)527                return 12528        if self.match_ScenarioOutlineLine(context, token):529                self.end_rule(context, 'Background')530                self.start_rule(context, 'Scenario_Definition')531                self.start_rule(context, 'ScenarioOutline')532                self.build(context, token)533                return 17534        if self.match_Empty(context, token):535                self.build(context, token)536                return 8537        state_comment = "State: 8 - Feature:1>Background:1>Background_Description:0>Description_Helper:2>#Comment:0"538        token.detach539        expected_tokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Empty"]540        error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)541        if (self.stop_at_first_error):542            raise error543        self.add_error(context, error)544        return 8545    # Feature:1>Background:2>Scenario_Step:0>Step:0>#StepLine:0546    def match_token_at_9(self, token, context):547        if self.match_EOF(context, token):548                self.end_rule(context, 'Step')549                self.end_rule(context, 'Background')550                self.build(context, token)551                return 27552        if self.match_TableRow(context, token):553                self.start_rule(context, 'DataTable')554                self.build(context, token)555                return 10556        if self.match_DocStringSeparator(context, token):557                self.start_rule(context, 'DocString')558                self.build(context, token)559                return 32560        if self.match_StepLine(context, token):561                self.end_rule(context, 'Step')562                self.start_rule(context, 'Step')563                self.build(context, token)564                return 9565        if self.match_TagLine(context, token):566                self.end_rule(context, 'Step')567                self.end_rule(context, 'Background')568                self.start_rule(context, 'Scenario_Definition')569                self.start_rule(context, 'Tags')570                self.build(context, token)571                return 11572        if self.match_ScenarioLine(context, token):573                self.end_rule(context, 'Step')574                self.end_rule(context, 'Background')575                self.start_rule(context, 'Scenario_Definition')576                self.start_rule(context, 'Scenario')577                self.build(context, token)578                return 12579        if self.match_ScenarioOutlineLine(context, token):580                self.end_rule(context, 'Step')581                self.end_rule(context, 'Background')582                self.start_rule(context, 'Scenario_Definition')583                self.start_rule(context, 'ScenarioOutline')584                self.build(context, token)585                return 17586        if self.match_Comment(context, token):587                self.build(context, token)588                return 9589        if self.match_Empty(context, token):590                self.build(context, token)591                return 9592        state_comment = "State: 9 - Feature:1>Background:2>Scenario_Step:0>Step:0>#StepLine:0"593        token.detach594        expected_tokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"]595        error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)596        if (self.stop_at_first_error):597            raise error598        self.add_error(context, error)599        return 9600    # Feature:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:0601    def match_token_at_10(self, token, context):602        if self.match_EOF(context, token):603                self.end_rule(context, 'DataTable')604                self.end_rule(context, 'Step')605                self.end_rule(context, 'Background')606                self.build(context, token)607                return 27608        if self.match_TableRow(context, token):609                self.build(context, token)610                return 10611        if self.match_StepLine(context, token):612                self.end_rule(context, 'DataTable')613                self.end_rule(context, 'Step')614                self.start_rule(context, 'Step')615                self.build(context, token)616                return 9617        if self.match_TagLine(context, token):618                self.end_rule(context, 'DataTable')619                self.end_rule(context, 'Step')620                self.end_rule(context, 'Background')621                self.start_rule(context, 'Scenario_Definition')622                self.start_rule(context, 'Tags')623                self.build(context, token)624                return 11625        if self.match_ScenarioLine(context, token):626                self.end_rule(context, 'DataTable')627                self.end_rule(context, 'Step')628                self.end_rule(context, 'Background')629                self.start_rule(context, 'Scenario_Definition')630                self.start_rule(context, 'Scenario')631                self.build(context, token)632                return 12633        if self.match_ScenarioOutlineLine(context, token):634                self.end_rule(context, 'DataTable')635                self.end_rule(context, 'Step')636                self.end_rule(context, 'Background')637                self.start_rule(context, 'Scenario_Definition')638                self.start_rule(context, 'ScenarioOutline')639                self.build(context, token)640                return 17641        if self.match_Comment(context, token):642                self.build(context, token)643                return 10644        if self.match_Empty(context, token):645                self.build(context, token)646                return 10647        state_comment = "State: 10 - Feature:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:0"648        token.detach649        expected_tokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"]650        error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)651        if (self.stop_at_first_error):652            raise error653        self.add_error(context, error)654        return 10655    # Feature:2>Scenario_Definition:0>Tags:0>#TagLine:0656    def match_token_at_11(self, token, context):657        if self.match_TagLine(context, token):658                self.build(context, token)659                return 11660        if self.match_ScenarioLine(context, token):661                self.end_rule(context, 'Tags')662                self.start_rule(context, 'Scenario')663                self.build(context, token)664                return 12665        if self.match_ScenarioOutlineLine(context, token):666                self.end_rule(context, 'Tags')667                self.start_rule(context, 'ScenarioOutline')668                self.build(context, token)669                return 17670        if self.match_Comment(context, token):671                self.build(context, token)672                return 11673        if self.match_Empty(context, token):674                self.build(context, token)675                return 11676        state_comment = "State: 11 - Feature:2>Scenario_Definition:0>Tags:0>#TagLine:0"677        token.detach678        expected_tokens = ["#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"]679        error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)680        if (self.stop_at_first_error):681            raise error682        self.add_error(context, error)683        return 11684    # Feature:2>Scenario_Definition:1>__alt0:0>Scenario:0>#ScenarioLine:0685    def match_token_at_12(self, token, context):686        if self.match_EOF(context, token):687                self.end_rule(context, 'Scenario')688                self.end_rule(context, 'Scenario_Definition')689                self.build(context, token)690                return 27691        if self.match_Empty(context, token):692                self.build(context, token)693                return 12694        if self.match_Comment(context, token):695                self.build(context, token)696                return 14697        if self.match_StepLine(context, token):698                self.start_rule(context, 'Step')699                self.build(context, token)700                return 15701        if self.match_TagLine(context, token):702                self.end_rule(context, 'Scenario')703                self.end_rule(context, 'Scenario_Definition')704                self.start_rule(context, 'Scenario_Definition')705                self.start_rule(context, 'Tags')706                self.build(context, token)707                return 11708        if self.match_ScenarioLine(context, token):709                self.end_rule(context, 'Scenario')710                self.end_rule(context, 'Scenario_Definition')711                self.start_rule(context, 'Scenario_Definition')712                self.start_rule(context, 'Scenario')713                self.build(context, token)714                return 12715        if self.match_ScenarioOutlineLine(context, token):716                self.end_rule(context, 'Scenario')717                self.end_rule(context, 'Scenario_Definition')718                self.start_rule(context, 'Scenario_Definition')719                self.start_rule(context, 'ScenarioOutline')720                self.build(context, token)721                return 17722        if self.match_Other(context, token):723                self.start_rule(context, 'Description')724                self.build(context, token)725                return 13726        state_comment = "State: 12 - Feature:2>Scenario_Definition:1>__alt0:0>Scenario:0>#ScenarioLine:0"727        token.detach728        expected_tokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"]729        error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)730        if (self.stop_at_first_error):731            raise error732        self.add_error(context, error)733        return 12734    # Feature:2>Scenario_Definition:1>__alt0:0>Scenario:1>Scenario_Description:0>Description_Helper:1>Description:0>#Other:0735    def match_token_at_13(self, token, context):736        if self.match_EOF(context, token):737                self.end_rule(context, 'Description')738                self.end_rule(context, 'Scenario')739                self.end_rule(context, 'Scenario_Definition')740                self.build(context, token)741                return 27742        if self.match_Comment(context, token):743                self.end_rule(context, 'Description')744                self.build(context, token)745                return 14746        if self.match_StepLine(context, token):747                self.end_rule(context, 'Description')748                self.start_rule(context, 'Step')749                self.build(context, token)750                return 15751        if self.match_TagLine(context, token):752                self.end_rule(context, 'Description')753                self.end_rule(context, 'Scenario')754                self.end_rule(context, 'Scenario_Definition')755                self.start_rule(context, 'Scenario_Definition')756                self.start_rule(context, 'Tags')757                self.build(context, token)758                return 11759        if self.match_ScenarioLine(context, token):760                self.end_rule(context, 'Description')761                self.end_rule(context, 'Scenario')762                self.end_rule(context, 'Scenario_Definition')763                self.start_rule(context, 'Scenario_Definition')764                self.start_rule(context, 'Scenario')765                self.build(context, token)766                return 12767        if self.match_ScenarioOutlineLine(context, token):768                self.end_rule(context, 'Description')769                self.end_rule(context, 'Scenario')770                self.end_rule(context, 'Scenario_Definition')771                self.start_rule(context, 'Scenario_Definition')772                self.start_rule(context, 'ScenarioOutline')773                self.build(context, token)774                return 17775        if self.match_Other(context, token):776                self.build(context, token)777                return 13778        state_comment = "State: 13 - Feature:2>Scenario_Definition:1>__alt0:0>Scenario:1>Scenario_Description:0>Description_Helper:1>Description:0>#Other:0"779        token.detach780        expected_tokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"]781        error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)782        if (self.stop_at_first_error):783            raise error784        self.add_error(context, error)785        return 13786    # Feature:2>Scenario_Definition:1>__alt0:0>Scenario:1>Scenario_Description:0>Description_Helper:2>#Comment:0787    def match_token_at_14(self, token, context):788        if self.match_EOF(context, token):789                self.end_rule(context, 'Scenario')790                self.end_rule(context, 'Scenario_Definition')791                self.build(context, token)792                return 27793        if self.match_Comment(context, token):794                self.build(context, token)795                return 14796        if self.match_StepLine(context, token):797                self.start_rule(context, 'Step')798                self.build(context, token)799                return 15800        if self.match_TagLine(context, token):801                self.end_rule(context, 'Scenario')802                self.end_rule(context, 'Scenario_Definition')803                self.start_rule(context, 'Scenario_Definition')804                self.start_rule(context, 'Tags')805                self.build(context, token)806                return 11807        if self.match_ScenarioLine(context, token):808                self.end_rule(context, 'Scenario')809                self.end_rule(context, 'Scenario_Definition')810                self.start_rule(context, 'Scenario_Definition')811                self.start_rule(context, 'Scenario')812                self.build(context, token)813                return 12814        if self.match_ScenarioOutlineLine(context, token):815                self.end_rule(context, 'Scenario')816                self.end_rule(context, 'Scenario_Definition')817                self.start_rule(context, 'Scenario_Definition')818                self.start_rule(context, 'ScenarioOutline')819                self.build(context, token)820                return 17821        if self.match_Empty(context, token):822                self.build(context, token)823                return 14824        state_comment = "State: 14 - Feature:2>Scenario_Definition:1>__alt0:0>Scenario:1>Scenario_Description:0>Description_Helper:2>#Comment:0"825        token.detach826        expected_tokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Empty"]827        error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)828        if (self.stop_at_first_error):829            raise error830        self.add_error(context, error)831        return 14832    # Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:0>#StepLine:0833    def match_token_at_15(self, token, context):834        if self.match_EOF(context, token):835                self.end_rule(context, 'Step')836                self.end_rule(context, 'Scenario')837                self.end_rule(context, 'Scenario_Definition')838                self.build(context, token)839                return 27840        if self.match_TableRow(context, token):841                self.start_rule(context, 'DataTable')842                self.build(context, token)843                return 16844        if self.match_DocStringSeparator(context, token):845                self.start_rule(context, 'DocString')846                self.build(context, token)847                return 30848        if self.match_StepLine(context, token):849                self.end_rule(context, 'Step')850                self.start_rule(context, 'Step')851                self.build(context, token)852                return 15853        if self.match_TagLine(context, token):854                self.end_rule(context, 'Step')855                self.end_rule(context, 'Scenario')856                self.end_rule(context, 'Scenario_Definition')857                self.start_rule(context, 'Scenario_Definition')858                self.start_rule(context, 'Tags')859                self.build(context, token)860                return 11861        if self.match_ScenarioLine(context, token):862                self.end_rule(context, 'Step')863                self.end_rule(context, 'Scenario')864                self.end_rule(context, 'Scenario_Definition')865                self.start_rule(context, 'Scenario_Definition')866                self.start_rule(context, 'Scenario')867                self.build(context, token)868                return 12869        if self.match_ScenarioOutlineLine(context, token):870                self.end_rule(context, 'Step')871                self.end_rule(context, 'Scenario')872                self.end_rule(context, 'Scenario_Definition')873                self.start_rule(context, 'Scenario_Definition')874                self.start_rule(context, 'ScenarioOutline')875                self.build(context, token)876                return 17877        if self.match_Comment(context, token):878                self.build(context, token)879                return 15880        if self.match_Empty(context, token):881                self.build(context, token)882                return 15883        state_comment = "State: 15 - Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:0>#StepLine:0"884        token.detach885        expected_tokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"]886        error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)887        if (self.stop_at_first_error):888            raise error889        self.add_error(context, error)890        return 15891    # Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:0892    def match_token_at_16(self, token, context):893        if self.match_EOF(context, token):894                self.end_rule(context, 'DataTable')895                self.end_rule(context, 'Step')896                self.end_rule(context, 'Scenario')897                self.end_rule(context, 'Scenario_Definition')898                self.build(context, token)899                return 27900        if self.match_TableRow(context, token):901                self.build(context, token)902                return 16903        if self.match_StepLine(context, token):904                self.end_rule(context, 'DataTable')905                self.end_rule(context, 'Step')906                self.start_rule(context, 'Step')907                self.build(context, token)908                return 15909        if self.match_TagLine(context, token):910                self.end_rule(context, 'DataTable')911                self.end_rule(context, 'Step')912                self.end_rule(context, 'Scenario')913                self.end_rule(context, 'Scenario_Definition')914                self.start_rule(context, 'Scenario_Definition')915                self.start_rule(context, 'Tags')916                self.build(context, token)917                return 11918        if self.match_ScenarioLine(context, token):919                self.end_rule(context, 'DataTable')920                self.end_rule(context, 'Step')921                self.end_rule(context, 'Scenario')922                self.end_rule(context, 'Scenario_Definition')923                self.start_rule(context, 'Scenario_Definition')924                self.start_rule(context, 'Scenario')925                self.build(context, token)926                return 12927        if self.match_ScenarioOutlineLine(context, token):928                self.end_rule(context, 'DataTable')929                self.end_rule(context, 'Step')930                self.end_rule(context, 'Scenario')931                self.end_rule(context, 'Scenario_Definition')932                self.start_rule(context, 'Scenario_Definition')933                self.start_rule(context, 'ScenarioOutline')934                self.build(context, token)935                return 17936        if self.match_Comment(context, token):937                self.build(context, token)938                return 16939        if self.match_Empty(context, token):940                self.build(context, token)941                return 16942        state_comment = "State: 16 - Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:0"943        token.detach944        expected_tokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"]945        error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)946        if (self.stop_at_first_error):947            raise error948        self.add_error(context, error)949        return 16950    # Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:0>#ScenarioOutlineLine:0951    def match_token_at_17(self, token, context):952        if self.match_EOF(context, token):953                self.end_rule(context, 'ScenarioOutline')954                self.end_rule(context, 'Scenario_Definition')955                self.build(context, token)956                return 27957        if self.match_Empty(context, token):958                self.build(context, token)959                return 17960        if self.match_Comment(context, token):961                self.build(context, token)962                return 19963        if self.match_StepLine(context, token):964                self.start_rule(context, 'Step')965                self.build(context, token)966                return 20967        if self.match_TagLine(context, token):968            if self.lookahead_0(context, token):969                self.start_rule(context, 'Examples_Definition')970                self.start_rule(context, 'Tags')971                self.build(context, token)972                return 22973        if self.match_TagLine(context, token):974                self.end_rule(context, 'ScenarioOutline')975                self.end_rule(context, 'Scenario_Definition')976                self.start_rule(context, 'Scenario_Definition')977                self.start_rule(context, 'Tags')978                self.build(context, token)979                return 11980        if self.match_ExamplesLine(context, token):981                self.start_rule(context, 'Examples_Definition')982                self.start_rule(context, 'Examples')983                self.build(context, token)984                return 23985        if self.match_ScenarioLine(context, token):986                self.end_rule(context, 'ScenarioOutline')987                self.end_rule(context, 'Scenario_Definition')988                self.start_rule(context, 'Scenario_Definition')989                self.start_rule(context, 'Scenario')990                self.build(context, token)991                return 12992        if self.match_ScenarioOutlineLine(context, token):993                self.end_rule(context, 'ScenarioOutline')994                self.end_rule(context, 'Scenario_Definition')995                self.start_rule(context, 'Scenario_Definition')996                self.start_rule(context, 'ScenarioOutline')997                self.build(context, token)998                return 17999        if self.match_Other(context, token):1000                self.start_rule(context, 'Description')1001                self.build(context, token)1002                return 181003        state_comment = "State: 17 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:0>#ScenarioOutlineLine:0"1004        token.detach1005        expected_tokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"]1006        error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)1007        if (self.stop_at_first_error):1008            raise error1009        self.add_error(context, error)1010        return 171011    # Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:1>ScenarioOutline_Description:0>Description_Helper:1>Description:0>#Other:01012    def match_token_at_18(self, token, context):1013        if self.match_EOF(context, token):1014                self.end_rule(context, 'Description')1015                self.end_rule(context, 'ScenarioOutline')1016                self.end_rule(context, 'Scenario_Definition')1017                self.build(context, token)1018                return 271019        if self.match_Comment(context, token):1020                self.end_rule(context, 'Description')1021                self.build(context, token)1022                return 191023        if self.match_StepLine(context, token):1024                self.end_rule(context, 'Description')1025                self.start_rule(context, 'Step')1026                self.build(context, token)1027                return 201028        if self.match_TagLine(context, token):1029            if self.lookahead_0(context, token):1030                self.end_rule(context, 'Description')1031                self.start_rule(context, 'Examples_Definition')1032                self.start_rule(context, 'Tags')1033                self.build(context, token)1034                return 221035        if self.match_TagLine(context, token):1036                self.end_rule(context, 'Description')1037                self.end_rule(context, 'ScenarioOutline')1038                self.end_rule(context, 'Scenario_Definition')1039                self.start_rule(context, 'Scenario_Definition')1040                self.start_rule(context, 'Tags')1041                self.build(context, token)1042                return 111043        if self.match_ExamplesLine(context, token):1044                self.end_rule(context, 'Description')1045                self.start_rule(context, 'Examples_Definition')1046                self.start_rule(context, 'Examples')1047                self.build(context, token)1048                return 231049        if self.match_ScenarioLine(context, token):1050                self.end_rule(context, 'Description')1051                self.end_rule(context, 'ScenarioOutline')1052                self.end_rule(context, 'Scenario_Definition')1053                self.start_rule(context, 'Scenario_Definition')1054                self.start_rule(context, 'Scenario')1055                self.build(context, token)1056                return 121057        if self.match_ScenarioOutlineLine(context, token):1058                self.end_rule(context, 'Description')1059                self.end_rule(context, 'ScenarioOutline')1060                self.end_rule(context, 'Scenario_Definition')1061                self.start_rule(context, 'Scenario_Definition')1062                self.start_rule(context, 'ScenarioOutline')1063                self.build(context, token)1064                return 171065        if self.match_Other(context, token):1066                self.build(context, token)1067                return 181068        state_comment = "State: 18 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:1>ScenarioOutline_Description:0>Description_Helper:1>Description:0>#Other:0"1069        token.detach1070        expected_tokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"]1071        error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)1072        if (self.stop_at_first_error):1073            raise error1074        self.add_error(context, error)1075        return 181076    # Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:1>ScenarioOutline_Description:0>Description_Helper:2>#Comment:01077    def match_token_at_19(self, token, context):1078        if self.match_EOF(context, token):1079                self.end_rule(context, 'ScenarioOutline')1080                self.end_rule(context, 'Scenario_Definition')1081                self.build(context, token)1082                return 271083        if self.match_Comment(context, token):1084                self.build(context, token)1085                return 191086        if self.match_StepLine(context, token):1087                self.start_rule(context, 'Step')1088                self.build(context, token)1089                return 201090        if self.match_TagLine(context, token):1091            if self.lookahead_0(context, token):1092                self.start_rule(context, 'Examples_Definition')1093                self.start_rule(context, 'Tags')1094                self.build(context, token)1095                return 221096        if self.match_TagLine(context, token):1097                self.end_rule(context, 'ScenarioOutline')1098                self.end_rule(context, 'Scenario_Definition')1099                self.start_rule(context, 'Scenario_Definition')1100                self.start_rule(context, 'Tags')1101                self.build(context, token)1102                return 111103        if self.match_ExamplesLine(context, token):1104                self.start_rule(context, 'Examples_Definition')1105                self.start_rule(context, 'Examples')1106                self.build(context, token)1107                return 231108        if self.match_ScenarioLine(context, token):1109                self.end_rule(context, 'ScenarioOutline')1110                self.end_rule(context, 'Scenario_Definition')1111                self.start_rule(context, 'Scenario_Definition')1112                self.start_rule(context, 'Scenario')1113                self.build(context, token)1114                return 121115        if self.match_ScenarioOutlineLine(context, token):1116                self.end_rule(context, 'ScenarioOutline')1117                self.end_rule(context, 'Scenario_Definition')1118                self.start_rule(context, 'Scenario_Definition')1119                self.start_rule(context, 'ScenarioOutline')1120                self.build(context, token)1121                return 171122        if self.match_Empty(context, token):1123                self.build(context, token)1124                return 191125        state_comment = "State: 19 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:1>ScenarioOutline_Description:0>Description_Helper:2>#Comment:0"1126        token.detach1127        expected_tokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Empty"]1128        error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)1129        if (self.stop_at_first_error):1130            raise error1131        self.add_error(context, error)1132        return 191133    # Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:0>#StepLine:01134    def match_token_at_20(self, token, context):1135        if self.match_EOF(context, token):1136                self.end_rule(context, 'Step')1137                self.end_rule(context, 'ScenarioOutline')1138                self.end_rule(context, 'Scenario_Definition')1139                self.build(context, token)1140                return 271141        if self.match_TableRow(context, token):1142                self.start_rule(context, 'DataTable')1143                self.build(context, token)1144                return 211145        if self.match_DocStringSeparator(context, token):1146                self.start_rule(context, 'DocString')1147                self.build(context, token)1148                return 281149        if self.match_StepLine(context, token):1150                self.end_rule(context, 'Step')1151                self.start_rule(context, 'Step')1152                self.build(context, token)1153                return 201154        if self.match_TagLine(context, token):1155            if self.lookahead_0(context, token):1156                self.end_rule(context, 'Step')1157                self.start_rule(context, 'Examples_Definition')1158                self.start_rule(context, 'Tags')1159                self.build(context, token)1160                return 221161        if self.match_TagLine(context, token):1162                self.end_rule(context, 'Step')1163                self.end_rule(context, 'ScenarioOutline')1164                self.end_rule(context, 'Scenario_Definition')1165                self.start_rule(context, 'Scenario_Definition')1166                self.start_rule(context, 'Tags')1167                self.build(context, token)1168                return 111169        if self.match_ExamplesLine(context, token):1170                self.end_rule(context, 'Step')1171                self.start_rule(context, 'Examples_Definition')1172                self.start_rule(context, 'Examples')1173                self.build(context, token)1174                return 231175        if self.match_ScenarioLine(context, token):1176                self.end_rule(context, 'Step')1177                self.end_rule(context, 'ScenarioOutline')1178                self.end_rule(context, 'Scenario_Definition')1179                self.start_rule(context, 'Scenario_Definition')1180                self.start_rule(context, 'Scenario')1181                self.build(context, token)1182                return 121183        if self.match_ScenarioOutlineLine(context, token):1184                self.end_rule(context, 'Step')1185                self.end_rule(context, 'ScenarioOutline')1186                self.end_rule(context, 'Scenario_Definition')1187                self.start_rule(context, 'Scenario_Definition')1188                self.start_rule(context, 'ScenarioOutline')1189                self.build(context, token)1190                return 171191        if self.match_Comment(context, token):1192                self.build(context, token)1193                return 201194        if self.match_Empty(context, token):1195                self.build(context, token)1196                return 201197        state_comment = "State: 20 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:0>#StepLine:0"1198        token.detach1199        expected_tokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"]1200        error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)1201        if (self.stop_at_first_error):1202            raise error1203        self.add_error(context, error)1204        return 201205    # Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:01206    def match_token_at_21(self, token, context):1207        if self.match_EOF(context, token):1208                self.end_rule(context, 'DataTable')1209                self.end_rule(context, 'Step')1210                self.end_rule(context, 'ScenarioOutline')1211                self.end_rule(context, 'Scenario_Definition')1212                self.build(context, token)1213                return 271214        if self.match_TableRow(context, token):1215                self.build(context, token)1216                return 211217        if self.match_StepLine(context, token):1218                self.end_rule(context, 'DataTable')1219                self.end_rule(context, 'Step')1220                self.start_rule(context, 'Step')1221                self.build(context, token)1222                return 201223        if self.match_TagLine(context, token):1224            if self.lookahead_0(context, token):1225                self.end_rule(context, 'DataTable')1226                self.end_rule(context, 'Step')1227                self.start_rule(context, 'Examples_Definition')1228                self.start_rule(context, 'Tags')1229                self.build(context, token)1230                return 221231        if self.match_TagLine(context, token):1232                self.end_rule(context, 'DataTable')1233                self.end_rule(context, 'Step')1234                self.end_rule(context, 'ScenarioOutline')1235                self.end_rule(context, 'Scenario_Definition')1236                self.start_rule(context, 'Scenario_Definition')1237                self.start_rule(context, 'Tags')1238                self.build(context, token)1239                return 111240        if self.match_ExamplesLine(context, token):1241                self.end_rule(context, 'DataTable')1242                self.end_rule(context, 'Step')1243                self.start_rule(context, 'Examples_Definition')1244                self.start_rule(context, 'Examples')1245                self.build(context, token)1246                return 231247        if self.match_ScenarioLine(context, token):1248                self.end_rule(context, 'DataTable')1249                self.end_rule(context, 'Step')1250                self.end_rule(context, 'ScenarioOutline')1251                self.end_rule(context, 'Scenario_Definition')1252                self.start_rule(context, 'Scenario_Definition')1253                self.start_rule(context, 'Scenario')1254                self.build(context, token)1255                return 121256        if self.match_ScenarioOutlineLine(context, token):1257                self.end_rule(context, 'DataTable')1258                self.end_rule(context, 'Step')1259                self.end_rule(context, 'ScenarioOutline')1260                self.end_rule(context, 'Scenario_Definition')1261                self.start_rule(context, 'Scenario_Definition')1262                self.start_rule(context, 'ScenarioOutline')1263                self.build(context, token)1264                return 171265        if self.match_Comment(context, token):1266                self.build(context, token)1267                return 211268        if self.match_Empty(context, token):1269                self.build(context, token)1270                return 211271        state_comment = "State: 21 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:0>DataTable:0>#TableRow:0"1272        token.detach1273        expected_tokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"]1274        error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)1275        if (self.stop_at_first_error):1276            raise error1277        self.add_error(context, error)1278        return 211279    # Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:0>Tags:0>#TagLine:01280    def match_token_at_22(self, token, context):1281        if self.match_TagLine(context, token):1282                self.build(context, token)1283                return 221284        if self.match_ExamplesLine(context, token):1285                self.end_rule(context, 'Tags')1286                self.start_rule(context, 'Examples')1287                self.build(context, token)1288                return 231289        if self.match_Comment(context, token):1290                self.build(context, token)1291                return 221292        if self.match_Empty(context, token):1293                self.build(context, token)1294                return 221295        state_comment = "State: 22 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:0>Tags:0>#TagLine:0"1296        token.detach1297        expected_tokens = ["#TagLine", "#ExamplesLine", "#Comment", "#Empty"]1298        error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)1299        if (self.stop_at_first_error):1300            raise error1301        self.add_error(context, error)1302        return 221303    # Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:0>#ExamplesLine:01304    def match_token_at_23(self, token, context):1305        if self.match_EOF(context, token):1306                self.end_rule(context, 'Examples')1307                self.end_rule(context, 'Examples_Definition')1308                self.end_rule(context, 'ScenarioOutline')1309                self.end_rule(context, 'Scenario_Definition')1310                self.build(context, token)1311                return 271312        if self.match_Empty(context, token):1313                self.build(context, token)1314                return 231315        if self.match_Comment(context, token):1316                self.build(context, token)1317                return 251318        if self.match_TableRow(context, token):1319                self.start_rule(context, 'Examples_Table')1320                self.build(context, token)1321                return 261322        if self.match_TagLine(context, token):1323            if self.lookahead_0(context, token):1324                self.end_rule(context, 'Examples')1325                self.end_rule(context, 'Examples_Definition')1326                self.start_rule(context, 'Examples_Definition')1327                self.start_rule(context, 'Tags')1328                self.build(context, token)1329                return 221330        if self.match_TagLine(context, token):1331                self.end_rule(context, 'Examples')1332                self.end_rule(context, 'Examples_Definition')1333                self.end_rule(context, 'ScenarioOutline')1334                self.end_rule(context, 'Scenario_Definition')1335                self.start_rule(context, 'Scenario_Definition')1336                self.start_rule(context, 'Tags')1337                self.build(context, token)1338                return 111339        if self.match_ExamplesLine(context, token):1340                self.end_rule(context, 'Examples')1341                self.end_rule(context, 'Examples_Definition')1342                self.start_rule(context, 'Examples_Definition')1343                self.start_rule(context, 'Examples')1344                self.build(context, token)1345                return 231346        if self.match_ScenarioLine(context, token):1347                self.end_rule(context, 'Examples')1348                self.end_rule(context, 'Examples_Definition')1349                self.end_rule(context, 'ScenarioOutline')1350                self.end_rule(context, 'Scenario_Definition')1351                self.start_rule(context, 'Scenario_Definition')1352                self.start_rule(context, 'Scenario')1353                self.build(context, token)1354                return 121355        if self.match_ScenarioOutlineLine(context, token):1356                self.end_rule(context, 'Examples')1357                self.end_rule(context, 'Examples_Definition')1358                self.end_rule(context, 'ScenarioOutline')1359                self.end_rule(context, 'Scenario_Definition')1360                self.start_rule(context, 'Scenario_Definition')1361                self.start_rule(context, 'ScenarioOutline')1362                self.build(context, token)1363                return 171364        if self.match_Other(context, token):1365                self.start_rule(context, 'Description')1366                self.build(context, token)1367                return 241368        state_comment = "State: 23 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:0>#ExamplesLine:0"1369        token.detach1370        expected_tokens = ["#EOF", "#Empty", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"]1371        error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)1372        if (self.stop_at_first_error):1373            raise error1374        self.add_error(context, error)1375        return 231376    # Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:1>Examples_Description:0>Description_Helper:1>Description:0>#Other:01377    def match_token_at_24(self, token, context):1378        if self.match_EOF(context, token):1379                self.end_rule(context, 'Description')1380                self.end_rule(context, 'Examples')1381                self.end_rule(context, 'Examples_Definition')1382                self.end_rule(context, 'ScenarioOutline')1383                self.end_rule(context, 'Scenario_Definition')1384                self.build(context, token)1385                return 271386        if self.match_Comment(context, token):1387                self.end_rule(context, 'Description')1388                self.build(context, token)1389                return 251390        if self.match_TableRow(context, token):1391                self.end_rule(context, 'Description')1392                self.start_rule(context, 'Examples_Table')1393                self.build(context, token)1394                return 261395        if self.match_TagLine(context, token):1396            if self.lookahead_0(context, token):1397                self.end_rule(context, 'Description')1398                self.end_rule(context, 'Examples')1399                self.end_rule(context, 'Examples_Definition')1400                self.start_rule(context, 'Examples_Definition')1401                self.start_rule(context, 'Tags')1402                self.build(context, token)1403                return 221404        if self.match_TagLine(context, token):1405                self.end_rule(context, 'Description')1406                self.end_rule(context, 'Examples')1407                self.end_rule(context, 'Examples_Definition')1408                self.end_rule(context, 'ScenarioOutline')1409                self.end_rule(context, 'Scenario_Definition')1410                self.start_rule(context, 'Scenario_Definition')1411                self.start_rule(context, 'Tags')1412                self.build(context, token)1413                return 111414        if self.match_ExamplesLine(context, token):1415                self.end_rule(context, 'Description')1416                self.end_rule(context, 'Examples')1417                self.end_rule(context, 'Examples_Definition')1418                self.start_rule(context, 'Examples_Definition')1419                self.start_rule(context, 'Examples')1420                self.build(context, token)1421                return 231422        if self.match_ScenarioLine(context, token):1423                self.end_rule(context, 'Description')1424                self.end_rule(context, 'Examples')1425                self.end_rule(context, 'Examples_Definition')1426                self.end_rule(context, 'ScenarioOutline')1427                self.end_rule(context, 'Scenario_Definition')1428                self.start_rule(context, 'Scenario_Definition')1429                self.start_rule(context, 'Scenario')1430                self.build(context, token)1431                return 121432        if self.match_ScenarioOutlineLine(context, token):1433                self.end_rule(context, 'Description')1434                self.end_rule(context, 'Examples')1435                self.end_rule(context, 'Examples_Definition')1436                self.end_rule(context, 'ScenarioOutline')1437                self.end_rule(context, 'Scenario_Definition')1438                self.start_rule(context, 'Scenario_Definition')1439                self.start_rule(context, 'ScenarioOutline')1440                self.build(context, token)1441                return 171442        if self.match_Other(context, token):1443                self.build(context, token)1444                return 241445        state_comment = "State: 24 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:1>Examples_Description:0>Description_Helper:1>Description:0>#Other:0"1446        token.detach1447        expected_tokens = ["#EOF", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Other"]1448        error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)1449        if (self.stop_at_first_error):1450            raise error1451        self.add_error(context, error)1452        return 241453    # Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:1>Examples_Description:0>Description_Helper:2>#Comment:01454    def match_token_at_25(self, token, context):1455        if self.match_EOF(context, token):1456                self.end_rule(context, 'Examples')1457                self.end_rule(context, 'Examples_Definition')1458                self.end_rule(context, 'ScenarioOutline')1459                self.end_rule(context, 'Scenario_Definition')1460                self.build(context, token)1461                return 271462        if self.match_Comment(context, token):1463                self.build(context, token)1464                return 251465        if self.match_TableRow(context, token):1466                self.start_rule(context, 'Examples_Table')1467                self.build(context, token)1468                return 261469        if self.match_TagLine(context, token):1470            if self.lookahead_0(context, token):1471                self.end_rule(context, 'Examples')1472                self.end_rule(context, 'Examples_Definition')1473                self.start_rule(context, 'Examples_Definition')1474                self.start_rule(context, 'Tags')1475                self.build(context, token)1476                return 221477        if self.match_TagLine(context, token):1478                self.end_rule(context, 'Examples')1479                self.end_rule(context, 'Examples_Definition')1480                self.end_rule(context, 'ScenarioOutline')1481                self.end_rule(context, 'Scenario_Definition')1482                self.start_rule(context, 'Scenario_Definition')1483                self.start_rule(context, 'Tags')1484                self.build(context, token)1485                return 111486        if self.match_ExamplesLine(context, token):1487                self.end_rule(context, 'Examples')1488                self.end_rule(context, 'Examples_Definition')1489                self.start_rule(context, 'Examples_Definition')1490                self.start_rule(context, 'Examples')1491                self.build(context, token)1492                return 231493        if self.match_ScenarioLine(context, token):1494                self.end_rule(context, 'Examples')1495                self.end_rule(context, 'Examples_Definition')1496                self.end_rule(context, 'ScenarioOutline')1497                self.end_rule(context, 'Scenario_Definition')1498                self.start_rule(context, 'Scenario_Definition')1499                self.start_rule(context, 'Scenario')1500                self.build(context, token)1501                return 121502        if self.match_ScenarioOutlineLine(context, token):1503                self.end_rule(context, 'Examples')1504                self.end_rule(context, 'Examples_Definition')1505                self.end_rule(context, 'ScenarioOutline')1506                self.end_rule(context, 'Scenario_Definition')1507                self.start_rule(context, 'Scenario_Definition')1508                self.start_rule(context, 'ScenarioOutline')1509                self.build(context, token)1510                return 171511        if self.match_Empty(context, token):1512                self.build(context, token)1513                return 251514        state_comment = "State: 25 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:1>Examples_Description:0>Description_Helper:2>#Comment:0"1515        token.detach1516        expected_tokens = ["#EOF", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Empty"]1517        error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)1518        if (self.stop_at_first_error):1519            raise error1520        self.add_error(context, error)1521        return 251522    # Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:2>Examples_Table:0>#TableRow:01523    def match_token_at_26(self, token, context):1524        if self.match_EOF(context, token):1525                self.end_rule(context, 'Examples_Table')1526                self.end_rule(context, 'Examples')1527                self.end_rule(context, 'Examples_Definition')1528                self.end_rule(context, 'ScenarioOutline')1529                self.end_rule(context, 'Scenario_Definition')1530                self.build(context, token)1531                return 271532        if self.match_TableRow(context, token):1533                self.build(context, token)1534                return 261535        if self.match_TagLine(context, token):1536            if self.lookahead_0(context, token):1537                self.end_rule(context, 'Examples_Table')1538                self.end_rule(context, 'Examples')1539                self.end_rule(context, 'Examples_Definition')1540                self.start_rule(context, 'Examples_Definition')1541                self.start_rule(context, 'Tags')1542                self.build(context, token)1543                return 221544        if self.match_TagLine(context, token):1545                self.end_rule(context, 'Examples_Table')1546                self.end_rule(context, 'Examples')1547                self.end_rule(context, 'Examples_Definition')1548                self.end_rule(context, 'ScenarioOutline')1549                self.end_rule(context, 'Scenario_Definition')1550                self.start_rule(context, 'Scenario_Definition')1551                self.start_rule(context, 'Tags')1552                self.build(context, token)1553                return 111554        if self.match_ExamplesLine(context, token):1555                self.end_rule(context, 'Examples_Table')1556                self.end_rule(context, 'Examples')1557                self.end_rule(context, 'Examples_Definition')1558                self.start_rule(context, 'Examples_Definition')1559                self.start_rule(context, 'Examples')1560                self.build(context, token)1561                return 231562        if self.match_ScenarioLine(context, token):1563                self.end_rule(context, 'Examples_Table')1564                self.end_rule(context, 'Examples')1565                self.end_rule(context, 'Examples_Definition')1566                self.end_rule(context, 'ScenarioOutline')1567                self.end_rule(context, 'Scenario_Definition')1568                self.start_rule(context, 'Scenario_Definition')1569                self.start_rule(context, 'Scenario')1570                self.build(context, token)1571                return 121572        if self.match_ScenarioOutlineLine(context, token):1573                self.end_rule(context, 'Examples_Table')1574                self.end_rule(context, 'Examples')1575                self.end_rule(context, 'Examples_Definition')1576                self.end_rule(context, 'ScenarioOutline')1577                self.end_rule(context, 'Scenario_Definition')1578                self.start_rule(context, 'Scenario_Definition')1579                self.start_rule(context, 'ScenarioOutline')1580                self.build(context, token)1581                return 171582        if self.match_Comment(context, token):1583                self.build(context, token)1584                return 261585        if self.match_Empty(context, token):1586                self.build(context, token)1587                return 261588        state_comment = "State: 26 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:3>Examples_Definition:1>Examples:2>Examples_Table:0>#TableRow:0"1589        token.detach1590        expected_tokens = ["#EOF", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"]1591        error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)1592        if (self.stop_at_first_error):1593            raise error1594        self.add_error(context, error)1595        return 261596    # Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:0>#DocStringSeparator:01597    def match_token_at_28(self, token, context):1598        if self.match_DocStringSeparator(context, token):1599                self.build(context, token)1600                return 291601        if self.match_Other(context, token):1602                self.build(context, token)1603                return 281604        state_comment = "State: 28 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:0>#DocStringSeparator:0"1605        token.detach1606        expected_tokens = ["#DocStringSeparator", "#Other"]1607        error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)1608        if (self.stop_at_first_error):1609            raise error1610        self.add_error(context, error)1611        return 281612    # Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:2>#DocStringSeparator:01613    def match_token_at_29(self, token, context):1614        if self.match_EOF(context, token):1615                self.end_rule(context, 'DocString')1616                self.end_rule(context, 'Step')1617                self.end_rule(context, 'ScenarioOutline')1618                self.end_rule(context, 'Scenario_Definition')1619                self.build(context, token)1620                return 271621        if self.match_StepLine(context, token):1622                self.end_rule(context, 'DocString')1623                self.end_rule(context, 'Step')1624                self.start_rule(context, 'Step')1625                self.build(context, token)1626                return 201627        if self.match_TagLine(context, token):1628            if self.lookahead_0(context, token):1629                self.end_rule(context, 'DocString')1630                self.end_rule(context, 'Step')1631                self.start_rule(context, 'Examples_Definition')1632                self.start_rule(context, 'Tags')1633                self.build(context, token)1634                return 221635        if self.match_TagLine(context, token):1636                self.end_rule(context, 'DocString')1637                self.end_rule(context, 'Step')1638                self.end_rule(context, 'ScenarioOutline')1639                self.end_rule(context, 'Scenario_Definition')1640                self.start_rule(context, 'Scenario_Definition')1641                self.start_rule(context, 'Tags')1642                self.build(context, token)1643                return 111644        if self.match_ExamplesLine(context, token):1645                self.end_rule(context, 'DocString')1646                self.end_rule(context, 'Step')1647                self.start_rule(context, 'Examples_Definition')1648                self.start_rule(context, 'Examples')1649                self.build(context, token)1650                return 231651        if self.match_ScenarioLine(context, token):1652                self.end_rule(context, 'DocString')1653                self.end_rule(context, 'Step')1654                self.end_rule(context, 'ScenarioOutline')1655                self.end_rule(context, 'Scenario_Definition')1656                self.start_rule(context, 'Scenario_Definition')1657                self.start_rule(context, 'Scenario')1658                self.build(context, token)1659                return 121660        if self.match_ScenarioOutlineLine(context, token):1661                self.end_rule(context, 'DocString')1662                self.end_rule(context, 'Step')1663                self.end_rule(context, 'ScenarioOutline')1664                self.end_rule(context, 'Scenario_Definition')1665                self.start_rule(context, 'Scenario_Definition')1666                self.start_rule(context, 'ScenarioOutline')1667                self.build(context, token)1668                return 171669        if self.match_Comment(context, token):1670                self.build(context, token)1671                return 291672        if self.match_Empty(context, token):1673                self.build(context, token)1674                return 291675        state_comment = "State: 29 - Feature:2>Scenario_Definition:1>__alt0:1>ScenarioOutline:2>ScenarioOutline_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:2>#DocStringSeparator:0"1676        token.detach1677        expected_tokens = ["#EOF", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"]1678        error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)1679        if (self.stop_at_first_error):1680            raise error1681        self.add_error(context, error)1682        return 291683    # Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:0>#DocStringSeparator:01684    def match_token_at_30(self, token, context):1685        if self.match_DocStringSeparator(context, token):1686                self.build(context, token)1687                return 311688        if self.match_Other(context, token):1689                self.build(context, token)1690                return 301691        state_comment = "State: 30 - Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:0>#DocStringSeparator:0"1692        token.detach1693        expected_tokens = ["#DocStringSeparator", "#Other"]1694        error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)1695        if (self.stop_at_first_error):1696            raise error1697        self.add_error(context, error)1698        return 301699    # Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:2>#DocStringSeparator:01700    def match_token_at_31(self, token, context):1701        if self.match_EOF(context, token):1702                self.end_rule(context, 'DocString')1703                self.end_rule(context, 'Step')1704                self.end_rule(context, 'Scenario')1705                self.end_rule(context, 'Scenario_Definition')1706                self.build(context, token)1707                return 271708        if self.match_StepLine(context, token):1709                self.end_rule(context, 'DocString')1710                self.end_rule(context, 'Step')1711                self.start_rule(context, 'Step')1712                self.build(context, token)1713                return 151714        if self.match_TagLine(context, token):1715                self.end_rule(context, 'DocString')1716                self.end_rule(context, 'Step')1717                self.end_rule(context, 'Scenario')1718                self.end_rule(context, 'Scenario_Definition')1719                self.start_rule(context, 'Scenario_Definition')1720                self.start_rule(context, 'Tags')1721                self.build(context, token)1722                return 111723        if self.match_ScenarioLine(context, token):1724                self.end_rule(context, 'DocString')1725                self.end_rule(context, 'Step')1726                self.end_rule(context, 'Scenario')1727                self.end_rule(context, 'Scenario_Definition')1728                self.start_rule(context, 'Scenario_Definition')1729                self.start_rule(context, 'Scenario')1730                self.build(context, token)1731                return 121732        if self.match_ScenarioOutlineLine(context, token):1733                self.end_rule(context, 'DocString')1734                self.end_rule(context, 'Step')1735                self.end_rule(context, 'Scenario')1736                self.end_rule(context, 'Scenario_Definition')1737                self.start_rule(context, 'Scenario_Definition')1738                self.start_rule(context, 'ScenarioOutline')1739                self.build(context, token)1740                return 171741        if self.match_Comment(context, token):1742                self.build(context, token)1743                return 311744        if self.match_Empty(context, token):1745                self.build(context, token)1746                return 311747        state_comment = "State: 31 - Feature:2>Scenario_Definition:1>__alt0:0>Scenario:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:2>#DocStringSeparator:0"1748        token.detach1749        expected_tokens = ["#EOF", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"]1750        error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)1751        if (self.stop_at_first_error):1752            raise error1753        self.add_error(context, error)1754        return 311755    # Feature:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:0>#DocStringSeparator:01756    def match_token_at_32(self, token, context):1757        if self.match_DocStringSeparator(context, token):1758                self.build(context, token)1759                return 331760        if self.match_Other(context, token):1761                self.build(context, token)1762                return 321763        state_comment = "State: 32 - Feature:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:0>#DocStringSeparator:0"1764        token.detach1765        expected_tokens = ["#DocStringSeparator", "#Other"]1766        error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)1767        if (self.stop_at_first_error):1768            raise error1769        self.add_error(context, error)1770        return 321771    # Feature:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:2>#DocStringSeparator:01772    def match_token_at_33(self, token, context):1773        if self.match_EOF(context, token):1774                self.end_rule(context, 'DocString')1775                self.end_rule(context, 'Step')1776                self.end_rule(context, 'Background')1777                self.build(context, token)1778                return 271779        if self.match_StepLine(context, token):1780                self.end_rule(context, 'DocString')1781                self.end_rule(context, 'Step')1782                self.start_rule(context, 'Step')1783                self.build(context, token)1784                return 91785        if self.match_TagLine(context, token):1786                self.end_rule(context, 'DocString')1787                self.end_rule(context, 'Step')1788                self.end_rule(context, 'Background')1789                self.start_rule(context, 'Scenario_Definition')1790                self.start_rule(context, 'Tags')1791                self.build(context, token)1792                return 111793        if self.match_ScenarioLine(context, token):1794                self.end_rule(context, 'DocString')1795                self.end_rule(context, 'Step')1796                self.end_rule(context, 'Background')1797                self.start_rule(context, 'Scenario_Definition')1798                self.start_rule(context, 'Scenario')1799                self.build(context, token)1800                return 121801        if self.match_ScenarioOutlineLine(context, token):1802                self.end_rule(context, 'DocString')1803                self.end_rule(context, 'Step')1804                self.end_rule(context, 'Background')1805                self.start_rule(context, 'Scenario_Definition')1806                self.start_rule(context, 'ScenarioOutline')1807                self.build(context, token)1808                return 171809        if self.match_Comment(context, token):1810                self.build(context, token)1811                return 331812        if self.match_Empty(context, token):1813                self.build(context, token)1814                return 331815        state_comment = "State: 33 - Feature:1>Background:2>Scenario_Step:0>Step:1>Step_Arg:0>__alt1:1>DocString:2>#DocStringSeparator:0"1816        token.detach1817        expected_tokens = ["#EOF", "#StepLine", "#TagLine", "#ScenarioLine", "#ScenarioOutlineLine", "#Comment", "#Empty"]1818        error = UnexpectedEOFException(token, expected_tokens, state_comment) if token.eof() else UnexpectedTokenException(token, expected_tokens, state_comment)1819        if (self.stop_at_first_error):1820            raise error1821        self.add_error(context, error)1822        return 331823    def lookahead_0(self, context, currentToken):1824        currentToken.detach1825        token = None1826        queue = []1827        match = False1828        while True:1829            token = self.read_token(context)1830            token.detach1831            queue.append(token)1832            if (self.match_ExamplesLine(context, token) or False):1833                match = True1834                break1835            if not (self.match_Empty(context, token) or self.match_Comment(context, token) or self.match_TagLine(context, token) or False):1836                break1837        context.token_queue.extend(queue)1838        return match1839    # private1840    def handle_ast_error(self, context, argument, action):1841        self.handle_external_error(context, True, argument, action)1842    def handle_external_error(self, context, default_value, argument, action):1843        if self.stop_at_first_error:1844            return action(argument)1845        try:1846            return action(argument)1847        except CompositeParserException as e:1848            for error in e.errors:1849                self.add_error(context, error)1850        except ParserException as e:1851            self.add_error(context, e)...slack_presenter.py
Source:slack_presenter.py  
...85            self.view["data"] = message86        else:87            self.view.status_code = code88            self.view.data = message89    def handle_external_error(self, error: ExternalException):90        message = f"External Error: {error}"91        code = 50092        if isinstance(self.view, dict):93            self.view["status_code"] = code94            self.view["data"] = message95        else:96            self.view.status_code = code97            self.view.data = message98    def handle_application_error(self, error: Exception):99        message = f"Application Error: {error}"100        code = 500101        if isinstance(self.view, dict):102            self.view["status_code"] = code103            self.view["data"] = message104        else:105            self.view.status_code = code106            self.view.data = message107    def handle_request_error(self, error: Exception):108        message = f"Request Error: {error}"109        code = 400110        if isinstance(self.view, dict):111            self.view["status_code"] = code112            self.view["data"] = message113        else:114            self.view.status_code = code115            self.view.data = message116    def _parse_lag_report_to_string(self, report: LagReportResponseModel):117        if report.success:118            text = f"""Stream Lag Report Success\nNo group id has lag"""119        else:120            text = f"""Stream Lag Report Fail\n"""121            for rep in report.streams:122                text += f"Topic: {rep.topic}, Group Id: {rep.group_id}, Bootstrap Servers: {rep.bootstrap_servers}, Lag: {rep.lag}"123                text += "\n"124        return text125    def _parse_detections_report_to_string(self, report: DetectionsReportResponseModel):126        text = "Topic {} from {} with group id {} processed {} out of {} alerts with {} missing\n"127        state_text = "Success" if report.success else "Failed"128        post_message = f"Detections Report {state_text}\n"129        for rep in report.streams:130            text_copy = text131            post_message += text_copy.format(132                rep.topic,133                rep.bootstrap_servers,134                rep.group_id,135                rep.processed,136                rep.total_messages,137                len(rep.difference),138            )139        return post_message140    def _parse_stamp_classifications_report_to_string(self, report: StampClassificationsReportResponseModel):141        tz = tzlocal.get_localzone()142        today = datetime.now(tz).strftime("%Y-%m-%d %H:%M:%S %z")143        post_message = f""":astronaut: :page_facing_up: ALeRCE's report of today ({today}):\n\t"""144        145        for rep in report.databases:146            if len(rep.counts) == 0:147                post_message += f"""⢠Database: {rep.database}\n\t⢠Host: {rep.host}\n\t:red_circle: No alerts today\n\t"""148        149            else:150                res = "" 151                for r in rep.counts:152                    res += f"\t\t\t - {r[0]:<8}: {r[1]:>7}\n"153                post_message += f"""⢠Database: {rep.database}\n\t⢠Host: {rep.host}\n\t⢠Objects observed last night: {rep.observed:>7} :night_with_stars:\n\t⢠New objects observed last night: {rep.new_objects:>7} :full_moon_with_face:\n\t⢠Stamp classifier distribution: \n {res}\t"""154        155        return post_message156        157    def post_to_slack(self, text: str):158        try:159            channels = self.slack_parameters.get("channel_names")160        except Exception as e:161            self.handle_client_error(162                ClientException(f"slack parameters not provided: {e}")163            )164            return165        try:166            for channel in channels:167                post_response = self.client.chat_postMessage(168                    channel=f"#{channel}", text=text169                )170        except Exception as e:171            self.handle_external_error(ExternalException(f"Error sending message: {e}"))172            return173        else:...controller.py
Source:controller.py  
...30    def _make_callbacks(self, report_type: str):31        def on_client_error(error: Exception):32            self.presenter.handle_client_error(error)33        def on_external_error(error: Exception):34            self.presenter.handle_external_error(error)35        def on_application_error(error: Exception):36            self.presenter.handle_application_error(error)37        if report_type == "lag_report":38            def on_success(response_model: LagReportResponseModel):39                self.presenter.export_lag_report(response_model)40            callbacks = {41                "success": on_success,42                "client_error": on_client_error,43                "external_error": on_external_error,44                "application_error": on_application_error,45            }46            return callbacks47        if report_type == "detections_report":48            def on_success(response_model: LagReportResponseModel):...presenter.py
Source:presenter.py  
...25    @abc.abstractmethod26    def handle_client_error(self, error):27        raise NotImplementedError28    @abc.abstractmethod29    def handle_external_error(self, error):30        raise NotImplementedError31    @abc.abstractmethod32    def handle_application_error(self, error):33        raise NotImplementedError34    @abc.abstractmethod35    def handle_request_error(self, error):...Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!
