How to use match_Other method of Parser class

Best Cucumber Common Library code snippet using Parser.match_Other

Parser.php

Source:Parser.php Github

copy

Full Screen

...160 fn () => $context->tokenMatcher->match_Language($token),161 false,162 );163 }164 private function match_Other(ParserContext $context, Token $token): bool165 {166 if ($token->isEOF()) {167 return false;168 }169 return $this->handleExternalError(170 $context,171 fn () => $context->tokenMatcher->match_Other($token),172 false,173 );174 }175 private function matchToken(int $state, Token $token, ParserContext $context): int176 {177 return match ($state) {178 0 => $this->matchTokenAt_0($token, $context),179 1 => $this->matchTokenAt_1($token, $context),180 2 => $this->matchTokenAt_2($token, $context),181 3 => $this->matchTokenAt_3($token, $context),182 4 => $this->matchTokenAt_4($token, $context),183 5 => $this->matchTokenAt_5($token, $context),184 6 => $this->matchTokenAt_6($token, $context),185 7 => $this->matchTokenAt_7($token, $context),186 8 => $this->matchTokenAt_8($token, $context),187 9 => $this->matchTokenAt_9($token, $context),188 10 => $this->matchTokenAt_10($token, $context),189 11 => $this->matchTokenAt_11($token, $context),190 12 => $this->matchTokenAt_12($token, $context),191 13 => $this->matchTokenAt_13($token, $context),192 14 => $this->matchTokenAt_14($token, $context),193 15 => $this->matchTokenAt_15($token, $context),194 16 => $this->matchTokenAt_16($token, $context),195 17 => $this->matchTokenAt_17($token, $context),196 18 => $this->matchTokenAt_18($token, $context),197 19 => $this->matchTokenAt_19($token, $context),198 20 => $this->matchTokenAt_20($token, $context),199 21 => $this->matchTokenAt_21($token, $context),200 22 => $this->matchTokenAt_22($token, $context),201 23 => $this->matchTokenAt_23($token, $context),202 24 => $this->matchTokenAt_24($token, $context),203 25 => $this->matchTokenAt_25($token, $context),204 26 => $this->matchTokenAt_26($token, $context),205 27 => $this->matchTokenAt_27($token, $context),206 28 => $this->matchTokenAt_28($token, $context),207 29 => $this->matchTokenAt_29($token, $context),208 30 => $this->matchTokenAt_30($token, $context),209 31 => $this->matchTokenAt_31($token, $context),210 32 => $this->matchTokenAt_32($token, $context),211 33 => $this->matchTokenAt_33($token, $context),212 34 => $this->matchTokenAt_34($token, $context),213 35 => $this->matchTokenAt_35($token, $context),214 36 => $this->matchTokenAt_36($token, $context),215 37 => $this->matchTokenAt_37($token, $context),216 38 => $this->matchTokenAt_38($token, $context),217 39 => $this->matchTokenAt_39($token, $context),218 40 => $this->matchTokenAt_40($token, $context),219 41 => $this->matchTokenAt_41($token, $context),220 43 => $this->matchTokenAt_43($token, $context),221 44 => $this->matchTokenAt_44($token, $context),222 45 => $this->matchTokenAt_45($token, $context),223 46 => $this->matchTokenAt_46($token, $context),224 47 => $this->matchTokenAt_47($token, $context),225 48 => $this->matchTokenAt_48($token, $context),226 49 => $this->matchTokenAt_49($token, $context),227 50 => $this->matchTokenAt_50($token, $context),228 default => throw new \LogicException("Unknown state: $state"),229 };230 }231 // Start232 private function matchTokenAt_0(Token $token, ParserContext $context): int233 {234 if ($this->match_EOF($context, $token)) {235 $this->build($context, $token);236 return 42;237 }238 if ($this->match_Language($context, $token)) {239 $this->startRule($context, RuleType::Feature);240 $this->startRule($context, RuleType::FeatureHeader);241 $this->build($context, $token);242 return 1;243 }244 if ($this->match_TagLine($context, $token)) {245 $this->startRule($context, RuleType::Feature);246 $this->startRule($context, RuleType::FeatureHeader);247 $this->startRule($context, RuleType::Tags);248 $this->build($context, $token);249 return 2;250 }251 if ($this->match_FeatureLine($context, $token)) {252 $this->startRule($context, RuleType::Feature);253 $this->startRule($context, RuleType::FeatureHeader);254 $this->build($context, $token);255 return 3;256 }257 if ($this->match_Comment($context, $token)) {258 $this->build($context, $token);259 return 0;260 }261 if ($this->match_Empty($context, $token)) {262 $this->build($context, $token);263 return 0;264 }265 $stateComment = "State: 0 - Start";266 $expectedTokens = ["#EOF", "#Language", "#TagLine", "#FeatureLine", "#Comment", "#Empty"];267 $error = $token->isEOF()268 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)269 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);270 $this->addError($context, $error);271 return 0;272 }273 // GherkinDocument:0>Feature:0>FeatureHeader:0>#Language:0274 private function matchTokenAt_1(Token $token, ParserContext $context): int275 {276 if ($this->match_TagLine($context, $token)) {277 $this->startRule($context, RuleType::Tags);278 $this->build($context, $token);279 return 2;280 }281 if ($this->match_FeatureLine($context, $token)) {282 $this->build($context, $token);283 return 3;284 }285 if ($this->match_Comment($context, $token)) {286 $this->build($context, $token);287 return 1;288 }289 if ($this->match_Empty($context, $token)) {290 $this->build($context, $token);291 return 1;292 }293 $stateComment = "State: 1 - GherkinDocument:0>Feature:0>FeatureHeader:0>#Language:0";294 $expectedTokens = ["#TagLine", "#FeatureLine", "#Comment", "#Empty"];295 $error = $token->isEOF()296 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)297 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);298 $this->addError($context, $error);299 return 1;300 }301 // GherkinDocument:0>Feature:0>FeatureHeader:1>Tags:0>#TagLine:0302 private function matchTokenAt_2(Token $token, ParserContext $context): int303 {304 if ($this->match_TagLine($context, $token)) {305 $this->build($context, $token);306 return 2;307 }308 if ($this->match_FeatureLine($context, $token)) {309 $this->endRule($context, RuleType::Tags);310 $this->build($context, $token);311 return 3;312 }313 if ($this->match_Comment($context, $token)) {314 $this->build($context, $token);315 return 2;316 }317 if ($this->match_Empty($context, $token)) {318 $this->build($context, $token);319 return 2;320 }321 $stateComment = "State: 2 - GherkinDocument:0>Feature:0>FeatureHeader:1>Tags:0>#TagLine:0";322 $expectedTokens = ["#TagLine", "#FeatureLine", "#Comment", "#Empty"];323 $error = $token->isEOF()324 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)325 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);326 $this->addError($context, $error);327 return 2;328 }329 // GherkinDocument:0>Feature:0>FeatureHeader:2>#FeatureLine:0330 private function matchTokenAt_3(Token $token, ParserContext $context): int331 {332 if ($this->match_EOF($context, $token)) {333 $this->endRule($context, RuleType::FeatureHeader);334 $this->endRule($context, RuleType::Feature);335 $this->build($context, $token);336 return 42;337 }338 if ($this->match_Empty($context, $token)) {339 $this->build($context, $token);340 return 3;341 }342 if ($this->match_Comment($context, $token)) {343 $this->build($context, $token);344 return 5;345 }346 if ($this->match_BackgroundLine($context, $token)) {347 $this->endRule($context, RuleType::FeatureHeader);348 $this->startRule($context, RuleType::Background);349 $this->build($context, $token);350 return 6;351 }352 if ($this->match_TagLine($context, $token)) {353 if ($this->lookahead_0($context)) {354 $this->endRule($context, RuleType::FeatureHeader);355 $this->startRule($context, RuleType::ScenarioDefinition);356 $this->startRule($context, RuleType::Tags);357 $this->build($context, $token);358 return 11;359 }360 }361 if ($this->match_TagLine($context, $token)) {362 $this->endRule($context, RuleType::FeatureHeader);363 $this->startRule($context, RuleType::Rule);364 $this->startRule($context, RuleType::RuleHeader);365 $this->startRule($context, RuleType::Tags);366 $this->build($context, $token);367 return 22;368 }369 if ($this->match_ScenarioLine($context, $token)) {370 $this->endRule($context, RuleType::FeatureHeader);371 $this->startRule($context, RuleType::ScenarioDefinition);372 $this->startRule($context, RuleType::Scenario);373 $this->build($context, $token);374 return 12;375 }376 if ($this->match_RuleLine($context, $token)) {377 $this->endRule($context, RuleType::FeatureHeader);378 $this->startRule($context, RuleType::Rule);379 $this->startRule($context, RuleType::RuleHeader);380 $this->build($context, $token);381 return 23;382 }383 if ($this->match_Other($context, $token)) {384 $this->startRule($context, RuleType::Description);385 $this->build($context, $token);386 return 4;387 }388 $stateComment = "State: 3 - GherkinDocument:0>Feature:0>FeatureHeader:2>#FeatureLine:0";389 $expectedTokens = ["#EOF", "#Empty", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"];390 $error = $token->isEOF()391 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)392 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);393 $this->addError($context, $error);394 return 3;395 }396 // GherkinDocument:0>Feature:0>FeatureHeader:3>DescriptionHelper:1>Description:0>#Other:0397 private function matchTokenAt_4(Token $token, ParserContext $context): int398 {399 if ($this->match_EOF($context, $token)) {400 $this->endRule($context, RuleType::Description);401 $this->endRule($context, RuleType::FeatureHeader);402 $this->endRule($context, RuleType::Feature);403 $this->build($context, $token);404 return 42;405 }406 if ($this->match_Comment($context, $token)) {407 $this->endRule($context, RuleType::Description);408 $this->build($context, $token);409 return 5;410 }411 if ($this->match_BackgroundLine($context, $token)) {412 $this->endRule($context, RuleType::Description);413 $this->endRule($context, RuleType::FeatureHeader);414 $this->startRule($context, RuleType::Background);415 $this->build($context, $token);416 return 6;417 }418 if ($this->match_TagLine($context, $token)) {419 if ($this->lookahead_0($context)) {420 $this->endRule($context, RuleType::Description);421 $this->endRule($context, RuleType::FeatureHeader);422 $this->startRule($context, RuleType::ScenarioDefinition);423 $this->startRule($context, RuleType::Tags);424 $this->build($context, $token);425 return 11;426 }427 }428 if ($this->match_TagLine($context, $token)) {429 $this->endRule($context, RuleType::Description);430 $this->endRule($context, RuleType::FeatureHeader);431 $this->startRule($context, RuleType::Rule);432 $this->startRule($context, RuleType::RuleHeader);433 $this->startRule($context, RuleType::Tags);434 $this->build($context, $token);435 return 22;436 }437 if ($this->match_ScenarioLine($context, $token)) {438 $this->endRule($context, RuleType::Description);439 $this->endRule($context, RuleType::FeatureHeader);440 $this->startRule($context, RuleType::ScenarioDefinition);441 $this->startRule($context, RuleType::Scenario);442 $this->build($context, $token);443 return 12;444 }445 if ($this->match_RuleLine($context, $token)) {446 $this->endRule($context, RuleType::Description);447 $this->endRule($context, RuleType::FeatureHeader);448 $this->startRule($context, RuleType::Rule);449 $this->startRule($context, RuleType::RuleHeader);450 $this->build($context, $token);451 return 23;452 }453 if ($this->match_Other($context, $token)) {454 $this->build($context, $token);455 return 4;456 }457 $stateComment = "State: 4 - GherkinDocument:0>Feature:0>FeatureHeader:3>DescriptionHelper:1>Description:0>#Other:0";458 $expectedTokens = ["#EOF", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"];459 $error = $token->isEOF()460 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)461 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);462 $this->addError($context, $error);463 return 4;464 }465 // GherkinDocument:0>Feature:0>FeatureHeader:3>DescriptionHelper:2>#Comment:0466 private function matchTokenAt_5(Token $token, ParserContext $context): int467 {468 if ($this->match_EOF($context, $token)) {469 $this->endRule($context, RuleType::FeatureHeader);470 $this->endRule($context, RuleType::Feature);471 $this->build($context, $token);472 return 42;473 }474 if ($this->match_Comment($context, $token)) {475 $this->build($context, $token);476 return 5;477 }478 if ($this->match_BackgroundLine($context, $token)) {479 $this->endRule($context, RuleType::FeatureHeader);480 $this->startRule($context, RuleType::Background);481 $this->build($context, $token);482 return 6;483 }484 if ($this->match_TagLine($context, $token)) {485 if ($this->lookahead_0($context)) {486 $this->endRule($context, RuleType::FeatureHeader);487 $this->startRule($context, RuleType::ScenarioDefinition);488 $this->startRule($context, RuleType::Tags);489 $this->build($context, $token);490 return 11;491 }492 }493 if ($this->match_TagLine($context, $token)) {494 $this->endRule($context, RuleType::FeatureHeader);495 $this->startRule($context, RuleType::Rule);496 $this->startRule($context, RuleType::RuleHeader);497 $this->startRule($context, RuleType::Tags);498 $this->build($context, $token);499 return 22;500 }501 if ($this->match_ScenarioLine($context, $token)) {502 $this->endRule($context, RuleType::FeatureHeader);503 $this->startRule($context, RuleType::ScenarioDefinition);504 $this->startRule($context, RuleType::Scenario);505 $this->build($context, $token);506 return 12;507 }508 if ($this->match_RuleLine($context, $token)) {509 $this->endRule($context, RuleType::FeatureHeader);510 $this->startRule($context, RuleType::Rule);511 $this->startRule($context, RuleType::RuleHeader);512 $this->build($context, $token);513 return 23;514 }515 if ($this->match_Empty($context, $token)) {516 $this->build($context, $token);517 return 5;518 }519 $stateComment = "State: 5 - GherkinDocument:0>Feature:0>FeatureHeader:3>DescriptionHelper:2>#Comment:0";520 $expectedTokens = ["#EOF", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Empty"];521 $error = $token->isEOF()522 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)523 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);524 $this->addError($context, $error);525 return 5;526 }527 // GherkinDocument:0>Feature:1>Background:0>#BackgroundLine:0528 private function matchTokenAt_6(Token $token, ParserContext $context): int529 {530 if ($this->match_EOF($context, $token)) {531 $this->endRule($context, RuleType::Background);532 $this->endRule($context, RuleType::Feature);533 $this->build($context, $token);534 return 42;535 }536 if ($this->match_Empty($context, $token)) {537 $this->build($context, $token);538 return 6;539 }540 if ($this->match_Comment($context, $token)) {541 $this->build($context, $token);542 return 8;543 }544 if ($this->match_StepLine($context, $token)) {545 $this->startRule($context, RuleType::Step);546 $this->build($context, $token);547 return 9;548 }549 if ($this->match_TagLine($context, $token)) {550 if ($this->lookahead_0($context)) {551 $this->endRule($context, RuleType::Background);552 $this->startRule($context, RuleType::ScenarioDefinition);553 $this->startRule($context, RuleType::Tags);554 $this->build($context, $token);555 return 11;556 }557 }558 if ($this->match_TagLine($context, $token)) {559 $this->endRule($context, RuleType::Background);560 $this->startRule($context, RuleType::Rule);561 $this->startRule($context, RuleType::RuleHeader);562 $this->startRule($context, RuleType::Tags);563 $this->build($context, $token);564 return 22;565 }566 if ($this->match_ScenarioLine($context, $token)) {567 $this->endRule($context, RuleType::Background);568 $this->startRule($context, RuleType::ScenarioDefinition);569 $this->startRule($context, RuleType::Scenario);570 $this->build($context, $token);571 return 12;572 }573 if ($this->match_RuleLine($context, $token)) {574 $this->endRule($context, RuleType::Background);575 $this->startRule($context, RuleType::Rule);576 $this->startRule($context, RuleType::RuleHeader);577 $this->build($context, $token);578 return 23;579 }580 if ($this->match_Other($context, $token)) {581 $this->startRule($context, RuleType::Description);582 $this->build($context, $token);583 return 7;584 }585 $stateComment = "State: 6 - GherkinDocument:0>Feature:1>Background:0>#BackgroundLine:0";586 $expectedTokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"];587 $error = $token->isEOF()588 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)589 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);590 $this->addError($context, $error);591 return 6;592 }593 // GherkinDocument:0>Feature:1>Background:1>DescriptionHelper:1>Description:0>#Other:0594 private function matchTokenAt_7(Token $token, ParserContext $context): int595 {596 if ($this->match_EOF($context, $token)) {597 $this->endRule($context, RuleType::Description);598 $this->endRule($context, RuleType::Background);599 $this->endRule($context, RuleType::Feature);600 $this->build($context, $token);601 return 42;602 }603 if ($this->match_Comment($context, $token)) {604 $this->endRule($context, RuleType::Description);605 $this->build($context, $token);606 return 8;607 }608 if ($this->match_StepLine($context, $token)) {609 $this->endRule($context, RuleType::Description);610 $this->startRule($context, RuleType::Step);611 $this->build($context, $token);612 return 9;613 }614 if ($this->match_TagLine($context, $token)) {615 if ($this->lookahead_0($context)) {616 $this->endRule($context, RuleType::Description);617 $this->endRule($context, RuleType::Background);618 $this->startRule($context, RuleType::ScenarioDefinition);619 $this->startRule($context, RuleType::Tags);620 $this->build($context, $token);621 return 11;622 }623 }624 if ($this->match_TagLine($context, $token)) {625 $this->endRule($context, RuleType::Description);626 $this->endRule($context, RuleType::Background);627 $this->startRule($context, RuleType::Rule);628 $this->startRule($context, RuleType::RuleHeader);629 $this->startRule($context, RuleType::Tags);630 $this->build($context, $token);631 return 22;632 }633 if ($this->match_ScenarioLine($context, $token)) {634 $this->endRule($context, RuleType::Description);635 $this->endRule($context, RuleType::Background);636 $this->startRule($context, RuleType::ScenarioDefinition);637 $this->startRule($context, RuleType::Scenario);638 $this->build($context, $token);639 return 12;640 }641 if ($this->match_RuleLine($context, $token)) {642 $this->endRule($context, RuleType::Description);643 $this->endRule($context, RuleType::Background);644 $this->startRule($context, RuleType::Rule);645 $this->startRule($context, RuleType::RuleHeader);646 $this->build($context, $token);647 return 23;648 }649 if ($this->match_Other($context, $token)) {650 $this->build($context, $token);651 return 7;652 }653 $stateComment = "State: 7 - GherkinDocument:0>Feature:1>Background:1>DescriptionHelper:1>Description:0>#Other:0";654 $expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"];655 $error = $token->isEOF()656 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)657 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);658 $this->addError($context, $error);659 return 7;660 }661 // GherkinDocument:0>Feature:1>Background:1>DescriptionHelper:2>#Comment:0662 private function matchTokenAt_8(Token $token, ParserContext $context): int663 {664 if ($this->match_EOF($context, $token)) {665 $this->endRule($context, RuleType::Background);666 $this->endRule($context, RuleType::Feature);667 $this->build($context, $token);668 return 42;669 }670 if ($this->match_Comment($context, $token)) {671 $this->build($context, $token);672 return 8;673 }674 if ($this->match_StepLine($context, $token)) {675 $this->startRule($context, RuleType::Step);676 $this->build($context, $token);677 return 9;678 }679 if ($this->match_TagLine($context, $token)) {680 if ($this->lookahead_0($context)) {681 $this->endRule($context, RuleType::Background);682 $this->startRule($context, RuleType::ScenarioDefinition);683 $this->startRule($context, RuleType::Tags);684 $this->build($context, $token);685 return 11;686 }687 }688 if ($this->match_TagLine($context, $token)) {689 $this->endRule($context, RuleType::Background);690 $this->startRule($context, RuleType::Rule);691 $this->startRule($context, RuleType::RuleHeader);692 $this->startRule($context, RuleType::Tags);693 $this->build($context, $token);694 return 22;695 }696 if ($this->match_ScenarioLine($context, $token)) {697 $this->endRule($context, RuleType::Background);698 $this->startRule($context, RuleType::ScenarioDefinition);699 $this->startRule($context, RuleType::Scenario);700 $this->build($context, $token);701 return 12;702 }703 if ($this->match_RuleLine($context, $token)) {704 $this->endRule($context, RuleType::Background);705 $this->startRule($context, RuleType::Rule);706 $this->startRule($context, RuleType::RuleHeader);707 $this->build($context, $token);708 return 23;709 }710 if ($this->match_Empty($context, $token)) {711 $this->build($context, $token);712 return 8;713 }714 $stateComment = "State: 8 - GherkinDocument:0>Feature:1>Background:1>DescriptionHelper:2>#Comment:0";715 $expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Empty"];716 $error = $token->isEOF()717 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)718 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);719 $this->addError($context, $error);720 return 8;721 }722 // GherkinDocument:0>Feature:1>Background:2>Step:0>#StepLine:0723 private function matchTokenAt_9(Token $token, ParserContext $context): int724 {725 if ($this->match_EOF($context, $token)) {726 $this->endRule($context, RuleType::Step);727 $this->endRule($context, RuleType::Background);728 $this->endRule($context, RuleType::Feature);729 $this->build($context, $token);730 return 42;731 }732 if ($this->match_TableRow($context, $token)) {733 $this->startRule($context, RuleType::DataTable);734 $this->build($context, $token);735 return 10;736 }737 if ($this->match_DocStringSeparator($context, $token)) {738 $this->startRule($context, RuleType::DocString);739 $this->build($context, $token);740 return 49;741 }742 if ($this->match_StepLine($context, $token)) {743 $this->endRule($context, RuleType::Step);744 $this->startRule($context, RuleType::Step);745 $this->build($context, $token);746 return 9;747 }748 if ($this->match_TagLine($context, $token)) {749 if ($this->lookahead_0($context)) {750 $this->endRule($context, RuleType::Step);751 $this->endRule($context, RuleType::Background);752 $this->startRule($context, RuleType::ScenarioDefinition);753 $this->startRule($context, RuleType::Tags);754 $this->build($context, $token);755 return 11;756 }757 }758 if ($this->match_TagLine($context, $token)) {759 $this->endRule($context, RuleType::Step);760 $this->endRule($context, RuleType::Background);761 $this->startRule($context, RuleType::Rule);762 $this->startRule($context, RuleType::RuleHeader);763 $this->startRule($context, RuleType::Tags);764 $this->build($context, $token);765 return 22;766 }767 if ($this->match_ScenarioLine($context, $token)) {768 $this->endRule($context, RuleType::Step);769 $this->endRule($context, RuleType::Background);770 $this->startRule($context, RuleType::ScenarioDefinition);771 $this->startRule($context, RuleType::Scenario);772 $this->build($context, $token);773 return 12;774 }775 if ($this->match_RuleLine($context, $token)) {776 $this->endRule($context, RuleType::Step);777 $this->endRule($context, RuleType::Background);778 $this->startRule($context, RuleType::Rule);779 $this->startRule($context, RuleType::RuleHeader);780 $this->build($context, $token);781 return 23;782 }783 if ($this->match_Comment($context, $token)) {784 $this->build($context, $token);785 return 9;786 }787 if ($this->match_Empty($context, $token)) {788 $this->build($context, $token);789 return 9;790 }791 $stateComment = "State: 9 - GherkinDocument:0>Feature:1>Background:2>Step:0>#StepLine:0";792 $expectedTokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];793 $error = $token->isEOF()794 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)795 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);796 $this->addError($context, $error);797 return 9;798 }799 // GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0800 private function matchTokenAt_10(Token $token, ParserContext $context): int801 {802 if ($this->match_EOF($context, $token)) {803 $this->endRule($context, RuleType::DataTable);804 $this->endRule($context, RuleType::Step);805 $this->endRule($context, RuleType::Background);806 $this->endRule($context, RuleType::Feature);807 $this->build($context, $token);808 return 42;809 }810 if ($this->match_TableRow($context, $token)) {811 $this->build($context, $token);812 return 10;813 }814 if ($this->match_StepLine($context, $token)) {815 $this->endRule($context, RuleType::DataTable);816 $this->endRule($context, RuleType::Step);817 $this->startRule($context, RuleType::Step);818 $this->build($context, $token);819 return 9;820 }821 if ($this->match_TagLine($context, $token)) {822 if ($this->lookahead_0($context)) {823 $this->endRule($context, RuleType::DataTable);824 $this->endRule($context, RuleType::Step);825 $this->endRule($context, RuleType::Background);826 $this->startRule($context, RuleType::ScenarioDefinition);827 $this->startRule($context, RuleType::Tags);828 $this->build($context, $token);829 return 11;830 }831 }832 if ($this->match_TagLine($context, $token)) {833 $this->endRule($context, RuleType::DataTable);834 $this->endRule($context, RuleType::Step);835 $this->endRule($context, RuleType::Background);836 $this->startRule($context, RuleType::Rule);837 $this->startRule($context, RuleType::RuleHeader);838 $this->startRule($context, RuleType::Tags);839 $this->build($context, $token);840 return 22;841 }842 if ($this->match_ScenarioLine($context, $token)) {843 $this->endRule($context, RuleType::DataTable);844 $this->endRule($context, RuleType::Step);845 $this->endRule($context, RuleType::Background);846 $this->startRule($context, RuleType::ScenarioDefinition);847 $this->startRule($context, RuleType::Scenario);848 $this->build($context, $token);849 return 12;850 }851 if ($this->match_RuleLine($context, $token)) {852 $this->endRule($context, RuleType::DataTable);853 $this->endRule($context, RuleType::Step);854 $this->endRule($context, RuleType::Background);855 $this->startRule($context, RuleType::Rule);856 $this->startRule($context, RuleType::RuleHeader);857 $this->build($context, $token);858 return 23;859 }860 if ($this->match_Comment($context, $token)) {861 $this->build($context, $token);862 return 10;863 }864 if ($this->match_Empty($context, $token)) {865 $this->build($context, $token);866 return 10;867 }868 $stateComment = "State: 10 - GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0";869 $expectedTokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];870 $error = $token->isEOF()871 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)872 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);873 $this->addError($context, $error);874 return 10;875 }876 // GherkinDocument:0>Feature:2>ScenarioDefinition:0>Tags:0>#TagLine:0877 private function matchTokenAt_11(Token $token, ParserContext $context): int878 {879 if ($this->match_TagLine($context, $token)) {880 $this->build($context, $token);881 return 11;882 }883 if ($this->match_ScenarioLine($context, $token)) {884 $this->endRule($context, RuleType::Tags);885 $this->startRule($context, RuleType::Scenario);886 $this->build($context, $token);887 return 12;888 }889 if ($this->match_Comment($context, $token)) {890 $this->build($context, $token);891 return 11;892 }893 if ($this->match_Empty($context, $token)) {894 $this->build($context, $token);895 return 11;896 }897 $stateComment = "State: 11 - GherkinDocument:0>Feature:2>ScenarioDefinition:0>Tags:0>#TagLine:0";898 $expectedTokens = ["#TagLine", "#ScenarioLine", "#Comment", "#Empty"];899 $error = $token->isEOF()900 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)901 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);902 $this->addError($context, $error);903 return 11;904 }905 // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:0>#ScenarioLine:0906 private function matchTokenAt_12(Token $token, ParserContext $context): int907 {908 if ($this->match_EOF($context, $token)) {909 $this->endRule($context, RuleType::Scenario);910 $this->endRule($context, RuleType::ScenarioDefinition);911 $this->endRule($context, RuleType::Feature);912 $this->build($context, $token);913 return 42;914 }915 if ($this->match_Empty($context, $token)) {916 $this->build($context, $token);917 return 12;918 }919 if ($this->match_Comment($context, $token)) {920 $this->build($context, $token);921 return 14;922 }923 if ($this->match_StepLine($context, $token)) {924 $this->startRule($context, RuleType::Step);925 $this->build($context, $token);926 return 15;927 }928 if ($this->match_TagLine($context, $token)) {929 if ($this->lookahead_1($context)) {930 $this->startRule($context, RuleType::ExamplesDefinition);931 $this->startRule($context, RuleType::Tags);932 $this->build($context, $token);933 return 17;934 }935 }936 if ($this->match_TagLine($context, $token)) {937 if ($this->lookahead_0($context)) {938 $this->endRule($context, RuleType::Scenario);939 $this->endRule($context, RuleType::ScenarioDefinition);940 $this->startRule($context, RuleType::ScenarioDefinition);941 $this->startRule($context, RuleType::Tags);942 $this->build($context, $token);943 return 11;944 }945 }946 if ($this->match_TagLine($context, $token)) {947 $this->endRule($context, RuleType::Scenario);948 $this->endRule($context, RuleType::ScenarioDefinition);949 $this->startRule($context, RuleType::Rule);950 $this->startRule($context, RuleType::RuleHeader);951 $this->startRule($context, RuleType::Tags);952 $this->build($context, $token);953 return 22;954 }955 if ($this->match_ExamplesLine($context, $token)) {956 $this->startRule($context, RuleType::ExamplesDefinition);957 $this->startRule($context, RuleType::Examples);958 $this->build($context, $token);959 return 18;960 }961 if ($this->match_ScenarioLine($context, $token)) {962 $this->endRule($context, RuleType::Scenario);963 $this->endRule($context, RuleType::ScenarioDefinition);964 $this->startRule($context, RuleType::ScenarioDefinition);965 $this->startRule($context, RuleType::Scenario);966 $this->build($context, $token);967 return 12;968 }969 if ($this->match_RuleLine($context, $token)) {970 $this->endRule($context, RuleType::Scenario);971 $this->endRule($context, RuleType::ScenarioDefinition);972 $this->startRule($context, RuleType::Rule);973 $this->startRule($context, RuleType::RuleHeader);974 $this->build($context, $token);975 return 23;976 }977 if ($this->match_Other($context, $token)) {978 $this->startRule($context, RuleType::Description);979 $this->build($context, $token);980 return 13;981 }982 $stateComment = "State: 12 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:0>#ScenarioLine:0";983 $expectedTokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"];984 $error = $token->isEOF()985 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)986 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);987 $this->addError($context, $error);988 return 12;989 }990 // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:1>Description:0>#Other:0991 private function matchTokenAt_13(Token $token, ParserContext $context): int992 {993 if ($this->match_EOF($context, $token)) {994 $this->endRule($context, RuleType::Description);995 $this->endRule($context, RuleType::Scenario);996 $this->endRule($context, RuleType::ScenarioDefinition);997 $this->endRule($context, RuleType::Feature);998 $this->build($context, $token);999 return 42;1000 }1001 if ($this->match_Comment($context, $token)) {1002 $this->endRule($context, RuleType::Description);1003 $this->build($context, $token);1004 return 14;1005 }1006 if ($this->match_StepLine($context, $token)) {1007 $this->endRule($context, RuleType::Description);1008 $this->startRule($context, RuleType::Step);1009 $this->build($context, $token);1010 return 15;1011 }1012 if ($this->match_TagLine($context, $token)) {1013 if ($this->lookahead_1($context)) {1014 $this->endRule($context, RuleType::Description);1015 $this->startRule($context, RuleType::ExamplesDefinition);1016 $this->startRule($context, RuleType::Tags);1017 $this->build($context, $token);1018 return 17;1019 }1020 }1021 if ($this->match_TagLine($context, $token)) {1022 if ($this->lookahead_0($context)) {1023 $this->endRule($context, RuleType::Description);1024 $this->endRule($context, RuleType::Scenario);1025 $this->endRule($context, RuleType::ScenarioDefinition);1026 $this->startRule($context, RuleType::ScenarioDefinition);1027 $this->startRule($context, RuleType::Tags);1028 $this->build($context, $token);1029 return 11;1030 }1031 }1032 if ($this->match_TagLine($context, $token)) {1033 $this->endRule($context, RuleType::Description);1034 $this->endRule($context, RuleType::Scenario);1035 $this->endRule($context, RuleType::ScenarioDefinition);1036 $this->startRule($context, RuleType::Rule);1037 $this->startRule($context, RuleType::RuleHeader);1038 $this->startRule($context, RuleType::Tags);1039 $this->build($context, $token);1040 return 22;1041 }1042 if ($this->match_ExamplesLine($context, $token)) {1043 $this->endRule($context, RuleType::Description);1044 $this->startRule($context, RuleType::ExamplesDefinition);1045 $this->startRule($context, RuleType::Examples);1046 $this->build($context, $token);1047 return 18;1048 }1049 if ($this->match_ScenarioLine($context, $token)) {1050 $this->endRule($context, RuleType::Description);1051 $this->endRule($context, RuleType::Scenario);1052 $this->endRule($context, RuleType::ScenarioDefinition);1053 $this->startRule($context, RuleType::ScenarioDefinition);1054 $this->startRule($context, RuleType::Scenario);1055 $this->build($context, $token);1056 return 12;1057 }1058 if ($this->match_RuleLine($context, $token)) {1059 $this->endRule($context, RuleType::Description);1060 $this->endRule($context, RuleType::Scenario);1061 $this->endRule($context, RuleType::ScenarioDefinition);1062 $this->startRule($context, RuleType::Rule);1063 $this->startRule($context, RuleType::RuleHeader);1064 $this->build($context, $token);1065 return 23;1066 }1067 if ($this->match_Other($context, $token)) {1068 $this->build($context, $token);1069 return 13;1070 }1071 $stateComment = "State: 13 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:1>Description:0>#Other:0";1072 $expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"];1073 $error = $token->isEOF()1074 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)1075 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);1076 $this->addError($context, $error);1077 return 13;1078 }1079 // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:2>#Comment:01080 private function matchTokenAt_14(Token $token, ParserContext $context): int1081 {1082 if ($this->match_EOF($context, $token)) {1083 $this->endRule($context, RuleType::Scenario);1084 $this->endRule($context, RuleType::ScenarioDefinition);1085 $this->endRule($context, RuleType::Feature);1086 $this->build($context, $token);1087 return 42;1088 }1089 if ($this->match_Comment($context, $token)) {1090 $this->build($context, $token);1091 return 14;1092 }1093 if ($this->match_StepLine($context, $token)) {1094 $this->startRule($context, RuleType::Step);1095 $this->build($context, $token);1096 return 15;1097 }1098 if ($this->match_TagLine($context, $token)) {1099 if ($this->lookahead_1($context)) {1100 $this->startRule($context, RuleType::ExamplesDefinition);1101 $this->startRule($context, RuleType::Tags);1102 $this->build($context, $token);1103 return 17;1104 }1105 }1106 if ($this->match_TagLine($context, $token)) {1107 if ($this->lookahead_0($context)) {1108 $this->endRule($context, RuleType::Scenario);1109 $this->endRule($context, RuleType::ScenarioDefinition);1110 $this->startRule($context, RuleType::ScenarioDefinition);1111 $this->startRule($context, RuleType::Tags);1112 $this->build($context, $token);1113 return 11;1114 }1115 }1116 if ($this->match_TagLine($context, $token)) {1117 $this->endRule($context, RuleType::Scenario);1118 $this->endRule($context, RuleType::ScenarioDefinition);1119 $this->startRule($context, RuleType::Rule);1120 $this->startRule($context, RuleType::RuleHeader);1121 $this->startRule($context, RuleType::Tags);1122 $this->build($context, $token);1123 return 22;1124 }1125 if ($this->match_ExamplesLine($context, $token)) {1126 $this->startRule($context, RuleType::ExamplesDefinition);1127 $this->startRule($context, RuleType::Examples);1128 $this->build($context, $token);1129 return 18;1130 }1131 if ($this->match_ScenarioLine($context, $token)) {1132 $this->endRule($context, RuleType::Scenario);1133 $this->endRule($context, RuleType::ScenarioDefinition);1134 $this->startRule($context, RuleType::ScenarioDefinition);1135 $this->startRule($context, RuleType::Scenario);1136 $this->build($context, $token);1137 return 12;1138 }1139 if ($this->match_RuleLine($context, $token)) {1140 $this->endRule($context, RuleType::Scenario);1141 $this->endRule($context, RuleType::ScenarioDefinition);1142 $this->startRule($context, RuleType::Rule);1143 $this->startRule($context, RuleType::RuleHeader);1144 $this->build($context, $token);1145 return 23;1146 }1147 if ($this->match_Empty($context, $token)) {1148 $this->build($context, $token);1149 return 14;1150 }1151 $stateComment = "State: 14 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:2>#Comment:0";1152 $expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Empty"];1153 $error = $token->isEOF()1154 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)1155 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);1156 $this->addError($context, $error);1157 return 14;1158 }1159 // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:0>#StepLine:01160 private function matchTokenAt_15(Token $token, ParserContext $context): int1161 {1162 if ($this->match_EOF($context, $token)) {1163 $this->endRule($context, RuleType::Step);1164 $this->endRule($context, RuleType::Scenario);1165 $this->endRule($context, RuleType::ScenarioDefinition);1166 $this->endRule($context, RuleType::Feature);1167 $this->build($context, $token);1168 return 42;1169 }1170 if ($this->match_TableRow($context, $token)) {1171 $this->startRule($context, RuleType::DataTable);1172 $this->build($context, $token);1173 return 16;1174 }1175 if ($this->match_DocStringSeparator($context, $token)) {1176 $this->startRule($context, RuleType::DocString);1177 $this->build($context, $token);1178 return 47;1179 }1180 if ($this->match_StepLine($context, $token)) {1181 $this->endRule($context, RuleType::Step);1182 $this->startRule($context, RuleType::Step);1183 $this->build($context, $token);1184 return 15;1185 }1186 if ($this->match_TagLine($context, $token)) {1187 if ($this->lookahead_1($context)) {1188 $this->endRule($context, RuleType::Step);1189 $this->startRule($context, RuleType::ExamplesDefinition);1190 $this->startRule($context, RuleType::Tags);1191 $this->build($context, $token);1192 return 17;1193 }1194 }1195 if ($this->match_TagLine($context, $token)) {1196 if ($this->lookahead_0($context)) {1197 $this->endRule($context, RuleType::Step);1198 $this->endRule($context, RuleType::Scenario);1199 $this->endRule($context, RuleType::ScenarioDefinition);1200 $this->startRule($context, RuleType::ScenarioDefinition);1201 $this->startRule($context, RuleType::Tags);1202 $this->build($context, $token);1203 return 11;1204 }1205 }1206 if ($this->match_TagLine($context, $token)) {1207 $this->endRule($context, RuleType::Step);1208 $this->endRule($context, RuleType::Scenario);1209 $this->endRule($context, RuleType::ScenarioDefinition);1210 $this->startRule($context, RuleType::Rule);1211 $this->startRule($context, RuleType::RuleHeader);1212 $this->startRule($context, RuleType::Tags);1213 $this->build($context, $token);1214 return 22;1215 }1216 if ($this->match_ExamplesLine($context, $token)) {1217 $this->endRule($context, RuleType::Step);1218 $this->startRule($context, RuleType::ExamplesDefinition);1219 $this->startRule($context, RuleType::Examples);1220 $this->build($context, $token);1221 return 18;1222 }1223 if ($this->match_ScenarioLine($context, $token)) {1224 $this->endRule($context, RuleType::Step);1225 $this->endRule($context, RuleType::Scenario);1226 $this->endRule($context, RuleType::ScenarioDefinition);1227 $this->startRule($context, RuleType::ScenarioDefinition);1228 $this->startRule($context, RuleType::Scenario);1229 $this->build($context, $token);1230 return 12;1231 }1232 if ($this->match_RuleLine($context, $token)) {1233 $this->endRule($context, RuleType::Step);1234 $this->endRule($context, RuleType::Scenario);1235 $this->endRule($context, RuleType::ScenarioDefinition);1236 $this->startRule($context, RuleType::Rule);1237 $this->startRule($context, RuleType::RuleHeader);1238 $this->build($context, $token);1239 return 23;1240 }1241 if ($this->match_Comment($context, $token)) {1242 $this->build($context, $token);1243 return 15;1244 }1245 if ($this->match_Empty($context, $token)) {1246 $this->build($context, $token);1247 return 15;1248 }1249 $stateComment = "State: 15 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:0>#StepLine:0";1250 $expectedTokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];1251 $error = $token->isEOF()1252 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)1253 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);1254 $this->addError($context, $error);1255 return 15;1256 }1257 // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:01258 private function matchTokenAt_16(Token $token, ParserContext $context): int1259 {1260 if ($this->match_EOF($context, $token)) {1261 $this->endRule($context, RuleType::DataTable);1262 $this->endRule($context, RuleType::Step);1263 $this->endRule($context, RuleType::Scenario);1264 $this->endRule($context, RuleType::ScenarioDefinition);1265 $this->endRule($context, RuleType::Feature);1266 $this->build($context, $token);1267 return 42;1268 }1269 if ($this->match_TableRow($context, $token)) {1270 $this->build($context, $token);1271 return 16;1272 }1273 if ($this->match_StepLine($context, $token)) {1274 $this->endRule($context, RuleType::DataTable);1275 $this->endRule($context, RuleType::Step);1276 $this->startRule($context, RuleType::Step);1277 $this->build($context, $token);1278 return 15;1279 }1280 if ($this->match_TagLine($context, $token)) {1281 if ($this->lookahead_1($context)) {1282 $this->endRule($context, RuleType::DataTable);1283 $this->endRule($context, RuleType::Step);1284 $this->startRule($context, RuleType::ExamplesDefinition);1285 $this->startRule($context, RuleType::Tags);1286 $this->build($context, $token);1287 return 17;1288 }1289 }1290 if ($this->match_TagLine($context, $token)) {1291 if ($this->lookahead_0($context)) {1292 $this->endRule($context, RuleType::DataTable);1293 $this->endRule($context, RuleType::Step);1294 $this->endRule($context, RuleType::Scenario);1295 $this->endRule($context, RuleType::ScenarioDefinition);1296 $this->startRule($context, RuleType::ScenarioDefinition);1297 $this->startRule($context, RuleType::Tags);1298 $this->build($context, $token);1299 return 11;1300 }1301 }1302 if ($this->match_TagLine($context, $token)) {1303 $this->endRule($context, RuleType::DataTable);1304 $this->endRule($context, RuleType::Step);1305 $this->endRule($context, RuleType::Scenario);1306 $this->endRule($context, RuleType::ScenarioDefinition);1307 $this->startRule($context, RuleType::Rule);1308 $this->startRule($context, RuleType::RuleHeader);1309 $this->startRule($context, RuleType::Tags);1310 $this->build($context, $token);1311 return 22;1312 }1313 if ($this->match_ExamplesLine($context, $token)) {1314 $this->endRule($context, RuleType::DataTable);1315 $this->endRule($context, RuleType::Step);1316 $this->startRule($context, RuleType::ExamplesDefinition);1317 $this->startRule($context, RuleType::Examples);1318 $this->build($context, $token);1319 return 18;1320 }1321 if ($this->match_ScenarioLine($context, $token)) {1322 $this->endRule($context, RuleType::DataTable);1323 $this->endRule($context, RuleType::Step);1324 $this->endRule($context, RuleType::Scenario);1325 $this->endRule($context, RuleType::ScenarioDefinition);1326 $this->startRule($context, RuleType::ScenarioDefinition);1327 $this->startRule($context, RuleType::Scenario);1328 $this->build($context, $token);1329 return 12;1330 }1331 if ($this->match_RuleLine($context, $token)) {1332 $this->endRule($context, RuleType::DataTable);1333 $this->endRule($context, RuleType::Step);1334 $this->endRule($context, RuleType::Scenario);1335 $this->endRule($context, RuleType::ScenarioDefinition);1336 $this->startRule($context, RuleType::Rule);1337 $this->startRule($context, RuleType::RuleHeader);1338 $this->build($context, $token);1339 return 23;1340 }1341 if ($this->match_Comment($context, $token)) {1342 $this->build($context, $token);1343 return 16;1344 }1345 if ($this->match_Empty($context, $token)) {1346 $this->build($context, $token);1347 return 16;1348 }1349 $stateComment = "State: 16 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0";1350 $expectedTokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];1351 $error = $token->isEOF()1352 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)1353 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);1354 $this->addError($context, $error);1355 return 16;1356 }1357 // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:0>Tags:0>#TagLine:01358 private function matchTokenAt_17(Token $token, ParserContext $context): int1359 {1360 if ($this->match_TagLine($context, $token)) {1361 $this->build($context, $token);1362 return 17;1363 }1364 if ($this->match_ExamplesLine($context, $token)) {1365 $this->endRule($context, RuleType::Tags);1366 $this->startRule($context, RuleType::Examples);1367 $this->build($context, $token);1368 return 18;1369 }1370 if ($this->match_Comment($context, $token)) {1371 $this->build($context, $token);1372 return 17;1373 }1374 if ($this->match_Empty($context, $token)) {1375 $this->build($context, $token);1376 return 17;1377 }1378 $stateComment = "State: 17 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:0>Tags:0>#TagLine:0";1379 $expectedTokens = ["#TagLine", "#ExamplesLine", "#Comment", "#Empty"];1380 $error = $token->isEOF()1381 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)1382 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);1383 $this->addError($context, $error);1384 return 17;1385 }1386 // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:0>#ExamplesLine:01387 private function matchTokenAt_18(Token $token, ParserContext $context): int1388 {1389 if ($this->match_EOF($context, $token)) {1390 $this->endRule($context, RuleType::Examples);1391 $this->endRule($context, RuleType::ExamplesDefinition);1392 $this->endRule($context, RuleType::Scenario);1393 $this->endRule($context, RuleType::ScenarioDefinition);1394 $this->endRule($context, RuleType::Feature);1395 $this->build($context, $token);1396 return 42;1397 }1398 if ($this->match_Empty($context, $token)) {1399 $this->build($context, $token);1400 return 18;1401 }1402 if ($this->match_Comment($context, $token)) {1403 $this->build($context, $token);1404 return 20;1405 }1406 if ($this->match_TableRow($context, $token)) {1407 $this->startRule($context, RuleType::ExamplesTable);1408 $this->build($context, $token);1409 return 21;1410 }1411 if ($this->match_TagLine($context, $token)) {1412 if ($this->lookahead_1($context)) {1413 $this->endRule($context, RuleType::Examples);1414 $this->endRule($context, RuleType::ExamplesDefinition);1415 $this->startRule($context, RuleType::ExamplesDefinition);1416 $this->startRule($context, RuleType::Tags);1417 $this->build($context, $token);1418 return 17;1419 }1420 }1421 if ($this->match_TagLine($context, $token)) {1422 if ($this->lookahead_0($context)) {1423 $this->endRule($context, RuleType::Examples);1424 $this->endRule($context, RuleType::ExamplesDefinition);1425 $this->endRule($context, RuleType::Scenario);1426 $this->endRule($context, RuleType::ScenarioDefinition);1427 $this->startRule($context, RuleType::ScenarioDefinition);1428 $this->startRule($context, RuleType::Tags);1429 $this->build($context, $token);1430 return 11;1431 }1432 }1433 if ($this->match_TagLine($context, $token)) {1434 $this->endRule($context, RuleType::Examples);1435 $this->endRule($context, RuleType::ExamplesDefinition);1436 $this->endRule($context, RuleType::Scenario);1437 $this->endRule($context, RuleType::ScenarioDefinition);1438 $this->startRule($context, RuleType::Rule);1439 $this->startRule($context, RuleType::RuleHeader);1440 $this->startRule($context, RuleType::Tags);1441 $this->build($context, $token);1442 return 22;1443 }1444 if ($this->match_ExamplesLine($context, $token)) {1445 $this->endRule($context, RuleType::Examples);1446 $this->endRule($context, RuleType::ExamplesDefinition);1447 $this->startRule($context, RuleType::ExamplesDefinition);1448 $this->startRule($context, RuleType::Examples);1449 $this->build($context, $token);1450 return 18;1451 }1452 if ($this->match_ScenarioLine($context, $token)) {1453 $this->endRule($context, RuleType::Examples);1454 $this->endRule($context, RuleType::ExamplesDefinition);1455 $this->endRule($context, RuleType::Scenario);1456 $this->endRule($context, RuleType::ScenarioDefinition);1457 $this->startRule($context, RuleType::ScenarioDefinition);1458 $this->startRule($context, RuleType::Scenario);1459 $this->build($context, $token);1460 return 12;1461 }1462 if ($this->match_RuleLine($context, $token)) {1463 $this->endRule($context, RuleType::Examples);1464 $this->endRule($context, RuleType::ExamplesDefinition);1465 $this->endRule($context, RuleType::Scenario);1466 $this->endRule($context, RuleType::ScenarioDefinition);1467 $this->startRule($context, RuleType::Rule);1468 $this->startRule($context, RuleType::RuleHeader);1469 $this->build($context, $token);1470 return 23;1471 }1472 if ($this->match_Other($context, $token)) {1473 $this->startRule($context, RuleType::Description);1474 $this->build($context, $token);1475 return 19;1476 }1477 $stateComment = "State: 18 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:0>#ExamplesLine:0";1478 $expectedTokens = ["#EOF", "#Empty", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"];1479 $error = $token->isEOF()1480 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)1481 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);1482 $this->addError($context, $error);1483 return 18;1484 }1485 // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:1>Description:0>#Other:01486 private function matchTokenAt_19(Token $token, ParserContext $context): int1487 {1488 if ($this->match_EOF($context, $token)) {1489 $this->endRule($context, RuleType::Description);1490 $this->endRule($context, RuleType::Examples);1491 $this->endRule($context, RuleType::ExamplesDefinition);1492 $this->endRule($context, RuleType::Scenario);1493 $this->endRule($context, RuleType::ScenarioDefinition);1494 $this->endRule($context, RuleType::Feature);1495 $this->build($context, $token);1496 return 42;1497 }1498 if ($this->match_Comment($context, $token)) {1499 $this->endRule($context, RuleType::Description);1500 $this->build($context, $token);1501 return 20;1502 }1503 if ($this->match_TableRow($context, $token)) {1504 $this->endRule($context, RuleType::Description);1505 $this->startRule($context, RuleType::ExamplesTable);1506 $this->build($context, $token);1507 return 21;1508 }1509 if ($this->match_TagLine($context, $token)) {1510 if ($this->lookahead_1($context)) {1511 $this->endRule($context, RuleType::Description);1512 $this->endRule($context, RuleType::Examples);1513 $this->endRule($context, RuleType::ExamplesDefinition);1514 $this->startRule($context, RuleType::ExamplesDefinition);1515 $this->startRule($context, RuleType::Tags);1516 $this->build($context, $token);1517 return 17;1518 }1519 }1520 if ($this->match_TagLine($context, $token)) {1521 if ($this->lookahead_0($context)) {1522 $this->endRule($context, RuleType::Description);1523 $this->endRule($context, RuleType::Examples);1524 $this->endRule($context, RuleType::ExamplesDefinition);1525 $this->endRule($context, RuleType::Scenario);1526 $this->endRule($context, RuleType::ScenarioDefinition);1527 $this->startRule($context, RuleType::ScenarioDefinition);1528 $this->startRule($context, RuleType::Tags);1529 $this->build($context, $token);1530 return 11;1531 }1532 }1533 if ($this->match_TagLine($context, $token)) {1534 $this->endRule($context, RuleType::Description);1535 $this->endRule($context, RuleType::Examples);1536 $this->endRule($context, RuleType::ExamplesDefinition);1537 $this->endRule($context, RuleType::Scenario);1538 $this->endRule($context, RuleType::ScenarioDefinition);1539 $this->startRule($context, RuleType::Rule);1540 $this->startRule($context, RuleType::RuleHeader);1541 $this->startRule($context, RuleType::Tags);1542 $this->build($context, $token);1543 return 22;1544 }1545 if ($this->match_ExamplesLine($context, $token)) {1546 $this->endRule($context, RuleType::Description);1547 $this->endRule($context, RuleType::Examples);1548 $this->endRule($context, RuleType::ExamplesDefinition);1549 $this->startRule($context, RuleType::ExamplesDefinition);1550 $this->startRule($context, RuleType::Examples);1551 $this->build($context, $token);1552 return 18;1553 }1554 if ($this->match_ScenarioLine($context, $token)) {1555 $this->endRule($context, RuleType::Description);1556 $this->endRule($context, RuleType::Examples);1557 $this->endRule($context, RuleType::ExamplesDefinition);1558 $this->endRule($context, RuleType::Scenario);1559 $this->endRule($context, RuleType::ScenarioDefinition);1560 $this->startRule($context, RuleType::ScenarioDefinition);1561 $this->startRule($context, RuleType::Scenario);1562 $this->build($context, $token);1563 return 12;1564 }1565 if ($this->match_RuleLine($context, $token)) {1566 $this->endRule($context, RuleType::Description);1567 $this->endRule($context, RuleType::Examples);1568 $this->endRule($context, RuleType::ExamplesDefinition);1569 $this->endRule($context, RuleType::Scenario);1570 $this->endRule($context, RuleType::ScenarioDefinition);1571 $this->startRule($context, RuleType::Rule);1572 $this->startRule($context, RuleType::RuleHeader);1573 $this->build($context, $token);1574 return 23;1575 }1576 if ($this->match_Other($context, $token)) {1577 $this->build($context, $token);1578 return 19;1579 }1580 $stateComment = "State: 19 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:1>Description:0>#Other:0";1581 $expectedTokens = ["#EOF", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"];1582 $error = $token->isEOF()1583 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)1584 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);1585 $this->addError($context, $error);1586 return 19;1587 }1588 // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:2>#Comment:01589 private function matchTokenAt_20(Token $token, ParserContext $context): int1590 {1591 if ($this->match_EOF($context, $token)) {1592 $this->endRule($context, RuleType::Examples);1593 $this->endRule($context, RuleType::ExamplesDefinition);1594 $this->endRule($context, RuleType::Scenario);1595 $this->endRule($context, RuleType::ScenarioDefinition);1596 $this->endRule($context, RuleType::Feature);1597 $this->build($context, $token);1598 return 42;1599 }1600 if ($this->match_Comment($context, $token)) {1601 $this->build($context, $token);1602 return 20;1603 }1604 if ($this->match_TableRow($context, $token)) {1605 $this->startRule($context, RuleType::ExamplesTable);1606 $this->build($context, $token);1607 return 21;1608 }1609 if ($this->match_TagLine($context, $token)) {1610 if ($this->lookahead_1($context)) {1611 $this->endRule($context, RuleType::Examples);1612 $this->endRule($context, RuleType::ExamplesDefinition);1613 $this->startRule($context, RuleType::ExamplesDefinition);1614 $this->startRule($context, RuleType::Tags);1615 $this->build($context, $token);1616 return 17;1617 }1618 }1619 if ($this->match_TagLine($context, $token)) {1620 if ($this->lookahead_0($context)) {1621 $this->endRule($context, RuleType::Examples);1622 $this->endRule($context, RuleType::ExamplesDefinition);1623 $this->endRule($context, RuleType::Scenario);1624 $this->endRule($context, RuleType::ScenarioDefinition);1625 $this->startRule($context, RuleType::ScenarioDefinition);1626 $this->startRule($context, RuleType::Tags);1627 $this->build($context, $token);1628 return 11;1629 }1630 }1631 if ($this->match_TagLine($context, $token)) {1632 $this->endRule($context, RuleType::Examples);1633 $this->endRule($context, RuleType::ExamplesDefinition);1634 $this->endRule($context, RuleType::Scenario);1635 $this->endRule($context, RuleType::ScenarioDefinition);1636 $this->startRule($context, RuleType::Rule);1637 $this->startRule($context, RuleType::RuleHeader);1638 $this->startRule($context, RuleType::Tags);1639 $this->build($context, $token);1640 return 22;1641 }1642 if ($this->match_ExamplesLine($context, $token)) {1643 $this->endRule($context, RuleType::Examples);1644 $this->endRule($context, RuleType::ExamplesDefinition);1645 $this->startRule($context, RuleType::ExamplesDefinition);1646 $this->startRule($context, RuleType::Examples);1647 $this->build($context, $token);1648 return 18;1649 }1650 if ($this->match_ScenarioLine($context, $token)) {1651 $this->endRule($context, RuleType::Examples);1652 $this->endRule($context, RuleType::ExamplesDefinition);1653 $this->endRule($context, RuleType::Scenario);1654 $this->endRule($context, RuleType::ScenarioDefinition);1655 $this->startRule($context, RuleType::ScenarioDefinition);1656 $this->startRule($context, RuleType::Scenario);1657 $this->build($context, $token);1658 return 12;1659 }1660 if ($this->match_RuleLine($context, $token)) {1661 $this->endRule($context, RuleType::Examples);1662 $this->endRule($context, RuleType::ExamplesDefinition);1663 $this->endRule($context, RuleType::Scenario);1664 $this->endRule($context, RuleType::ScenarioDefinition);1665 $this->startRule($context, RuleType::Rule);1666 $this->startRule($context, RuleType::RuleHeader);1667 $this->build($context, $token);1668 return 23;1669 }1670 if ($this->match_Empty($context, $token)) {1671 $this->build($context, $token);1672 return 20;1673 }1674 $stateComment = "State: 20 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:2>#Comment:0";1675 $expectedTokens = ["#EOF", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Empty"];1676 $error = $token->isEOF()1677 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)1678 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);1679 $this->addError($context, $error);1680 return 20;1681 }1682 // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:2>ExamplesTable:0>#TableRow:01683 private function matchTokenAt_21(Token $token, ParserContext $context): int1684 {1685 if ($this->match_EOF($context, $token)) {1686 $this->endRule($context, RuleType::ExamplesTable);1687 $this->endRule($context, RuleType::Examples);1688 $this->endRule($context, RuleType::ExamplesDefinition);1689 $this->endRule($context, RuleType::Scenario);1690 $this->endRule($context, RuleType::ScenarioDefinition);1691 $this->endRule($context, RuleType::Feature);1692 $this->build($context, $token);1693 return 42;1694 }1695 if ($this->match_TableRow($context, $token)) {1696 $this->build($context, $token);1697 return 21;1698 }1699 if ($this->match_TagLine($context, $token)) {1700 if ($this->lookahead_1($context)) {1701 $this->endRule($context, RuleType::ExamplesTable);1702 $this->endRule($context, RuleType::Examples);1703 $this->endRule($context, RuleType::ExamplesDefinition);1704 $this->startRule($context, RuleType::ExamplesDefinition);1705 $this->startRule($context, RuleType::Tags);1706 $this->build($context, $token);1707 return 17;1708 }1709 }1710 if ($this->match_TagLine($context, $token)) {1711 if ($this->lookahead_0($context)) {1712 $this->endRule($context, RuleType::ExamplesTable);1713 $this->endRule($context, RuleType::Examples);1714 $this->endRule($context, RuleType::ExamplesDefinition);1715 $this->endRule($context, RuleType::Scenario);1716 $this->endRule($context, RuleType::ScenarioDefinition);1717 $this->startRule($context, RuleType::ScenarioDefinition);1718 $this->startRule($context, RuleType::Tags);1719 $this->build($context, $token);1720 return 11;1721 }1722 }1723 if ($this->match_TagLine($context, $token)) {1724 $this->endRule($context, RuleType::ExamplesTable);1725 $this->endRule($context, RuleType::Examples);1726 $this->endRule($context, RuleType::ExamplesDefinition);1727 $this->endRule($context, RuleType::Scenario);1728 $this->endRule($context, RuleType::ScenarioDefinition);1729 $this->startRule($context, RuleType::Rule);1730 $this->startRule($context, RuleType::RuleHeader);1731 $this->startRule($context, RuleType::Tags);1732 $this->build($context, $token);1733 return 22;1734 }1735 if ($this->match_ExamplesLine($context, $token)) {1736 $this->endRule($context, RuleType::ExamplesTable);1737 $this->endRule($context, RuleType::Examples);1738 $this->endRule($context, RuleType::ExamplesDefinition);1739 $this->startRule($context, RuleType::ExamplesDefinition);1740 $this->startRule($context, RuleType::Examples);1741 $this->build($context, $token);1742 return 18;1743 }1744 if ($this->match_ScenarioLine($context, $token)) {1745 $this->endRule($context, RuleType::ExamplesTable);1746 $this->endRule($context, RuleType::Examples);1747 $this->endRule($context, RuleType::ExamplesDefinition);1748 $this->endRule($context, RuleType::Scenario);1749 $this->endRule($context, RuleType::ScenarioDefinition);1750 $this->startRule($context, RuleType::ScenarioDefinition);1751 $this->startRule($context, RuleType::Scenario);1752 $this->build($context, $token);1753 return 12;1754 }1755 if ($this->match_RuleLine($context, $token)) {1756 $this->endRule($context, RuleType::ExamplesTable);1757 $this->endRule($context, RuleType::Examples);1758 $this->endRule($context, RuleType::ExamplesDefinition);1759 $this->endRule($context, RuleType::Scenario);1760 $this->endRule($context, RuleType::ScenarioDefinition);1761 $this->startRule($context, RuleType::Rule);1762 $this->startRule($context, RuleType::RuleHeader);1763 $this->build($context, $token);1764 return 23;1765 }1766 if ($this->match_Comment($context, $token)) {1767 $this->build($context, $token);1768 return 21;1769 }1770 if ($this->match_Empty($context, $token)) {1771 $this->build($context, $token);1772 return 21;1773 }1774 $stateComment = "State: 21 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:2>ExamplesTable:0>#TableRow:0";1775 $expectedTokens = ["#EOF", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];1776 $error = $token->isEOF()1777 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)1778 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);1779 $this->addError($context, $error);1780 return 21;1781 }1782 // GherkinDocument:0>Feature:3>Rule:0>RuleHeader:0>Tags:0>#TagLine:01783 private function matchTokenAt_22(Token $token, ParserContext $context): int1784 {1785 if ($this->match_TagLine($context, $token)) {1786 $this->build($context, $token);1787 return 22;1788 }1789 if ($this->match_RuleLine($context, $token)) {1790 $this->endRule($context, RuleType::Tags);1791 $this->build($context, $token);1792 return 23;1793 }1794 if ($this->match_Comment($context, $token)) {1795 $this->build($context, $token);1796 return 22;1797 }1798 if ($this->match_Empty($context, $token)) {1799 $this->build($context, $token);1800 return 22;1801 }1802 $stateComment = "State: 22 - GherkinDocument:0>Feature:3>Rule:0>RuleHeader:0>Tags:0>#TagLine:0";1803 $expectedTokens = ["#TagLine", "#RuleLine", "#Comment", "#Empty"];1804 $error = $token->isEOF()1805 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)1806 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);1807 $this->addError($context, $error);1808 return 22;1809 }1810 // GherkinDocument:0>Feature:3>Rule:0>RuleHeader:1>#RuleLine:01811 private function matchTokenAt_23(Token $token, ParserContext $context): int1812 {1813 if ($this->match_EOF($context, $token)) {1814 $this->endRule($context, RuleType::RuleHeader);1815 $this->endRule($context, RuleType::Rule);1816 $this->endRule($context, RuleType::Feature);1817 $this->build($context, $token);1818 return 42;1819 }1820 if ($this->match_Empty($context, $token)) {1821 $this->build($context, $token);1822 return 23;1823 }1824 if ($this->match_Comment($context, $token)) {1825 $this->build($context, $token);1826 return 25;1827 }1828 if ($this->match_BackgroundLine($context, $token)) {1829 $this->endRule($context, RuleType::RuleHeader);1830 $this->startRule($context, RuleType::Background);1831 $this->build($context, $token);1832 return 26;1833 }1834 if ($this->match_TagLine($context, $token)) {1835 if ($this->lookahead_0($context)) {1836 $this->endRule($context, RuleType::RuleHeader);1837 $this->startRule($context, RuleType::ScenarioDefinition);1838 $this->startRule($context, RuleType::Tags);1839 $this->build($context, $token);1840 return 31;1841 }1842 }1843 if ($this->match_TagLine($context, $token)) {1844 $this->endRule($context, RuleType::RuleHeader);1845 $this->endRule($context, RuleType::Rule);1846 $this->startRule($context, RuleType::Rule);1847 $this->startRule($context, RuleType::RuleHeader);1848 $this->startRule($context, RuleType::Tags);1849 $this->build($context, $token);1850 return 22;1851 }1852 if ($this->match_ScenarioLine($context, $token)) {1853 $this->endRule($context, RuleType::RuleHeader);1854 $this->startRule($context, RuleType::ScenarioDefinition);1855 $this->startRule($context, RuleType::Scenario);1856 $this->build($context, $token);1857 return 32;1858 }1859 if ($this->match_RuleLine($context, $token)) {1860 $this->endRule($context, RuleType::RuleHeader);1861 $this->endRule($context, RuleType::Rule);1862 $this->startRule($context, RuleType::Rule);1863 $this->startRule($context, RuleType::RuleHeader);1864 $this->build($context, $token);1865 return 23;1866 }1867 if ($this->match_Other($context, $token)) {1868 $this->startRule($context, RuleType::Description);1869 $this->build($context, $token);1870 return 24;1871 }1872 $stateComment = "State: 23 - GherkinDocument:0>Feature:3>Rule:0>RuleHeader:1>#RuleLine:0";1873 $expectedTokens = ["#EOF", "#Empty", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"];1874 $error = $token->isEOF()1875 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)1876 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);1877 $this->addError($context, $error);1878 return 23;1879 }1880 // GherkinDocument:0>Feature:3>Rule:0>RuleHeader:2>DescriptionHelper:1>Description:0>#Other:01881 private function matchTokenAt_24(Token $token, ParserContext $context): int1882 {1883 if ($this->match_EOF($context, $token)) {1884 $this->endRule($context, RuleType::Description);1885 $this->endRule($context, RuleType::RuleHeader);1886 $this->endRule($context, RuleType::Rule);1887 $this->endRule($context, RuleType::Feature);1888 $this->build($context, $token);1889 return 42;1890 }1891 if ($this->match_Comment($context, $token)) {1892 $this->endRule($context, RuleType::Description);1893 $this->build($context, $token);1894 return 25;1895 }1896 if ($this->match_BackgroundLine($context, $token)) {1897 $this->endRule($context, RuleType::Description);1898 $this->endRule($context, RuleType::RuleHeader);1899 $this->startRule($context, RuleType::Background);1900 $this->build($context, $token);1901 return 26;1902 }1903 if ($this->match_TagLine($context, $token)) {1904 if ($this->lookahead_0($context)) {1905 $this->endRule($context, RuleType::Description);1906 $this->endRule($context, RuleType::RuleHeader);1907 $this->startRule($context, RuleType::ScenarioDefinition);1908 $this->startRule($context, RuleType::Tags);1909 $this->build($context, $token);1910 return 31;1911 }1912 }1913 if ($this->match_TagLine($context, $token)) {1914 $this->endRule($context, RuleType::Description);1915 $this->endRule($context, RuleType::RuleHeader);1916 $this->endRule($context, RuleType::Rule);1917 $this->startRule($context, RuleType::Rule);1918 $this->startRule($context, RuleType::RuleHeader);1919 $this->startRule($context, RuleType::Tags);1920 $this->build($context, $token);1921 return 22;1922 }1923 if ($this->match_ScenarioLine($context, $token)) {1924 $this->endRule($context, RuleType::Description);1925 $this->endRule($context, RuleType::RuleHeader);1926 $this->startRule($context, RuleType::ScenarioDefinition);1927 $this->startRule($context, RuleType::Scenario);1928 $this->build($context, $token);1929 return 32;1930 }1931 if ($this->match_RuleLine($context, $token)) {1932 $this->endRule($context, RuleType::Description);1933 $this->endRule($context, RuleType::RuleHeader);1934 $this->endRule($context, RuleType::Rule);1935 $this->startRule($context, RuleType::Rule);1936 $this->startRule($context, RuleType::RuleHeader);1937 $this->build($context, $token);1938 return 23;1939 }1940 if ($this->match_Other($context, $token)) {1941 $this->build($context, $token);1942 return 24;1943 }1944 $stateComment = "State: 24 - GherkinDocument:0>Feature:3>Rule:0>RuleHeader:2>DescriptionHelper:1>Description:0>#Other:0";1945 $expectedTokens = ["#EOF", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"];1946 $error = $token->isEOF()1947 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)1948 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);1949 $this->addError($context, $error);1950 return 24;1951 }1952 // GherkinDocument:0>Feature:3>Rule:0>RuleHeader:2>DescriptionHelper:2>#Comment:01953 private function matchTokenAt_25(Token $token, ParserContext $context): int1954 {1955 if ($this->match_EOF($context, $token)) {1956 $this->endRule($context, RuleType::RuleHeader);1957 $this->endRule($context, RuleType::Rule);1958 $this->endRule($context, RuleType::Feature);1959 $this->build($context, $token);1960 return 42;1961 }1962 if ($this->match_Comment($context, $token)) {1963 $this->build($context, $token);1964 return 25;1965 }1966 if ($this->match_BackgroundLine($context, $token)) {1967 $this->endRule($context, RuleType::RuleHeader);1968 $this->startRule($context, RuleType::Background);1969 $this->build($context, $token);1970 return 26;1971 }1972 if ($this->match_TagLine($context, $token)) {1973 if ($this->lookahead_0($context)) {1974 $this->endRule($context, RuleType::RuleHeader);1975 $this->startRule($context, RuleType::ScenarioDefinition);1976 $this->startRule($context, RuleType::Tags);1977 $this->build($context, $token);1978 return 31;1979 }1980 }1981 if ($this->match_TagLine($context, $token)) {1982 $this->endRule($context, RuleType::RuleHeader);1983 $this->endRule($context, RuleType::Rule);1984 $this->startRule($context, RuleType::Rule);1985 $this->startRule($context, RuleType::RuleHeader);1986 $this->startRule($context, RuleType::Tags);1987 $this->build($context, $token);1988 return 22;1989 }1990 if ($this->match_ScenarioLine($context, $token)) {1991 $this->endRule($context, RuleType::RuleHeader);1992 $this->startRule($context, RuleType::ScenarioDefinition);1993 $this->startRule($context, RuleType::Scenario);1994 $this->build($context, $token);1995 return 32;1996 }1997 if ($this->match_RuleLine($context, $token)) {1998 $this->endRule($context, RuleType::RuleHeader);1999 $this->endRule($context, RuleType::Rule);2000 $this->startRule($context, RuleType::Rule);2001 $this->startRule($context, RuleType::RuleHeader);2002 $this->build($context, $token);2003 return 23;2004 }2005 if ($this->match_Empty($context, $token)) {2006 $this->build($context, $token);2007 return 25;2008 }2009 $stateComment = "State: 25 - GherkinDocument:0>Feature:3>Rule:0>RuleHeader:2>DescriptionHelper:2>#Comment:0";2010 $expectedTokens = ["#EOF", "#Comment", "#BackgroundLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Empty"];2011 $error = $token->isEOF()2012 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)2013 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);2014 $this->addError($context, $error);2015 return 25;2016 }2017 // GherkinDocument:0>Feature:3>Rule:1>Background:0>#BackgroundLine:02018 private function matchTokenAt_26(Token $token, ParserContext $context): int2019 {2020 if ($this->match_EOF($context, $token)) {2021 $this->endRule($context, RuleType::Background);2022 $this->endRule($context, RuleType::Rule);2023 $this->endRule($context, RuleType::Feature);2024 $this->build($context, $token);2025 return 42;2026 }2027 if ($this->match_Empty($context, $token)) {2028 $this->build($context, $token);2029 return 26;2030 }2031 if ($this->match_Comment($context, $token)) {2032 $this->build($context, $token);2033 return 28;2034 }2035 if ($this->match_StepLine($context, $token)) {2036 $this->startRule($context, RuleType::Step);2037 $this->build($context, $token);2038 return 29;2039 }2040 if ($this->match_TagLine($context, $token)) {2041 if ($this->lookahead_0($context)) {2042 $this->endRule($context, RuleType::Background);2043 $this->startRule($context, RuleType::ScenarioDefinition);2044 $this->startRule($context, RuleType::Tags);2045 $this->build($context, $token);2046 return 31;2047 }2048 }2049 if ($this->match_TagLine($context, $token)) {2050 $this->endRule($context, RuleType::Background);2051 $this->endRule($context, RuleType::Rule);2052 $this->startRule($context, RuleType::Rule);2053 $this->startRule($context, RuleType::RuleHeader);2054 $this->startRule($context, RuleType::Tags);2055 $this->build($context, $token);2056 return 22;2057 }2058 if ($this->match_ScenarioLine($context, $token)) {2059 $this->endRule($context, RuleType::Background);2060 $this->startRule($context, RuleType::ScenarioDefinition);2061 $this->startRule($context, RuleType::Scenario);2062 $this->build($context, $token);2063 return 32;2064 }2065 if ($this->match_RuleLine($context, $token)) {2066 $this->endRule($context, RuleType::Background);2067 $this->endRule($context, RuleType::Rule);2068 $this->startRule($context, RuleType::Rule);2069 $this->startRule($context, RuleType::RuleHeader);2070 $this->build($context, $token);2071 return 23;2072 }2073 if ($this->match_Other($context, $token)) {2074 $this->startRule($context, RuleType::Description);2075 $this->build($context, $token);2076 return 27;2077 }2078 $stateComment = "State: 26 - GherkinDocument:0>Feature:3>Rule:1>Background:0>#BackgroundLine:0";2079 $expectedTokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"];2080 $error = $token->isEOF()2081 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)2082 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);2083 $this->addError($context, $error);2084 return 26;2085 }2086 // GherkinDocument:0>Feature:3>Rule:1>Background:1>DescriptionHelper:1>Description:0>#Other:02087 private function matchTokenAt_27(Token $token, ParserContext $context): int2088 {2089 if ($this->match_EOF($context, $token)) {2090 $this->endRule($context, RuleType::Description);2091 $this->endRule($context, RuleType::Background);2092 $this->endRule($context, RuleType::Rule);2093 $this->endRule($context, RuleType::Feature);2094 $this->build($context, $token);2095 return 42;2096 }2097 if ($this->match_Comment($context, $token)) {2098 $this->endRule($context, RuleType::Description);2099 $this->build($context, $token);2100 return 28;2101 }2102 if ($this->match_StepLine($context, $token)) {2103 $this->endRule($context, RuleType::Description);2104 $this->startRule($context, RuleType::Step);2105 $this->build($context, $token);2106 return 29;2107 }2108 if ($this->match_TagLine($context, $token)) {2109 if ($this->lookahead_0($context)) {2110 $this->endRule($context, RuleType::Description);2111 $this->endRule($context, RuleType::Background);2112 $this->startRule($context, RuleType::ScenarioDefinition);2113 $this->startRule($context, RuleType::Tags);2114 $this->build($context, $token);2115 return 31;2116 }2117 }2118 if ($this->match_TagLine($context, $token)) {2119 $this->endRule($context, RuleType::Description);2120 $this->endRule($context, RuleType::Background);2121 $this->endRule($context, RuleType::Rule);2122 $this->startRule($context, RuleType::Rule);2123 $this->startRule($context, RuleType::RuleHeader);2124 $this->startRule($context, RuleType::Tags);2125 $this->build($context, $token);2126 return 22;2127 }2128 if ($this->match_ScenarioLine($context, $token)) {2129 $this->endRule($context, RuleType::Description);2130 $this->endRule($context, RuleType::Background);2131 $this->startRule($context, RuleType::ScenarioDefinition);2132 $this->startRule($context, RuleType::Scenario);2133 $this->build($context, $token);2134 return 32;2135 }2136 if ($this->match_RuleLine($context, $token)) {2137 $this->endRule($context, RuleType::Description);2138 $this->endRule($context, RuleType::Background);2139 $this->endRule($context, RuleType::Rule);2140 $this->startRule($context, RuleType::Rule);2141 $this->startRule($context, RuleType::RuleHeader);2142 $this->build($context, $token);2143 return 23;2144 }2145 if ($this->match_Other($context, $token)) {2146 $this->build($context, $token);2147 return 27;2148 }2149 $stateComment = "State: 27 - GherkinDocument:0>Feature:3>Rule:1>Background:1>DescriptionHelper:1>Description:0>#Other:0";2150 $expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Other"];2151 $error = $token->isEOF()2152 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)2153 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);2154 $this->addError($context, $error);2155 return 27;2156 }2157 // GherkinDocument:0>Feature:3>Rule:1>Background:1>DescriptionHelper:2>#Comment:02158 private function matchTokenAt_28(Token $token, ParserContext $context): int2159 {2160 if ($this->match_EOF($context, $token)) {2161 $this->endRule($context, RuleType::Background);2162 $this->endRule($context, RuleType::Rule);2163 $this->endRule($context, RuleType::Feature);2164 $this->build($context, $token);2165 return 42;2166 }2167 if ($this->match_Comment($context, $token)) {2168 $this->build($context, $token);2169 return 28;2170 }2171 if ($this->match_StepLine($context, $token)) {2172 $this->startRule($context, RuleType::Step);2173 $this->build($context, $token);2174 return 29;2175 }2176 if ($this->match_TagLine($context, $token)) {2177 if ($this->lookahead_0($context)) {2178 $this->endRule($context, RuleType::Background);2179 $this->startRule($context, RuleType::ScenarioDefinition);2180 $this->startRule($context, RuleType::Tags);2181 $this->build($context, $token);2182 return 31;2183 }2184 }2185 if ($this->match_TagLine($context, $token)) {2186 $this->endRule($context, RuleType::Background);2187 $this->endRule($context, RuleType::Rule);2188 $this->startRule($context, RuleType::Rule);2189 $this->startRule($context, RuleType::RuleHeader);2190 $this->startRule($context, RuleType::Tags);2191 $this->build($context, $token);2192 return 22;2193 }2194 if ($this->match_ScenarioLine($context, $token)) {2195 $this->endRule($context, RuleType::Background);2196 $this->startRule($context, RuleType::ScenarioDefinition);2197 $this->startRule($context, RuleType::Scenario);2198 $this->build($context, $token);2199 return 32;2200 }2201 if ($this->match_RuleLine($context, $token)) {2202 $this->endRule($context, RuleType::Background);2203 $this->endRule($context, RuleType::Rule);2204 $this->startRule($context, RuleType::Rule);2205 $this->startRule($context, RuleType::RuleHeader);2206 $this->build($context, $token);2207 return 23;2208 }2209 if ($this->match_Empty($context, $token)) {2210 $this->build($context, $token);2211 return 28;2212 }2213 $stateComment = "State: 28 - GherkinDocument:0>Feature:3>Rule:1>Background:1>DescriptionHelper:2>#Comment:0";2214 $expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Empty"];2215 $error = $token->isEOF()2216 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)2217 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);2218 $this->addError($context, $error);2219 return 28;2220 }2221 // GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:0>#StepLine:02222 private function matchTokenAt_29(Token $token, ParserContext $context): int2223 {2224 if ($this->match_EOF($context, $token)) {2225 $this->endRule($context, RuleType::Step);2226 $this->endRule($context, RuleType::Background);2227 $this->endRule($context, RuleType::Rule);2228 $this->endRule($context, RuleType::Feature);2229 $this->build($context, $token);2230 return 42;2231 }2232 if ($this->match_TableRow($context, $token)) {2233 $this->startRule($context, RuleType::DataTable);2234 $this->build($context, $token);2235 return 30;2236 }2237 if ($this->match_DocStringSeparator($context, $token)) {2238 $this->startRule($context, RuleType::DocString);2239 $this->build($context, $token);2240 return 45;2241 }2242 if ($this->match_StepLine($context, $token)) {2243 $this->endRule($context, RuleType::Step);2244 $this->startRule($context, RuleType::Step);2245 $this->build($context, $token);2246 return 29;2247 }2248 if ($this->match_TagLine($context, $token)) {2249 if ($this->lookahead_0($context)) {2250 $this->endRule($context, RuleType::Step);2251 $this->endRule($context, RuleType::Background);2252 $this->startRule($context, RuleType::ScenarioDefinition);2253 $this->startRule($context, RuleType::Tags);2254 $this->build($context, $token);2255 return 31;2256 }2257 }2258 if ($this->match_TagLine($context, $token)) {2259 $this->endRule($context, RuleType::Step);2260 $this->endRule($context, RuleType::Background);2261 $this->endRule($context, RuleType::Rule);2262 $this->startRule($context, RuleType::Rule);2263 $this->startRule($context, RuleType::RuleHeader);2264 $this->startRule($context, RuleType::Tags);2265 $this->build($context, $token);2266 return 22;2267 }2268 if ($this->match_ScenarioLine($context, $token)) {2269 $this->endRule($context, RuleType::Step);2270 $this->endRule($context, RuleType::Background);2271 $this->startRule($context, RuleType::ScenarioDefinition);2272 $this->startRule($context, RuleType::Scenario);2273 $this->build($context, $token);2274 return 32;2275 }2276 if ($this->match_RuleLine($context, $token)) {2277 $this->endRule($context, RuleType::Step);2278 $this->endRule($context, RuleType::Background);2279 $this->endRule($context, RuleType::Rule);2280 $this->startRule($context, RuleType::Rule);2281 $this->startRule($context, RuleType::RuleHeader);2282 $this->build($context, $token);2283 return 23;2284 }2285 if ($this->match_Comment($context, $token)) {2286 $this->build($context, $token);2287 return 29;2288 }2289 if ($this->match_Empty($context, $token)) {2290 $this->build($context, $token);2291 return 29;2292 }2293 $stateComment = "State: 29 - GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:0>#StepLine:0";2294 $expectedTokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];2295 $error = $token->isEOF()2296 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)2297 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);2298 $this->addError($context, $error);2299 return 29;2300 }2301 // GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:02302 private function matchTokenAt_30(Token $token, ParserContext $context): int2303 {2304 if ($this->match_EOF($context, $token)) {2305 $this->endRule($context, RuleType::DataTable);2306 $this->endRule($context, RuleType::Step);2307 $this->endRule($context, RuleType::Background);2308 $this->endRule($context, RuleType::Rule);2309 $this->endRule($context, RuleType::Feature);2310 $this->build($context, $token);2311 return 42;2312 }2313 if ($this->match_TableRow($context, $token)) {2314 $this->build($context, $token);2315 return 30;2316 }2317 if ($this->match_StepLine($context, $token)) {2318 $this->endRule($context, RuleType::DataTable);2319 $this->endRule($context, RuleType::Step);2320 $this->startRule($context, RuleType::Step);2321 $this->build($context, $token);2322 return 29;2323 }2324 if ($this->match_TagLine($context, $token)) {2325 if ($this->lookahead_0($context)) {2326 $this->endRule($context, RuleType::DataTable);2327 $this->endRule($context, RuleType::Step);2328 $this->endRule($context, RuleType::Background);2329 $this->startRule($context, RuleType::ScenarioDefinition);2330 $this->startRule($context, RuleType::Tags);2331 $this->build($context, $token);2332 return 31;2333 }2334 }2335 if ($this->match_TagLine($context, $token)) {2336 $this->endRule($context, RuleType::DataTable);2337 $this->endRule($context, RuleType::Step);2338 $this->endRule($context, RuleType::Background);2339 $this->endRule($context, RuleType::Rule);2340 $this->startRule($context, RuleType::Rule);2341 $this->startRule($context, RuleType::RuleHeader);2342 $this->startRule($context, RuleType::Tags);2343 $this->build($context, $token);2344 return 22;2345 }2346 if ($this->match_ScenarioLine($context, $token)) {2347 $this->endRule($context, RuleType::DataTable);2348 $this->endRule($context, RuleType::Step);2349 $this->endRule($context, RuleType::Background);2350 $this->startRule($context, RuleType::ScenarioDefinition);2351 $this->startRule($context, RuleType::Scenario);2352 $this->build($context, $token);2353 return 32;2354 }2355 if ($this->match_RuleLine($context, $token)) {2356 $this->endRule($context, RuleType::DataTable);2357 $this->endRule($context, RuleType::Step);2358 $this->endRule($context, RuleType::Background);2359 $this->endRule($context, RuleType::Rule);2360 $this->startRule($context, RuleType::Rule);2361 $this->startRule($context, RuleType::RuleHeader);2362 $this->build($context, $token);2363 return 23;2364 }2365 if ($this->match_Comment($context, $token)) {2366 $this->build($context, $token);2367 return 30;2368 }2369 if ($this->match_Empty($context, $token)) {2370 $this->build($context, $token);2371 return 30;2372 }2373 $stateComment = "State: 30 - GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0";2374 $expectedTokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];2375 $error = $token->isEOF()2376 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)2377 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);2378 $this->addError($context, $error);2379 return 30;2380 }2381 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:0>Tags:0>#TagLine:02382 private function matchTokenAt_31(Token $token, ParserContext $context): int2383 {2384 if ($this->match_TagLine($context, $token)) {2385 $this->build($context, $token);2386 return 31;2387 }2388 if ($this->match_ScenarioLine($context, $token)) {2389 $this->endRule($context, RuleType::Tags);2390 $this->startRule($context, RuleType::Scenario);2391 $this->build($context, $token);2392 return 32;2393 }2394 if ($this->match_Comment($context, $token)) {2395 $this->build($context, $token);2396 return 31;2397 }2398 if ($this->match_Empty($context, $token)) {2399 $this->build($context, $token);2400 return 31;2401 }2402 $stateComment = "State: 31 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:0>Tags:0>#TagLine:0";2403 $expectedTokens = ["#TagLine", "#ScenarioLine", "#Comment", "#Empty"];2404 $error = $token->isEOF()2405 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)2406 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);2407 $this->addError($context, $error);2408 return 31;2409 }2410 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:0>#ScenarioLine:02411 private function matchTokenAt_32(Token $token, ParserContext $context): int2412 {2413 if ($this->match_EOF($context, $token)) {2414 $this->endRule($context, RuleType::Scenario);2415 $this->endRule($context, RuleType::ScenarioDefinition);2416 $this->endRule($context, RuleType::Rule);2417 $this->endRule($context, RuleType::Feature);2418 $this->build($context, $token);2419 return 42;2420 }2421 if ($this->match_Empty($context, $token)) {2422 $this->build($context, $token);2423 return 32;2424 }2425 if ($this->match_Comment($context, $token)) {2426 $this->build($context, $token);2427 return 34;2428 }2429 if ($this->match_StepLine($context, $token)) {2430 $this->startRule($context, RuleType::Step);2431 $this->build($context, $token);2432 return 35;2433 }2434 if ($this->match_TagLine($context, $token)) {2435 if ($this->lookahead_1($context)) {2436 $this->startRule($context, RuleType::ExamplesDefinition);2437 $this->startRule($context, RuleType::Tags);2438 $this->build($context, $token);2439 return 37;2440 }2441 }2442 if ($this->match_TagLine($context, $token)) {2443 if ($this->lookahead_0($context)) {2444 $this->endRule($context, RuleType::Scenario);2445 $this->endRule($context, RuleType::ScenarioDefinition);2446 $this->startRule($context, RuleType::ScenarioDefinition);2447 $this->startRule($context, RuleType::Tags);2448 $this->build($context, $token);2449 return 31;2450 }2451 }2452 if ($this->match_TagLine($context, $token)) {2453 $this->endRule($context, RuleType::Scenario);2454 $this->endRule($context, RuleType::ScenarioDefinition);2455 $this->endRule($context, RuleType::Rule);2456 $this->startRule($context, RuleType::Rule);2457 $this->startRule($context, RuleType::RuleHeader);2458 $this->startRule($context, RuleType::Tags);2459 $this->build($context, $token);2460 return 22;2461 }2462 if ($this->match_ExamplesLine($context, $token)) {2463 $this->startRule($context, RuleType::ExamplesDefinition);2464 $this->startRule($context, RuleType::Examples);2465 $this->build($context, $token);2466 return 38;2467 }2468 if ($this->match_ScenarioLine($context, $token)) {2469 $this->endRule($context, RuleType::Scenario);2470 $this->endRule($context, RuleType::ScenarioDefinition);2471 $this->startRule($context, RuleType::ScenarioDefinition);2472 $this->startRule($context, RuleType::Scenario);2473 $this->build($context, $token);2474 return 32;2475 }2476 if ($this->match_RuleLine($context, $token)) {2477 $this->endRule($context, RuleType::Scenario);2478 $this->endRule($context, RuleType::ScenarioDefinition);2479 $this->endRule($context, RuleType::Rule);2480 $this->startRule($context, RuleType::Rule);2481 $this->startRule($context, RuleType::RuleHeader);2482 $this->build($context, $token);2483 return 23;2484 }2485 if ($this->match_Other($context, $token)) {2486 $this->startRule($context, RuleType::Description);2487 $this->build($context, $token);2488 return 33;2489 }2490 $stateComment = "State: 32 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:0>#ScenarioLine:0";2491 $expectedTokens = ["#EOF", "#Empty", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"];2492 $error = $token->isEOF()2493 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)2494 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);2495 $this->addError($context, $error);2496 return 32;2497 }2498 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:1>Description:0>#Other:02499 private function matchTokenAt_33(Token $token, ParserContext $context): int2500 {2501 if ($this->match_EOF($context, $token)) {2502 $this->endRule($context, RuleType::Description);2503 $this->endRule($context, RuleType::Scenario);2504 $this->endRule($context, RuleType::ScenarioDefinition);2505 $this->endRule($context, RuleType::Rule);2506 $this->endRule($context, RuleType::Feature);2507 $this->build($context, $token);2508 return 42;2509 }2510 if ($this->match_Comment($context, $token)) {2511 $this->endRule($context, RuleType::Description);2512 $this->build($context, $token);2513 return 34;2514 }2515 if ($this->match_StepLine($context, $token)) {2516 $this->endRule($context, RuleType::Description);2517 $this->startRule($context, RuleType::Step);2518 $this->build($context, $token);2519 return 35;2520 }2521 if ($this->match_TagLine($context, $token)) {2522 if ($this->lookahead_1($context)) {2523 $this->endRule($context, RuleType::Description);2524 $this->startRule($context, RuleType::ExamplesDefinition);2525 $this->startRule($context, RuleType::Tags);2526 $this->build($context, $token);2527 return 37;2528 }2529 }2530 if ($this->match_TagLine($context, $token)) {2531 if ($this->lookahead_0($context)) {2532 $this->endRule($context, RuleType::Description);2533 $this->endRule($context, RuleType::Scenario);2534 $this->endRule($context, RuleType::ScenarioDefinition);2535 $this->startRule($context, RuleType::ScenarioDefinition);2536 $this->startRule($context, RuleType::Tags);2537 $this->build($context, $token);2538 return 31;2539 }2540 }2541 if ($this->match_TagLine($context, $token)) {2542 $this->endRule($context, RuleType::Description);2543 $this->endRule($context, RuleType::Scenario);2544 $this->endRule($context, RuleType::ScenarioDefinition);2545 $this->endRule($context, RuleType::Rule);2546 $this->startRule($context, RuleType::Rule);2547 $this->startRule($context, RuleType::RuleHeader);2548 $this->startRule($context, RuleType::Tags);2549 $this->build($context, $token);2550 return 22;2551 }2552 if ($this->match_ExamplesLine($context, $token)) {2553 $this->endRule($context, RuleType::Description);2554 $this->startRule($context, RuleType::ExamplesDefinition);2555 $this->startRule($context, RuleType::Examples);2556 $this->build($context, $token);2557 return 38;2558 }2559 if ($this->match_ScenarioLine($context, $token)) {2560 $this->endRule($context, RuleType::Description);2561 $this->endRule($context, RuleType::Scenario);2562 $this->endRule($context, RuleType::ScenarioDefinition);2563 $this->startRule($context, RuleType::ScenarioDefinition);2564 $this->startRule($context, RuleType::Scenario);2565 $this->build($context, $token);2566 return 32;2567 }2568 if ($this->match_RuleLine($context, $token)) {2569 $this->endRule($context, RuleType::Description);2570 $this->endRule($context, RuleType::Scenario);2571 $this->endRule($context, RuleType::ScenarioDefinition);2572 $this->endRule($context, RuleType::Rule);2573 $this->startRule($context, RuleType::Rule);2574 $this->startRule($context, RuleType::RuleHeader);2575 $this->build($context, $token);2576 return 23;2577 }2578 if ($this->match_Other($context, $token)) {2579 $this->build($context, $token);2580 return 33;2581 }2582 $stateComment = "State: 33 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:1>Description:0>#Other:0";2583 $expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"];2584 $error = $token->isEOF()2585 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)2586 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);2587 $this->addError($context, $error);2588 return 33;2589 }2590 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:2>#Comment:02591 private function matchTokenAt_34(Token $token, ParserContext $context): int2592 {2593 if ($this->match_EOF($context, $token)) {2594 $this->endRule($context, RuleType::Scenario);2595 $this->endRule($context, RuleType::ScenarioDefinition);2596 $this->endRule($context, RuleType::Rule);2597 $this->endRule($context, RuleType::Feature);2598 $this->build($context, $token);2599 return 42;2600 }2601 if ($this->match_Comment($context, $token)) {2602 $this->build($context, $token);2603 return 34;2604 }2605 if ($this->match_StepLine($context, $token)) {2606 $this->startRule($context, RuleType::Step);2607 $this->build($context, $token);2608 return 35;2609 }2610 if ($this->match_TagLine($context, $token)) {2611 if ($this->lookahead_1($context)) {2612 $this->startRule($context, RuleType::ExamplesDefinition);2613 $this->startRule($context, RuleType::Tags);2614 $this->build($context, $token);2615 return 37;2616 }2617 }2618 if ($this->match_TagLine($context, $token)) {2619 if ($this->lookahead_0($context)) {2620 $this->endRule($context, RuleType::Scenario);2621 $this->endRule($context, RuleType::ScenarioDefinition);2622 $this->startRule($context, RuleType::ScenarioDefinition);2623 $this->startRule($context, RuleType::Tags);2624 $this->build($context, $token);2625 return 31;2626 }2627 }2628 if ($this->match_TagLine($context, $token)) {2629 $this->endRule($context, RuleType::Scenario);2630 $this->endRule($context, RuleType::ScenarioDefinition);2631 $this->endRule($context, RuleType::Rule);2632 $this->startRule($context, RuleType::Rule);2633 $this->startRule($context, RuleType::RuleHeader);2634 $this->startRule($context, RuleType::Tags);2635 $this->build($context, $token);2636 return 22;2637 }2638 if ($this->match_ExamplesLine($context, $token)) {2639 $this->startRule($context, RuleType::ExamplesDefinition);2640 $this->startRule($context, RuleType::Examples);2641 $this->build($context, $token);2642 return 38;2643 }2644 if ($this->match_ScenarioLine($context, $token)) {2645 $this->endRule($context, RuleType::Scenario);2646 $this->endRule($context, RuleType::ScenarioDefinition);2647 $this->startRule($context, RuleType::ScenarioDefinition);2648 $this->startRule($context, RuleType::Scenario);2649 $this->build($context, $token);2650 return 32;2651 }2652 if ($this->match_RuleLine($context, $token)) {2653 $this->endRule($context, RuleType::Scenario);2654 $this->endRule($context, RuleType::ScenarioDefinition);2655 $this->endRule($context, RuleType::Rule);2656 $this->startRule($context, RuleType::Rule);2657 $this->startRule($context, RuleType::RuleHeader);2658 $this->build($context, $token);2659 return 23;2660 }2661 if ($this->match_Empty($context, $token)) {2662 $this->build($context, $token);2663 return 34;2664 }2665 $stateComment = "State: 34 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:1>DescriptionHelper:2>#Comment:0";2666 $expectedTokens = ["#EOF", "#Comment", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Empty"];2667 $error = $token->isEOF()2668 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)2669 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);2670 $this->addError($context, $error);2671 return 34;2672 }2673 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:0>#StepLine:02674 private function matchTokenAt_35(Token $token, ParserContext $context): int2675 {2676 if ($this->match_EOF($context, $token)) {2677 $this->endRule($context, RuleType::Step);2678 $this->endRule($context, RuleType::Scenario);2679 $this->endRule($context, RuleType::ScenarioDefinition);2680 $this->endRule($context, RuleType::Rule);2681 $this->endRule($context, RuleType::Feature);2682 $this->build($context, $token);2683 return 42;2684 }2685 if ($this->match_TableRow($context, $token)) {2686 $this->startRule($context, RuleType::DataTable);2687 $this->build($context, $token);2688 return 36;2689 }2690 if ($this->match_DocStringSeparator($context, $token)) {2691 $this->startRule($context, RuleType::DocString);2692 $this->build($context, $token);2693 return 43;2694 }2695 if ($this->match_StepLine($context, $token)) {2696 $this->endRule($context, RuleType::Step);2697 $this->startRule($context, RuleType::Step);2698 $this->build($context, $token);2699 return 35;2700 }2701 if ($this->match_TagLine($context, $token)) {2702 if ($this->lookahead_1($context)) {2703 $this->endRule($context, RuleType::Step);2704 $this->startRule($context, RuleType::ExamplesDefinition);2705 $this->startRule($context, RuleType::Tags);2706 $this->build($context, $token);2707 return 37;2708 }2709 }2710 if ($this->match_TagLine($context, $token)) {2711 if ($this->lookahead_0($context)) {2712 $this->endRule($context, RuleType::Step);2713 $this->endRule($context, RuleType::Scenario);2714 $this->endRule($context, RuleType::ScenarioDefinition);2715 $this->startRule($context, RuleType::ScenarioDefinition);2716 $this->startRule($context, RuleType::Tags);2717 $this->build($context, $token);2718 return 31;2719 }2720 }2721 if ($this->match_TagLine($context, $token)) {2722 $this->endRule($context, RuleType::Step);2723 $this->endRule($context, RuleType::Scenario);2724 $this->endRule($context, RuleType::ScenarioDefinition);2725 $this->endRule($context, RuleType::Rule);2726 $this->startRule($context, RuleType::Rule);2727 $this->startRule($context, RuleType::RuleHeader);2728 $this->startRule($context, RuleType::Tags);2729 $this->build($context, $token);2730 return 22;2731 }2732 if ($this->match_ExamplesLine($context, $token)) {2733 $this->endRule($context, RuleType::Step);2734 $this->startRule($context, RuleType::ExamplesDefinition);2735 $this->startRule($context, RuleType::Examples);2736 $this->build($context, $token);2737 return 38;2738 }2739 if ($this->match_ScenarioLine($context, $token)) {2740 $this->endRule($context, RuleType::Step);2741 $this->endRule($context, RuleType::Scenario);2742 $this->endRule($context, RuleType::ScenarioDefinition);2743 $this->startRule($context, RuleType::ScenarioDefinition);2744 $this->startRule($context, RuleType::Scenario);2745 $this->build($context, $token);2746 return 32;2747 }2748 if ($this->match_RuleLine($context, $token)) {2749 $this->endRule($context, RuleType::Step);2750 $this->endRule($context, RuleType::Scenario);2751 $this->endRule($context, RuleType::ScenarioDefinition);2752 $this->endRule($context, RuleType::Rule);2753 $this->startRule($context, RuleType::Rule);2754 $this->startRule($context, RuleType::RuleHeader);2755 $this->build($context, $token);2756 return 23;2757 }2758 if ($this->match_Comment($context, $token)) {2759 $this->build($context, $token);2760 return 35;2761 }2762 if ($this->match_Empty($context, $token)) {2763 $this->build($context, $token);2764 return 35;2765 }2766 $stateComment = "State: 35 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:0>#StepLine:0";2767 $expectedTokens = ["#EOF", "#TableRow", "#DocStringSeparator", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];2768 $error = $token->isEOF()2769 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)2770 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);2771 $this->addError($context, $error);2772 return 35;2773 }2774 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:02775 private function matchTokenAt_36(Token $token, ParserContext $context): int2776 {2777 if ($this->match_EOF($context, $token)) {2778 $this->endRule($context, RuleType::DataTable);2779 $this->endRule($context, RuleType::Step);2780 $this->endRule($context, RuleType::Scenario);2781 $this->endRule($context, RuleType::ScenarioDefinition);2782 $this->endRule($context, RuleType::Rule);2783 $this->endRule($context, RuleType::Feature);2784 $this->build($context, $token);2785 return 42;2786 }2787 if ($this->match_TableRow($context, $token)) {2788 $this->build($context, $token);2789 return 36;2790 }2791 if ($this->match_StepLine($context, $token)) {2792 $this->endRule($context, RuleType::DataTable);2793 $this->endRule($context, RuleType::Step);2794 $this->startRule($context, RuleType::Step);2795 $this->build($context, $token);2796 return 35;2797 }2798 if ($this->match_TagLine($context, $token)) {2799 if ($this->lookahead_1($context)) {2800 $this->endRule($context, RuleType::DataTable);2801 $this->endRule($context, RuleType::Step);2802 $this->startRule($context, RuleType::ExamplesDefinition);2803 $this->startRule($context, RuleType::Tags);2804 $this->build($context, $token);2805 return 37;2806 }2807 }2808 if ($this->match_TagLine($context, $token)) {2809 if ($this->lookahead_0($context)) {2810 $this->endRule($context, RuleType::DataTable);2811 $this->endRule($context, RuleType::Step);2812 $this->endRule($context, RuleType::Scenario);2813 $this->endRule($context, RuleType::ScenarioDefinition);2814 $this->startRule($context, RuleType::ScenarioDefinition);2815 $this->startRule($context, RuleType::Tags);2816 $this->build($context, $token);2817 return 31;2818 }2819 }2820 if ($this->match_TagLine($context, $token)) {2821 $this->endRule($context, RuleType::DataTable);2822 $this->endRule($context, RuleType::Step);2823 $this->endRule($context, RuleType::Scenario);2824 $this->endRule($context, RuleType::ScenarioDefinition);2825 $this->endRule($context, RuleType::Rule);2826 $this->startRule($context, RuleType::Rule);2827 $this->startRule($context, RuleType::RuleHeader);2828 $this->startRule($context, RuleType::Tags);2829 $this->build($context, $token);2830 return 22;2831 }2832 if ($this->match_ExamplesLine($context, $token)) {2833 $this->endRule($context, RuleType::DataTable);2834 $this->endRule($context, RuleType::Step);2835 $this->startRule($context, RuleType::ExamplesDefinition);2836 $this->startRule($context, RuleType::Examples);2837 $this->build($context, $token);2838 return 38;2839 }2840 if ($this->match_ScenarioLine($context, $token)) {2841 $this->endRule($context, RuleType::DataTable);2842 $this->endRule($context, RuleType::Step);2843 $this->endRule($context, RuleType::Scenario);2844 $this->endRule($context, RuleType::ScenarioDefinition);2845 $this->startRule($context, RuleType::ScenarioDefinition);2846 $this->startRule($context, RuleType::Scenario);2847 $this->build($context, $token);2848 return 32;2849 }2850 if ($this->match_RuleLine($context, $token)) {2851 $this->endRule($context, RuleType::DataTable);2852 $this->endRule($context, RuleType::Step);2853 $this->endRule($context, RuleType::Scenario);2854 $this->endRule($context, RuleType::ScenarioDefinition);2855 $this->endRule($context, RuleType::Rule);2856 $this->startRule($context, RuleType::Rule);2857 $this->startRule($context, RuleType::RuleHeader);2858 $this->build($context, $token);2859 return 23;2860 }2861 if ($this->match_Comment($context, $token)) {2862 $this->build($context, $token);2863 return 36;2864 }2865 if ($this->match_Empty($context, $token)) {2866 $this->build($context, $token);2867 return 36;2868 }2869 $stateComment = "State: 36 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:0>DataTable:0>#TableRow:0";2870 $expectedTokens = ["#EOF", "#TableRow", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];2871 $error = $token->isEOF()2872 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)2873 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);2874 $this->addError($context, $error);2875 return 36;2876 }2877 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:0>Tags:0>#TagLine:02878 private function matchTokenAt_37(Token $token, ParserContext $context): int2879 {2880 if ($this->match_TagLine($context, $token)) {2881 $this->build($context, $token);2882 return 37;2883 }2884 if ($this->match_ExamplesLine($context, $token)) {2885 $this->endRule($context, RuleType::Tags);2886 $this->startRule($context, RuleType::Examples);2887 $this->build($context, $token);2888 return 38;2889 }2890 if ($this->match_Comment($context, $token)) {2891 $this->build($context, $token);2892 return 37;2893 }2894 if ($this->match_Empty($context, $token)) {2895 $this->build($context, $token);2896 return 37;2897 }2898 $stateComment = "State: 37 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:0>Tags:0>#TagLine:0";2899 $expectedTokens = ["#TagLine", "#ExamplesLine", "#Comment", "#Empty"];2900 $error = $token->isEOF()2901 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)2902 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);2903 $this->addError($context, $error);2904 return 37;2905 }2906 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:0>#ExamplesLine:02907 private function matchTokenAt_38(Token $token, ParserContext $context): int2908 {2909 if ($this->match_EOF($context, $token)) {2910 $this->endRule($context, RuleType::Examples);2911 $this->endRule($context, RuleType::ExamplesDefinition);2912 $this->endRule($context, RuleType::Scenario);2913 $this->endRule($context, RuleType::ScenarioDefinition);2914 $this->endRule($context, RuleType::Rule);2915 $this->endRule($context, RuleType::Feature);2916 $this->build($context, $token);2917 return 42;2918 }2919 if ($this->match_Empty($context, $token)) {2920 $this->build($context, $token);2921 return 38;2922 }2923 if ($this->match_Comment($context, $token)) {2924 $this->build($context, $token);2925 return 40;2926 }2927 if ($this->match_TableRow($context, $token)) {2928 $this->startRule($context, RuleType::ExamplesTable);2929 $this->build($context, $token);2930 return 41;2931 }2932 if ($this->match_TagLine($context, $token)) {2933 if ($this->lookahead_1($context)) {2934 $this->endRule($context, RuleType::Examples);2935 $this->endRule($context, RuleType::ExamplesDefinition);2936 $this->startRule($context, RuleType::ExamplesDefinition);2937 $this->startRule($context, RuleType::Tags);2938 $this->build($context, $token);2939 return 37;2940 }2941 }2942 if ($this->match_TagLine($context, $token)) {2943 if ($this->lookahead_0($context)) {2944 $this->endRule($context, RuleType::Examples);2945 $this->endRule($context, RuleType::ExamplesDefinition);2946 $this->endRule($context, RuleType::Scenario);2947 $this->endRule($context, RuleType::ScenarioDefinition);2948 $this->startRule($context, RuleType::ScenarioDefinition);2949 $this->startRule($context, RuleType::Tags);2950 $this->build($context, $token);2951 return 31;2952 }2953 }2954 if ($this->match_TagLine($context, $token)) {2955 $this->endRule($context, RuleType::Examples);2956 $this->endRule($context, RuleType::ExamplesDefinition);2957 $this->endRule($context, RuleType::Scenario);2958 $this->endRule($context, RuleType::ScenarioDefinition);2959 $this->endRule($context, RuleType::Rule);2960 $this->startRule($context, RuleType::Rule);2961 $this->startRule($context, RuleType::RuleHeader);2962 $this->startRule($context, RuleType::Tags);2963 $this->build($context, $token);2964 return 22;2965 }2966 if ($this->match_ExamplesLine($context, $token)) {2967 $this->endRule($context, RuleType::Examples);2968 $this->endRule($context, RuleType::ExamplesDefinition);2969 $this->startRule($context, RuleType::ExamplesDefinition);2970 $this->startRule($context, RuleType::Examples);2971 $this->build($context, $token);2972 return 38;2973 }2974 if ($this->match_ScenarioLine($context, $token)) {2975 $this->endRule($context, RuleType::Examples);2976 $this->endRule($context, RuleType::ExamplesDefinition);2977 $this->endRule($context, RuleType::Scenario);2978 $this->endRule($context, RuleType::ScenarioDefinition);2979 $this->startRule($context, RuleType::ScenarioDefinition);2980 $this->startRule($context, RuleType::Scenario);2981 $this->build($context, $token);2982 return 32;2983 }2984 if ($this->match_RuleLine($context, $token)) {2985 $this->endRule($context, RuleType::Examples);2986 $this->endRule($context, RuleType::ExamplesDefinition);2987 $this->endRule($context, RuleType::Scenario);2988 $this->endRule($context, RuleType::ScenarioDefinition);2989 $this->endRule($context, RuleType::Rule);2990 $this->startRule($context, RuleType::Rule);2991 $this->startRule($context, RuleType::RuleHeader);2992 $this->build($context, $token);2993 return 23;2994 }2995 if ($this->match_Other($context, $token)) {2996 $this->startRule($context, RuleType::Description);2997 $this->build($context, $token);2998 return 39;2999 }3000 $stateComment = "State: 38 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:0>#ExamplesLine:0";3001 $expectedTokens = ["#EOF", "#Empty", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"];3002 $error = $token->isEOF()3003 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)3004 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);3005 $this->addError($context, $error);3006 return 38;3007 }3008 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:1>Description:0>#Other:03009 private function matchTokenAt_39(Token $token, ParserContext $context): int3010 {3011 if ($this->match_EOF($context, $token)) {3012 $this->endRule($context, RuleType::Description);3013 $this->endRule($context, RuleType::Examples);3014 $this->endRule($context, RuleType::ExamplesDefinition);3015 $this->endRule($context, RuleType::Scenario);3016 $this->endRule($context, RuleType::ScenarioDefinition);3017 $this->endRule($context, RuleType::Rule);3018 $this->endRule($context, RuleType::Feature);3019 $this->build($context, $token);3020 return 42;3021 }3022 if ($this->match_Comment($context, $token)) {3023 $this->endRule($context, RuleType::Description);3024 $this->build($context, $token);3025 return 40;3026 }3027 if ($this->match_TableRow($context, $token)) {3028 $this->endRule($context, RuleType::Description);3029 $this->startRule($context, RuleType::ExamplesTable);3030 $this->build($context, $token);3031 return 41;3032 }3033 if ($this->match_TagLine($context, $token)) {3034 if ($this->lookahead_1($context)) {3035 $this->endRule($context, RuleType::Description);3036 $this->endRule($context, RuleType::Examples);3037 $this->endRule($context, RuleType::ExamplesDefinition);3038 $this->startRule($context, RuleType::ExamplesDefinition);3039 $this->startRule($context, RuleType::Tags);3040 $this->build($context, $token);3041 return 37;3042 }3043 }3044 if ($this->match_TagLine($context, $token)) {3045 if ($this->lookahead_0($context)) {3046 $this->endRule($context, RuleType::Description);3047 $this->endRule($context, RuleType::Examples);3048 $this->endRule($context, RuleType::ExamplesDefinition);3049 $this->endRule($context, RuleType::Scenario);3050 $this->endRule($context, RuleType::ScenarioDefinition);3051 $this->startRule($context, RuleType::ScenarioDefinition);3052 $this->startRule($context, RuleType::Tags);3053 $this->build($context, $token);3054 return 31;3055 }3056 }3057 if ($this->match_TagLine($context, $token)) {3058 $this->endRule($context, RuleType::Description);3059 $this->endRule($context, RuleType::Examples);3060 $this->endRule($context, RuleType::ExamplesDefinition);3061 $this->endRule($context, RuleType::Scenario);3062 $this->endRule($context, RuleType::ScenarioDefinition);3063 $this->endRule($context, RuleType::Rule);3064 $this->startRule($context, RuleType::Rule);3065 $this->startRule($context, RuleType::RuleHeader);3066 $this->startRule($context, RuleType::Tags);3067 $this->build($context, $token);3068 return 22;3069 }3070 if ($this->match_ExamplesLine($context, $token)) {3071 $this->endRule($context, RuleType::Description);3072 $this->endRule($context, RuleType::Examples);3073 $this->endRule($context, RuleType::ExamplesDefinition);3074 $this->startRule($context, RuleType::ExamplesDefinition);3075 $this->startRule($context, RuleType::Examples);3076 $this->build($context, $token);3077 return 38;3078 }3079 if ($this->match_ScenarioLine($context, $token)) {3080 $this->endRule($context, RuleType::Description);3081 $this->endRule($context, RuleType::Examples);3082 $this->endRule($context, RuleType::ExamplesDefinition);3083 $this->endRule($context, RuleType::Scenario);3084 $this->endRule($context, RuleType::ScenarioDefinition);3085 $this->startRule($context, RuleType::ScenarioDefinition);3086 $this->startRule($context, RuleType::Scenario);3087 $this->build($context, $token);3088 return 32;3089 }3090 if ($this->match_RuleLine($context, $token)) {3091 $this->endRule($context, RuleType::Description);3092 $this->endRule($context, RuleType::Examples);3093 $this->endRule($context, RuleType::ExamplesDefinition);3094 $this->endRule($context, RuleType::Scenario);3095 $this->endRule($context, RuleType::ScenarioDefinition);3096 $this->endRule($context, RuleType::Rule);3097 $this->startRule($context, RuleType::Rule);3098 $this->startRule($context, RuleType::RuleHeader);3099 $this->build($context, $token);3100 return 23;3101 }3102 if ($this->match_Other($context, $token)) {3103 $this->build($context, $token);3104 return 39;3105 }3106 $stateComment = "State: 39 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:1>Description:0>#Other:0";3107 $expectedTokens = ["#EOF", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Other"];3108 $error = $token->isEOF()3109 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)3110 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);3111 $this->addError($context, $error);3112 return 39;3113 }3114 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:2>#Comment:03115 private function matchTokenAt_40(Token $token, ParserContext $context): int3116 {3117 if ($this->match_EOF($context, $token)) {3118 $this->endRule($context, RuleType::Examples);3119 $this->endRule($context, RuleType::ExamplesDefinition);3120 $this->endRule($context, RuleType::Scenario);3121 $this->endRule($context, RuleType::ScenarioDefinition);3122 $this->endRule($context, RuleType::Rule);3123 $this->endRule($context, RuleType::Feature);3124 $this->build($context, $token);3125 return 42;3126 }3127 if ($this->match_Comment($context, $token)) {3128 $this->build($context, $token);3129 return 40;3130 }3131 if ($this->match_TableRow($context, $token)) {3132 $this->startRule($context, RuleType::ExamplesTable);3133 $this->build($context, $token);3134 return 41;3135 }3136 if ($this->match_TagLine($context, $token)) {3137 if ($this->lookahead_1($context)) {3138 $this->endRule($context, RuleType::Examples);3139 $this->endRule($context, RuleType::ExamplesDefinition);3140 $this->startRule($context, RuleType::ExamplesDefinition);3141 $this->startRule($context, RuleType::Tags);3142 $this->build($context, $token);3143 return 37;3144 }3145 }3146 if ($this->match_TagLine($context, $token)) {3147 if ($this->lookahead_0($context)) {3148 $this->endRule($context, RuleType::Examples);3149 $this->endRule($context, RuleType::ExamplesDefinition);3150 $this->endRule($context, RuleType::Scenario);3151 $this->endRule($context, RuleType::ScenarioDefinition);3152 $this->startRule($context, RuleType::ScenarioDefinition);3153 $this->startRule($context, RuleType::Tags);3154 $this->build($context, $token);3155 return 31;3156 }3157 }3158 if ($this->match_TagLine($context, $token)) {3159 $this->endRule($context, RuleType::Examples);3160 $this->endRule($context, RuleType::ExamplesDefinition);3161 $this->endRule($context, RuleType::Scenario);3162 $this->endRule($context, RuleType::ScenarioDefinition);3163 $this->endRule($context, RuleType::Rule);3164 $this->startRule($context, RuleType::Rule);3165 $this->startRule($context, RuleType::RuleHeader);3166 $this->startRule($context, RuleType::Tags);3167 $this->build($context, $token);3168 return 22;3169 }3170 if ($this->match_ExamplesLine($context, $token)) {3171 $this->endRule($context, RuleType::Examples);3172 $this->endRule($context, RuleType::ExamplesDefinition);3173 $this->startRule($context, RuleType::ExamplesDefinition);3174 $this->startRule($context, RuleType::Examples);3175 $this->build($context, $token);3176 return 38;3177 }3178 if ($this->match_ScenarioLine($context, $token)) {3179 $this->endRule($context, RuleType::Examples);3180 $this->endRule($context, RuleType::ExamplesDefinition);3181 $this->endRule($context, RuleType::Scenario);3182 $this->endRule($context, RuleType::ScenarioDefinition);3183 $this->startRule($context, RuleType::ScenarioDefinition);3184 $this->startRule($context, RuleType::Scenario);3185 $this->build($context, $token);3186 return 32;3187 }3188 if ($this->match_RuleLine($context, $token)) {3189 $this->endRule($context, RuleType::Examples);3190 $this->endRule($context, RuleType::ExamplesDefinition);3191 $this->endRule($context, RuleType::Scenario);3192 $this->endRule($context, RuleType::ScenarioDefinition);3193 $this->endRule($context, RuleType::Rule);3194 $this->startRule($context, RuleType::Rule);3195 $this->startRule($context, RuleType::RuleHeader);3196 $this->build($context, $token);3197 return 23;3198 }3199 if ($this->match_Empty($context, $token)) {3200 $this->build($context, $token);3201 return 40;3202 }3203 $stateComment = "State: 40 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:1>DescriptionHelper:2>#Comment:0";3204 $expectedTokens = ["#EOF", "#Comment", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Empty"];3205 $error = $token->isEOF()3206 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)3207 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);3208 $this->addError($context, $error);3209 return 40;3210 }3211 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:2>ExamplesTable:0>#TableRow:03212 private function matchTokenAt_41(Token $token, ParserContext $context): int3213 {3214 if ($this->match_EOF($context, $token)) {3215 $this->endRule($context, RuleType::ExamplesTable);3216 $this->endRule($context, RuleType::Examples);3217 $this->endRule($context, RuleType::ExamplesDefinition);3218 $this->endRule($context, RuleType::Scenario);3219 $this->endRule($context, RuleType::ScenarioDefinition);3220 $this->endRule($context, RuleType::Rule);3221 $this->endRule($context, RuleType::Feature);3222 $this->build($context, $token);3223 return 42;3224 }3225 if ($this->match_TableRow($context, $token)) {3226 $this->build($context, $token);3227 return 41;3228 }3229 if ($this->match_TagLine($context, $token)) {3230 if ($this->lookahead_1($context)) {3231 $this->endRule($context, RuleType::ExamplesTable);3232 $this->endRule($context, RuleType::Examples);3233 $this->endRule($context, RuleType::ExamplesDefinition);3234 $this->startRule($context, RuleType::ExamplesDefinition);3235 $this->startRule($context, RuleType::Tags);3236 $this->build($context, $token);3237 return 37;3238 }3239 }3240 if ($this->match_TagLine($context, $token)) {3241 if ($this->lookahead_0($context)) {3242 $this->endRule($context, RuleType::ExamplesTable);3243 $this->endRule($context, RuleType::Examples);3244 $this->endRule($context, RuleType::ExamplesDefinition);3245 $this->endRule($context, RuleType::Scenario);3246 $this->endRule($context, RuleType::ScenarioDefinition);3247 $this->startRule($context, RuleType::ScenarioDefinition);3248 $this->startRule($context, RuleType::Tags);3249 $this->build($context, $token);3250 return 31;3251 }3252 }3253 if ($this->match_TagLine($context, $token)) {3254 $this->endRule($context, RuleType::ExamplesTable);3255 $this->endRule($context, RuleType::Examples);3256 $this->endRule($context, RuleType::ExamplesDefinition);3257 $this->endRule($context, RuleType::Scenario);3258 $this->endRule($context, RuleType::ScenarioDefinition);3259 $this->endRule($context, RuleType::Rule);3260 $this->startRule($context, RuleType::Rule);3261 $this->startRule($context, RuleType::RuleHeader);3262 $this->startRule($context, RuleType::Tags);3263 $this->build($context, $token);3264 return 22;3265 }3266 if ($this->match_ExamplesLine($context, $token)) {3267 $this->endRule($context, RuleType::ExamplesTable);3268 $this->endRule($context, RuleType::Examples);3269 $this->endRule($context, RuleType::ExamplesDefinition);3270 $this->startRule($context, RuleType::ExamplesDefinition);3271 $this->startRule($context, RuleType::Examples);3272 $this->build($context, $token);3273 return 38;3274 }3275 if ($this->match_ScenarioLine($context, $token)) {3276 $this->endRule($context, RuleType::ExamplesTable);3277 $this->endRule($context, RuleType::Examples);3278 $this->endRule($context, RuleType::ExamplesDefinition);3279 $this->endRule($context, RuleType::Scenario);3280 $this->endRule($context, RuleType::ScenarioDefinition);3281 $this->startRule($context, RuleType::ScenarioDefinition);3282 $this->startRule($context, RuleType::Scenario);3283 $this->build($context, $token);3284 return 32;3285 }3286 if ($this->match_RuleLine($context, $token)) {3287 $this->endRule($context, RuleType::ExamplesTable);3288 $this->endRule($context, RuleType::Examples);3289 $this->endRule($context, RuleType::ExamplesDefinition);3290 $this->endRule($context, RuleType::Scenario);3291 $this->endRule($context, RuleType::ScenarioDefinition);3292 $this->endRule($context, RuleType::Rule);3293 $this->startRule($context, RuleType::Rule);3294 $this->startRule($context, RuleType::RuleHeader);3295 $this->build($context, $token);3296 return 23;3297 }3298 if ($this->match_Comment($context, $token)) {3299 $this->build($context, $token);3300 return 41;3301 }3302 if ($this->match_Empty($context, $token)) {3303 $this->build($context, $token);3304 return 41;3305 }3306 $stateComment = "State: 41 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:3>ExamplesDefinition:1>Examples:2>ExamplesTable:0>#TableRow:0";3307 $expectedTokens = ["#EOF", "#TableRow", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];3308 $error = $token->isEOF()3309 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)3310 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);3311 $this->addError($context, $error);3312 return 41;3313 }3314 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:03315 private function matchTokenAt_43(Token $token, ParserContext $context): int3316 {3317 if ($this->match_DocStringSeparator($context, $token)) {3318 $this->build($context, $token);3319 return 44;3320 }3321 if ($this->match_Other($context, $token)) {3322 $this->build($context, $token);3323 return 43;3324 }3325 $stateComment = "State: 43 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0";3326 $expectedTokens = ["#DocStringSeparator", "#Other"];3327 $error = $token->isEOF()3328 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)3329 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);3330 $this->addError($context, $error);3331 return 43;3332 }3333 // GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:03334 private function matchTokenAt_44(Token $token, ParserContext $context): int3335 {3336 if ($this->match_EOF($context, $token)) {3337 $this->endRule($context, RuleType::DocString);3338 $this->endRule($context, RuleType::Step);3339 $this->endRule($context, RuleType::Scenario);3340 $this->endRule($context, RuleType::ScenarioDefinition);3341 $this->endRule($context, RuleType::Rule);3342 $this->endRule($context, RuleType::Feature);3343 $this->build($context, $token);3344 return 42;3345 }3346 if ($this->match_StepLine($context, $token)) {3347 $this->endRule($context, RuleType::DocString);3348 $this->endRule($context, RuleType::Step);3349 $this->startRule($context, RuleType::Step);3350 $this->build($context, $token);3351 return 35;3352 }3353 if ($this->match_TagLine($context, $token)) {3354 if ($this->lookahead_1($context)) {3355 $this->endRule($context, RuleType::DocString);3356 $this->endRule($context, RuleType::Step);3357 $this->startRule($context, RuleType::ExamplesDefinition);3358 $this->startRule($context, RuleType::Tags);3359 $this->build($context, $token);3360 return 37;3361 }3362 }3363 if ($this->match_TagLine($context, $token)) {3364 if ($this->lookahead_0($context)) {3365 $this->endRule($context, RuleType::DocString);3366 $this->endRule($context, RuleType::Step);3367 $this->endRule($context, RuleType::Scenario);3368 $this->endRule($context, RuleType::ScenarioDefinition);3369 $this->startRule($context, RuleType::ScenarioDefinition);3370 $this->startRule($context, RuleType::Tags);3371 $this->build($context, $token);3372 return 31;3373 }3374 }3375 if ($this->match_TagLine($context, $token)) {3376 $this->endRule($context, RuleType::DocString);3377 $this->endRule($context, RuleType::Step);3378 $this->endRule($context, RuleType::Scenario);3379 $this->endRule($context, RuleType::ScenarioDefinition);3380 $this->endRule($context, RuleType::Rule);3381 $this->startRule($context, RuleType::Rule);3382 $this->startRule($context, RuleType::RuleHeader);3383 $this->startRule($context, RuleType::Tags);3384 $this->build($context, $token);3385 return 22;3386 }3387 if ($this->match_ExamplesLine($context, $token)) {3388 $this->endRule($context, RuleType::DocString);3389 $this->endRule($context, RuleType::Step);3390 $this->startRule($context, RuleType::ExamplesDefinition);3391 $this->startRule($context, RuleType::Examples);3392 $this->build($context, $token);3393 return 38;3394 }3395 if ($this->match_ScenarioLine($context, $token)) {3396 $this->endRule($context, RuleType::DocString);3397 $this->endRule($context, RuleType::Step);3398 $this->endRule($context, RuleType::Scenario);3399 $this->endRule($context, RuleType::ScenarioDefinition);3400 $this->startRule($context, RuleType::ScenarioDefinition);3401 $this->startRule($context, RuleType::Scenario);3402 $this->build($context, $token);3403 return 32;3404 }3405 if ($this->match_RuleLine($context, $token)) {3406 $this->endRule($context, RuleType::DocString);3407 $this->endRule($context, RuleType::Step);3408 $this->endRule($context, RuleType::Scenario);3409 $this->endRule($context, RuleType::ScenarioDefinition);3410 $this->endRule($context, RuleType::Rule);3411 $this->startRule($context, RuleType::Rule);3412 $this->startRule($context, RuleType::RuleHeader);3413 $this->build($context, $token);3414 return 23;3415 }3416 if ($this->match_Comment($context, $token)) {3417 $this->build($context, $token);3418 return 44;3419 }3420 if ($this->match_Empty($context, $token)) {3421 $this->build($context, $token);3422 return 44;3423 }3424 $stateComment = "State: 44 - GherkinDocument:0>Feature:3>Rule:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0";3425 $expectedTokens = ["#EOF", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];3426 $error = $token->isEOF()3427 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)3428 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);3429 $this->addError($context, $error);3430 return 44;3431 }3432 // GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:03433 private function matchTokenAt_45(Token $token, ParserContext $context): int3434 {3435 if ($this->match_DocStringSeparator($context, $token)) {3436 $this->build($context, $token);3437 return 46;3438 }3439 if ($this->match_Other($context, $token)) {3440 $this->build($context, $token);3441 return 45;3442 }3443 $stateComment = "State: 45 - GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0";3444 $expectedTokens = ["#DocStringSeparator", "#Other"];3445 $error = $token->isEOF()3446 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)3447 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);3448 $this->addError($context, $error);3449 return 45;3450 }3451 // GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:03452 private function matchTokenAt_46(Token $token, ParserContext $context): int3453 {3454 if ($this->match_EOF($context, $token)) {3455 $this->endRule($context, RuleType::DocString);3456 $this->endRule($context, RuleType::Step);3457 $this->endRule($context, RuleType::Background);3458 $this->endRule($context, RuleType::Rule);3459 $this->endRule($context, RuleType::Feature);3460 $this->build($context, $token);3461 return 42;3462 }3463 if ($this->match_StepLine($context, $token)) {3464 $this->endRule($context, RuleType::DocString);3465 $this->endRule($context, RuleType::Step);3466 $this->startRule($context, RuleType::Step);3467 $this->build($context, $token);3468 return 29;3469 }3470 if ($this->match_TagLine($context, $token)) {3471 if ($this->lookahead_0($context)) {3472 $this->endRule($context, RuleType::DocString);3473 $this->endRule($context, RuleType::Step);3474 $this->endRule($context, RuleType::Background);3475 $this->startRule($context, RuleType::ScenarioDefinition);3476 $this->startRule($context, RuleType::Tags);3477 $this->build($context, $token);3478 return 31;3479 }3480 }3481 if ($this->match_TagLine($context, $token)) {3482 $this->endRule($context, RuleType::DocString);3483 $this->endRule($context, RuleType::Step);3484 $this->endRule($context, RuleType::Background);3485 $this->endRule($context, RuleType::Rule);3486 $this->startRule($context, RuleType::Rule);3487 $this->startRule($context, RuleType::RuleHeader);3488 $this->startRule($context, RuleType::Tags);3489 $this->build($context, $token);3490 return 22;3491 }3492 if ($this->match_ScenarioLine($context, $token)) {3493 $this->endRule($context, RuleType::DocString);3494 $this->endRule($context, RuleType::Step);3495 $this->endRule($context, RuleType::Background);3496 $this->startRule($context, RuleType::ScenarioDefinition);3497 $this->startRule($context, RuleType::Scenario);3498 $this->build($context, $token);3499 return 32;3500 }3501 if ($this->match_RuleLine($context, $token)) {3502 $this->endRule($context, RuleType::DocString);3503 $this->endRule($context, RuleType::Step);3504 $this->endRule($context, RuleType::Background);3505 $this->endRule($context, RuleType::Rule);3506 $this->startRule($context, RuleType::Rule);3507 $this->startRule($context, RuleType::RuleHeader);3508 $this->build($context, $token);3509 return 23;3510 }3511 if ($this->match_Comment($context, $token)) {3512 $this->build($context, $token);3513 return 46;3514 }3515 if ($this->match_Empty($context, $token)) {3516 $this->build($context, $token);3517 return 46;3518 }3519 $stateComment = "State: 46 - GherkinDocument:0>Feature:3>Rule:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0";3520 $expectedTokens = ["#EOF", "#StepLine", "#TagLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];3521 $error = $token->isEOF()3522 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)3523 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);3524 $this->addError($context, $error);3525 return 46;3526 }3527 // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:03528 private function matchTokenAt_47(Token $token, ParserContext $context): int3529 {3530 if ($this->match_DocStringSeparator($context, $token)) {3531 $this->build($context, $token);3532 return 48;3533 }3534 if ($this->match_Other($context, $token)) {3535 $this->build($context, $token);3536 return 47;3537 }3538 $stateComment = "State: 47 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0";3539 $expectedTokens = ["#DocStringSeparator", "#Other"];3540 $error = $token->isEOF()3541 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)3542 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);3543 $this->addError($context, $error);3544 return 47;3545 }3546 // GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:03547 private function matchTokenAt_48(Token $token, ParserContext $context): int3548 {3549 if ($this->match_EOF($context, $token)) {3550 $this->endRule($context, RuleType::DocString);3551 $this->endRule($context, RuleType::Step);3552 $this->endRule($context, RuleType::Scenario);3553 $this->endRule($context, RuleType::ScenarioDefinition);3554 $this->endRule($context, RuleType::Feature);3555 $this->build($context, $token);3556 return 42;3557 }3558 if ($this->match_StepLine($context, $token)) {3559 $this->endRule($context, RuleType::DocString);3560 $this->endRule($context, RuleType::Step);3561 $this->startRule($context, RuleType::Step);3562 $this->build($context, $token);3563 return 15;3564 }3565 if ($this->match_TagLine($context, $token)) {3566 if ($this->lookahead_1($context)) {3567 $this->endRule($context, RuleType::DocString);3568 $this->endRule($context, RuleType::Step);3569 $this->startRule($context, RuleType::ExamplesDefinition);3570 $this->startRule($context, RuleType::Tags);3571 $this->build($context, $token);3572 return 17;3573 }3574 }3575 if ($this->match_TagLine($context, $token)) {3576 if ($this->lookahead_0($context)) {3577 $this->endRule($context, RuleType::DocString);3578 $this->endRule($context, RuleType::Step);3579 $this->endRule($context, RuleType::Scenario);3580 $this->endRule($context, RuleType::ScenarioDefinition);3581 $this->startRule($context, RuleType::ScenarioDefinition);3582 $this->startRule($context, RuleType::Tags);3583 $this->build($context, $token);3584 return 11;3585 }3586 }3587 if ($this->match_TagLine($context, $token)) {3588 $this->endRule($context, RuleType::DocString);3589 $this->endRule($context, RuleType::Step);3590 $this->endRule($context, RuleType::Scenario);3591 $this->endRule($context, RuleType::ScenarioDefinition);3592 $this->startRule($context, RuleType::Rule);3593 $this->startRule($context, RuleType::RuleHeader);3594 $this->startRule($context, RuleType::Tags);3595 $this->build($context, $token);3596 return 22;3597 }3598 if ($this->match_ExamplesLine($context, $token)) {3599 $this->endRule($context, RuleType::DocString);3600 $this->endRule($context, RuleType::Step);3601 $this->startRule($context, RuleType::ExamplesDefinition);3602 $this->startRule($context, RuleType::Examples);3603 $this->build($context, $token);3604 return 18;3605 }3606 if ($this->match_ScenarioLine($context, $token)) {3607 $this->endRule($context, RuleType::DocString);3608 $this->endRule($context, RuleType::Step);3609 $this->endRule($context, RuleType::Scenario);3610 $this->endRule($context, RuleType::ScenarioDefinition);3611 $this->startRule($context, RuleType::ScenarioDefinition);3612 $this->startRule($context, RuleType::Scenario);3613 $this->build($context, $token);3614 return 12;3615 }3616 if ($this->match_RuleLine($context, $token)) {3617 $this->endRule($context, RuleType::DocString);3618 $this->endRule($context, RuleType::Step);3619 $this->endRule($context, RuleType::Scenario);3620 $this->endRule($context, RuleType::ScenarioDefinition);3621 $this->startRule($context, RuleType::Rule);3622 $this->startRule($context, RuleType::RuleHeader);3623 $this->build($context, $token);3624 return 23;3625 }3626 if ($this->match_Comment($context, $token)) {3627 $this->build($context, $token);3628 return 48;3629 }3630 if ($this->match_Empty($context, $token)) {3631 $this->build($context, $token);3632 return 48;3633 }3634 $stateComment = "State: 48 - GherkinDocument:0>Feature:2>ScenarioDefinition:1>Scenario:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:0";3635 $expectedTokens = ["#EOF", "#StepLine", "#TagLine", "#ExamplesLine", "#ScenarioLine", "#RuleLine", "#Comment", "#Empty"];3636 $error = $token->isEOF()3637 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)3638 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);3639 $this->addError($context, $error);3640 return 48;3641 }3642 // GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:03643 private function matchTokenAt_49(Token $token, ParserContext $context): int3644 {3645 if ($this->match_DocStringSeparator($context, $token)) {3646 $this->build($context, $token);3647 return 50;3648 }3649 if ($this->match_Other($context, $token)) {3650 $this->build($context, $token);3651 return 49;3652 }3653 $stateComment = "State: 49 - GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:0>#DocStringSeparator:0";3654 $expectedTokens = ["#DocStringSeparator", "#Other"];3655 $error = $token->isEOF()3656 ? new UnexpectedEofException($token, $expectedTokens, $stateComment)3657 : new UnexpectedTokenException($token, $expectedTokens, $stateComment);3658 $this->addError($context, $error);3659 return 49;3660 }3661 // GherkinDocument:0>Feature:1>Background:2>Step:1>StepArg:0>__alt0:1>DocString:2>#DocStringSeparator:03662 private function matchTokenAt_50(Token $token, ParserContext $context): int3663 {...

Full Screen

Full Screen

IndividualStrategies.php

Source:IndividualStrategies.php Github

copy

Full Screen

1<?php2defined('BASEPATH') OR exit('No direct script access allowed');3class IndividualStrategies extends CI_Controller {4 function __construct() {5 parent::__construct();6 $this->viewname = $this->router->fetch_class();7 $this->method = $this->router->fetch_method();8 $this->load->library(array('form_validation', 'Session', 'm_pdf'));9 }10 /*11 @Author : Niral Patel12 @Desc : IndividualStrategies Index Page13 @Input : yp id14 @Output :15 @Date : 12/07/201716 */17 public function index($id, $careHomeId = 0, $isArchive = 0) {18 $data['is_archive_page'] = $isArchive;19 $data['careHomeId'] = $careHomeId;20 /* for care to care data21 ghelani nikunj22 24/9/201823 care to care data get with the all previous care home */24 if ($isArchive !== 0) {25 $temp = $this->common_model->get_records(PAST_CARE_HOME_INFO, array('move_date'), '', '', array("yp_id" => $id, "past_carehome" => $careHomeId));26 $careHomeDetails = $this->common_model->get_records(PAST_CARE_HOME_INFO, array("*"), '', '', array("yp_id" => $id, "move_date <= " => $temp[0]['move_date']));27 $enterDate = $moveDate = '';28 $totalCareHome = count($careHomeDetails);29 if ($totalCareHome >= 1) {30 $enterDate = $careHomeDetails[0]['enter_date'];31 $moveDate = $careHomeDetails[$totalCareHome - 1]['move_date'];32 } elseif ($totalCareHome == 0) {33 $enterDate = $careHomeDetails[0]['enter_date'];34 $moveDate = $careHomeDetails[0]['move_date'];35 }36 }37 if (is_numeric($id)) {38 //get pp form39 $match = array('is_form_id' => 1);40 $formsdata = $this->common_model->get_records(IS_FORM, '', '', '', $match);41 if (!empty($formsdata)) {42 $data['form_data'] = json_decode($formsdata[0]['form_json_data'], TRUE);43 }44 //get YP information45 $fields = array("care_home,yp_fname,yp_lname,date_of_birth,yp_id");46 $data['YP_details'] = YpDetails($id,$fields);47 if (empty($data['YP_details'])) {48 $msg = $this->lang->line('common_no_record_found');49 $this->session->set_flashdata('msg', "<div class='alert alert-danger text-center'>$msg</div>");50 redirect('YoungPerson/view/' . $id);51 }52 //get ra yp data53 $match = array('yp_id' => $id, 'is_previous_version' => 0);54 $data['edit_data'] = $this->common_model->get_records(INDIVIDUAL_STRATEGIES, '', '', '', $match);55 $table = NFC_AMENDMENTS . ' as do';56 $match = array('do.yp_id' => $id);57 $fields = array("do.*,CONCAT(l.firstname,' ', l.lastname) as create_name");58 $join_tables = array(LOGIN . ' as l' => 'l.login_id= do.staff_initials');59 $data['item_details'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', $match);60 $table = NFC_CURRENT_PROTOCOLS_IN_PLACE . ' as cpip';61 $match = array('cpip.yp_id' => $id);62 $fields = array("cpip.*,CONCAT(l.firstname,' ', l.lastname) as create_name");63 $join_tables = array(LOGIN . ' as l' => 'l.login_id= cpip.staff_initials');64 $data['protocols_details'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', $match);65 $login_user_id = $this->session->userdata['LOGGED_IN']['ID'];66 $table = INDIVIDUAL_MEETING_SIGNOFF . ' as ims';67 $where = array("l.is_delete" => "0", "ims.yp_id" => $id, "ims.is_delete" => "0");68 $fields = array("ims.created_by,ims.created_date,ims.yp_id, CONCAT(`firstname`,' ', `lastname`) as name");69 $join_tables = array(LOGIN . ' as l' => 'l.login_id=ims.created_by');70 $group_by = array('created_by');71 $data['ra_signoff_data'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', '', '', '', '', '', '', $group_by, $where);72 $table = INDIVIDUAL_MEETING_SIGNOFF . ' as ims';73 $where = array("ims.yp_id" => $id, "ims.created_by" => $login_user_id, "ims.is_delete" => "0");74 $fields = array("ims.individual_meeting_signoff_id,ims.individual_meeting_id,ims.created_date");75 $data['check_signoff_data'] = $this->common_model->get_records($table, $fields, '', '', '', '', '', '', '', '', '', $where);76 //get is old yp data77 $match = array('yp_id' => $id, 'is_previous_version' => 1);78 $data['prev_edit_data'] = $this->common_model->get_records(INDIVIDUAL_STRATEGIES, '', '', '', $match);79 $match = array('yp_id' => $id, 'status' => 1);80 $prev_archive = $this->common_model->get_records(INDIVIDUAL_STRATEGIES_ARCHIVE, '', '', '', $match, '', '1', '', 'is_archive_id', 'desc');81 if (!empty($prev_archive)) {82 $is_archive_id = $prev_archive[0]['is_archive_id'];83 $table = NFC_ARCHIVE_AMENDMENTS . ' as do';84 $match = array('do.yp_id' => $id, 'do.archive_individual_meeting_id' => $is_archive_id);85 $fields = array("do.*,CONCAT(l.firstname,' ', l.lastname) as create_name");86 $join_tables = array(LOGIN . ' as l' => 'l.login_id= do.staff_initials');87 $data['item_details_archive'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', $match);88 $table = NFC_ARCHIVE_CURRENT_PROTOCOLS_IN_PLACE . ' as cpip';89 $match = array('cpip.yp_id' => $id, 'cpip.archive_individual_meeting_id' => $is_archive_id);90 $fields = array("cpip.*,CONCAT(l.firstname,' ', l.lastname) as create_name");91 $join_tables = array(LOGIN . ' as l' => 'l.login_id= cpip.staff_initials');92 $data['protocols_details_archive'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', $match);93 }94 //get external approve95 $table = NFC_IS_SIGNOFF_DETAILS;96 $fields = array('form_json_data,user_type,key_data,email');97 $where = array('yp_id' => $id);98 $data['check_external_signoff_data'] = $this->common_model->get_records($table, $fields, '', '', '', '', '', '', '', '', '', $where);99 $data['ypid'] = $id;100 $data['header'] = array('menu_module' => 'YoungPerson');101 $data['footerJs'][0] = base_url('uploads/custom/js/IndividualStrategies/IndividualStrategies.js');102 $data['crnt_view'] = $this->viewname;103 $data['main_content'] = '/view';104 $this->parser->parse('layouts/DefaultTemplate', $data);105 } else {106 show_404();107 }108 }109 /*110 @Author : Niral Patel111 @Desc : create RiskAssesment edit page112 @Input :113 @Output :114 @Date : 12/07/2017115 */116 117 public function edit($id) {118 if (is_numeric($id)) {119 //get pp form120 $match = array('is_form_id' => 1);121 $pp_forms = $this->common_model->get_records(IS_FORM, '', '', '', $match);122 if (!empty($pp_forms)) {123 $data['form_data'] = json_decode($pp_forms[0]['form_json_data'], TRUE);124 }125 //get YP information126 $fields = array("care_home,yp_fname,yp_lname,date_of_birth,yp_id");127 $data['YP_details'] = YpDetails($id,$fields);128 if (empty($data['YP_details'])) {129 $msg = $this->lang->line('common_no_record_found');130 $this->session->set_flashdata('msg', "<div class='alert alert-danger text-center'>$msg</div>");131 redirect('YoungPerson/view/' . $id);132 }133 //get pp yp data134 $match = array('yp_id' => $id, 'is_previous_version' => 0);135 $data['edit_data'] = $this->common_model->get_records(INDIVIDUAL_STRATEGIES, '', '', '', $match);136 //get amendments data137 $table = NFC_AMENDMENTS;138 $match = array('yp_id' => $id);139 $field = array('*');140 $data['item_details'] = $this->common_model->get_records($table, $field, '', '', $match);141 //get Current Protocols In Place data142 $table = NFC_CURRENT_PROTOCOLS_IN_PLACE;143 $match = array('yp_id' => $id);144 $field = array('*');145 $data['protocols_details'] = $this->common_model->get_records($table, $field, '', '', $match);146 $url_data = base_url('IndividualStrategies/edit/' . $id);147 $match = array('url_data' => $url_data);148 $data['check_edit_permission'] = $this->common_model->get_records(CHECK_EDIT_URL, '*', '', '', $match);149 if (count($data['check_edit_permission']) > 0) {150 $in_time = date('Y-m-d h:i:s', strtotime($data['check_edit_permission'][0]['datetime']));151 $currnt_time = date('Y-m-d h:i:s');152 if (strtotime($in_time) > strtotime($currnt_time)) {153 $now = strtotime($in_time) - strtotime($currnt_time);154 } else {155 $now = strtotime($currnt_time) - strtotime($in_time);156 }157 $secs = floor($now % 60);158 if ($secs >= 10) {159 $data['ypid'] = $id;160 $data['footerJs'][0] = base_url('uploads/custom/js/IndividualStrategies/IndividualStrategies.js');161 $data['footerJs'][1] = base_url('uploads/custom/js/formbuilder/formbuilder.js');162 $data['header'] = array('menu_module' => 'YoungPerson');163 $data['crnt_view'] = $this->viewname;164 $data['main_content'] = '/edit';165 $this->parser->parse('layouts/DefaultTemplate', $data);166 } else {167 $msg = $this->lang->line('check_is_user_update_data');168 $this->session->set_flashdata('msg', "<div class='alert alert-danger text-center'>$msg</div>");169 redirect('/' . $this->viewname . '/index/' . $id);170 }171 } else {172 $data['ypid'] = $id;173 $data['footerJs'][0] = base_url('uploads/custom/js/IndividualStrategies/IndividualStrategies.js');174 $data['footerJs'][1] = base_url('uploads/custom/js/formbuilder/formbuilder.js');175 $data['header'] = array('menu_module' => 'YoungPerson');176 $data['crnt_view'] = $this->viewname;177 $data['main_content'] = '/edit';178 $this->parser->parse('layouts/DefaultTemplate', $data);179 }180 } else {181 show_404();182 }183 }184 /*185 @Author : Ritesh rana186 @Desc : Insert is form187 @Input :188 @Output :189 @Date : 26/02/2018190 */191 public function insert() {192 if (!validateFormSecret()) {193 redirect($_SERVER['HTTP_REFERER']); //Redirect On Listing page194 }195 $postData = $this->input->post();196 $match = array("yp_id" => $postData['yp_id']);197 $fields = array("care_home");198 $data_care_home_id['YP_details_care_home_id'] = $this->common_model->get_records(YP_DETAILS, $fields, '', '', $match);199 unset($postData['submit_isform']);200 //get pp form201 $match = array('is_form_id' => 1);202 $pp_forms = $this->common_model->get_records(IS_FORM, '', '', '', $match);203 if (!empty($pp_forms)) {204 $pp_form_data = json_decode($pp_forms[0]['form_json_data'], TRUE);205 $data = array();206 foreach ($pp_form_data as $row) {207 if (isset($row['name'])) {208 if ($row['type'] == 'file') {209 $filename = $row['name'];210 //get image previous image211 $match = array('individual_strategies_id' => $postData['individual_strategies_id'], 'yp_id' => $postData['yp_id'], 'is_previous_version' => 0);212 $pp_yp_data = $this->common_model->get_records(INDIVIDUAL_STRATEGIES, array('`' . $row['name'] . '`'), '', '', $match);213 //delete img214 if (!empty($postData['hidden_' . $row['name']])) {215 $delete_img = explode(',', $postData['hidden_' . $row['name']]);216 $db_images = explode(',', $pp_yp_data[0][$filename]);217 $differentedImage = array_diff($db_images, $delete_img);218 $pp_yp_data[0][$filename] = !empty($differentedImage) ? implode(',', $differentedImage) : '';219 }220 if (!empty($_FILES[$filename]['name'][0])) {221 /* common function replaced by Dhara Bhalala on 29/09/2018 */222 createDirectory(array($this->config->item('is_base_url'), $this->config->item('is_base_big_url'), $this->config->item('is_base_big_url') . '/' . $postData['yp_id']));223 $file_view = $this->config->item('is_img_url') . $postData['yp_id'];224 //upload big image225 $upload_data = uploadImage($filename, $file_view, '/' . $this->viewname . '/index/' . $postData['yp_id']);226 //upload small image227 $insertImagesData = array();228 if (!empty($upload_data)) {229 foreach ($upload_data as $imageFiles) {230 /* common function replaced by Dhara Bhalala on 29/09/2018 */231 createDirectory(array($this->config->item('is_base_small_url'), $this->config->item('is_base_small_url') . '/' . $postData['yp_id']));232 /* condition added by Dhara Bhalala on 21/09/2018 to solve GD lib error */233 if ($imageFiles['is_image'])234 $a = do_resize($this->config->item('is_img_url') . $postData['yp_id'], $this->config->item('is_img_url_small') . $postData['yp_id'], $imageFiles['file_name']);235 array_push($insertImagesData, $imageFiles['file_name']);236 if (!empty($insertImagesData)) {237 $images = implode(',', $insertImagesData);238 }239 }240 if (!empty($pp_yp_data[0][$filename])) {241 $images .=',' . $pp_yp_data[0][$filename];242 }243 $data[$row['name']] = !empty($images) ? $images : '';244 }245 } else {246 $data[$row['name']] = !empty($pp_yp_data[0][$filename]) ? $pp_yp_data[0][$filename] : '';247 }248 } else {249 if ($row['type'] != 'button') {250 if ($row['type'] == 'checkbox-group') {251 $data[$row['name']] = !empty($postData[$row['name']]) ? implode(',', $postData[$row['name']]) : '';252 } elseif ($row['type'] == 'textarea' && $row['subtype'] == 'tinymce') {253 $data[$row['name']] = strip_slashes($postData[$row['name']]);254 } elseif ($row['type'] == 'date') {255 $data[$row['name']] = dateformat($postData[$row['name']]);256 } elseif ($row['type'] == 'text') {257 if ($row['subtype'] == 'time') {258 $data[$row['name']] = dbtimeformat($postData[$row['name']]);259 } else {260 $data[$row['name']] = strip_tags(strip_slashes($postData[$row['name']]));261 }262 } else {263 $data[$row['name']] = strip_tags(strip_slashes($postData[$row['name']]));264 }265 }266 }267 }268 }269 }270 //get current data271 $match = array('yp_id' => $postData['yp_id'], 'is_previous_version' => 0);272 $pp_new_data = $this->common_model->get_records(INDIVIDUAL_STRATEGIES, array('*'), '', '', $match);273 //get pp yp data274 $match = array('yp_id' => $postData['yp_id'], 'is_previous_version' => 1);275 $previous_data = $this->common_model->get_records(INDIVIDUAL_STRATEGIES, array('*'), '', '', $match);276 if (!empty($pp_new_data)) {277 $update_pre_data = array();278 $updated_field = array();279 $n = 0;280 if (!empty($pp_form_data)) {281 foreach ($pp_form_data as $row) {282 if (isset($row['name'])) {283 if ($row['type'] != 'button') {284 if (!empty($pp_new_data)) {285 if ($postData[$row['name']] != $pp_new_data[0][$row['name']]) {286 $updated_field[] = $row['label'];287 $n++;288 }289 }290 $update_pre_data[$row['name']] = strip_slashes($pp_new_data[0][$row['name']]);291 }292 }293 }294 $update_pre_data['yp_id'] = $postData['yp_id'];295 $update_pre_data['created_date'] = $pp_new_data[0]['created_date'];296 $update_pre_data['created_by'] = $pp_new_data[0]['created_by'];297 $update_pre_data['modified_by'] = $pp_new_data[0]['modified_by'];298 $update_pre_data['modified_date'] = $pp_new_data[0]['modified_date'];299 $update_pre_data['care_home_id'] = $data_care_home_id['YP_details_care_home_id'][0]['care_home'];300 $update_pre_data['is_previous_version'] = 1;301 }302 }303 if (!empty($postData['individual_strategies_id'])) {304 $individual_strategies_id = $postData['individual_strategies_id'];305 $data['individual_strategies_id'] = $postData['individual_strategies_id'];306 $data['yp_id'] = $postData['yp_id'];307 $data['modified_date'] = datetimeformat();308 $data['modified_by'] = $this->session->userdata['LOGGED_IN']['ID'];309 $data['care_home_id'] = $data_care_home_id['YP_details_care_home_id'][0]['care_home'];310 $this->common_model->update(INDIVIDUAL_STRATEGIES, $data, array('individual_strategies_id' => $postData['individual_strategies_id']));311 if (!empty($updated_field)) {312 foreach ($updated_field as $fields) {313 //Insert log activity314 $activity = array(315 'user_id' => $this->session->userdata['LOGGED_IN']['ID'],316 'yp_id' => !empty($postData['yp_id']) ? $postData['yp_id'] : '',317 'module_name' => IS_MODULE,318 'module_field_name' => $fields,319 'type' => 2320 );321 log_activity($activity);322 }323 }324 } else {325 326 $data['yp_id'] = $postData['yp_id'];327 $data['created_date'] = datetimeformat();328 $data['modified_date'] = datetimeformat();329 $data['created_by'] = $this->session->userdata['LOGGED_IN']['ID'];330 $data['care_home_id'] = $data_care_home_id['YP_details_care_home_id'][0]['care_home'];331 $this->common_model->insert(INDIVIDUAL_STRATEGIES, $data);332 $individual_strategies_id = $this->db->insert_id();333 //Insert log activity334 $activity = array(335 'user_id' => $this->session->userdata['LOGGED_IN']['ID'],336 'yp_id' => !empty($postData['yp_id']) ? $postData['yp_id'] : '',337 'module_name' => IS_MODULE,338 'module_field_name' => '',339 'type' => 1340 );341 log_activity($activity);342 }343 $new_change = 0;344 $new_update = 0;345 if (!empty($individual_strategies_id)) {346 // amendments insater & update 347 //Delete item348 $delete_item_id = $this->input->post('delete_item_id');349 if (!empty($delete_item_id)) {350 $new_update++;351 $delete_item = substr($delete_item_id, 0, -1);352 $delete_item_id = explode(',', $delete_item);353 $where1 = array('individual_meeting_id' => $individual_strategies_id);354 $this->common_model->delete_where_in(NFC_AMENDMENTS, $where1, 'amendments_id', $delete_item_id);355 }356 //update amendments item357 $where1 = array('individual_meeting_id' => $individual_strategies_id);358 $individual_meeting_item = $this->common_model->get_records(NFC_AMENDMENTS, array('amendments_id'), '', '', $where1, '');359 if (!empty($individual_meeting_item)) {360 361 for ($i = 0; $i < count($individual_meeting_item); $i++) {362 $update_item = '';363 if (!empty($postData['amendments_' . $individual_meeting_item[$i]['amendments_id']])) {364 $adst = addslashes(($postData['amendments_' . $individual_meeting_item[$i]['amendments_id']]));365 $where1 = "yp_id =" . $postData['yp_id'] . " and amendments_id =" . $individual_meeting_item[$i]['amendments_id'];366 $amendments_archive = $this->common_model->get_records(NFC_ARCHIVE_AMENDMENTS, array('archive_amendments_id,amendments'), '', '', $where1, '', '1', '', 'archive_amendments_id', 'desc', '', '');367 if (!empty($amendments_archive)) {368 $current = strip_tags($postData['amendments_' . $individual_meeting_item[$i]['amendments_id']]);369 $ame = strip_tags($amendments_archive[0]['amendments']);370 if ($current != $ame) {371 $new_update++;372 }373 }374 375 $update_item['amendments'] = stripslashes(str_replace("'", '"', $this->input->post('amendments_' . $individual_meeting_item[$i]['amendments_id'])));376 /* Start - Ritesh Rana : Mantis issue # 8931, Dt: 17th April 2018 */377 $prev_amendments_data = $this->common_model->get_records(NFC_AMENDMENTS, array('*'), '', '', $where1);378 if ($prev_amendments_data) {379 $amendments_prev_info = $prev_amendments_data[0]['amendments'];380 if ($amendments_prev_info != $update_item['amendments']) {381 $update_item['modified_date'] = datetimeformat();382 }383 }384 /* End - Ritesh Rana : Mantis issue # 8931, Dt: 17th April 2018 */385 $where = array('amendments_id' => $individual_meeting_item[$i]['amendments_id']);386 $success_update = $this->common_model->update(NFC_AMENDMENTS, $update_item, $where);387 }388 }389 }390 //Insert new amendments391 $item_name = $this->input->post('amendments');392 for ($i = 0; $i < count($item_name); $i++) {393 if (!empty($item_name[$i])) {394 $new_change ++;395 $item_data['individual_meeting_id'] = $individual_strategies_id;396 $item_data['yp_id'] = $postData['yp_id'];397 $item_data['amendments'] = strip_slashes($item_name[$i]);398 $item_data['staff_initials'] = $this->session->userdata['LOGGED_IN']['ID'];399 $item_data['created_date'] = datetimeformat();400 $item_data['modified_date'] = datetimeformat();401 $this->common_model->insert(NFC_AMENDMENTS, $item_data);402 }403 }404 /* end amendments functionality */405 /* start Current Protocols in place */406 $delete_protocols_id = $this->input->post('delete_protocols_id');407 if (!empty($delete_protocols_id)) {408 $new_update++;409 $delete_protocols = substr($delete_protocols_id, 0, -1);410 $delete_id = explode(',', $delete_protocols);411 $where1 = array('individual_meeting_id' => $individual_strategies_id);412 $this->common_model->delete_where_in(NFC_CURRENT_PROTOCOLS_IN_PLACE, $where1, 'protocols_in_place_id', $delete_id);413 }414 //update Current Protocols in place415 $where1 = array('individual_meeting_id' => $individual_strategies_id);416 $individual_protocols_item = $this->common_model->get_records(NFC_CURRENT_PROTOCOLS_IN_PLACE, array('protocols_in_place_id'), '', '', $where1, '');417 if (!empty($individual_protocols_item)) {418 for ($i = 0; $i < count($individual_protocols_item); $i++) {419 $update_protocols = '';420 if (!empty(addslashes($postData['current_protocols_in_place_' . $individual_protocols_item[$i]['protocols_in_place_id']]))) {421 $where1 = "yp_id =" . $postData['yp_id'] . " and protocols_in_place_id =" . $individual_protocols_item[$i]['protocols_in_place_id'];422 $current_protocol_archive = $this->common_model->get_records(NFC_ARCHIVE_CURRENT_PROTOCOLS_IN_PLACE, array('archive_protocols_in_place_id,current_protocols_in_place'), '', '', $where1, '', '1', '', 'archive_protocols_in_place_id', 'desc', '', '');423 if (!empty($current_protocol_archive)) {424 $current_pro = strip_tags($postData['current_protocols_in_place_' . $individual_protocols_item[$i]['protocols_in_place_id']]);425 $protocol = strip_tags($current_protocol_archive[0]['current_protocols_in_place']);426 if ($current_pro != $protocol) {427 $new_update++;428 }429 }430 /* Start - Ritesh Rana : Mantis issue # 8931, Dt: 17th April 2018 */431 $update_protocols['current_protocols_in_place'] = strip_slashes($this->input->post('current_protocols_in_place_' . $individual_protocols_item[$i]['protocols_in_place_id']));432 $prev_protocol_data = $this->common_model->get_records(NFC_CURRENT_PROTOCOLS_IN_PLACE, array('*'), '', '', $where1);433 if ($prev_protocol_data) {434 $protocol_prev_info = $prev_protocol_data[0]['current_protocols_in_place'];435 if ($protocol_prev_info != $update_protocols['current_protocols_in_place']) {436 $update_protocols['modified_date'] = datetimeformat();437 }438 }439 /* End - Ritesh Rana : Mantis issue # 8931, Dt: 17th April 2018 */440 $where = array('protocols_in_place_id' => $individual_protocols_item[$i]['protocols_in_place_id']);441 $success_update = $this->common_model->update(NFC_CURRENT_PROTOCOLS_IN_PLACE, $update_protocols, $where);442 }443 }444 }445 //Insert new Current Protocols in place446 $protocols_name = $this->input->post('current_protocols_in_place');447 for ($i = 0; $i < count($protocols_name); $i++) {448 if (!empty($protocols_name[$i])) {449 $new_change ++;450 $protocols_data['individual_meeting_id'] = $individual_strategies_id;451 $protocols_data['yp_id'] = $postData['yp_id'];452 $protocols_data['current_protocols_in_place'] = strip_slashes($protocols_name[$i]);453 $protocols_data['staff_initials'] = $this->session->userdata['LOGGED_IN']['ID'];454 $protocols_data['created_date'] = datetimeformat();455 $protocols_data['modified_date'] = datetimeformat();456 $this->common_model->insert(NFC_CURRENT_PROTOCOLS_IN_PLACE, $protocols_data);457 }458 }459 /* end Current Protocols in place */460 }461 if (!empty($previous_data)) {462 if ($n != 0 || $new_update > 0 || $new_change > 0) {463 $this->common_model->update(INDIVIDUAL_STRATEGIES, $update_pre_data, array('yp_id' => $postData['yp_id'], 'is_previous_version' => 1, 'care_home_id' => $data_care_home_id['YP_details_care_home_id'][0]['care_home']));464 }465 } else {466 $this->common_model->insert(INDIVIDUAL_STRATEGIES, $update_pre_data);467 }468 $this->createArchive($postData['yp_id'], $individual_strategies_id, $new_change, $new_update);469 redirect('/' . $this->viewname . '/index/' . $data['yp_id']);470 }471 /*472 @Author : Ritesh Rana473 @Desc : usr sign off functionality474 @Input : yp_id,is_id475 @Output :476 @Date : 12/07/2017477 */478 public function manager_review($yp_id, $individual_strategies_id) {479 if (!empty($yp_id) && !empty($individual_strategies_id)) {480 $login_user_id = $this->session->userdata['LOGGED_IN']['ID'];481 $match = array('yp_id' => $yp_id, 'created_by' => $login_user_id, 'is_delete' => '0');482 $check_signoff_data = $this->common_model->get_records(INDIVIDUAL_MEETING_SIGNOFF, '', '', '', $match);483 if (empty($check_signoff_data) > 0) {484 $update_pre_data['yp_id'] = $yp_id;485 $update_pre_data['individual_meeting_id'] = $individual_strategies_id;486 $update_pre_data['created_date'] = datetimeformat();487 $update_pre_data['created_by'] = $this->session->userdata('LOGGED_IN')['ID'];488 if ($this->common_model->insert(INDIVIDUAL_MEETING_SIGNOFF, $update_pre_data)) {489 $msg = $this->lang->line('successfully_strategies_review');490 $this->session->set_flashdata('msg', "<div class='alert alert-success text-center'>$msg</div>");491 } else {492 // error493 $msg = $this->lang->line('error_msg');494 $this->session->set_flashdata('msg', "<div class='alert alert-danger text-center'>$msg</div>");495 }496 } else {497 $msg = $this->lang->line('already_strategies_review');498 $this->session->set_flashdata('msg', "<div class='alert alert-danger text-center'>$msg</div>");499 }500 } else {501 $msg = $this->lang->line('error_msg');502 $this->session->set_flashdata('msg', "<div class='alert alert-danger text-center'>$msg</div>");503 }504 redirect('/' . $this->viewname . '/index/' . $yp_id);505 }506 /*507 @Author : Niral Patel508 @Desc : check edit page 509 @Input :510 @Output :511 @Date : 18/08/2017512 */513 public function update_slug() {514 $postData = $this->input->post();515 $where = array('url_data' => $postData['url_data']);516 $this->common_model->delete(CHECK_EDIT_URL, $where);517 $update_pre_data['datetime'] = date('Y-m-d H:i:s');518 $update_pre_data['url_data'] = $postData['url_data'];519 $this->common_model->insert(CHECK_EDIT_URL, $update_pre_data);520 return TRUE;521 }522 /*523 @Author : Niral Patel524 @Desc : Create archive525 @Input :526 @Output :527 @Date : 18/08/2017528 */529 public function createArchive($id, $individual_strategies_id, $new_change, $new_update) {530 $fields = array("care_home,yp_fname,yp_lname,date_of_birth,yp_id");531 $data_yp_detail['YP_details'] = YpDetails($id, $fields);532 if (is_numeric($id)) {533 //get ra form534 $match = array('is_form_id' => 1);535 $formsdata = $this->common_model->get_records(IS_FORM, '', '', '', $match);536 //get IS yp data537 $match = array('yp_id' => $id);538 $pp_yp_data = $this->common_model->get_records(INDIVIDUAL_STRATEGIES, '', '', '', $match);539 /* edit by nikunj ghelani540 query for get medified date from individual strategie */541 if (!empty($formsdata) && !empty($pp_yp_data)) {542 $match = array('yp_id' => $id, 'is_previous_version' => 1);543 $data['prev_edit_data'] = $this->common_model->get_records(INDIVIDUAL_STRATEGIES, '', '', '', $match);544 $last_modified_date = $data['prev_edit_data'][0]['modified_date'];545 $form_data = json_decode($formsdata[0]['form_json_data'], TRUE);546 $data = array();547 $i = 0;548 foreach ($form_data as $row) {549 if (isset($row['name'])) {550 if ($row['type'] != 'button') {551 if ($row['type'] == 'checkbox-group') {552 $form_data[$i]['value'] = implode(',', $pp_yp_data[0][$row['name']]);553 } else {554 /*changes done by Dhara Bhalala to manage single quote in json*/555 $form_data[$i]['value'] = str_replace("'", "\'", $pp_yp_data[0][$row['name']]);556// $form_data[$i]['value'] = str_replace("'", '"', $pp_yp_data[0][$row['name']]);557 }558 }559 }560 $i++;561 }562 $archive = array(563 'yp_id' => $id,564 'form_json_data' => json_encode($form_data, TRUE),565 'created_by' => $this->session->userdata('LOGGED_IN')['ID'],566 'created_date' => datetimeformat(),567 'modified_date' => $last_modified_date,568 'modified_time' => date("H:i:s"),569 'status' => 0,570 'care_home_id' => $data_yp_detail['YP_details'][0]['care_home']571 );572 //get ra yp data573// $wherestring = " form_json_data = '" . str_replace("\\", "\\\\", json_encode($form_data, TRUE)) . "'";574// $pp_archive_data = $this->common_model->get_records(INDIVIDUAL_STRATEGIES_ARCHIVE, array('yp_id'), '', '', '', '', '', '', '', '', '', $wherestring);575 576 /*changes done by Dhara Bhalala to prevent auto archive when no updation changes*/577 $match = array('form_json_data' => json_encode($form_data, TRUE));578 $pp_archive_data = $this->common_model->get_records(INDIVIDUAL_STRATEGIES_ARCHIVE, array('yp_id'), '', '', $match);579 580 if (empty($pp_archive_data) || $new_change > 0 || $new_update > 0) {581 //get ra yp data582 $match = array('yp_id' => $id);583 $archive_data = $this->common_model->get_records(INDIVIDUAL_STRATEGIES_ARCHIVE, '', '', '', $match);584 if (!empty($archive_data)) {585 //update status to archive586 $update_archive = array(587 'created_date' => datetimeformat(),588 'modified_date' => $last_modified_date,589 'modified_time' => date("H:i:s"),590 'status' => 1,591 'care_home_id' => $data_yp_detail['YP_details'][0]['care_home']592 );593 $where = array('status' => 0, 'yp_id' => $id);594 $this->common_model->update(INDIVIDUAL_STRATEGIES_ARCHIVE, $update_archive, $where);595 }596 //insert archive data for next time597 $this->common_model->insert(INDIVIDUAL_STRATEGIES_ARCHIVE, $archive);598 $archive_individual_meeting_id = $this->db->insert_id();599 $table = NFC_AMENDMENTS;600 $match = array('yp_id' => $id);601 $field = array('*');602 $amendment_data = $this->common_model->get_records($table, $field, '', '', $match);603 if (!empty($amendment_data)) {604 foreach ($amendment_data as $data) {605 $amendment['amendments_id'] = $data['amendments_id'];606 $amendment['archive_individual_meeting_id'] = $archive_individual_meeting_id;607 $amendment['yp_id'] = $data['yp_id'];608 $amendment['amendments'] = ucfirst($data['amendments']);609 $amendment['staff_initials'] = $data['staff_initials'];610 $amendment['amendments_modified_date'] = $data['modified_date'];611 $amendment['created_date'] = datetimeformat();612 $this->common_model->insert(NFC_ARCHIVE_AMENDMENTS, $amendment);613 }614 }615 $table = NFC_CURRENT_PROTOCOLS_IN_PLACE;616 $match = array('yp_id' => $id);617 $field = array('*');618 $protocols_details = $this->common_model->get_records($table, $field, '', '', $match);619 if (!empty($protocols_details)) {620 foreach ($protocols_details as $protocols_data) {621 $protocols['protocols_in_place_id'] = $protocols_data['protocols_in_place_id'];622 $protocols['yp_id'] = $protocols_data['yp_id'];623 $protocols['archive_individual_meeting_id'] = $archive_individual_meeting_id;624 $protocols['current_protocols_in_place'] = ucfirst($protocols_data['current_protocols_in_place']);625 $protocols['staff_initials'] = $protocols_data['staff_initials'];626 $protocols['created_date'] = datetimeformat();627 $protocols['protocol_modified_date'] = $protocols_data['modified_date'];628 $this->common_model->insert(NFC_ARCHIVE_CURRENT_PROTOCOLS_IN_PLACE, $protocols);629 }630 }631 if ($archive_individual_meeting_id > 1) {632 $archive_individual_meeting_id = $archive_individual_meeting_id - 1;633 }634 $table = INDIVIDUAL_MEETING_SIGNOFF;635 $match = array('yp_id' => $id, 'individual_meeting_id' => $pp_yp_data[0]['individual_strategies_id'], 'is_delete' => '0');636 $field = array('yp_id,individual_meeting_id,created_by');637 $signoff_details = $this->common_model->get_records($table, $field, '', '', $match);638 if (!empty($signoff_details)) {639 foreach ($signoff_details as $signoff_data) {640 $signoff['yp_id'] = $signoff_data['yp_id'];641 $signoff['archive_individual_meeting_id'] = $archive_individual_meeting_id;642 $signoff['individual_meeting_id'] = ucfirst($signoff_data['individual_meeting_id']);643 $signoff['created_by'] = $signoff_data['created_by'];644 $signoff['created_date'] = datetimeformat();645 $this->common_model->insert(NFC_ARCHIVE_INDIVIDUAL_MEETING_SIGNOFF, $signoff);646 }647 $archive = array('is_delete' => 1);648 $where = array('yp_id' => $id);649 $this->common_model->update(INDIVIDUAL_MEETING_SIGNOFF, $archive, $where);650 }651 return TRUE;652 } else {653 return TRUE;654 }655 } else {656 return TRUE;657 }658 } else {659 show_404();660 }661 }662 /*663 @Author : Ritesh Rana664 @Desc : open popup for Signoff / Approval functionality665 @Input : yp_id,is_id666 @Output :667 @Date : 12/07/2017668 */669 public function signoff($yp_id = '', $is_id = '') {670 $this->formValidation();671 $fields = array("care_home");672 $data['YP_details'] = YpDetails($yp_id,$fields);673 $data['care_home_id'] = $data['YP_details'][0]['care_home'];674 $main_user_data = $this->session->userdata('LOGGED_IN');675 if ($this->form_validation->run() == FALSE) {676 $data['footerJs'][0] = base_url('uploads/custom/js/IndividualStrategies/IndividualStrategies.js');677 $data['crnt_view'] = $this->viewname;678 $data['ypid'] = $yp_id;679 $data['is_id'] = $is_id;680 //get social info681 $table = SOCIAL_WORKER_DETAILS . ' as sw';682 $match = array("sw.yp_id" => $yp_id);683 $fields = array("sw.social_worker_id,sw.social_worker_firstname,sw.social_worker_surname");684 $data['social_worker_data'] = $this->common_model->get_records($table, $fields, '', '', $match);685 //get parent info686 $table = PARENT_CARER_INFORMATION . ' as pc';687 $match = array("pc.yp_id" => $yp_id, 'pc.is_deleted' => 0);688 $fields = array("pc.parent_carer_id,pc.firstname,pc.surname");689 $data['parent_data'] = $this->common_model->get_records($table, $fields, '', '', $match);690 //Get Records From Login Table691 $data['form_action_path'] = $this->viewname . '/signoff';692 $data['header'] = array('menu_module' => 'YoungPerson');693 $data['validation'] = validation_errors();694 if (!empty($data['validation'])) {695 $data['main_content'] = '/signoff';696 $this->parser->parse('layouts/DefaultTemplate', $data);697 } else {698 $this->load->view('/signoff', $data);699 }700 } else {701 $this->insertdata();702 }703 }704 /*705 @Author : Ritesh Rana706 @Desc : insert Signoff / Approval functionality707 @Input : yp_id,is_id708 @Output :709 @Date : 12/07/2017710 */711 public function insertdata() {712 $postdata = $this->input->post();713 $ypid = $postdata['ypid'];714 $is_id = $postdata['is_id'];715 $user_type = $postdata['user_type'];716 // insert parent details717 if ($user_type == 'parent') {718 $parent_data['firstname'] = strip_tags($postdata['fname']);719 $parent_data['surname'] = strip_tags($postdata['lname']);720 $parent_data['relationship'] = strip_tags($postdata['relationship']);721 $parent_data['address'] = strip_tags($postdata['address']);722 $parent_data['contact_number'] = strip_tags($postdata['contact_number']);723 $parent_data['email_address'] = strip_tags($postdata['email']);724 $parent_data['yp_authorised_communication'] = strip_tags($postdata['yp_authorised_communication']);725 $parent_data['carer_authorised_communication'] = strip_tags($postdata['carer_authorised_communication']);726 $parent_data['yp_authorised_communication'] = strip_tags($postdata['yp_authorised_communication']);727 $parent_data['comments'] = strip_tags($postdata['comments']);728 $parent_data['created_date'] = datetimeformat();729 $parent_data['created_by'] = $this->session->userdata['LOGGED_IN']['ID'];730 $parent_data['yp_id'] = $this->input->post('ypid');731 $parent_data['care_home_id'] = $this->input->post('care_home_id');732 $success = $this->common_model->insert(PARENT_CARER_INFORMATION, $parent_data);733 //Insert log activity734 $activity = array(735 'user_id' => $this->session->userdata['LOGGED_IN']['ID'],736 'yp_id' => !empty($postdata['ypid']) ? $postdata['ypid'] : '',737 'module_name' => IS_PARENT_CARER_DETAILS_YP,738 'module_field_name' => '',739 'type' => 1740 );741 log_activity($activity);742 }743 //Current Login detail744 $main_user_data = $this->session->userdata('LOGGED_IN');745 if (!validateFormSecret()) {746 $this->session->set_flashdata('msg', "<div class='alert alert-danger text-center'>" . lang('error') . "</div>");747 redirect('YoungPerson/view/' . $ypid);748 }749 $data['crnt_view'] = $this->viewname;750 $match = array('is_form_id' => 1);751 $formsdata = $this->common_model->get_records(IS_FORM, '', '', '', $match);752 //get ra yp data753 $match = array('yp_id' => $ypid);754 $pp_yp_data = $this->common_model->get_records(INDIVIDUAL_STRATEGIES, '', '', '', $match);755 if (!empty($formsdata) && !empty($pp_yp_data)) {756 $form_data = json_decode($formsdata[0]['form_json_data'], TRUE);757 $data = array();758 $i = 0;759 foreach ($form_data as $row) {760 if (isset($row['name'])) {761 if ($row['type'] != 'button') {762 if ($row['type'] == 'checkbox-group') {763 $form_data[$i]['value'] = implode(',', $pp_yp_data[0][$row['name']]);764 } else {765 $form_data[$i]['value'] = str_replace("'", '"', $pp_yp_data[0][$row['name']]);766 }767 }768 }769 $i++;770 }771 }772 $data = array(773 'user_type' => ucfirst($postdata['user_type']),774 'yp_id' => ucfirst($postdata['ypid']),775 'is_id' => ucfirst($postdata['is_id']),776 'form_json_data' => json_encode($form_data, TRUE),777 'fname' => ucfirst($postdata['fname']),778 'lname' => ucfirst($postdata['lname']),779 'email' => $postdata['email'],780 'key_data' => md5($postdata['email']),781 'created_date' => datetimeformat(),782 'created_by' => $main_user_data['ID'],783 'updated_by' => $main_user_data['ID'],784 'care_home_id' => $postdata['care_home_id'],785 );786 //Insert Record in Database787 if ($this->common_model->insert(NFC_IS_SIGNOFF_DETAILS, $data)) {788 $signoff_id = $this->db->insert_id();789 $table = NFC_AMENDMENTS;790 $match = array('yp_id' => $ypid);791 $field = array('amendments_id,yp_id,amendments,staff_initials');792 $amendment_data = $this->common_model->get_records($table, $field, '', '', $match);793 if (!empty($amendment_data)) {794 foreach ($amendment_data as $data_amendment) {795 $amendment['amendments_id'] = $data_amendment['amendments_id'];796 $amendment['approval_individual_meeting_id'] = $signoff_id;797 $amendment['yp_id'] = $data_amendment['yp_id'];798 $amendment['amendments'] = ucfirst($data_amendment['amendments']);799 $amendment['staff_initials'] = $data_amendment['staff_initials'];800 $amendment['created_date'] = datetimeformat();801 $this->common_model->insert(NFC_APPROVAL_AMENDMENTS, $amendment);802 }803 }804 $table = NFC_CURRENT_PROTOCOLS_IN_PLACE;805 $match = array('yp_id' => $ypid);806 $field = array('protocols_in_place_id,yp_id,current_protocols_in_place,staff_initials');807 $protocols_details = $this->common_model->get_records($table, $field, '', '', $match);808 if (!empty($protocols_details)) {809 foreach ($protocols_details as $protocols_data) {810 $protocols['protocols_in_place_id'] = $protocols_data['protocols_in_place_id'];811 $protocols['yp_id'] = $protocols_data['yp_id'];812 $protocols['approval_individual_meeting_id'] = $signoff_id;813 $protocols['current_protocols_in_place'] = ucfirst($protocols_data['current_protocols_in_place']);814 $protocols['staff_initials'] = $protocols_data['staff_initials'];815 $protocols['created_date'] = datetimeformat();816 $this->common_model->insert(NFC_APPROVAL_CURRENT_PROTOCOLS_IN_PLACE, $protocols);817 }818 }819 $table = INDIVIDUAL_MEETING_SIGNOFF;820 $match = array('yp_id' => $ypid, 'is_delete' => '0');821 $field = array('yp_id,created_by');822 $signoff_data = $this->common_model->get_records($table, $field, '', '', $match);823 if (!empty($signoff_data)) {824 foreach ($signoff_data as $approval_value) {825 $update_arc_data['approval_is_id'] = $signoff_id;826 $update_arc_data['yp_id'] = $approval_value['yp_id'];827 $update_arc_data['created_date'] = datetimeformat();828 $update_arc_data['created_by'] = $approval_value['created_by'];829 $this->common_model->insert(NFC_APPROVAL_INDIVIDUAL_MEETING_SIGNOFF, $update_arc_data);830 }831 }832 $this->sendMailToRelation($data, $signoff_id); // send mail833 $msg = $this->lang->line('successfully_sign_off');834 $this->session->set_flashdata('msg', "<div class='alert alert-success text-center'>$msg</div>");835 } else {836 // error837 $msg = $this->lang->line('error_msg');838 $this->session->set_flashdata('msg', "<div class='alert alert-danger text-center'>$msg</div>");839 }840 redirect('IndividualStrategies/index/' . $ypid);841 }842 /*843 @Author : Ritesh Rana844 @Desc : Send email for Signoff / Approval functionality845 @Input : yp_id,is_id846 @Output :847 @Date : 12/07/2017848 */849 private function sendMailToRelation($data = array(), $signoff_id) {850 if (!empty($data) && is_numeric($signoff_id)) {851 if (!empty($data['yp_id'])) {852 $match = array("yp_id" => $data['yp_id']);853 $fields = array("concat(yp_fname,' ',yp_lname) as yp_name");854 $YP_details = $this->common_model->get_records(YP_DETAILS, $fields, '', '', $match);855 }856 $yp_name = !empty($YP_details[0]['yp_name']) ? $YP_details[0]['yp_name'] : "";857 /* Send Created Customer password with Link */858 $toEmailId = $data['email'];859 $customerName = $data['fname'] . ' ' . $data['lname'];860 $email = md5($toEmailId);861 $loginLink = base_url('IndividualStrategies/signoffData/' . $data['yp_id'] . '/' . $signoff_id . '/' . $email);862 $find = array('{NAME}', '{LINK}');863 $replace = array(864 'NAME' => $customerName,865 'LINK' => $loginLink,866 );867 $emailSubject = 'Welcome to NFCTracker';868 $emailBody = '<div>'869 . '<p>Hello {NAME} ,</p> '870 . '<p>Please find Individual Strategies for ' . $yp_name . ' for your approval.</p> '871 . "<p>For security purposes, Please do not forward this email on to any other person. It is for the recipient only and if this is sent in error please advise itsupport@newforestcare.co.uk and delete this email. This link is only valid for " . REPORT_EXPAIRED_HOUR . ", should this not be signed off within " . REPORT_EXPAIRED_HOUR . " of recieving then please request again</p>"872 . '<p> <a href="{LINK}">click here</a> </p> '873 . '<div>';874 $finalEmailBody = str_replace($find, $replace, $emailBody);875 return $this->common_model->sendEmail($toEmailId, $emailSubject, $finalEmailBody, FROM_EMAIL_ID);876 }877 return true;878 }879 public function formValidation($id = null) {880 $this->form_validation->set_rules('fname', 'Firstname', 'trim|required|min_length[2]|max_length[100]|xss_clean');881 $this->form_validation->set_rules('lname', 'Lastname', 'trim|required|min_length[2]|max_length[100]|xss_clean');882 $this->form_validation->set_rules('email', 'Email', 'trim|required|xss_clean');883 }884 /*885 @Author : Ritesh Rana886 @Desc : View Signoff / Approval functionality887 @Input : yp_id,email_id and sign off id888 @Output :889 @Date : 12/07/2017890 */891 public function signoffData($id, $signoff_id, $email) {892 if (is_numeric($id) && is_numeric($signoff_id) && !empty($email)) {893 $login_user_id = $this->session->userdata['LOGGED_IN']['ID'];894 $match = array('yp_id' => $id, 'is_signoff_details_id' => $signoff_id, 'key_data' => $email, 'status' => 'inactive');895 $check_signoff_data = $this->common_model->get_records(NFC_IS_SIGNOFF_DETAILS, array("*"), '', '', $match);896 if (!empty($check_signoff_data)) {897 $expairedDate = date('Y-m-d H:i:s', strtotime($check_signoff_data[0]['created_date'] . REPORT_EXPAIRED_DAYS));898 if (strtotime(datetimeformat()) <= strtotime($expairedDate)) {899 $data['form_data'] = json_decode($check_signoff_data[0]['form_json_data'], TRUE);900 //get YP information901 $fields = array("care_home,yp_fname,yp_lname,date_of_birth,yp_id");902 $data['YP_details'] = YpDetails($id,$fields);903 if (empty($data['YP_details'])) {904 $msg = $this->lang->line('common_no_record_found');905 $this->session->set_flashdata('msg', "<div class='alert alert-danger text-center'>$msg</div>");906 redirect('YoungPerson/view/' . $id);907 }908 //get Amendments data909 $table = NFC_APPROVAL_AMENDMENTS . ' as do';910 $match = array('do.yp_id' => $id, 'approval_individual_meeting_id' => $signoff_id);911 $fields = array("do.amendments,do.created_date,CONCAT(l.firstname,' ', l.lastname) as create_name");912 $join_tables = array(LOGIN . ' as l' => 'l.login_id= do.staff_initials');913 $data['item_details'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', $match);914 //get current protocols in place915 $table = NFC_APPROVAL_CURRENT_PROTOCOLS_IN_PLACE . ' as cpip';916 $match = array('cpip.yp_id' => $id, 'approval_individual_meeting_id' => $signoff_id);917 $fields = array("cpip.current_protocols_in_place,cpip.created_date,CONCAT(l.firstname,' ', l.lastname) as create_name");918 $join_tables = array(LOGIN . ' as l' => 'l.login_id= cpip.staff_initials');919 $data['protocols_details'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', $match);920 //get IS Signoff datat 921 $login_user_id = $this->session->userdata['LOGGED_IN']['ID'];922 $table = INDIVIDUAL_MEETING_SIGNOFF . ' as ims';923 $where = array("l.is_delete" => "0", "ims.yp_id" => $id, "ims.is_delete" => "0");924 $fields = array("ims.created_by,ims.created_date,ims.yp_id, CONCAT(`firstname`,' ', `lastname`) as name");925 $join_tables = array(LOGIN . ' as l' => 'l.login_id=ims.created_by');926 $group_by = array('created_by');927 $data['ra_signoff_data'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', '', '', '', '', '', '', $group_by, $where);928 //get IS old yp data929 $data['key_data'] = $email;930 $data['ypid'] = $id;931 $data['signoff_id'] = $signoff_id;932 $match = array('yp_id' => $id, 'is_previous_version' => 1);933 $data['prev_edit_data'] = $this->common_model->get_records(INDIVIDUAL_STRATEGIES, '', '', '', $match);934 $data['header'] = array('menu_module' => 'YoungPerson');935 $data['footerJs'][0] = base_url('uploads/custom/js/IndividualStrategies/IndividualStrategies.js');936 $data['crnt_view'] = $this->viewname;937 $data['main_content'] = '/signoff_view';938 $this->parser->parse('layouts/DefaultTemplate', $data);939 } else {940 $msg = lang('link_expired');941 $this->session->set_flashdata('msg', "<div class='alert alert-danger text-center'>$msg</div>")942 ;943 $this->load->view('successfully_message');944 }945 } else {946 $msg = $this->lang->line('already_is_review');947 $this->session->set_flashdata('msg', "<div class='alert alert-danger text-center'>$msg</div>");948 $this->load->view('successfully_message');949 }950 //get pp form951 } else {952 show_404();953 }954 }955 /*956 @Author : Ritesh Rana957 @Desc : review data for Signoff / Approval view page958 @Input : yp_id,signoff_id,email_id959 @Output :960 @Date : 12/07/2017961 */962 public function signoff_review_data($yp_id, $signoff_id, $email) {963 if (!empty($yp_id) && !empty($signoff_id) && !empty($email)) {964 $login_user_id = $this->session->userdata['LOGGED_IN']['ID'];965 $match = array('yp_id' => $yp_id, 'is_signoff_details_id' => $signoff_id, 'key_data' => $email, 'status' => 'inactive');966 $check_signoff_data = $this->common_model->get_records(NFC_IS_SIGNOFF_DETAILS, array("form_json_data,created_date,key_data"), '', '', $match);967 if (!empty($check_signoff_data)) {968 $expairedDate = date('Y-m-d H:i:s', strtotime($check_signoff_data[0]['created_date'] . REPORT_EXPAIRED_DAYS));969 if (strtotime(datetimeformat()) <= strtotime($expairedDate)) {970 $u_data['status'] = 'active';971 $u_data['modified_date'] = datetimeformat();972 $success = $this->common_model->update(NFC_IS_SIGNOFF_DETAILS, $u_data, array('is_signoff_details_id' => $signoff_id, 'yp_id' => $yp_id, 'key_data' => $email));973 if ($success) {974 $msg = $this->lang->line('successfully_is_review');975 $this->session->set_flashdata('signoff_review_msg', "<div class='alert alert-success text-center'>$msg</div>");976 } else {977 // error978 $msg = $this->lang->line('error_msg');979 $this->session->set_flashdata('signoff_review_msg', "<div class='alert alert-danger text-center'>$msg</div>");980 }981 } else {982 $msg = lang('link_expired');983 $this->session->set_flashdata('signoff_review_msg', "<div class='alert alert-danger text-center'>$msg</div>")984 ;985 }986 } else {987 $msg = $this->lang->line('already_is_review');988 $this->session->set_flashdata('signoff_review_msg', "<div class='alert alert-danger text-center'>$msg</div>");989 }990 } else {991 $msg = $this->lang->line('error_msg');992 $this->session->set_flashdata('signoff_review_msg', "<div class='alert alert-danger text-center'>$msg</div>");993 }994 $this->load->view('successfully_message');995 }996 /*997 @Author : Niral Patel998 @Desc : get user type detail999 @Input :1000 @Output :1001 @Date : 28/03/20181002 */1003 public function getUserTypeDetail() {1004 $postdata = $this->input->post();1005 $user_type = !empty($postdata['user_type']) ? $postdata['user_type'] : '';1006 $id = $postdata['id'];1007 $ypid = $postdata['ypid'];1008 $table = YP_DETAILS . ' as yp';1009 $match = "yp.yp_id = " . $ypid;1010 $fields = array("yp.*,swd.social_worker_firstname,swd.social_worker_surname,swd.landline,swd.mobile,swd.email,swd.senior_social_worker_firstname,swd.senior_social_worker_surname,oyp.pen_portrait,swd.other,pc.firstname,pc.surname,pc.relationship,pc.address,pc.contact_number,pc.email_address,pc.yp_authorised_communication,pc.carer_authorised_communication,pc.comments");1011 $join_tables = array(SOCIAL_WORKER_DETAILS . ' as swd' => 'swd.yp_id= yp.yp_id', PARENT_CARER_INFORMATION . ' as pc' => 'pc.yp_id= yp.yp_id', OVERVIEW_OF_YOUNG_PERSON . ' as oyp' => 'oyp.yp_id= yp.yp_id');1012 $data['editRecord'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', $match);1013 if ($user_type == 'parent_data') {1014 //get parent info1015 $table = PARENT_CARER_INFORMATION . ' as pc';1016 $match = array("pc.parent_carer_id" => $id, 'pc.is_deleted' => 0);1017 $fields = array("pc.*");1018 $data['parent_data'] = $this->common_model->get_records($table, $fields, '', '', $match);1019 $data['editRecord'][0]['fname'] = $data['editRecord'][0]['firstname'];1020 $data['editRecord'][0]['lname'] = $data['editRecord'][0]['surname'];1021 $data['editRecord'][0]['email_id'] = $data['editRecord'][0]['email_address'];1022 } else if ($user_type == 'social_data') {1023 //get social info1024 $table = SOCIAL_WORKER_DETAILS . ' as sw';1025 $match = array("sw.social_worker_id" => $id);1026 $fields = array("sw.*");1027 $data['social_worker_data'] = $this->common_model->get_records($table, $fields, '', '', $match);1028 $data['editRecord'][0]['fname'] = $data['editRecord'][0]['social_worker_firstname'];1029 $data['editRecord'][0]['lname'] = $data['editRecord'][0]['social_worker_surname'];1030 $data['editRecord'][0]['email_id'] = $data['editRecord'][0]['email'];1031 }1032 $data['user_type'] = $user_type;1033 $this->load->view($this->viewname . '/signoff_ajax', $data);1034 }1035 /*1036 @Author : Ritesh rana1037 @Desc : view id data1038 @Input :1039 @Output :1040 @Date : 13/04/20181041 */1042 public function external_approval_list($ypid, $is_id) {1043 if (is_numeric($ypid) && is_numeric($is_id)) {1044 $fields = array("care_home,yp_fname,yp_lname,date_of_birth,yp_id");1045 $data['YP_details'] = YpDetails($ypid,$fields);1046 if (empty($data['YP_details'])) {1047 $msg = $this->lang->line('common_no_record_found');1048 $this->session->set_flashdata('msg', "<div class='alert alert-danger text-center'>$msg</div>");1049 redirect('YoungPerson/view/' . $ypid);1050 }1051 $searchtext = $perpage = '';1052 $searchtext = $this->input->post('searchtext');1053 $sortfield = $this->input->post('sortfield');1054 $sortby = $this->input->post('sortby');1055 $perpage = 10;1056 $allflag = $this->input->post('allflag');1057 if (!empty($allflag) && ($allflag == 'all' || $allflag == 'changesorting' || $allflag == 'changesearch')) {1058 $this->session->unset_userdata('is_approval_session_data');1059 }1060 $searchsort_session = $this->session->userdata('is_approval_session_data');1061 //Sorting1062 if (!empty($sortfield) && !empty($sortby)) {1063 $data['sortfield'] = $sortfield;1064 $data['sortby'] = $sortby;1065 } else {1066 if (!empty($searchsort_session['sortfield'])) {1067 $data['sortfield'] = $searchsort_session['sortfield'];1068 $data['sortby'] = $searchsort_session['sortby'];1069 $sortfield = $searchsort_session['sortfield'];1070 $sortby = $searchsort_session['sortby'];1071 } else {1072 $sortfield = 'is_signoff_details_id';1073 $sortby = 'desc';1074 $data['sortfield'] = $sortfield;1075 $data['sortby'] = $sortby;1076 }1077 }1078 //Search text1079 if (!empty($searchtext)) {1080 $data['searchtext'] = $searchtext;1081 } else {1082 if (empty($allflag) && !empty($searchsort_session['searchtext'])) {1083 $data['searchtext'] = $searchsort_session['searchtext'];1084 $searchtext = $data['searchtext'];1085 } else {1086 $data['searchtext'] = '';1087 }1088 }1089 if (!empty($perpage) && $perpage != 'null') {1090 $data['perpage'] = $perpage;1091 $config['per_page'] = $perpage;1092 } else {1093 if (!empty($searchsort_session['perpage'])) {1094 $data['perpage'] = trim($searchsort_session['perpage']);1095 $config['per_page'] = trim($searchsort_session['perpage']);1096 } else {1097 $config['per_page'] = '10';1098 $data['perpage'] = '10';1099 }1100 }1101 //pagination configuration1102 $config['first_link'] = 'First';1103 $config['base_url'] = base_url() . $this->viewname . '/external_approval_list/' . $ypid . '/' . $is_id;1104 if (!empty($allflag) && ($allflag == 'all' || $allflag == 'changesorting' || $allflag == 'changesearch')) {1105 $config['uri_segment'] = 0;1106 $uri_segment = 0;1107 } else {1108 $config['uri_segment'] = 5;1109 $uri_segment = $this->uri->segment(5);1110 }1111 //Query1112 $table = NFC_IS_SIGNOFF_DETAILS . ' as com';1113 $where = array("com.yp_id" => $ypid, "com.is_id" => $is_id);1114 $fields = array("c.care_home_name,com.*,CONCAT(`firstname`,' ', `lastname`) as create_name ,CONCAT(`fname`,' ', `lname`) as user_name");1115 $join_tables = array(LOGIN . ' as l' => 'l.login_id= com.created_by', CARE_HOME . ' as c' => 'c.care_home_id= com.care_home_id');1116 if (!empty($searchtext)) {1117 1118 } else {1119 $data['information'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', '', '', $config['per_page'], $uri_segment, $sortfield, $sortby, '', $where);1120 $config['total_rows'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', '', '', '', '', $sortfield, $sortby, '', $where, '', '', '1');1121 }1122 $data['ypid'] = $ypid;1123 $data['is_id'] = $is_id;1124 $this->ajax_pagination->initialize($config);1125 $data['pagination'] = $this->ajax_pagination->create_links();1126 $data['uri_segment'] = $uri_segment;1127 $sortsearchpage_data = array(1128 'sortfield' => $data['sortfield'],1129 'sortby' => $data['sortby'],1130 'searchtext' => $data['searchtext'],1131 'perpage' => trim($data['perpage']),1132 'uri_segment' => $uri_segment,1133 'total_rows' => $config['total_rows']);1134 $this->session->set_userdata('is_approval_session_data', $sortsearchpage_data);1135 setActiveSession('is_approval_session_data'); // set current Session active1136 $data['header'] = array('menu_module' => 'Communication');1137 //get communication form1138 $data['crnt_view'] = $this->viewname;1139 $data['footerJs'][0] = base_url('uploads/custom/js/IndividualStrategies/IndividualStrategies.js');1140 $data['header'] = array('menu_module' => 'YoungPerson');1141 if ($this->input->post('result_type') == 'ajax') {1142 $this->load->view($this->viewname . '/approval_ajaxlist', $data);1143 } else {1144 $data['main_content'] = '/is_list';1145 $this->parser->parse('layouts/DefaultTemplate', $data);1146 }1147 } else {1148 show_404();1149 }1150 }1151 /*1152 @Author : Ritesh rana1153 @Desc : view approval IS1154 @Input :1155 @Output :1156 @Date : 13/04/20181157 */1158 public function viewApprovalIs($id, $ypid) {1159 if (is_numeric($id) && is_numeric($ypid)) {1160 //get archive pp data1161 $match = array('is_signoff_details_id' => $id);1162 $formsdata = $this->common_model->get_records(NFC_IS_SIGNOFF_DETAILS, '', '', '', $match);1163 $data['formsdata'] = $formsdata;1164 if (!empty($formsdata)) {1165 $data['pp_form_data'] = json_decode($formsdata[0]['form_json_data'], TRUE);1166 }1167 //get YP information1168 $fields = array("care_home,yp_fname,yp_lname,date_of_birth,yp_id");1169 $data['YP_details'] = YpDetails($ypid,$fields);1170 if (empty($data['YP_details'])) {1171 $msg = $this->lang->line('common_no_record_found');1172 $this->session->set_flashdata('msg', "<div class='alert alert-danger text-center'>$msg</div>");1173 redirect('YoungPerson/view/' . $ypid);1174 }1175 //get approval individual behaviour plan signoff1176 $table = NFC_APPROVAL_INDIVIDUAL_BEHAVIOUR_PLAN_SIGNOFF . ' as ibp';1177 $where = array("l.is_delete" => "0", "ibp.yp_id" => $ypid, "ibp.is_delete" => "0", "approval_ibp_id" => $id);1178 $fields = array("ibp.created_by,ibp.created_date,ibp.yp_id, CONCAT(`firstname`,' ', `lastname`) as name");1179 $join_tables = array(LOGIN . ' as l' => 'l.login_id=ibp.created_by');1180 $group_by = array('created_by');1181 $data['signoff_data'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', '', '', '', '', '', '', $group_by, $where);1182 //get approval amendments1183 $table = NFC_APPROVAL_AMENDMENTS . ' as do';1184 $match = array('do.yp_id' => $ypid, 'approval_individual_meeting_id' => $id);1185 $fields = array("do.amendments,do.amendments_id,do.created_date,CONCAT(l.firstname,' ', l.lastname) as create_name");1186 $join_tables = array(LOGIN . ' as l' => 'l.login_id= do.staff_initials');1187 $data['item_details'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', $match);1188 1189 //get approval current protocols in place1190 $table = NFC_APPROVAL_CURRENT_PROTOCOLS_IN_PLACE . ' as cpip';1191 $match = array('cpip.yp_id' => $ypid, 'approval_individual_meeting_id' => $id);1192 $fields = array("cpip.protocols_in_place_id,cpip.current_protocols_in_place,cpip.created_date,CONCAT(l.firstname,' ', l.lastname) as create_name");1193 $join_tables = array(LOGIN . ' as l' => 'l.login_id= cpip.staff_initials');1194 $data['protocols_details'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', $match);1195 1196 $table = NFC_APPROVAL_INDIVIDUAL_MEETING_SIGNOFF . ' as is';1197 $where = array("l.is_delete" => "0", "is.yp_id" => $ypid, "is.is_delete" => "0", "approval_is_id" => $id);1198 $fields = array("is.created_by,is.created_date,is.yp_id, CONCAT(`firstname`,' ', `lastname`) as name");1199 $join_tables = array(LOGIN . ' as l' => 'l.login_id=is.created_by');1200 $group_by = array('created_by');1201 $data['signoff_data'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', '', '', '', '', '', '', $group_by, $where);1202 $data['ypid'] = $ypid;1203 $data['is_id'] = $formsdata[0]['is_id'];1204 $data['footerJs'][0] = base_url('uploads/custom/js/IndividualStrategies/IndividualStrategies.js');1205 $data['crnt_view'] = $this->viewname;1206 $data['header'] = array('menu_module' => 'YoungPerson');1207 $data['main_content'] = '/approval_view';1208 $this->parser->parse('layouts/DefaultTemplate', $data);1209 } else {1210 show_404();1211 }1212 }1213 /*1214 @Author : Ritesh rana1215 @Desc : resend external approval1216 @Input :1217 @Output :1218 @Date : 13/04/20181219 */1220 public function resend_external_approval($signoff_id, $ypid, $isid) {1221 $match = array('is_signoff_details_id' => $signoff_id);1222 $signoff_data = $this->common_model->get_records(NFC_IS_SIGNOFF_DETAILS, array("yp_id,fname,lname,email"), '', '', $match);1223 if (!empty($signoff_data)) {1224 $data = array(1225 'yp_id' => ucfirst($signoff_data[0]['yp_id']),1226 'fname' => ucfirst($signoff_data[0]['fname']),1227 'lname' => ucfirst($signoff_data[0]['lname']),1228 'email' => $signoff_data[0]['email']1229 );1230 $sent = $this->sendMailToRelation($data, $signoff_id); // send mail1231 if ($sent) {1232 $u_data['created_date'] = datetimeformat();1233 $u_data['modified_date'] = NULL;1234 $success = $this->common_model->update(NFC_IS_SIGNOFF_DETAILS, $u_data, array('is_signoff_details_id' => $signoff_id));1235 $msg = $this->lang->line('mail_sent_successfully');1236 $this->session->set_flashdata('msg', "<div class='alert alert-success text-center'>$msg</div>");1237 } else {1238 $msg = $this->lang->line('error');1239 $this->session->set_flashdata('msg', "<div class='alert alert-success text-center'>$msg</div>");1240 }1241 }1242 redirect($this->viewname . '/external_approval_list/' . $ypid . '/' . $isid);1243 }1244/*1245 @Author : Ritesh rana1246 @Desc : Download Pdf1247 @Input :1248 @Output :1249 @Date : 13/04/20181250 */1251 public function DownloadPdf($individual_strategies_id, $yp_id) {1252 $data = [];1253 $match = array('is_form_id' => 1);1254 $ra_forms = $this->common_model->get_records(IS_FORM, '', '', '', $match);1255 if (!empty($ra_forms)) {1256 $data['ra_form_data'] = json_decode($ra_forms[0]['form_json_data'], TRUE);1257 }1258 //get YP information1259 $data['id'] = $yp_id;1260 $fields = array("care_home,yp_fname,yp_lname,date_of_birth,yp_id");1261 $data['YP_details'] = YpDetails($yp_id,$fields);1262 //get amendments1263 $table = NFC_AMENDMENTS . ' as do';1264 $match = array('do.yp_id' => $yp_id, 'do.individual_meeting_id' => $individual_strategies_id);1265 $fields = array("do.amendments,do.created_date,CONCAT(l.firstname,' ', l.lastname) as create_name");1266 $join_tables = array(LOGIN . ' as l' => 'l.login_id= do.staff_initials');1267 $data['item_details'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', $match);1268 //get current protocols in place1269 $table = NFC_CURRENT_PROTOCOLS_IN_PLACE . ' as cpip';1270 $match = array('cpip.yp_id' => $yp_id, 'cpip.individual_meeting_id' => $individual_strategies_id);1271 $fields = array("cpip.current_protocols_in_place,cpip.created_date,CONCAT(l.firstname,' ', l.lastname) as create_name");1272 $join_tables = array(LOGIN . ' as l' => 'l.login_id= cpip.staff_initials');1273 $data['protocols_details'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', $match);1274 1275 //get individual meeting signoff 1276 $table = INDIVIDUAL_MEETING_SIGNOFF . ' as ims';1277 $where = array("l.is_delete" => "0", "ims.yp_id" => $yp_id, "ims.individual_meeting_id" => $individual_strategies_id);1278 $fields = array("ims.created_by,ims.yp_id, CONCAT(`firstname`,' ', `lastname`) as name");1279 $join_tables = array(LOGIN . ' as l' => 'l.login_id=ims.created_by');1280 $group_by = array('created_by');1281 $data['signoff_data'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', '', '', '', '', '', '', $group_by, $where);1282 //get individual signoff details1283 $table = NFC_IS_SIGNOFF_DETAILS . ' as sd';1284 $match_social = array('sd.yp_id' => $yp_id, 'sd.is_id' => $individual_strategies_id, 'sd.status' => 'active');1285 $social_where_in = array("sd.user_type" => ['Social_worker', 'Social_data']);1286 $match_parent = array('sd.yp_id' => $yp_id, 'sd.is_id' => $individual_strategies_id, 'sd.status' => 'active');1287 $parent_where_in = array("sd.user_type" => ['Parent', 'Parent_data']);1288 $match_other = array('sd.yp_id' => $yp_id, 'sd.is_id' => $individual_strategies_id, "sd.user_type" => "Other", 'sd.status' => 'active');1289 $fields = array("sd.*,CONCAT(sd.fname,' ', sd.lname) as staff_name");1290 $data['social_worker_signoff'] = $this->common_model->get_records($table, $fields, '', '', $match_social, '', '', '', '', '', '', '', '', $social_where_in);1291 $data['parent_signoff'] = $this->common_model->get_records($table, $fields, '', '', $match_parent, '', '', '', '', '', '', '', '', $parent_where_in);1292 $data['other_signoff'] = $this->common_model->get_records($table, $fields, '', '', $match_other);1293 //get IS yp data1294 $table = INDIVIDUAL_STRATEGIES . ' as cpm';1295 $match = array('cpm.yp_id' => $yp_id, 'cpm.individual_strategies_id' => $individual_strategies_id);1296 $fields = array("cpm.*,CONCAT(l.firstname,' ', l.lastname) as create_name");1297 $join_tables = array(LOGIN . ' as l' => 'l.login_id = cpm.created_by');1298 $data['edit_data'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', $match);1299 $data['crnt_view'] = $this->viewname;1300 $data['ypid'] = $yp_id;1301 //new1302 $pdfFileName = "individual_strategies.pdf";1303 $PDFInformation['yp_details'] = $data['YP_details'][0];1304 $PDFInformation['edit_data'] = $data['edit_data'][0]['modified_date'];1305 $PDFHeaderHTML = $this->load->view('isrpdfHeader', $PDFInformation, true);1306 $PDFFooterHTML = $this->load->view('isrpdfFooter', $PDFInformation, true);1307 //Set Header Footer and Content For PDF1308 $this->m_pdf->pdf->mPDF('utf-8', 'A4', '', '', '15', '15', '55', '25');1309 $this->m_pdf->pdf->SetHTMLHeader($PDFHeaderHTML, 'O');1310 $this->m_pdf->pdf->SetHTMLFooter($PDFFooterHTML);1311 $data['main_content'] = '/isrpdf';1312 $html = $this->parser->parse('layouts/PdfDataTemplate', $data);1313 /* remove */1314 $this->m_pdf->pdf->WriteHTML($html);1315 //Store PDF in individual_strategies Folder1316 $this->m_pdf->pdf->Output($pdfFileName, "D");1317 }1318 /*1319 @Author : Nikunj Ghelani1320 @Desc : PDF data1321 @Input :1322 @Output :1323 @Date : 28/06/20181324 */1325 public function DownloadPDF_after_mail($id, $signoff_id) {1326 if (is_numeric($id) && is_numeric($signoff_id)) {1327 $login_user_id = $this->session->userdata['LOGGED_IN']['ID'];1328 $match = array('yp_id' => $id, 'is_signoff_details_id' => $signoff_id, 'status' => 'inactive');1329 $check_signoff_data = $this->common_model->get_records(NFC_IS_SIGNOFF_DETAILS, array("form_json_data,user_type,email,key_data,created_date"), '', '', $match);1330 if (!empty($check_signoff_data)) {1331 $expairedDate = date('Y-m-d H:i:s', strtotime($check_signoff_data[0]['created_date'] . REPORT_EXPAIRED_DAYS));1332 if (strtotime(datetimeformat()) <= strtotime($expairedDate)) {1333 $data['form_data'] = json_decode($check_signoff_data[0]['form_json_data'], TRUE);1334 //get YP information1335 $fields = array("care_home,yp_fname,yp_lname,date_of_birth,yp_id");1336 $data['YP_details'] = YpDetails($id,$fields);1337 1338 if (empty($data['YP_details'])) {1339 $msg = $this->lang->line('common_no_record_found');1340 $this->session->set_flashdata('msg', "<div class='alert alert-danger text-center'>$msg</div>");1341 redirect('YoungPerson/view/' . $id);1342 }1343 //get IS yp data1344 $match = array('yp_id' => $id, 'is_previous_version' => 1);1345 $data['is_edit_data'] = $this->common_model->get_records(NFC_INDIVIDUAL_STRATEGIES, array("*"), '', '', $match);1346 //get approval amendments1347 $table = NFC_APPROVAL_AMENDMENTS . ' as do';1348 $match = array('do.yp_id' => $id, 'approval_individual_meeting_id' => $signoff_id);1349 $fields = array("do.amendments,do.created_date,CONCAT(l.firstname,' ', l.lastname) as create_name");1350 $join_tables = array(LOGIN . ' as l' => 'l.login_id= do.staff_initials');1351 $data['item_details'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', $match);1352 //get approval current protocols in place1353 $table = NFC_APPROVAL_CURRENT_PROTOCOLS_IN_PLACE . ' as cpip';1354 $match = array('cpip.yp_id' => $id, 'approval_individual_meeting_id' => $signoff_id);1355 $fields = array("cpip.current_protocols_in_place,cpip.created_date,CONCAT(l.firstname,' ', l.lastname) as create_name");1356 $join_tables = array(LOGIN . ' as l' => 'l.login_id= cpip.staff_initials');1357 $data['protocols_details'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', $match);1358 1359 //get signoff data 1360 $login_user_id = $this->session->userdata['LOGGED_IN']['ID'];1361 $table = INDIVIDUAL_MEETING_SIGNOFF . ' as ims';1362 $where = array("l.is_delete" => "0", "ims.yp_id" => $id, "ims.is_delete" => "0");1363 $fields = array("ims.created_by,ims.created_date,ims.yp_id, CONCAT(`firstname`,' ', `lastname`) as name");1364 $join_tables = array(LOGIN . ' as l' => 'l.login_id=ims.created_by');1365 $group_by = array('created_by');1366 $data['ra_signoff_data'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', '', '', '', '', '', '', $group_by, $where);1367 $table = INDIVIDUAL_MEETING_SIGNOFF . ' as ims';1368 $where = array("ims.yp_id" => $id, "ims.created_by" => $login_user_id, "ims.is_delete" => "0");1369 $fields = array("ims.individual_meeting_signoff_id,ims.individual_meeting_id");1370 $data['check_signoff_data'] = $this->common_model->get_records($table, $fields, '', '', '', '', '', '', '', '', '', $where);1371 //get ra old yp data1372 $data['key_data'] = $email;1373 $data['ypid'] = $id;1374 $data['signoff_id'] = $signoff_id;1375 $match = array('yp_id' => $id, 'is_previous_version' => 1);1376 $data['prev_edit_data'] = $this->common_model->get_records(INDIVIDUAL_STRATEGIES, '', '', '', $match);1377 $data['header'] = array('menu_module' => 'YoungPerson');1378 $data['footerJs'][0] = base_url('uploads/custom/js/IndividualStrategies/IndividualStrategies.js');1379 $data['crnt_view'] = $this->viewname;1380 $pdfFileName = "individualstrategies.pdf";1381 $PDFInformation['yp_details'] = $data['YP_details'][0];1382 $PDFInformation['edit_data'] = $data['edit_data'][0]['modified_date'];1383 $PDFInformation['edit_date'] = $data['is_edit_data'][0]['modified_date'];1384 $PDFHeaderHTML = $this->load->view('individualstrategiespdfHeader', $PDFInformation, true);1385 $PDFFooterHTML = $this->load->view('individualstrategiespdfFooter', $PDFInformation, true);1386 //Set Header Footer and Content For PDF1387 $this->m_pdf->pdf->mPDF('utf-8', 'A4', '', '', '10', '10', '45', '25');1388 $this->m_pdf->pdf->SetHTMLHeader($PDFHeaderHTML, 'O');1389 $this->m_pdf->pdf->SetHTMLFooter($PDFFooterHTML);1390 $data['main_content'] = '/individualstrategies';1391 $html = $this->parser->parse('layouts/PdfDataTemplate', $data);1392 /* remove */1393 $this->m_pdf->pdf->WriteHTML($html);1394 //Store PDF in individual_strategies Folder1395 $this->m_pdf->pdf->Output($pdfFileName, "D");1396 } else {1397 $msg = lang('link_expired');1398 $this->session->set_flashdata('msg', "<div class='alert alert-danger text-center'>$msg</div>")1399 ;1400 $this->load->view('successfully_message');1401 }1402 } else {1403 $msg = $this->lang->line('already_is_review');1404 $this->session->set_flashdata('msg', "<div class='alert alert-danger text-center'>$msg</div>");1405 $this->load->view('successfully_message');1406 }1407 //get pp form1408 } else {1409 show_404();1410 }1411 }1412}...

Full Screen

Full Screen

test.php

Source:test.php Github

copy

Full Screen

1<?PHP2require_once '../peg/autoloader.php';3use hafriedlander\Peg\Parser;4class parsingMachine extends Parser\Basic {5/* SL: '/' */6protected $match_SL_typestack = array('SL');7function match_SL ($stack = array()) {8 $matchrule = "SL"; $result = $this->construct($matchrule, $matchrule, null);9 if (substr($this->string,$this->pos,1) == '/') {10 $this->pos += 1;11 $result["text"] .= '/';12 return $this->finalise($result);13 }14 else { return FALSE; }15}16/* DP: ':' */17protected $match_DP_typestack = array('DP');18function match_DP ($stack = array()) {19 $matchrule = "DP"; $result = $this->construct($matchrule, $matchrule, null);20 if (substr($this->string,$this->pos,1) == ':') {21 $this->pos += 1;22 $result["text"] .= ':';23 return $this->finalise($result);24 }25 else { return FALSE; }26}27/* PV: ';' */28protected $match_PV_typestack = array('PV');29function match_PV ($stack = array()) {30 $matchrule = "PV"; $result = $this->construct($matchrule, $matchrule, null);31 if (substr($this->string,$this->pos,1) == ';') {32 $this->pos += 1;33 $result["text"] .= ';';34 return $this->finalise($result);35 }36 else { return FALSE; }37}38/* V: ',' */39protected $match_V_typestack = array('V');40function match_V ($stack = array()) {41 $matchrule = "V"; $result = $this->construct($matchrule, $matchrule, null);42 if (substr($this->string,$this->pos,1) == ',') {43 $this->pos += 1;44 $result["text"] .= ',';45 return $this->finalise($result);46 }47 else { return FALSE; }48}49/* PLUS: '+' */50protected $match_PLUS_typestack = array('PLUS');51function match_PLUS ($stack = array()) {52 $matchrule = "PLUS"; $result = $this->construct($matchrule, $matchrule, null);53 if (substr($this->string,$this->pos,1) == '+') {54 $this->pos += 1;55 $result["text"] .= '+';56 return $this->finalise($result);57 }58 else { return FALSE; }59}60/* number: /[0-9]+/ */61protected $match_number_typestack = array('number');62function match_number ($stack = array()) {63 $matchrule = "number"; $result = $this->construct($matchrule, $matchrule, null);64 if (( $subres = $this->rx( '/[0-9]+/' ) ) !== FALSE) {65 $result["text"] .= $subres;66 return $this->finalise($result);67 }68 else { return FALSE; }69}70/* number2: /[0-9]{2}/ */71protected $match_number2_typestack = array('number2');72function match_number2 ($stack = array()) {73 $matchrule = "number2"; $result = $this->construct($matchrule, $matchrule, null);74 if (( $subres = $this->rx( '/[0-9]{2}/' ) ) !== FALSE) {75 $result["text"] .= $subres;76 return $this->finalise($result);77 }78 else { return FALSE; }79}80/* number4: /[0-9]{4}/ */81protected $match_number4_typestack = array('number4');82function match_number4 ($stack = array()) {83 $matchrule = "number4"; $result = $this->construct($matchrule, $matchrule, null);84 if (( $subres = $this->rx( '/[0-9]{4}/' ) ) !== FALSE) {85 $result["text"] .= $subres;86 return $this->finalise($result);87 }88 else { return FALSE; }89}90/* chars: /[a-zA-Z\.]+/ */91protected $match_chars_typestack = array('chars');92function match_chars ($stack = array()) {93 $matchrule = "chars"; $result = $this->construct($matchrule, $matchrule, null);94 if (( $subres = $this->rx( '/[a-zA-Z\.]+/' ) ) !== FALSE) {95 $result["text"] .= $subres;96 return $this->finalise($result);97 }98 else { return FALSE; }99}100/* numero: /[0-9]/ */101protected $match_numero_typestack = array('numero');102function match_numero ($stack = array()) {103 $matchrule = "numero"; $result = $this->construct($matchrule, $matchrule, null);104 if (( $subres = $this->rx( '/[0-9]/' ) ) !== FALSE) {105 $result["text"] .= $subres;106 return $this->finalise($result);107 }108 else { return FALSE; }109}110/* minuscolo: /[a-z]/ */111protected $match_minuscolo_typestack = array('minuscolo');112function match_minuscolo ($stack = array()) {113 $matchrule = "minuscolo"; $result = $this->construct($matchrule, $matchrule, null);114 if (( $subres = $this->rx( '/[a-z]/' ) ) !== FALSE) {115 $result["text"] .= $subres;116 return $this->finalise($result);117 }118 else { return FALSE; }119}120/* normale: (numero | minuscolo | '.' | '-' | '_')+ */121protected $match_normale_typestack = array('normale');122function match_normale ($stack = array()) {123 $matchrule = "normale"; $result = $this->construct($matchrule, $matchrule, null);124 $count = 0;125 while (true) {126 $res_29 = $result;127 $pos_29 = $this->pos;128 $_28 = NULL;129 do {130 $_26 = NULL;131 do {132 $res_11 = $result;133 $pos_11 = $this->pos;134 $matcher = 'match_'.'numero'; $key = $matcher; $pos = $this->pos;135 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );136 if ($subres !== FALSE) {137 $this->store( $result, $subres );138 $_26 = TRUE; break;139 }140 $result = $res_11;141 $this->pos = $pos_11;142 $_24 = NULL;143 do {144 $res_13 = $result;145 $pos_13 = $this->pos;146 $matcher = 'match_'.'minuscolo'; $key = $matcher; $pos = $this->pos;147 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );148 if ($subres !== FALSE) {149 $this->store( $result, $subres );150 $_24 = TRUE; break;151 }152 $result = $res_13;153 $this->pos = $pos_13;154 $_22 = NULL;155 do {156 $res_15 = $result;157 $pos_15 = $this->pos;158 if (substr($this->string,$this->pos,1) == '.') {159 $this->pos += 1;160 $result["text"] .= '.';161 $_22 = TRUE; break;162 }163 $result = $res_15;164 $this->pos = $pos_15;165 $_20 = NULL;166 do {167 $res_17 = $result;168 $pos_17 = $this->pos;169 if (substr($this->string,$this->pos,1) == '-') {170 $this->pos += 1;171 $result["text"] .= '-';172 $_20 = TRUE; break;173 }174 $result = $res_17;175 $this->pos = $pos_17;176 if (substr($this->string,$this->pos,1) == '_') {177 $this->pos += 1;178 $result["text"] .= '_';179 $_20 = TRUE; break;180 }181 $result = $res_17;182 $this->pos = $pos_17;183 $_20 = FALSE; break;184 }185 while(0);186 if( $_20 === TRUE ) { $_22 = TRUE; break; }187 $result = $res_15;188 $this->pos = $pos_15;189 $_22 = FALSE; break;190 }191 while(0);192 if( $_22 === TRUE ) { $_24 = TRUE; break; }193 $result = $res_13;194 $this->pos = $pos_13;195 $_24 = FALSE; break;196 }197 while(0);198 if( $_24 === TRUE ) { $_26 = TRUE; break; }199 $result = $res_11;200 $this->pos = $pos_11;201 $_26 = FALSE; break;202 }203 while(0);204 if( $_26 === FALSE) { $_28 = FALSE; break; }205 $_28 = TRUE; break;206 }207 while(0);208 if( $_28 === FALSE) {209 $result = $res_29;210 $this->pos = $pos_29;211 unset( $res_29 );212 unset( $pos_29 );213 break;214 }215 $count++;216 }217 if ($count >= 1) { return $this->finalise($result); }218 else { return FALSE; }219}220/* other: /=-_'()/ */221protected $match_other_typestack = array('other');222function match_other ($stack = array()) {223 $matchrule = "other"; $result = $this->construct($matchrule, $matchrule, null);224 if (( $subres = $this->rx( '/=-_\'()/' ) ) !== FALSE) {225 $result["text"] .= $subres;226 return $this->finalise($result);227 }228 else { return FALSE; }229}230/* any: /.+/ */231protected $match_any_typestack = array('any');232function match_any ($stack = array()) {233 $matchrule = "any"; $result = $this->construct($matchrule, $matchrule, null);234 if (( $subres = $this->rx( '/.+/' ) ) !== FALSE) {235 $result["text"] .= $subres;236 return $this->finalise($result);237 }238 else { return FALSE; }239}240/* token: normale* */241protected $match_token_typestack = array('token');242function match_token ($stack = array()) {243 $matchrule = "token"; $result = $this->construct($matchrule, $matchrule, null);244 while (true) {245 $res_32 = $result;246 $pos_32 = $this->pos;247 $matcher = 'match_'.'normale'; $key = $matcher; $pos = $this->pos;248 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );249 if ($subres !== FALSE) { $this->store( $result, $subres ); }250 else {251 $result = $res_32;252 $this->pos = $pos_32;253 unset( $res_32 );254 unset( $pos_32 );255 break;256 }257 }258 return $this->finalise($result);259}260/* string: (number | chars )+ */261protected $match_string_typestack = array('string');262function match_string ($stack = array()) {263 $matchrule = "string"; $result = $this->construct($matchrule, $matchrule, null);264 $count = 0;265 while (true) {266 $res_39 = $result;267 $pos_39 = $this->pos;268 $_38 = NULL;269 do {270 $_36 = NULL;271 do {272 $res_33 = $result;273 $pos_33 = $this->pos;274 $matcher = 'match_'.'number'; $key = $matcher; $pos = $this->pos;275 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );276 if ($subres !== FALSE) {277 $this->store( $result, $subres );278 $_36 = TRUE; break;279 }280 $result = $res_33;281 $this->pos = $pos_33;282 $matcher = 'match_'.'chars'; $key = $matcher; $pos = $this->pos;283 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );284 if ($subres !== FALSE) {285 $this->store( $result, $subres );286 $_36 = TRUE; break;287 }288 $result = $res_33;289 $this->pos = $pos_33;290 $_36 = FALSE; break;291 }292 while(0);293 if( $_36 === FALSE) { $_38 = FALSE; break; }294 $_38 = TRUE; break;295 }296 while(0);297 if( $_38 === FALSE) {298 $result = $res_39;299 $this->pos = $pos_39;300 unset( $res_39 );301 unset( $pos_39 );302 break;303 }304 $count++;305 }306 if ($count >= 1) { return $this->finalise($result); }307 else { return FALSE; }308}309/* dataString: number4 '-' number2 '-' number2 */310protected $match_dataString_typestack = array('dataString');311function match_dataString ($stack = array()) {312 $matchrule = "dataString"; $result = $this->construct($matchrule, $matchrule, null);313 $_45 = NULL;314 do {315 $matcher = 'match_'.'number4'; $key = $matcher; $pos = $this->pos;316 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );317 if ($subres !== FALSE) { $this->store( $result, $subres ); }318 else { $_45 = FALSE; break; }319 if (substr($this->string,$this->pos,1) == '-') {320 $this->pos += 1;321 $result["text"] .= '-';322 }323 else { $_45 = FALSE; break; }324 $matcher = 'match_'.'number2'; $key = $matcher; $pos = $this->pos;325 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );326 if ($subres !== FALSE) { $this->store( $result, $subres ); }327 else { $_45 = FALSE; break; }328 if (substr($this->string,$this->pos,1) == '-') {329 $this->pos += 1;330 $result["text"] .= '-';331 }332 else { $_45 = FALSE; break; }333 $matcher = 'match_'.'number2'; $key = $matcher; $pos = $this->pos;334 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );335 if ($subres !== FALSE) { $this->store( $result, $subres ); }336 else { $_45 = FALSE; break; }337 $_45 = TRUE; break;338 }339 while(0);340 if( $_45 === TRUE ) { return $this->finalise($result); }341 if( $_45 === FALSE) { return FALSE; }342}343/* expr: > :schema :documento :versione? :comunicato* :manifestazione? :partizione? :proprieta? :extra? > | :extra */344protected $match_expr_typestack = array('expr');345function match_expr ($stack = array()) {346 $matchrule = "expr"; $result = $this->construct($matchrule, $matchrule, null);347 $_61 = NULL;348 do {349 $res_47 = $result;350 $pos_47 = $this->pos;351 $_58 = NULL;352 do {353 if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }354 $matcher = 'match_'.'schema'; $key = $matcher; $pos = $this->pos;355 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );356 if ($subres !== FALSE) {357 $this->store( $result, $subres, "schema" );358 }359 else { $_58 = FALSE; break; }360 $matcher = 'match_'.'documento'; $key = $matcher; $pos = $this->pos;361 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );362 if ($subres !== FALSE) {363 $this->store( $result, $subres, "documento" );364 }365 else { $_58 = FALSE; break; }366 $res_51 = $result;367 $pos_51 = $this->pos;368 $matcher = 'match_'.'versione'; $key = $matcher; $pos = $this->pos;369 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );370 if ($subres !== FALSE) {371 $this->store( $result, $subres, "versione" );372 }373 else {374 $result = $res_51;375 $this->pos = $pos_51;376 unset( $res_51 );377 unset( $pos_51 );378 }379 while (true) {380 $res_52 = $result;381 $pos_52 = $this->pos;382 $matcher = 'match_'.'comunicato'; $key = $matcher; $pos = $this->pos;383 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );384 if ($subres !== FALSE) {385 $this->store( $result, $subres, "comunicato" );386 }387 else {388 $result = $res_52;389 $this->pos = $pos_52;390 unset( $res_52 );391 unset( $pos_52 );392 break;393 }394 }395 $res_53 = $result;396 $pos_53 = $this->pos;397 $matcher = 'match_'.'manifestazione'; $key = $matcher; $pos = $this->pos;398 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );399 if ($subres !== FALSE) {400 $this->store( $result, $subres, "manifestazione" );401 }402 else {403 $result = $res_53;404 $this->pos = $pos_53;405 unset( $res_53 );406 unset( $pos_53 );407 }408 $res_54 = $result;409 $pos_54 = $this->pos;410 $matcher = 'match_'.'partizione'; $key = $matcher; $pos = $this->pos;411 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );412 if ($subres !== FALSE) {413 $this->store( $result, $subres, "partizione" );414 }415 else {416 $result = $res_54;417 $this->pos = $pos_54;418 unset( $res_54 );419 unset( $pos_54 );420 }421 $res_55 = $result;422 $pos_55 = $this->pos;423 $matcher = 'match_'.'proprieta'; $key = $matcher; $pos = $this->pos;424 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );425 if ($subres !== FALSE) {426 $this->store( $result, $subres, "proprieta" );427 }428 else {429 $result = $res_55;430 $this->pos = $pos_55;431 unset( $res_55 );432 unset( $pos_55 );433 }434 $res_56 = $result;435 $pos_56 = $this->pos;436 $matcher = 'match_'.'extra'; $key = $matcher; $pos = $this->pos;437 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );438 if ($subres !== FALSE) {439 $this->store( $result, $subres, "extra" );440 }441 else {442 $result = $res_56;443 $this->pos = $pos_56;444 unset( $res_56 );445 unset( $pos_56 );446 }447 if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }448 $_58 = TRUE; break;449 }450 while(0);451 if( $_58 === TRUE ) { $_61 = TRUE; break; }452 $result = $res_47;453 $this->pos = $pos_47;454 $matcher = 'match_'.'extra'; $key = $matcher; $pos = $this->pos;455 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );456 if ($subres !== FALSE) {457 $this->store( $result, $subres, "extra" );458 $_61 = TRUE; break;459 }460 $result = $res_47;461 $this->pos = $pos_47;462 $_61 = FALSE; break;463 }464 while(0);465 if( $_61 === TRUE ) { return $this->finalise($result); }466 if( $_61 === FALSE) { return FALSE; }467}468/* extra: any */469protected $match_extra_typestack = array('extra');470function match_extra ($stack = array()) {471 $matchrule = "extra"; $result = $this->construct($matchrule, $matchrule, null);472 $matcher = 'match_'.'any'; $key = $matcher; $pos = $this->pos;473 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );474 if ($subres !== FALSE) {475 $this->store( $result, $subres );476 return $this->finalise($result);477 }478 else { return FALSE; }479}480/* schema: "urn:nir:" */481protected $match_schema_typestack = array('schema');482function match_schema ($stack = array()) {483 $matchrule = "schema"; $result = $this->construct($matchrule, $matchrule, null);484 if (( $subres = $this->literal( 'urn:nir:' ) ) !== FALSE) {485 $result["text"] .= $subres;486 return $this->finalise($result);487 }488 else { return FALSE; }489}490/* documento: :autorita DP :provvedimento (DP :estremi (DP :annesso)*)? */491protected $match_documento_typestack = array('documento');492function match_documento ($stack = array()) {493 $matchrule = "documento"; $result = $this->construct($matchrule, $matchrule, null);494 $_76 = NULL;495 do {496 $matcher = 'match_'.'autorita'; $key = $matcher; $pos = $this->pos;497 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );498 if ($subres !== FALSE) {499 $this->store( $result, $subres, "autorita" );500 }501 else { $_76 = FALSE; break; }502 $matcher = 'match_'.'DP'; $key = $matcher; $pos = $this->pos;503 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );504 if ($subres !== FALSE) { $this->store( $result, $subres ); }505 else { $_76 = FALSE; break; }506 $matcher = 'match_'.'provvedimento'; $key = $matcher; $pos = $this->pos;507 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );508 if ($subres !== FALSE) {509 $this->store( $result, $subres, "provvedimento" );510 }511 else { $_76 = FALSE; break; }512 $res_75 = $result;513 $pos_75 = $this->pos;514 $_74 = NULL;515 do {516 $matcher = 'match_'.'DP'; $key = $matcher; $pos = $this->pos;517 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );518 if ($subres !== FALSE) { $this->store( $result, $subres ); }519 else { $_74 = FALSE; break; }520 $matcher = 'match_'.'estremi'; $key = $matcher; $pos = $this->pos;521 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );522 if ($subres !== FALSE) {523 $this->store( $result, $subres, "estremi" );524 }525 else { $_74 = FALSE; break; }526 while (true) {527 $res_73 = $result;528 $pos_73 = $this->pos;529 $_72 = NULL;530 do {531 $matcher = 'match_'.'DP'; $key = $matcher; $pos = $this->pos;532 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );533 if ($subres !== FALSE) { $this->store( $result, $subres ); }534 else { $_72 = FALSE; break; }535 $matcher = 'match_'.'annesso'; $key = $matcher; $pos = $this->pos;536 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );537 if ($subres !== FALSE) {538 $this->store( $result, $subres, "annesso" );539 }540 else { $_72 = FALSE; break; }541 $_72 = TRUE; break;542 }543 while(0);544 if( $_72 === FALSE) {545 $result = $res_73;546 $this->pos = $pos_73;547 unset( $res_73 );548 unset( $pos_73 );549 break;550 }551 }552 $_74 = TRUE; break;553 }554 while(0);555 if( $_74 === FALSE) {556 $result = $res_75;557 $this->pos = $pos_75;558 unset( $res_75 );559 unset( $pos_75 );560 }561 $_76 = TRUE; break;562 }563 while(0);564 if( $_76 === TRUE ) { return $this->finalise($result); }565 if( $_76 === FALSE) { return FALSE; }566}567/* autorita: :soggetto (PLUS :soggetto)* */568protected $match_autorita_typestack = array('autorita');569function match_autorita ($stack = array()) {570 $matchrule = "autorita"; $result = $this->construct($matchrule, $matchrule, null);571 $_83 = NULL;572 do {573 $matcher = 'match_'.'soggetto'; $key = $matcher; $pos = $this->pos;574 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );575 if ($subres !== FALSE) {576 $this->store( $result, $subres, "soggetto" );577 }578 else { $_83 = FALSE; break; }579 while (true) {580 $res_82 = $result;581 $pos_82 = $this->pos;582 $_81 = NULL;583 do {584 $matcher = 'match_'.'PLUS'; $key = $matcher; $pos = $this->pos;585 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );586 if ($subres !== FALSE) { $this->store( $result, $subres ); }587 else { $_81 = FALSE; break; }588 $matcher = 'match_'.'soggetto'; $key = $matcher; $pos = $this->pos;589 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );590 if ($subres !== FALSE) {591 $this->store( $result, $subres, "soggetto" );592 }593 else { $_81 = FALSE; break; }594 $_81 = TRUE; break;595 }596 while(0);597 if( $_81 === FALSE) {598 $result = $res_82;599 $this->pos = $pos_82;600 unset( $res_82 );601 unset( $pos_82 );602 break;603 }604 }605 $_83 = TRUE; break;606 }607 while(0);608 if( $_83 === TRUE ) { return $this->finalise($result); }609 if( $_83 === FALSE) { return FALSE; }610}611/* soggetto: 612 istituzione:token PV organo:token PV organo:token PV organo:token PV organo:token PV funzione:token | 613 istituzione:token PV organo:token PV organo:token PV organo:token PV funzione:token | 614 istituzione:token PV organo:token PV organo:token PV funzione:token | 615 istituzione:token PV organo:token PV funzione:token | 616 istituzione:token PV funzione:token | 617 carica:token */618protected $match_soggetto_typestack = array('soggetto');619function match_soggetto ($stack = array()) {620 $matchrule = "soggetto"; $result = $this->construct($matchrule, $matchrule, null);621 $_144 = NULL;622 do {623 $res_85 = $result;624 $pos_85 = $this->pos;625 $_97 = NULL;626 do {627 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;628 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );629 if ($subres !== FALSE) {630 $this->store( $result, $subres, "istituzione" );631 }632 else { $_97 = FALSE; break; }633 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;634 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );635 if ($subres !== FALSE) { $this->store( $result, $subres ); }636 else { $_97 = FALSE; break; }637 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;638 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );639 if ($subres !== FALSE) {640 $this->store( $result, $subres, "organo" );641 }642 else { $_97 = FALSE; break; }643 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;644 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );645 if ($subres !== FALSE) { $this->store( $result, $subres ); }646 else { $_97 = FALSE; break; }647 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;648 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );649 if ($subres !== FALSE) {650 $this->store( $result, $subres, "organo" );651 }652 else { $_97 = FALSE; break; }653 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;654 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );655 if ($subres !== FALSE) { $this->store( $result, $subres ); }656 else { $_97 = FALSE; break; }657 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;658 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );659 if ($subres !== FALSE) {660 $this->store( $result, $subres, "organo" );661 }662 else { $_97 = FALSE; break; }663 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;664 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );665 if ($subres !== FALSE) { $this->store( $result, $subres ); }666 else { $_97 = FALSE; break; }667 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;668 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );669 if ($subres !== FALSE) {670 $this->store( $result, $subres, "organo" );671 }672 else { $_97 = FALSE; break; }673 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;674 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );675 if ($subres !== FALSE) { $this->store( $result, $subres ); }676 else { $_97 = FALSE; break; }677 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;678 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );679 if ($subres !== FALSE) {680 $this->store( $result, $subres, "funzione" );681 }682 else { $_97 = FALSE; break; }683 $_97 = TRUE; break;684 }685 while(0);686 if( $_97 === TRUE ) { $_144 = TRUE; break; }687 $result = $res_85;688 $this->pos = $pos_85;689 $_142 = NULL;690 do {691 $res_99 = $result;692 $pos_99 = $this->pos;693 $_109 = NULL;694 do {695 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;696 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );697 if ($subres !== FALSE) {698 $this->store( $result, $subres, "istituzione" );699 }700 else { $_109 = FALSE; break; }701 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;702 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );703 if ($subres !== FALSE) { $this->store( $result, $subres ); }704 else { $_109 = FALSE; break; }705 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;706 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );707 if ($subres !== FALSE) {708 $this->store( $result, $subres, "organo" );709 }710 else { $_109 = FALSE; break; }711 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;712 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );713 if ($subres !== FALSE) { $this->store( $result, $subres ); }714 else { $_109 = FALSE; break; }715 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;716 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );717 if ($subres !== FALSE) {718 $this->store( $result, $subres, "organo" );719 }720 else { $_109 = FALSE; break; }721 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;722 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );723 if ($subres !== FALSE) { $this->store( $result, $subres ); }724 else { $_109 = FALSE; break; }725 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;726 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );727 if ($subres !== FALSE) {728 $this->store( $result, $subres, "organo" );729 }730 else { $_109 = FALSE; break; }731 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;732 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );733 if ($subres !== FALSE) { $this->store( $result, $subres ); }734 else { $_109 = FALSE; break; }735 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;736 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );737 if ($subres !== FALSE) {738 $this->store( $result, $subres, "funzione" );739 }740 else { $_109 = FALSE; break; }741 $_109 = TRUE; break;742 }743 while(0);744 if( $_109 === TRUE ) { $_142 = TRUE; break; }745 $result = $res_99;746 $this->pos = $pos_99;747 $_140 = NULL;748 do {749 $res_111 = $result;750 $pos_111 = $this->pos;751 $_119 = NULL;752 do {753 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;754 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );755 if ($subres !== FALSE) {756 $this->store( $result, $subres, "istituzione" );757 }758 else { $_119 = FALSE; break; }759 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;760 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );761 if ($subres !== FALSE) { $this->store( $result, $subres ); }762 else { $_119 = FALSE; break; }763 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;764 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );765 if ($subres !== FALSE) {766 $this->store( $result, $subres, "organo" );767 }768 else { $_119 = FALSE; break; }769 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;770 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );771 if ($subres !== FALSE) { $this->store( $result, $subres ); }772 else { $_119 = FALSE; break; }773 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;774 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );775 if ($subres !== FALSE) {776 $this->store( $result, $subres, "organo" );777 }778 else { $_119 = FALSE; break; }779 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;780 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );781 if ($subres !== FALSE) { $this->store( $result, $subres ); }782 else { $_119 = FALSE; break; }783 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;784 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );785 if ($subres !== FALSE) {786 $this->store( $result, $subres, "funzione" );787 }788 else { $_119 = FALSE; break; }789 $_119 = TRUE; break;790 }791 while(0);792 if( $_119 === TRUE ) { $_140 = TRUE; break; }793 $result = $res_111;794 $this->pos = $pos_111;795 $_138 = NULL;796 do {797 $res_121 = $result;798 $pos_121 = $this->pos;799 $_127 = NULL;800 do {801 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;802 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );803 if ($subres !== FALSE) {804 $this->store( $result, $subres, "istituzione" );805 }806 else { $_127 = FALSE; break; }807 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;808 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );809 if ($subres !== FALSE) {810 $this->store( $result, $subres );811 }812 else { $_127 = FALSE; break; }813 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;814 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );815 if ($subres !== FALSE) {816 $this->store( $result, $subres, "organo" );817 }818 else { $_127 = FALSE; break; }819 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;820 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );821 if ($subres !== FALSE) {822 $this->store( $result, $subres );823 }824 else { $_127 = FALSE; break; }825 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;826 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );827 if ($subres !== FALSE) {828 $this->store( $result, $subres, "funzione" );829 }830 else { $_127 = FALSE; break; }831 $_127 = TRUE; break;832 }833 while(0);834 if( $_127 === TRUE ) { $_138 = TRUE; break; }835 $result = $res_121;836 $this->pos = $pos_121;837 $_136 = NULL;838 do {839 $res_129 = $result;840 $pos_129 = $this->pos;841 $_133 = NULL;842 do {843 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;844 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );845 if ($subres !== FALSE) {846 $this->store( $result, $subres, "istituzione" );847 }848 else { $_133 = FALSE; break; }849 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;850 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );851 if ($subres !== FALSE) {852 $this->store( $result, $subres );853 }854 else { $_133 = FALSE; break; }855 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;856 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );857 if ($subres !== FALSE) {858 $this->store( $result, $subres, "funzione" );859 }860 else { $_133 = FALSE; break; }861 $_133 = TRUE; break;862 }863 while(0);864 if( $_133 === TRUE ) { $_136 = TRUE; break; }865 $result = $res_129;866 $this->pos = $pos_129;867 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;868 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );869 if ($subres !== FALSE) {870 $this->store( $result, $subres, "carica" );871 $_136 = TRUE; break;872 }873 $result = $res_129;874 $this->pos = $pos_129;875 $_136 = FALSE; break;876 }877 while(0);878 if( $_136 === TRUE ) { $_138 = TRUE; break; }879 $result = $res_121;880 $this->pos = $pos_121;881 $_138 = FALSE; break;882 }883 while(0);884 if( $_138 === TRUE ) { $_140 = TRUE; break; }885 $result = $res_111;886 $this->pos = $pos_111;887 $_140 = FALSE; break;888 }889 while(0);890 if( $_140 === TRUE ) { $_142 = TRUE; break; }891 $result = $res_99;892 $this->pos = $pos_99;893 $_142 = FALSE; break;894 }895 while(0);896 if( $_142 === TRUE ) { $_144 = TRUE; break; }897 $result = $res_85;898 $this->pos = $pos_85;899 $_144 = FALSE; break;900 }901 while(0);902 if( $_144 === TRUE ) { return $this->finalise($result); }903 if( $_144 === FALSE) { return FALSE; }904}905/* suggetto: elemento:token (PV elemento:token)* */906protected $match_suggetto_typestack = array('suggetto');907function match_suggetto ($stack = array()) {908 $matchrule = "suggetto"; $result = $this->construct($matchrule, $matchrule, null);909 $_151 = NULL;910 do {911 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;912 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );913 if ($subres !== FALSE) {914 $this->store( $result, $subres, "elemento" );915 }916 else { $_151 = FALSE; break; }917 while (true) {918 $res_150 = $result;919 $pos_150 = $this->pos;920 $_149 = NULL;921 do {922 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;923 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );924 if ($subres !== FALSE) { $this->store( $result, $subres ); }925 else { $_149 = FALSE; break; }926 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;927 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );928 if ($subres !== FALSE) {929 $this->store( $result, $subres, "elemento" );930 }931 else { $_149 = FALSE; break; }932 $_149 = TRUE; break;933 }934 while(0);935 if( $_149 === FALSE) {936 $result = $res_150;937 $this->pos = $pos_150;938 unset( $res_150 );939 unset( $pos_150 );940 break;941 }942 }943 $_151 = TRUE; break;944 }945 while(0);946 if( $_151 === TRUE ) { return $this->finalise($result); }947 if( $_151 === FALSE) { return FALSE; }948}949/* provvedimento: tipo:token ( PV :spec)* */950protected $match_provvedimento_typestack = array('provvedimento');951function match_provvedimento ($stack = array()) {952 $matchrule = "provvedimento"; $result = $this->construct($matchrule, $matchrule, null);953 $_158 = NULL;954 do {955 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;956 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );957 if ($subres !== FALSE) {958 $this->store( $result, $subres, "tipo" );959 }960 else { $_158 = FALSE; break; }961 while (true) {962 $res_157 = $result;963 $pos_157 = $this->pos;964 $_156 = NULL;965 do {966 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;967 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );968 if ($subres !== FALSE) { $this->store( $result, $subres ); }969 else { $_156 = FALSE; break; }970 $matcher = 'match_'.'spec'; $key = $matcher; $pos = $this->pos;971 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );972 if ($subres !== FALSE) {973 $this->store( $result, $subres, "spec" );974 }975 else { $_156 = FALSE; break; }976 $_156 = TRUE; break;977 }978 while(0);979 if( $_156 === FALSE) {980 $result = $res_157;981 $this->pos = $pos_157;982 unset( $res_157 );983 unset( $pos_157 );984 break;985 }986 }987 $_158 = TRUE; break;988 }989 while(0);990 if( $_158 === TRUE ) { return $this->finalise($result); }991 if( $_158 === FALSE) { return FALSE; }992}993/* estremi: 994 (:date (PV :numeri (V :numeri)*) ?) |995 (:periodo PV :date (PV :numeri (V :numeri)*) ?) |996 (:periodo (PV :numeri (V :numeri)*) ?) */997protected $match_estremi_typestack = array('estremi');998function match_estremi ($stack = array()) {999 $matchrule = "estremi"; $result = $this->construct($matchrule, $matchrule, null);1000 $_199 = NULL;1001 do {1002 $res_160 = $result;1003 $pos_160 = $this->pos;1004 $_170 = NULL;1005 do {1006 $matcher = 'match_'.'date'; $key = $matcher; $pos = $this->pos;1007 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1008 if ($subres !== FALSE) {1009 $this->store( $result, $subres, "date" );1010 }1011 else { $_170 = FALSE; break; }1012 $res_169 = $result;1013 $pos_169 = $this->pos;1014 $_168 = NULL;1015 do {1016 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;1017 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1018 if ($subres !== FALSE) { $this->store( $result, $subres ); }1019 else { $_168 = FALSE; break; }1020 $matcher = 'match_'.'numeri'; $key = $matcher; $pos = $this->pos;1021 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1022 if ($subres !== FALSE) {1023 $this->store( $result, $subres, "numeri" );1024 }1025 else { $_168 = FALSE; break; }1026 while (true) {1027 $res_167 = $result;1028 $pos_167 = $this->pos;1029 $_166 = NULL;1030 do {1031 $matcher = 'match_'.'V'; $key = $matcher; $pos = $this->pos;1032 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1033 if ($subres !== FALSE) {1034 $this->store( $result, $subres );1035 }1036 else { $_166 = FALSE; break; }1037 $matcher = 'match_'.'numeri'; $key = $matcher; $pos = $this->pos;1038 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1039 if ($subres !== FALSE) {1040 $this->store( $result, $subres, "numeri" );1041 }1042 else { $_166 = FALSE; break; }1043 $_166 = TRUE; break;1044 }1045 while(0);1046 if( $_166 === FALSE) {1047 $result = $res_167;1048 $this->pos = $pos_167;1049 unset( $res_167 );1050 unset( $pos_167 );1051 break;1052 }1053 }1054 $_168 = TRUE; break;1055 }1056 while(0);1057 if( $_168 === FALSE) {1058 $result = $res_169;1059 $this->pos = $pos_169;1060 unset( $res_169 );1061 unset( $pos_169 );1062 }1063 $_170 = TRUE; break;1064 }1065 while(0);1066 if( $_170 === TRUE ) { $_199 = TRUE; break; }1067 $result = $res_160;1068 $this->pos = $pos_160;1069 $_197 = NULL;1070 do {1071 $res_172 = $result;1072 $pos_172 = $this->pos;1073 $_184 = NULL;1074 do {1075 $matcher = 'match_'.'periodo'; $key = $matcher; $pos = $this->pos;1076 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1077 if ($subres !== FALSE) {1078 $this->store( $result, $subres, "periodo" );1079 }1080 else { $_184 = FALSE; break; }1081 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;1082 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1083 if ($subres !== FALSE) { $this->store( $result, $subres ); }1084 else { $_184 = FALSE; break; }1085 $matcher = 'match_'.'date'; $key = $matcher; $pos = $this->pos;1086 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1087 if ($subres !== FALSE) {1088 $this->store( $result, $subres, "date" );1089 }1090 else { $_184 = FALSE; break; }1091 $res_183 = $result;1092 $pos_183 = $this->pos;1093 $_182 = NULL;1094 do {1095 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;1096 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1097 if ($subres !== FALSE) { $this->store( $result, $subres ); }1098 else { $_182 = FALSE; break; }1099 $matcher = 'match_'.'numeri'; $key = $matcher; $pos = $this->pos;1100 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1101 if ($subres !== FALSE) {1102 $this->store( $result, $subres, "numeri" );1103 }1104 else { $_182 = FALSE; break; }1105 while (true) {1106 $res_181 = $result;1107 $pos_181 = $this->pos;1108 $_180 = NULL;1109 do {1110 $matcher = 'match_'.'V'; $key = $matcher; $pos = $this->pos;1111 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1112 if ($subres !== FALSE) {1113 $this->store( $result, $subres );1114 }1115 else { $_180 = FALSE; break; }1116 $matcher = 'match_'.'numeri'; $key = $matcher; $pos = $this->pos;1117 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1118 if ($subres !== FALSE) {1119 $this->store( $result, $subres, "numeri" );1120 }1121 else { $_180 = FALSE; break; }1122 $_180 = TRUE; break;1123 }1124 while(0);1125 if( $_180 === FALSE) {1126 $result = $res_181;1127 $this->pos = $pos_181;1128 unset( $res_181 );1129 unset( $pos_181 );1130 break;1131 }1132 }1133 $_182 = TRUE; break;1134 }1135 while(0);1136 if( $_182 === FALSE) {1137 $result = $res_183;1138 $this->pos = $pos_183;1139 unset( $res_183 );1140 unset( $pos_183 );1141 }1142 $_184 = TRUE; break;1143 }1144 while(0);1145 if( $_184 === TRUE ) { $_197 = TRUE; break; }1146 $result = $res_172;1147 $this->pos = $pos_172;1148 $_195 = NULL;1149 do {1150 $matcher = 'match_'.'periodo'; $key = $matcher; $pos = $this->pos;1151 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1152 if ($subres !== FALSE) {1153 $this->store( $result, $subres, "periodo" );1154 }1155 else { $_195 = FALSE; break; }1156 $res_194 = $result;1157 $pos_194 = $this->pos;1158 $_193 = NULL;1159 do {1160 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;1161 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1162 if ($subres !== FALSE) { $this->store( $result, $subres ); }1163 else { $_193 = FALSE; break; }1164 $matcher = 'match_'.'numeri'; $key = $matcher; $pos = $this->pos;1165 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1166 if ($subres !== FALSE) {1167 $this->store( $result, $subres, "numeri" );1168 }1169 else { $_193 = FALSE; break; }1170 while (true) {1171 $res_192 = $result;1172 $pos_192 = $this->pos;1173 $_191 = NULL;1174 do {1175 $matcher = 'match_'.'V'; $key = $matcher; $pos = $this->pos;1176 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1177 if ($subres !== FALSE) {1178 $this->store( $result, $subres );1179 }1180 else { $_191 = FALSE; break; }1181 $matcher = 'match_'.'numeri'; $key = $matcher; $pos = $this->pos;1182 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1183 if ($subres !== FALSE) {1184 $this->store( $result, $subres, "numeri" );1185 }1186 else { $_191 = FALSE; break; }1187 $_191 = TRUE; break;1188 }1189 while(0);1190 if( $_191 === FALSE) {1191 $result = $res_192;1192 $this->pos = $pos_192;1193 unset( $res_192 );1194 unset( $pos_192 );1195 break;1196 }1197 }1198 $_193 = TRUE; break;1199 }1200 while(0);1201 if( $_193 === FALSE) {1202 $result = $res_194;1203 $this->pos = $pos_194;1204 unset( $res_194 );1205 unset( $pos_194 );1206 }1207 $_195 = TRUE; break;1208 }1209 while(0);1210 if( $_195 === TRUE ) { $_197 = TRUE; break; }1211 $result = $res_172;1212 $this->pos = $pos_172;1213 $_197 = FALSE; break;1214 }1215 while(0);1216 if( $_197 === TRUE ) { $_199 = TRUE; break; }1217 $result = $res_160;1218 $this->pos = $pos_160;1219 $_199 = FALSE; break;1220 }1221 while(0);1222 if( $_199 === TRUE ) { return $this->finalise($result); }1223 if( $_199 === FALSE) { return FALSE; }1224}1225/* date: data:dataString (V data:dataString)* */1226protected $match_date_typestack = array('date');1227function match_date ($stack = array()) {1228 $matchrule = "date"; $result = $this->construct($matchrule, $matchrule, null);1229 $_206 = NULL;1230 do {1231 $matcher = 'match_'.'dataString'; $key = $matcher; $pos = $this->pos;1232 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1233 if ($subres !== FALSE) {1234 $this->store( $result, $subres, "data" );1235 }1236 else { $_206 = FALSE; break; }1237 while (true) {1238 $res_205 = $result;1239 $pos_205 = $this->pos;1240 $_204 = NULL;1241 do {1242 $matcher = 'match_'.'V'; $key = $matcher; $pos = $this->pos;1243 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1244 if ($subres !== FALSE) { $this->store( $result, $subres ); }1245 else { $_204 = FALSE; break; }1246 $matcher = 'match_'.'dataString'; $key = $matcher; $pos = $this->pos;1247 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1248 if ($subres !== FALSE) {1249 $this->store( $result, $subres, "data" );1250 }1251 else { $_204 = FALSE; break; }1252 $_204 = TRUE; break;1253 }1254 while(0);1255 if( $_204 === FALSE) {1256 $result = $res_205;1257 $this->pos = $pos_205;1258 unset( $res_205 );1259 unset( $pos_205 );1260 break;1261 }1262 }1263 $_206 = TRUE; break;1264 }1265 while(0);1266 if( $_206 === TRUE ) { return $this->finalise($result); }1267 if( $_206 === FALSE) { return FALSE; }1268}1269/* data: data:dataString */1270protected $match_data_typestack = array('data');1271function match_data ($stack = array()) {1272 $matchrule = "data"; $result = $this->construct($matchrule, $matchrule, null);1273 $matcher = 'match_'.'dataString'; $key = $matcher; $pos = $this->pos;1274 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1275 if ($subres !== FALSE) {1276 $this->store( $result, $subres, "data" );1277 return $this->finalise($result);1278 }1279 else { return FALSE; }1280}1281/* periodo: token */1282protected $match_periodo_typestack = array('periodo');1283function match_periodo ($stack = array()) {1284 $matchrule = "periodo"; $result = $this->construct($matchrule, $matchrule, null);1285 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;1286 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1287 if ($subres !== FALSE) {1288 $this->store( $result, $subres );1289 return $this->finalise($result);1290 }1291 else { return FALSE; }1292}1293/* numeri: 'nir-' numero+ | token */1294protected $match_numeri_typestack = array('numeri');1295function match_numeri ($stack = array()) {1296 $matchrule = "numeri"; $result = $this->construct($matchrule, $matchrule, null);1297 $_216 = NULL;1298 do {1299 $res_210 = $result;1300 $pos_210 = $this->pos;1301 $_213 = NULL;1302 do {1303 if (( $subres = $this->literal( 'nir-' ) ) !== FALSE) { $result["text"] .= $subres; }1304 else { $_213 = FALSE; break; }1305 $count = 0;1306 while (true) {1307 $res_212 = $result;1308 $pos_212 = $this->pos;1309 $matcher = 'match_'.'numero'; $key = $matcher; $pos = $this->pos;1310 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1311 if ($subres !== FALSE) { $this->store( $result, $subres ); }1312 else {1313 $result = $res_212;1314 $this->pos = $pos_212;1315 unset( $res_212 );1316 unset( $pos_212 );1317 break;1318 }1319 $count++;1320 }1321 if ($count >= 1) { }1322 else { $_213 = FALSE; break; }1323 $_213 = TRUE; break;1324 }1325 while(0);1326 if( $_213 === TRUE ) { $_216 = TRUE; break; }1327 $result = $res_210;1328 $this->pos = $pos_210;1329 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;1330 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1331 if ($subres !== FALSE) {1332 $this->store( $result, $subres );1333 $_216 = TRUE; break;1334 }1335 $result = $res_210;1336 $this->pos = $pos_210;1337 $_216 = FALSE; break;1338 }1339 while(0);1340 if( $_216 === TRUE ) { return $this->finalise($result); }1341 if( $_216 === FALSE) { return FALSE; }1342}1343/* annesso: id:token (PV :spec)* */1344protected $match_annesso_typestack = array('annesso');1345function match_annesso ($stack = array()) {1346 $matchrule = "annesso"; $result = $this->construct($matchrule, $matchrule, null);1347 $_223 = NULL;1348 do {1349 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;1350 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1351 if ($subres !== FALSE) {1352 $this->store( $result, $subres, "id" );1353 }1354 else { $_223 = FALSE; break; }1355 while (true) {1356 $res_222 = $result;1357 $pos_222 = $this->pos;1358 $_221 = NULL;1359 do {1360 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;1361 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1362 if ($subres !== FALSE) { $this->store( $result, $subres ); }1363 else { $_221 = FALSE; break; }1364 $matcher = 'match_'.'spec'; $key = $matcher; $pos = $this->pos;1365 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1366 if ($subres !== FALSE) {1367 $this->store( $result, $subres, "spec" );1368 }1369 else { $_221 = FALSE; break; }1370 $_221 = TRUE; break;1371 }1372 while(0);1373 if( $_221 === FALSE) {1374 $result = $res_222;1375 $this->pos = $pos_222;1376 unset( $res_222 );1377 unset( $pos_222 );1378 break;1379 }1380 }1381 $_223 = TRUE; break;1382 }1383 while(0);1384 if( $_223 === TRUE ) { return $this->finalise($result); }1385 if( $_223 === FALSE) { return FALSE; }1386}1387/* spec: token */1388protected $match_spec_typestack = array('spec');1389function match_spec ($stack = array()) {1390 $matchrule = "spec"; $result = $this->construct($matchrule, $matchrule, null);1391 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;1392 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1393 if ($subres !== FALSE) {1394 $this->store( $result, $subres );1395 return $this->finalise($result);1396 }1397 else { return FALSE; }1398}1399/* vigenza: data */1400protected $match_vigenza_typestack = array('vigenza');1401function match_vigenza ($stack = array()) {1402 $matchrule = "vigenza"; $result = $this->construct($matchrule, $matchrule, null);1403 $matcher = 'match_'.'data'; $key = $matcher; $pos = $this->pos;1404 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1405 if ($subres !== FALSE) {1406 $this->store( $result, $subres );1407 return $this->finalise($result);1408 }1409 else { return FALSE; }1410}1411/* versione: '@' (:data | :spec) ( PV (:vigenza | :spec))? */1412protected $match_versione_typestack = array('versione');1413function match_versione ($stack = array()) {1414 $matchrule = "versione"; $result = $this->construct($matchrule, $matchrule, null);1415 $_245 = NULL;1416 do {1417 if (substr($this->string,$this->pos,1) == '@') {1418 $this->pos += 1;1419 $result["text"] .= '@';1420 }1421 else { $_245 = FALSE; break; }1422 $_233 = NULL;1423 do {1424 $_231 = NULL;1425 do {1426 $res_228 = $result;1427 $pos_228 = $this->pos;1428 $matcher = 'match_'.'data'; $key = $matcher; $pos = $this->pos;1429 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1430 if ($subres !== FALSE) {1431 $this->store( $result, $subres, "data" );1432 $_231 = TRUE; break;1433 }1434 $result = $res_228;1435 $this->pos = $pos_228;1436 $matcher = 'match_'.'spec'; $key = $matcher; $pos = $this->pos;1437 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1438 if ($subres !== FALSE) {1439 $this->store( $result, $subres, "spec" );1440 $_231 = TRUE; break;1441 }1442 $result = $res_228;1443 $this->pos = $pos_228;1444 $_231 = FALSE; break;1445 }1446 while(0);1447 if( $_231 === FALSE) { $_233 = FALSE; break; }1448 $_233 = TRUE; break;1449 }1450 while(0);1451 if( $_233 === FALSE) { $_245 = FALSE; break; }1452 $res_244 = $result;1453 $pos_244 = $this->pos;1454 $_243 = NULL;1455 do {1456 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;1457 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1458 if ($subres !== FALSE) { $this->store( $result, $subres ); }1459 else { $_243 = FALSE; break; }1460 $_241 = NULL;1461 do {1462 $_239 = NULL;1463 do {1464 $res_236 = $result;1465 $pos_236 = $this->pos;1466 $matcher = 'match_'.'vigenza'; $key = $matcher; $pos = $this->pos;1467 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1468 if ($subres !== FALSE) {1469 $this->store( $result, $subres, "vigenza" );1470 $_239 = TRUE; break;1471 }1472 $result = $res_236;1473 $this->pos = $pos_236;1474 $matcher = 'match_'.'spec'; $key = $matcher; $pos = $this->pos;1475 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1476 if ($subres !== FALSE) {1477 $this->store( $result, $subres, "spec" );1478 $_239 = TRUE; break;1479 }1480 $result = $res_236;1481 $this->pos = $pos_236;1482 $_239 = FALSE; break;1483 }1484 while(0);1485 if( $_239 === FALSE) { $_241 = FALSE; break; }1486 $_241 = TRUE; break;1487 }1488 while(0);1489 if( $_241 === FALSE) { $_243 = FALSE; break; }1490 $_243 = TRUE; break;1491 }1492 while(0);1493 if( $_243 === FALSE) {1494 $result = $res_244;1495 $this->pos = $pos_244;1496 unset( $res_244 );1497 unset( $pos_244 );1498 }1499 $_245 = TRUE; break;1500 }1501 while(0);1502 if( $_245 === TRUE ) { return $this->finalise($result); }1503 if( $_245 === FALSE) { return FALSE; }1504}1505/* comunicato: '*' tipo:token PV :data */1506protected $match_comunicato_typestack = array('comunicato');1507function match_comunicato ($stack = array()) {1508 $matchrule = "comunicato"; $result = $this->construct($matchrule, $matchrule, null);1509 $_251 = NULL;1510 do {1511 if (substr($this->string,$this->pos,1) == '*') {1512 $this->pos += 1;1513 $result["text"] .= '*';1514 }1515 else { $_251 = FALSE; break; }1516 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;1517 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1518 if ($subres !== FALSE) {1519 $this->store( $result, $subres, "tipo" );1520 }1521 else { $_251 = FALSE; break; }1522 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;1523 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1524 if ($subres !== FALSE) { $this->store( $result, $subres ); }1525 else { $_251 = FALSE; break; }1526 $matcher = 'match_'.'data'; $key = $matcher; $pos = $this->pos;1527 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1528 if ($subres !== FALSE) {1529 $this->store( $result, $subres, "data" );1530 }1531 else { $_251 = FALSE; break; }1532 $_251 = TRUE; break;1533 }1534 while(0);1535 if( $_251 === TRUE ) { return $this->finalise($result); }1536 if( $_251 === FALSE) { return FALSE; }1537}1538/* manifestazione: '$' formato:(formato:token (PV :spec)*) editore:(DP nome:token (PV :spec)*) (componente:(DP nome:token (PV :spec)*))? */1539protected $match_manifestazione_typestack = array('manifestazione');1540function match_manifestazione ($stack = array()) {1541 $matchrule = "manifestazione"; $result = $this->construct($matchrule, $matchrule, null);1542 $_279 = NULL;1543 do {1544 if (substr($this->string,$this->pos,1) == '$') {1545 $this->pos += 1;1546 $result["text"] .= '$';1547 }1548 else { $_279 = FALSE; break; }1549 $stack[] = $result; $result = $this->construct( $matchrule, "formato" ); 1550 $_259 = NULL;1551 do {1552 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;1553 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1554 if ($subres !== FALSE) {1555 $this->store( $result, $subres, "formato" );1556 }1557 else { $_259 = FALSE; break; }1558 while (true) {1559 $res_258 = $result;1560 $pos_258 = $this->pos;1561 $_257 = NULL;1562 do {1563 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;1564 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1565 if ($subres !== FALSE) { $this->store( $result, $subres ); }1566 else { $_257 = FALSE; break; }1567 $matcher = 'match_'.'spec'; $key = $matcher; $pos = $this->pos;1568 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1569 if ($subres !== FALSE) {1570 $this->store( $result, $subres, "spec" );1571 }1572 else { $_257 = FALSE; break; }1573 $_257 = TRUE; break;1574 }1575 while(0);1576 if( $_257 === FALSE) {1577 $result = $res_258;1578 $this->pos = $pos_258;1579 unset( $res_258 );1580 unset( $pos_258 );1581 break;1582 }1583 }1584 $_259 = TRUE; break;1585 }1586 while(0);1587 if( $_259 === TRUE ) {1588 $subres = $result; $result = array_pop($stack);1589 $this->store( $result, $subres, 'formato' );1590 }1591 if( $_259 === FALSE) {1592 $result = array_pop($stack);1593 $_279 = FALSE; break;1594 }1595 $stack[] = $result; $result = $this->construct( $matchrule, "editore" ); 1596 $_267 = NULL;1597 do {1598 $matcher = 'match_'.'DP'; $key = $matcher; $pos = $this->pos;1599 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1600 if ($subres !== FALSE) { $this->store( $result, $subres ); }1601 else { $_267 = FALSE; break; }1602 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;1603 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1604 if ($subres !== FALSE) {1605 $this->store( $result, $subres, "nome" );1606 }1607 else { $_267 = FALSE; break; }1608 while (true) {1609 $res_266 = $result;1610 $pos_266 = $this->pos;1611 $_265 = NULL;1612 do {1613 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;1614 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1615 if ($subres !== FALSE) { $this->store( $result, $subres ); }1616 else { $_265 = FALSE; break; }1617 $matcher = 'match_'.'spec'; $key = $matcher; $pos = $this->pos;1618 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1619 if ($subres !== FALSE) {1620 $this->store( $result, $subres, "spec" );1621 }1622 else { $_265 = FALSE; break; }1623 $_265 = TRUE; break;1624 }1625 while(0);1626 if( $_265 === FALSE) {1627 $result = $res_266;1628 $this->pos = $pos_266;1629 unset( $res_266 );1630 unset( $pos_266 );1631 break;1632 }1633 }1634 $_267 = TRUE; break;1635 }1636 while(0);1637 if( $_267 === TRUE ) {1638 $subres = $result; $result = array_pop($stack);1639 $this->store( $result, $subres, 'editore' );1640 }1641 if( $_267 === FALSE) {1642 $result = array_pop($stack);1643 $_279 = FALSE; break;1644 }1645 $res_278 = $result;1646 $pos_278 = $this->pos;1647 $_277 = NULL;1648 do {1649 $stack[] = $result; $result = $this->construct( $matchrule, "componente" ); 1650 $_275 = NULL;1651 do {1652 $matcher = 'match_'.'DP'; $key = $matcher; $pos = $this->pos;1653 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1654 if ($subres !== FALSE) { $this->store( $result, $subres ); }1655 else { $_275 = FALSE; break; }1656 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;1657 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1658 if ($subres !== FALSE) {1659 $this->store( $result, $subres, "nome" );1660 }1661 else { $_275 = FALSE; break; }1662 while (true) {1663 $res_274 = $result;1664 $pos_274 = $this->pos;1665 $_273 = NULL;1666 do {1667 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;1668 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1669 if ($subres !== FALSE) {1670 $this->store( $result, $subres );1671 }1672 else { $_273 = FALSE; break; }1673 $matcher = 'match_'.'spec'; $key = $matcher; $pos = $this->pos;1674 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1675 if ($subres !== FALSE) {1676 $this->store( $result, $subres, "spec" );1677 }1678 else { $_273 = FALSE; break; }1679 $_273 = TRUE; break;1680 }1681 while(0);1682 if( $_273 === FALSE) {1683 $result = $res_274;1684 $this->pos = $pos_274;1685 unset( $res_274 );1686 unset( $pos_274 );1687 break;1688 }1689 }1690 $_275 = TRUE; break;1691 }1692 while(0);1693 if( $_275 === TRUE ) {1694 $subres = $result; $result = array_pop($stack);1695 $this->store( $result, $subres, 'componente' );1696 }1697 if( $_275 === FALSE) {1698 $result = array_pop($stack);1699 $_277 = FALSE; break;1700 }1701 $_277 = TRUE; break;1702 }1703 while(0);1704 if( $_277 === FALSE) {1705 $result = $res_278;1706 $this->pos = $pos_278;1707 unset( $res_278 );1708 unset( $pos_278 );1709 }1710 $_279 = TRUE; break;1711 }1712 while(0);1713 if( $_279 === TRUE ) { return $this->finalise($result); }1714 if( $_279 === FALSE) { return FALSE; }1715}1716/* partizione: '~' id:token */1717protected $match_partizione_typestack = array('partizione');1718function match_partizione ($stack = array()) {1719 $matchrule = "partizione"; $result = $this->construct($matchrule, $matchrule, null);1720 $_283 = NULL;1721 do {1722 if (substr($this->string,$this->pos,1) == '~') {1723 $this->pos += 1;1724 $result["text"] .= '~';1725 }1726 else { $_283 = FALSE; break; }1727 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;1728 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1729 if ($subres !== FALSE) {1730 $this->store( $result, $subres, "id" );1731 }1732 else { $_283 = FALSE; break; }1733 $_283 = TRUE; break;1734 }1735 while(0);1736 if( $_283 === TRUE ) { return $this->finalise($result); }1737 if( $_283 === FALSE) { return FALSE; }1738}1739/* proprieta: '!' ( 'vig=' vigore:data | 'eff=' efficacia:data) */1740protected $match_proprieta_typestack = array('proprieta');1741function match_proprieta ($stack = array()) {1742 $matchrule = "proprieta"; $result = $this->construct($matchrule, $matchrule, null);1743 $_299 = NULL;1744 do {1745 if (substr($this->string,$this->pos,1) == '!') {1746 $this->pos += 1;1747 $result["text"] .= '!';1748 }1749 else { $_299 = FALSE; break; }1750 $_297 = NULL;1751 do {1752 $_295 = NULL;1753 do {1754 $res_286 = $result;1755 $pos_286 = $this->pos;1756 $_289 = NULL;1757 do {1758 if (( $subres = $this->literal( 'vig=' ) ) !== FALSE) { $result["text"] .= $subres; }1759 else { $_289 = FALSE; break; }1760 $matcher = 'match_'.'data'; $key = $matcher; $pos = $this->pos;1761 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1762 if ($subres !== FALSE) {1763 $this->store( $result, $subres, "vigore" );1764 }1765 else { $_289 = FALSE; break; }1766 $_289 = TRUE; break;1767 }1768 while(0);1769 if( $_289 === TRUE ) { $_295 = TRUE; break; }1770 $result = $res_286;1771 $this->pos = $pos_286;1772 $_293 = NULL;1773 do {1774 if (( $subres = $this->literal( 'eff=' ) ) !== FALSE) { $result["text"] .= $subres; }1775 else { $_293 = FALSE; break; }1776 $matcher = 'match_'.'data'; $key = $matcher; $pos = $this->pos;1777 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1778 if ($subres !== FALSE) {1779 $this->store( $result, $subres, "efficacia" );1780 }1781 else { $_293 = FALSE; break; }1782 $_293 = TRUE; break;1783 }1784 while(0);1785 if( $_293 === TRUE ) { $_295 = TRUE; break; }1786 $result = $res_286;1787 $this->pos = $pos_286;1788 $_295 = FALSE; break;1789 }1790 while(0);1791 if( $_295 === FALSE) { $_297 = FALSE; break; }1792 $_297 = TRUE; break;1793 }1794 while(0);1795 if( $_297 === FALSE) { $_299 = FALSE; break; }1796 $_299 = TRUE; break;1797 }1798 while(0);1799 if( $_299 === TRUE ) { return $this->finalise($result); }1800 if( $_299 === FALSE) { return FALSE; }1801}1802}1803?>...

Full Screen

Full Screen

nir.php

Source:nir.php Github

copy

Full Screen

1<?PHP2require_once './peg/autoloader.php';3use hafriedlander\Peg\Parser;4class parsingMachine extends Parser\Basic {5/* SL: '/' */6protected $match_SL_typestack = array('SL');7function match_SL ($stack = array()) {8 $matchrule = "SL"; $result = $this->construct($matchrule, $matchrule, null);9 if (substr($this->string,$this->pos,1) == '/') {10 $this->pos += 1;11 $result["text"] .= '/';12 return $this->finalise($result);13 }14 else { return FALSE; }15}16/* DP: ':' */17protected $match_DP_typestack = array('DP');18function match_DP ($stack = array()) {19 $matchrule = "DP"; $result = $this->construct($matchrule, $matchrule, null);20 if (substr($this->string,$this->pos,1) == ':') {21 $this->pos += 1;22 $result["text"] .= ':';23 return $this->finalise($result);24 }25 else { return FALSE; }26}27/* PV: ';' */28protected $match_PV_typestack = array('PV');29function match_PV ($stack = array()) {30 $matchrule = "PV"; $result = $this->construct($matchrule, $matchrule, null);31 if (substr($this->string,$this->pos,1) == ';') {32 $this->pos += 1;33 $result["text"] .= ';';34 return $this->finalise($result);35 }36 else { return FALSE; }37}38/* V: ',' */39protected $match_V_typestack = array('V');40function match_V ($stack = array()) {41 $matchrule = "V"; $result = $this->construct($matchrule, $matchrule, null);42 if (substr($this->string,$this->pos,1) == ',') {43 $this->pos += 1;44 $result["text"] .= ',';45 return $this->finalise($result);46 }47 else { return FALSE; }48}49/* PLUS: '+' */50protected $match_PLUS_typestack = array('PLUS');51function match_PLUS ($stack = array()) {52 $matchrule = "PLUS"; $result = $this->construct($matchrule, $matchrule, null);53 if (substr($this->string,$this->pos,1) == '+') {54 $this->pos += 1;55 $result["text"] .= '+';56 return $this->finalise($result);57 }58 else { return FALSE; }59}60/* number: /[0-9]+/ */61protected $match_number_typestack = array('number');62function match_number ($stack = array()) {63 $matchrule = "number"; $result = $this->construct($matchrule, $matchrule, null);64 if (( $subres = $this->rx( '/[0-9]+/' ) ) !== FALSE) {65 $result["text"] .= $subres;66 return $this->finalise($result);67 }68 else { return FALSE; }69}70/* number2: /[0-9]{2}/ */71protected $match_number2_typestack = array('number2');72function match_number2 ($stack = array()) {73 $matchrule = "number2"; $result = $this->construct($matchrule, $matchrule, null);74 if (( $subres = $this->rx( '/[0-9]{2}/' ) ) !== FALSE) {75 $result["text"] .= $subres;76 return $this->finalise($result);77 }78 else { return FALSE; }79}80/* number4: /[0-9]{4}/ */81protected $match_number4_typestack = array('number4');82function match_number4 ($stack = array()) {83 $matchrule = "number4"; $result = $this->construct($matchrule, $matchrule, null);84 if (( $subres = $this->rx( '/[0-9]{4}/' ) ) !== FALSE) {85 $result["text"] .= $subres;86 return $this->finalise($result);87 }88 else { return FALSE; }89}90/* chars: /[a-zA-Z\.]+/ */91protected $match_chars_typestack = array('chars');92function match_chars ($stack = array()) {93 $matchrule = "chars"; $result = $this->construct($matchrule, $matchrule, null);94 if (( $subres = $this->rx( '/[a-zA-Z\.]+/' ) ) !== FALSE) {95 $result["text"] .= $subres;96 return $this->finalise($result);97 }98 else { return FALSE; }99}100/* numero: /[0-9]/ */101protected $match_numero_typestack = array('numero');102function match_numero ($stack = array()) {103 $matchrule = "numero"; $result = $this->construct($matchrule, $matchrule, null);104 if (( $subres = $this->rx( '/[0-9]/' ) ) !== FALSE) {105 $result["text"] .= $subres;106 return $this->finalise($result);107 }108 else { return FALSE; }109}110/* minuscolo: /[a-z]/ */111protected $match_minuscolo_typestack = array('minuscolo');112function match_minuscolo ($stack = array()) {113 $matchrule = "minuscolo"; $result = $this->construct($matchrule, $matchrule, null);114 if (( $subres = $this->rx( '/[a-z]/' ) ) !== FALSE) {115 $result["text"] .= $subres;116 return $this->finalise($result);117 }118 else { return FALSE; }119}120/* normale: (numero | minuscolo | '.' | '-' | '_')+ */121protected $match_normale_typestack = array('normale');122function match_normale ($stack = array()) {123 $matchrule = "normale"; $result = $this->construct($matchrule, $matchrule, null);124 $count = 0;125 while (true) {126 $res_29 = $result;127 $pos_29 = $this->pos;128 $_28 = NULL;129 do {130 $_26 = NULL;131 do {132 $res_11 = $result;133 $pos_11 = $this->pos;134 $matcher = 'match_'.'numero'; $key = $matcher; $pos = $this->pos;135 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );136 if ($subres !== FALSE) {137 $this->store( $result, $subres );138 $_26 = TRUE; break;139 }140 $result = $res_11;141 $this->pos = $pos_11;142 $_24 = NULL;143 do {144 $res_13 = $result;145 $pos_13 = $this->pos;146 $matcher = 'match_'.'minuscolo'; $key = $matcher; $pos = $this->pos;147 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );148 if ($subres !== FALSE) {149 $this->store( $result, $subres );150 $_24 = TRUE; break;151 }152 $result = $res_13;153 $this->pos = $pos_13;154 $_22 = NULL;155 do {156 $res_15 = $result;157 $pos_15 = $this->pos;158 if (substr($this->string,$this->pos,1) == '.') {159 $this->pos += 1;160 $result["text"] .= '.';161 $_22 = TRUE; break;162 }163 $result = $res_15;164 $this->pos = $pos_15;165 $_20 = NULL;166 do {167 $res_17 = $result;168 $pos_17 = $this->pos;169 if (substr($this->string,$this->pos,1) == '-') {170 $this->pos += 1;171 $result["text"] .= '-';172 $_20 = TRUE; break;173 }174 $result = $res_17;175 $this->pos = $pos_17;176 if (substr($this->string,$this->pos,1) == '_') {177 $this->pos += 1;178 $result["text"] .= '_';179 $_20 = TRUE; break;180 }181 $result = $res_17;182 $this->pos = $pos_17;183 $_20 = FALSE; break;184 }185 while(0);186 if( $_20 === TRUE ) { $_22 = TRUE; break; }187 $result = $res_15;188 $this->pos = $pos_15;189 $_22 = FALSE; break;190 }191 while(0);192 if( $_22 === TRUE ) { $_24 = TRUE; break; }193 $result = $res_13;194 $this->pos = $pos_13;195 $_24 = FALSE; break;196 }197 while(0);198 if( $_24 === TRUE ) { $_26 = TRUE; break; }199 $result = $res_11;200 $this->pos = $pos_11;201 $_26 = FALSE; break;202 }203 while(0);204 if( $_26 === FALSE) { $_28 = FALSE; break; }205 $_28 = TRUE; break;206 }207 while(0);208 if( $_28 === FALSE) {209 $result = $res_29;210 $this->pos = $pos_29;211 unset( $res_29 );212 unset( $pos_29 );213 break;214 }215 $count++;216 }217 if ($count >= 1) { return $this->finalise($result); }218 else { return FALSE; }219}220/* other: /=-_'()/ */221protected $match_other_typestack = array('other');222function match_other ($stack = array()) {223 $matchrule = "other"; $result = $this->construct($matchrule, $matchrule, null);224 if (( $subres = $this->rx( '/=-_\'()/' ) ) !== FALSE) {225 $result["text"] .= $subres;226 return $this->finalise($result);227 }228 else { return FALSE; }229}230/* any: /.+/ */231protected $match_any_typestack = array('any');232function match_any ($stack = array()) {233 $matchrule = "any"; $result = $this->construct($matchrule, $matchrule, null);234 if (( $subres = $this->rx( '/.+/' ) ) !== FALSE) {235 $result["text"] .= $subres;236 return $this->finalise($result);237 }238 else { return FALSE; }239}240/* token: normale* */241protected $match_token_typestack = array('token');242function match_token ($stack = array()) {243 $matchrule = "token"; $result = $this->construct($matchrule, $matchrule, null);244 while (true) {245 $res_32 = $result;246 $pos_32 = $this->pos;247 $matcher = 'match_'.'normale'; $key = $matcher; $pos = $this->pos;248 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );249 if ($subres !== FALSE) { $this->store( $result, $subres ); }250 else {251 $result = $res_32;252 $this->pos = $pos_32;253 unset( $res_32 );254 unset( $pos_32 );255 break;256 }257 }258 return $this->finalise($result);259}260/* string: (number | chars )+ */261protected $match_string_typestack = array('string');262function match_string ($stack = array()) {263 $matchrule = "string"; $result = $this->construct($matchrule, $matchrule, null);264 $count = 0;265 while (true) {266 $res_39 = $result;267 $pos_39 = $this->pos;268 $_38 = NULL;269 do {270 $_36 = NULL;271 do {272 $res_33 = $result;273 $pos_33 = $this->pos;274 $matcher = 'match_'.'number'; $key = $matcher; $pos = $this->pos;275 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );276 if ($subres !== FALSE) {277 $this->store( $result, $subres );278 $_36 = TRUE; break;279 }280 $result = $res_33;281 $this->pos = $pos_33;282 $matcher = 'match_'.'chars'; $key = $matcher; $pos = $this->pos;283 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );284 if ($subres !== FALSE) {285 $this->store( $result, $subres );286 $_36 = TRUE; break;287 }288 $result = $res_33;289 $this->pos = $pos_33;290 $_36 = FALSE; break;291 }292 while(0);293 if( $_36 === FALSE) { $_38 = FALSE; break; }294 $_38 = TRUE; break;295 }296 while(0);297 if( $_38 === FALSE) {298 $result = $res_39;299 $this->pos = $pos_39;300 unset( $res_39 );301 unset( $pos_39 );302 break;303 }304 $count++;305 }306 if ($count >= 1) { return $this->finalise($result); }307 else { return FALSE; }308}309/* dataString: number4 '-' number2 '-' number2 */310protected $match_dataString_typestack = array('dataString');311function match_dataString ($stack = array()) {312 $matchrule = "dataString"; $result = $this->construct($matchrule, $matchrule, null);313 $_45 = NULL;314 do {315 $matcher = 'match_'.'number4'; $key = $matcher; $pos = $this->pos;316 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );317 if ($subres !== FALSE) { $this->store( $result, $subres ); }318 else { $_45 = FALSE; break; }319 if (substr($this->string,$this->pos,1) == '-') {320 $this->pos += 1;321 $result["text"] .= '-';322 }323 else { $_45 = FALSE; break; }324 $matcher = 'match_'.'number2'; $key = $matcher; $pos = $this->pos;325 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );326 if ($subres !== FALSE) { $this->store( $result, $subres ); }327 else { $_45 = FALSE; break; }328 if (substr($this->string,$this->pos,1) == '-') {329 $this->pos += 1;330 $result["text"] .= '-';331 }332 else { $_45 = FALSE; break; }333 $matcher = 'match_'.'number2'; $key = $matcher; $pos = $this->pos;334 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );335 if ($subres !== FALSE) { $this->store( $result, $subres ); }336 else { $_45 = FALSE; break; }337 $_45 = TRUE; break;338 }339 while(0);340 if( $_45 === TRUE ) { return $this->finalise($result); }341 if( $_45 === FALSE) { return FALSE; }342}343/* expr: > :schema :documento :versione? :comunicato* :manifestazione? :partizione? :proprieta? :extra? > | :extra */344protected $match_expr_typestack = array('expr');345function match_expr ($stack = array()) {346 $matchrule = "expr"; $result = $this->construct($matchrule, $matchrule, null);347 $_61 = NULL;348 do {349 $res_47 = $result;350 $pos_47 = $this->pos;351 $_58 = NULL;352 do {353 if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }354 $matcher = 'match_'.'schema'; $key = $matcher; $pos = $this->pos;355 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );356 if ($subres !== FALSE) {357 $this->store( $result, $subres, "schema" );358 }359 else { $_58 = FALSE; break; }360 $matcher = 'match_'.'documento'; $key = $matcher; $pos = $this->pos;361 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );362 if ($subres !== FALSE) {363 $this->store( $result, $subres, "documento" );364 }365 else { $_58 = FALSE; break; }366 $res_51 = $result;367 $pos_51 = $this->pos;368 $matcher = 'match_'.'versione'; $key = $matcher; $pos = $this->pos;369 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );370 if ($subres !== FALSE) {371 $this->store( $result, $subres, "versione" );372 }373 else {374 $result = $res_51;375 $this->pos = $pos_51;376 unset( $res_51 );377 unset( $pos_51 );378 }379 while (true) {380 $res_52 = $result;381 $pos_52 = $this->pos;382 $matcher = 'match_'.'comunicato'; $key = $matcher; $pos = $this->pos;383 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );384 if ($subres !== FALSE) {385 $this->store( $result, $subres, "comunicato" );386 }387 else {388 $result = $res_52;389 $this->pos = $pos_52;390 unset( $res_52 );391 unset( $pos_52 );392 break;393 }394 }395 $res_53 = $result;396 $pos_53 = $this->pos;397 $matcher = 'match_'.'manifestazione'; $key = $matcher; $pos = $this->pos;398 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );399 if ($subres !== FALSE) {400 $this->store( $result, $subres, "manifestazione" );401 }402 else {403 $result = $res_53;404 $this->pos = $pos_53;405 unset( $res_53 );406 unset( $pos_53 );407 }408 $res_54 = $result;409 $pos_54 = $this->pos;410 $matcher = 'match_'.'partizione'; $key = $matcher; $pos = $this->pos;411 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );412 if ($subres !== FALSE) {413 $this->store( $result, $subres, "partizione" );414 }415 else {416 $result = $res_54;417 $this->pos = $pos_54;418 unset( $res_54 );419 unset( $pos_54 );420 }421 $res_55 = $result;422 $pos_55 = $this->pos;423 $matcher = 'match_'.'proprieta'; $key = $matcher; $pos = $this->pos;424 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );425 if ($subres !== FALSE) {426 $this->store( $result, $subres, "proprieta" );427 }428 else {429 $result = $res_55;430 $this->pos = $pos_55;431 unset( $res_55 );432 unset( $pos_55 );433 }434 $res_56 = $result;435 $pos_56 = $this->pos;436 $matcher = 'match_'.'extra'; $key = $matcher; $pos = $this->pos;437 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );438 if ($subres !== FALSE) {439 $this->store( $result, $subres, "extra" );440 }441 else {442 $result = $res_56;443 $this->pos = $pos_56;444 unset( $res_56 );445 unset( $pos_56 );446 }447 if (( $subres = $this->whitespace( ) ) !== FALSE) { $result["text"] .= $subres; }448 $_58 = TRUE; break;449 }450 while(0);451 if( $_58 === TRUE ) { $_61 = TRUE; break; }452 $result = $res_47;453 $this->pos = $pos_47;454 $matcher = 'match_'.'extra'; $key = $matcher; $pos = $this->pos;455 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );456 if ($subres !== FALSE) {457 $this->store( $result, $subres, "extra" );458 $_61 = TRUE; break;459 }460 $result = $res_47;461 $this->pos = $pos_47;462 $_61 = FALSE; break;463 }464 while(0);465 if( $_61 === TRUE ) { return $this->finalise($result); }466 if( $_61 === FALSE) { return FALSE; }467}468/* extra: any */469protected $match_extra_typestack = array('extra');470function match_extra ($stack = array()) {471 $matchrule = "extra"; $result = $this->construct($matchrule, $matchrule, null);472 $matcher = 'match_'.'any'; $key = $matcher; $pos = $this->pos;473 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );474 if ($subres !== FALSE) {475 $this->store( $result, $subres );476 return $this->finalise($result);477 }478 else { return FALSE; }479}480/* schema: "urn:nir:" */481protected $match_schema_typestack = array('schema');482function match_schema ($stack = array()) {483 $matchrule = "schema"; $result = $this->construct($matchrule, $matchrule, null);484 if (( $subres = $this->literal( 'urn:nir:' ) ) !== FALSE) {485 $result["text"] .= $subres;486 return $this->finalise($result);487 }488 else { return FALSE; }489}490/* documento: :autorita DP :provvedimento (DP :estremi (DP :annesso)*)? */491protected $match_documento_typestack = array('documento');492function match_documento ($stack = array()) {493 $matchrule = "documento"; $result = $this->construct($matchrule, $matchrule, null);494 $_76 = NULL;495 do {496 $matcher = 'match_'.'autorita'; $key = $matcher; $pos = $this->pos;497 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );498 if ($subres !== FALSE) {499 $this->store( $result, $subres, "autorita" );500 }501 else { $_76 = FALSE; break; }502 $matcher = 'match_'.'DP'; $key = $matcher; $pos = $this->pos;503 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );504 if ($subres !== FALSE) { $this->store( $result, $subres ); }505 else { $_76 = FALSE; break; }506 $matcher = 'match_'.'provvedimento'; $key = $matcher; $pos = $this->pos;507 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );508 if ($subres !== FALSE) {509 $this->store( $result, $subres, "provvedimento" );510 }511 else { $_76 = FALSE; break; }512 $res_75 = $result;513 $pos_75 = $this->pos;514 $_74 = NULL;515 do {516 $matcher = 'match_'.'DP'; $key = $matcher; $pos = $this->pos;517 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );518 if ($subres !== FALSE) { $this->store( $result, $subres ); }519 else { $_74 = FALSE; break; }520 $matcher = 'match_'.'estremi'; $key = $matcher; $pos = $this->pos;521 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );522 if ($subres !== FALSE) {523 $this->store( $result, $subres, "estremi" );524 }525 else { $_74 = FALSE; break; }526 while (true) {527 $res_73 = $result;528 $pos_73 = $this->pos;529 $_72 = NULL;530 do {531 $matcher = 'match_'.'DP'; $key = $matcher; $pos = $this->pos;532 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );533 if ($subres !== FALSE) { $this->store( $result, $subres ); }534 else { $_72 = FALSE; break; }535 $matcher = 'match_'.'annesso'; $key = $matcher; $pos = $this->pos;536 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );537 if ($subres !== FALSE) {538 $this->store( $result, $subres, "annesso" );539 }540 else { $_72 = FALSE; break; }541 $_72 = TRUE; break;542 }543 while(0);544 if( $_72 === FALSE) {545 $result = $res_73;546 $this->pos = $pos_73;547 unset( $res_73 );548 unset( $pos_73 );549 break;550 }551 }552 $_74 = TRUE; break;553 }554 while(0);555 if( $_74 === FALSE) {556 $result = $res_75;557 $this->pos = $pos_75;558 unset( $res_75 );559 unset( $pos_75 );560 }561 $_76 = TRUE; break;562 }563 while(0);564 if( $_76 === TRUE ) { return $this->finalise($result); }565 if( $_76 === FALSE) { return FALSE; }566}567/* autorita: :soggetto (PLUS :soggetto)* */568protected $match_autorita_typestack = array('autorita');569function match_autorita ($stack = array()) {570 $matchrule = "autorita"; $result = $this->construct($matchrule, $matchrule, null);571 $_83 = NULL;572 do {573 $matcher = 'match_'.'soggetto'; $key = $matcher; $pos = $this->pos;574 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );575 if ($subres !== FALSE) {576 $this->store( $result, $subres, "soggetto" );577 }578 else { $_83 = FALSE; break; }579 while (true) {580 $res_82 = $result;581 $pos_82 = $this->pos;582 $_81 = NULL;583 do {584 $matcher = 'match_'.'PLUS'; $key = $matcher; $pos = $this->pos;585 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );586 if ($subres !== FALSE) { $this->store( $result, $subres ); }587 else { $_81 = FALSE; break; }588 $matcher = 'match_'.'soggetto'; $key = $matcher; $pos = $this->pos;589 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );590 if ($subres !== FALSE) {591 $this->store( $result, $subres, "soggetto" );592 }593 else { $_81 = FALSE; break; }594 $_81 = TRUE; break;595 }596 while(0);597 if( $_81 === FALSE) {598 $result = $res_82;599 $this->pos = $pos_82;600 unset( $res_82 );601 unset( $pos_82 );602 break;603 }604 }605 $_83 = TRUE; break;606 }607 while(0);608 if( $_83 === TRUE ) { return $this->finalise($result); }609 if( $_83 === FALSE) { return FALSE; }610}611/* soggetto: 612 istituzione:token PV organo:token PV organo:token PV organo:token PV organo:token PV funzione:token | 613 istituzione:token PV organo:token PV organo:token PV organo:token PV funzione:token | 614 istituzione:token PV organo:token PV organo:token PV funzione:token | 615 istituzione:token PV organo:token PV funzione:token | 616 istituzione:token PV funzione:token | 617 carica:token */618protected $match_soggetto_typestack = array('soggetto');619function match_soggetto ($stack = array()) {620 $matchrule = "soggetto"; $result = $this->construct($matchrule, $matchrule, null);621 $_144 = NULL;622 do {623 $res_85 = $result;624 $pos_85 = $this->pos;625 $_97 = NULL;626 do {627 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;628 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );629 if ($subres !== FALSE) {630 $this->store( $result, $subres, "istituzione" );631 }632 else { $_97 = FALSE; break; }633 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;634 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );635 if ($subres !== FALSE) { $this->store( $result, $subres ); }636 else { $_97 = FALSE; break; }637 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;638 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );639 if ($subres !== FALSE) {640 $this->store( $result, $subres, "organo" );641 }642 else { $_97 = FALSE; break; }643 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;644 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );645 if ($subres !== FALSE) { $this->store( $result, $subres ); }646 else { $_97 = FALSE; break; }647 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;648 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );649 if ($subres !== FALSE) {650 $this->store( $result, $subres, "organo" );651 }652 else { $_97 = FALSE; break; }653 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;654 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );655 if ($subres !== FALSE) { $this->store( $result, $subres ); }656 else { $_97 = FALSE; break; }657 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;658 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );659 if ($subres !== FALSE) {660 $this->store( $result, $subres, "organo" );661 }662 else { $_97 = FALSE; break; }663 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;664 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );665 if ($subres !== FALSE) { $this->store( $result, $subres ); }666 else { $_97 = FALSE; break; }667 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;668 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );669 if ($subres !== FALSE) {670 $this->store( $result, $subres, "organo" );671 }672 else { $_97 = FALSE; break; }673 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;674 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );675 if ($subres !== FALSE) { $this->store( $result, $subres ); }676 else { $_97 = FALSE; break; }677 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;678 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );679 if ($subres !== FALSE) {680 $this->store( $result, $subres, "funzione" );681 }682 else { $_97 = FALSE; break; }683 $_97 = TRUE; break;684 }685 while(0);686 if( $_97 === TRUE ) { $_144 = TRUE; break; }687 $result = $res_85;688 $this->pos = $pos_85;689 $_142 = NULL;690 do {691 $res_99 = $result;692 $pos_99 = $this->pos;693 $_109 = NULL;694 do {695 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;696 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );697 if ($subres !== FALSE) {698 $this->store( $result, $subres, "istituzione" );699 }700 else { $_109 = FALSE; break; }701 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;702 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );703 if ($subres !== FALSE) { $this->store( $result, $subres ); }704 else { $_109 = FALSE; break; }705 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;706 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );707 if ($subres !== FALSE) {708 $this->store( $result, $subres, "organo" );709 }710 else { $_109 = FALSE; break; }711 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;712 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );713 if ($subres !== FALSE) { $this->store( $result, $subres ); }714 else { $_109 = FALSE; break; }715 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;716 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );717 if ($subres !== FALSE) {718 $this->store( $result, $subres, "organo" );719 }720 else { $_109 = FALSE; break; }721 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;722 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );723 if ($subres !== FALSE) { $this->store( $result, $subres ); }724 else { $_109 = FALSE; break; }725 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;726 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );727 if ($subres !== FALSE) {728 $this->store( $result, $subres, "organo" );729 }730 else { $_109 = FALSE; break; }731 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;732 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );733 if ($subres !== FALSE) { $this->store( $result, $subres ); }734 else { $_109 = FALSE; break; }735 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;736 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );737 if ($subres !== FALSE) {738 $this->store( $result, $subres, "funzione" );739 }740 else { $_109 = FALSE; break; }741 $_109 = TRUE; break;742 }743 while(0);744 if( $_109 === TRUE ) { $_142 = TRUE; break; }745 $result = $res_99;746 $this->pos = $pos_99;747 $_140 = NULL;748 do {749 $res_111 = $result;750 $pos_111 = $this->pos;751 $_119 = NULL;752 do {753 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;754 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );755 if ($subres !== FALSE) {756 $this->store( $result, $subres, "istituzione" );757 }758 else { $_119 = FALSE; break; }759 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;760 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );761 if ($subres !== FALSE) { $this->store( $result, $subres ); }762 else { $_119 = FALSE; break; }763 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;764 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );765 if ($subres !== FALSE) {766 $this->store( $result, $subres, "organo" );767 }768 else { $_119 = FALSE; break; }769 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;770 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );771 if ($subres !== FALSE) { $this->store( $result, $subres ); }772 else { $_119 = FALSE; break; }773 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;774 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );775 if ($subres !== FALSE) {776 $this->store( $result, $subres, "organo" );777 }778 else { $_119 = FALSE; break; }779 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;780 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );781 if ($subres !== FALSE) { $this->store( $result, $subres ); }782 else { $_119 = FALSE; break; }783 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;784 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );785 if ($subres !== FALSE) {786 $this->store( $result, $subres, "funzione" );787 }788 else { $_119 = FALSE; break; }789 $_119 = TRUE; break;790 }791 while(0);792 if( $_119 === TRUE ) { $_140 = TRUE; break; }793 $result = $res_111;794 $this->pos = $pos_111;795 $_138 = NULL;796 do {797 $res_121 = $result;798 $pos_121 = $this->pos;799 $_127 = NULL;800 do {801 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;802 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );803 if ($subres !== FALSE) {804 $this->store( $result, $subres, "istituzione" );805 }806 else { $_127 = FALSE; break; }807 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;808 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );809 if ($subres !== FALSE) {810 $this->store( $result, $subres );811 }812 else { $_127 = FALSE; break; }813 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;814 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );815 if ($subres !== FALSE) {816 $this->store( $result, $subres, "organo" );817 }818 else { $_127 = FALSE; break; }819 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;820 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );821 if ($subres !== FALSE) {822 $this->store( $result, $subres );823 }824 else { $_127 = FALSE; break; }825 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;826 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );827 if ($subres !== FALSE) {828 $this->store( $result, $subres, "funzione" );829 }830 else { $_127 = FALSE; break; }831 $_127 = TRUE; break;832 }833 while(0);834 if( $_127 === TRUE ) { $_138 = TRUE; break; }835 $result = $res_121;836 $this->pos = $pos_121;837 $_136 = NULL;838 do {839 $res_129 = $result;840 $pos_129 = $this->pos;841 $_133 = NULL;842 do {843 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;844 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );845 if ($subres !== FALSE) {846 $this->store( $result, $subres, "istituzione" );847 }848 else { $_133 = FALSE; break; }849 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;850 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );851 if ($subres !== FALSE) {852 $this->store( $result, $subres );853 }854 else { $_133 = FALSE; break; }855 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;856 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );857 if ($subres !== FALSE) {858 $this->store( $result, $subres, "funzione" );859 }860 else { $_133 = FALSE; break; }861 $_133 = TRUE; break;862 }863 while(0);864 if( $_133 === TRUE ) { $_136 = TRUE; break; }865 $result = $res_129;866 $this->pos = $pos_129;867 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;868 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );869 if ($subres !== FALSE) {870 $this->store( $result, $subres, "carica" );871 $_136 = TRUE; break;872 }873 $result = $res_129;874 $this->pos = $pos_129;875 $_136 = FALSE; break;876 }877 while(0);878 if( $_136 === TRUE ) { $_138 = TRUE; break; }879 $result = $res_121;880 $this->pos = $pos_121;881 $_138 = FALSE; break;882 }883 while(0);884 if( $_138 === TRUE ) { $_140 = TRUE; break; }885 $result = $res_111;886 $this->pos = $pos_111;887 $_140 = FALSE; break;888 }889 while(0);890 if( $_140 === TRUE ) { $_142 = TRUE; break; }891 $result = $res_99;892 $this->pos = $pos_99;893 $_142 = FALSE; break;894 }895 while(0);896 if( $_142 === TRUE ) { $_144 = TRUE; break; }897 $result = $res_85;898 $this->pos = $pos_85;899 $_144 = FALSE; break;900 }901 while(0);902 if( $_144 === TRUE ) { return $this->finalise($result); }903 if( $_144 === FALSE) { return FALSE; }904}905/* suggetto: elemento:token (PV elemento:token)* */906protected $match_suggetto_typestack = array('suggetto');907function match_suggetto ($stack = array()) {908 $matchrule = "suggetto"; $result = $this->construct($matchrule, $matchrule, null);909 $_151 = NULL;910 do {911 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;912 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );913 if ($subres !== FALSE) {914 $this->store( $result, $subres, "elemento" );915 }916 else { $_151 = FALSE; break; }917 while (true) {918 $res_150 = $result;919 $pos_150 = $this->pos;920 $_149 = NULL;921 do {922 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;923 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );924 if ($subres !== FALSE) { $this->store( $result, $subres ); }925 else { $_149 = FALSE; break; }926 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;927 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );928 if ($subres !== FALSE) {929 $this->store( $result, $subres, "elemento" );930 }931 else { $_149 = FALSE; break; }932 $_149 = TRUE; break;933 }934 while(0);935 if( $_149 === FALSE) {936 $result = $res_150;937 $this->pos = $pos_150;938 unset( $res_150 );939 unset( $pos_150 );940 break;941 }942 }943 $_151 = TRUE; break;944 }945 while(0);946 if( $_151 === TRUE ) { return $this->finalise($result); }947 if( $_151 === FALSE) { return FALSE; }948}949/* provvedimento: tipo:token ( PV :spec)* */950protected $match_provvedimento_typestack = array('provvedimento');951function match_provvedimento ($stack = array()) {952 $matchrule = "provvedimento"; $result = $this->construct($matchrule, $matchrule, null);953 $_158 = NULL;954 do {955 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;956 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );957 if ($subres !== FALSE) {958 $this->store( $result, $subres, "tipo" );959 }960 else { $_158 = FALSE; break; }961 while (true) {962 $res_157 = $result;963 $pos_157 = $this->pos;964 $_156 = NULL;965 do {966 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;967 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );968 if ($subres !== FALSE) { $this->store( $result, $subres ); }969 else { $_156 = FALSE; break; }970 $matcher = 'match_'.'spec'; $key = $matcher; $pos = $this->pos;971 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );972 if ($subres !== FALSE) {973 $this->store( $result, $subres, "spec" );974 }975 else { $_156 = FALSE; break; }976 $_156 = TRUE; break;977 }978 while(0);979 if( $_156 === FALSE) {980 $result = $res_157;981 $this->pos = $pos_157;982 unset( $res_157 );983 unset( $pos_157 );984 break;985 }986 }987 $_158 = TRUE; break;988 }989 while(0);990 if( $_158 === TRUE ) { return $this->finalise($result); }991 if( $_158 === FALSE) { return FALSE; }992}993/* estremi: 994 (:date (PV :numeri (V :numeri)*) ?) |995 (:periodo PV :date (PV :numeri (V :numeri)*) ?) |996 (:periodo (PV :numeri (V :numeri)*) ?) */997protected $match_estremi_typestack = array('estremi');998function match_estremi ($stack = array()) {999 $matchrule = "estremi"; $result = $this->construct($matchrule, $matchrule, null);1000 $_199 = NULL;1001 do {1002 $res_160 = $result;1003 $pos_160 = $this->pos;1004 $_170 = NULL;1005 do {1006 $matcher = 'match_'.'date'; $key = $matcher; $pos = $this->pos;1007 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1008 if ($subres !== FALSE) {1009 $this->store( $result, $subres, "date" );1010 }1011 else { $_170 = FALSE; break; }1012 $res_169 = $result;1013 $pos_169 = $this->pos;1014 $_168 = NULL;1015 do {1016 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;1017 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1018 if ($subres !== FALSE) { $this->store( $result, $subres ); }1019 else { $_168 = FALSE; break; }1020 $matcher = 'match_'.'numeri'; $key = $matcher; $pos = $this->pos;1021 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1022 if ($subres !== FALSE) {1023 $this->store( $result, $subres, "numeri" );1024 }1025 else { $_168 = FALSE; break; }1026 while (true) {1027 $res_167 = $result;1028 $pos_167 = $this->pos;1029 $_166 = NULL;1030 do {1031 $matcher = 'match_'.'V'; $key = $matcher; $pos = $this->pos;1032 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1033 if ($subres !== FALSE) {1034 $this->store( $result, $subres );1035 }1036 else { $_166 = FALSE; break; }1037 $matcher = 'match_'.'numeri'; $key = $matcher; $pos = $this->pos;1038 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1039 if ($subres !== FALSE) {1040 $this->store( $result, $subres, "numeri" );1041 }1042 else { $_166 = FALSE; break; }1043 $_166 = TRUE; break;1044 }1045 while(0);1046 if( $_166 === FALSE) {1047 $result = $res_167;1048 $this->pos = $pos_167;1049 unset( $res_167 );1050 unset( $pos_167 );1051 break;1052 }1053 }1054 $_168 = TRUE; break;1055 }1056 while(0);1057 if( $_168 === FALSE) {1058 $result = $res_169;1059 $this->pos = $pos_169;1060 unset( $res_169 );1061 unset( $pos_169 );1062 }1063 $_170 = TRUE; break;1064 }1065 while(0);1066 if( $_170 === TRUE ) { $_199 = TRUE; break; }1067 $result = $res_160;1068 $this->pos = $pos_160;1069 $_197 = NULL;1070 do {1071 $res_172 = $result;1072 $pos_172 = $this->pos;1073 $_184 = NULL;1074 do {1075 $matcher = 'match_'.'periodo'; $key = $matcher; $pos = $this->pos;1076 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1077 if ($subres !== FALSE) {1078 $this->store( $result, $subres, "periodo" );1079 }1080 else { $_184 = FALSE; break; }1081 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;1082 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1083 if ($subres !== FALSE) { $this->store( $result, $subres ); }1084 else { $_184 = FALSE; break; }1085 $matcher = 'match_'.'date'; $key = $matcher; $pos = $this->pos;1086 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1087 if ($subres !== FALSE) {1088 $this->store( $result, $subres, "date" );1089 }1090 else { $_184 = FALSE; break; }1091 $res_183 = $result;1092 $pos_183 = $this->pos;1093 $_182 = NULL;1094 do {1095 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;1096 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1097 if ($subres !== FALSE) { $this->store( $result, $subres ); }1098 else { $_182 = FALSE; break; }1099 $matcher = 'match_'.'numeri'; $key = $matcher; $pos = $this->pos;1100 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1101 if ($subres !== FALSE) {1102 $this->store( $result, $subres, "numeri" );1103 }1104 else { $_182 = FALSE; break; }1105 while (true) {1106 $res_181 = $result;1107 $pos_181 = $this->pos;1108 $_180 = NULL;1109 do {1110 $matcher = 'match_'.'V'; $key = $matcher; $pos = $this->pos;1111 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1112 if ($subres !== FALSE) {1113 $this->store( $result, $subres );1114 }1115 else { $_180 = FALSE; break; }1116 $matcher = 'match_'.'numeri'; $key = $matcher; $pos = $this->pos;1117 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1118 if ($subres !== FALSE) {1119 $this->store( $result, $subres, "numeri" );1120 }1121 else { $_180 = FALSE; break; }1122 $_180 = TRUE; break;1123 }1124 while(0);1125 if( $_180 === FALSE) {1126 $result = $res_181;1127 $this->pos = $pos_181;1128 unset( $res_181 );1129 unset( $pos_181 );1130 break;1131 }1132 }1133 $_182 = TRUE; break;1134 }1135 while(0);1136 if( $_182 === FALSE) {1137 $result = $res_183;1138 $this->pos = $pos_183;1139 unset( $res_183 );1140 unset( $pos_183 );1141 }1142 $_184 = TRUE; break;1143 }1144 while(0);1145 if( $_184 === TRUE ) { $_197 = TRUE; break; }1146 $result = $res_172;1147 $this->pos = $pos_172;1148 $_195 = NULL;1149 do {1150 $matcher = 'match_'.'periodo'; $key = $matcher; $pos = $this->pos;1151 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1152 if ($subres !== FALSE) {1153 $this->store( $result, $subres, "periodo" );1154 }1155 else { $_195 = FALSE; break; }1156 $res_194 = $result;1157 $pos_194 = $this->pos;1158 $_193 = NULL;1159 do {1160 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;1161 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1162 if ($subres !== FALSE) { $this->store( $result, $subres ); }1163 else { $_193 = FALSE; break; }1164 $matcher = 'match_'.'numeri'; $key = $matcher; $pos = $this->pos;1165 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1166 if ($subres !== FALSE) {1167 $this->store( $result, $subres, "numeri" );1168 }1169 else { $_193 = FALSE; break; }1170 while (true) {1171 $res_192 = $result;1172 $pos_192 = $this->pos;1173 $_191 = NULL;1174 do {1175 $matcher = 'match_'.'V'; $key = $matcher; $pos = $this->pos;1176 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1177 if ($subres !== FALSE) {1178 $this->store( $result, $subres );1179 }1180 else { $_191 = FALSE; break; }1181 $matcher = 'match_'.'numeri'; $key = $matcher; $pos = $this->pos;1182 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1183 if ($subres !== FALSE) {1184 $this->store( $result, $subres, "numeri" );1185 }1186 else { $_191 = FALSE; break; }1187 $_191 = TRUE; break;1188 }1189 while(0);1190 if( $_191 === FALSE) {1191 $result = $res_192;1192 $this->pos = $pos_192;1193 unset( $res_192 );1194 unset( $pos_192 );1195 break;1196 }1197 }1198 $_193 = TRUE; break;1199 }1200 while(0);1201 if( $_193 === FALSE) {1202 $result = $res_194;1203 $this->pos = $pos_194;1204 unset( $res_194 );1205 unset( $pos_194 );1206 }1207 $_195 = TRUE; break;1208 }1209 while(0);1210 if( $_195 === TRUE ) { $_197 = TRUE; break; }1211 $result = $res_172;1212 $this->pos = $pos_172;1213 $_197 = FALSE; break;1214 }1215 while(0);1216 if( $_197 === TRUE ) { $_199 = TRUE; break; }1217 $result = $res_160;1218 $this->pos = $pos_160;1219 $_199 = FALSE; break;1220 }1221 while(0);1222 if( $_199 === TRUE ) { return $this->finalise($result); }1223 if( $_199 === FALSE) { return FALSE; }1224}1225/* date: data:dataString (V data:dataString)* */1226protected $match_date_typestack = array('date');1227function match_date ($stack = array()) {1228 $matchrule = "date"; $result = $this->construct($matchrule, $matchrule, null);1229 $_206 = NULL;1230 do {1231 $matcher = 'match_'.'dataString'; $key = $matcher; $pos = $this->pos;1232 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1233 if ($subres !== FALSE) {1234 $this->store( $result, $subres, "data" );1235 }1236 else { $_206 = FALSE; break; }1237 while (true) {1238 $res_205 = $result;1239 $pos_205 = $this->pos;1240 $_204 = NULL;1241 do {1242 $matcher = 'match_'.'V'; $key = $matcher; $pos = $this->pos;1243 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1244 if ($subres !== FALSE) { $this->store( $result, $subres ); }1245 else { $_204 = FALSE; break; }1246 $matcher = 'match_'.'dataString'; $key = $matcher; $pos = $this->pos;1247 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1248 if ($subres !== FALSE) {1249 $this->store( $result, $subres, "data" );1250 }1251 else { $_204 = FALSE; break; }1252 $_204 = TRUE; break;1253 }1254 while(0);1255 if( $_204 === FALSE) {1256 $result = $res_205;1257 $this->pos = $pos_205;1258 unset( $res_205 );1259 unset( $pos_205 );1260 break;1261 }1262 }1263 $_206 = TRUE; break;1264 }1265 while(0);1266 if( $_206 === TRUE ) { return $this->finalise($result); }1267 if( $_206 === FALSE) { return FALSE; }1268}1269/* data: data:dataString */1270protected $match_data_typestack = array('data');1271function match_data ($stack = array()) {1272 $matchrule = "data"; $result = $this->construct($matchrule, $matchrule, null);1273 $matcher = 'match_'.'dataString'; $key = $matcher; $pos = $this->pos;1274 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1275 if ($subres !== FALSE) {1276 $this->store( $result, $subres, "data" );1277 return $this->finalise($result);1278 }1279 else { return FALSE; }1280}1281/* periodo: token */1282protected $match_periodo_typestack = array('periodo');1283function match_periodo ($stack = array()) {1284 $matchrule = "periodo"; $result = $this->construct($matchrule, $matchrule, null);1285 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;1286 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1287 if ($subres !== FALSE) {1288 $this->store( $result, $subres );1289 return $this->finalise($result);1290 }1291 else { return FALSE; }1292}1293/* numeri: 'nir-' numero+ | token */1294protected $match_numeri_typestack = array('numeri');1295function match_numeri ($stack = array()) {1296 $matchrule = "numeri"; $result = $this->construct($matchrule, $matchrule, null);1297 $_216 = NULL;1298 do {1299 $res_210 = $result;1300 $pos_210 = $this->pos;1301 $_213 = NULL;1302 do {1303 if (( $subres = $this->literal( 'nir-' ) ) !== FALSE) { $result["text"] .= $subres; }1304 else { $_213 = FALSE; break; }1305 $count = 0;1306 while (true) {1307 $res_212 = $result;1308 $pos_212 = $this->pos;1309 $matcher = 'match_'.'numero'; $key = $matcher; $pos = $this->pos;1310 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1311 if ($subres !== FALSE) { $this->store( $result, $subres ); }1312 else {1313 $result = $res_212;1314 $this->pos = $pos_212;1315 unset( $res_212 );1316 unset( $pos_212 );1317 break;1318 }1319 $count++;1320 }1321 if ($count >= 1) { }1322 else { $_213 = FALSE; break; }1323 $_213 = TRUE; break;1324 }1325 while(0);1326 if( $_213 === TRUE ) { $_216 = TRUE; break; }1327 $result = $res_210;1328 $this->pos = $pos_210;1329 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;1330 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1331 if ($subres !== FALSE) {1332 $this->store( $result, $subres );1333 $_216 = TRUE; break;1334 }1335 $result = $res_210;1336 $this->pos = $pos_210;1337 $_216 = FALSE; break;1338 }1339 while(0);1340 if( $_216 === TRUE ) { return $this->finalise($result); }1341 if( $_216 === FALSE) { return FALSE; }1342}1343/* annesso: id:token (PV :spec)* */1344protected $match_annesso_typestack = array('annesso');1345function match_annesso ($stack = array()) {1346 $matchrule = "annesso"; $result = $this->construct($matchrule, $matchrule, null);1347 $_223 = NULL;1348 do {1349 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;1350 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1351 if ($subres !== FALSE) {1352 $this->store( $result, $subres, "id" );1353 }1354 else { $_223 = FALSE; break; }1355 while (true) {1356 $res_222 = $result;1357 $pos_222 = $this->pos;1358 $_221 = NULL;1359 do {1360 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;1361 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1362 if ($subres !== FALSE) { $this->store( $result, $subres ); }1363 else { $_221 = FALSE; break; }1364 $matcher = 'match_'.'spec'; $key = $matcher; $pos = $this->pos;1365 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1366 if ($subres !== FALSE) {1367 $this->store( $result, $subres, "spec" );1368 }1369 else { $_221 = FALSE; break; }1370 $_221 = TRUE; break;1371 }1372 while(0);1373 if( $_221 === FALSE) {1374 $result = $res_222;1375 $this->pos = $pos_222;1376 unset( $res_222 );1377 unset( $pos_222 );1378 break;1379 }1380 }1381 $_223 = TRUE; break;1382 }1383 while(0);1384 if( $_223 === TRUE ) { return $this->finalise($result); }1385 if( $_223 === FALSE) { return FALSE; }1386}1387/* spec: token */1388protected $match_spec_typestack = array('spec');1389function match_spec ($stack = array()) {1390 $matchrule = "spec"; $result = $this->construct($matchrule, $matchrule, null);1391 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;1392 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1393 if ($subres !== FALSE) {1394 $this->store( $result, $subres );1395 return $this->finalise($result);1396 }1397 else { return FALSE; }1398}1399/* vigenza: data */1400protected $match_vigenza_typestack = array('vigenza');1401function match_vigenza ($stack = array()) {1402 $matchrule = "vigenza"; $result = $this->construct($matchrule, $matchrule, null);1403 $matcher = 'match_'.'data'; $key = $matcher; $pos = $this->pos;1404 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1405 if ($subres !== FALSE) {1406 $this->store( $result, $subres );1407 return $this->finalise($result);1408 }1409 else { return FALSE; }1410}1411/* versione: '@' (:data | :spec) ( PV (:vigenza | :spec))? */1412protected $match_versione_typestack = array('versione');1413function match_versione ($stack = array()) {1414 $matchrule = "versione"; $result = $this->construct($matchrule, $matchrule, null);1415 $_245 = NULL;1416 do {1417 if (substr($this->string,$this->pos,1) == '@') {1418 $this->pos += 1;1419 $result["text"] .= '@';1420 }1421 else { $_245 = FALSE; break; }1422 $_233 = NULL;1423 do {1424 $_231 = NULL;1425 do {1426 $res_228 = $result;1427 $pos_228 = $this->pos;1428 $matcher = 'match_'.'data'; $key = $matcher; $pos = $this->pos;1429 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1430 if ($subres !== FALSE) {1431 $this->store( $result, $subres, "data" );1432 $_231 = TRUE; break;1433 }1434 $result = $res_228;1435 $this->pos = $pos_228;1436 $matcher = 'match_'.'spec'; $key = $matcher; $pos = $this->pos;1437 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1438 if ($subres !== FALSE) {1439 $this->store( $result, $subres, "spec" );1440 $_231 = TRUE; break;1441 }1442 $result = $res_228;1443 $this->pos = $pos_228;1444 $_231 = FALSE; break;1445 }1446 while(0);1447 if( $_231 === FALSE) { $_233 = FALSE; break; }1448 $_233 = TRUE; break;1449 }1450 while(0);1451 if( $_233 === FALSE) { $_245 = FALSE; break; }1452 $res_244 = $result;1453 $pos_244 = $this->pos;1454 $_243 = NULL;1455 do {1456 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;1457 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1458 if ($subres !== FALSE) { $this->store( $result, $subres ); }1459 else { $_243 = FALSE; break; }1460 $_241 = NULL;1461 do {1462 $_239 = NULL;1463 do {1464 $res_236 = $result;1465 $pos_236 = $this->pos;1466 $matcher = 'match_'.'vigenza'; $key = $matcher; $pos = $this->pos;1467 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1468 if ($subres !== FALSE) {1469 $this->store( $result, $subres, "vigenza" );1470 $_239 = TRUE; break;1471 }1472 $result = $res_236;1473 $this->pos = $pos_236;1474 $matcher = 'match_'.'spec'; $key = $matcher; $pos = $this->pos;1475 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1476 if ($subres !== FALSE) {1477 $this->store( $result, $subres, "spec" );1478 $_239 = TRUE; break;1479 }1480 $result = $res_236;1481 $this->pos = $pos_236;1482 $_239 = FALSE; break;1483 }1484 while(0);1485 if( $_239 === FALSE) { $_241 = FALSE; break; }1486 $_241 = TRUE; break;1487 }1488 while(0);1489 if( $_241 === FALSE) { $_243 = FALSE; break; }1490 $_243 = TRUE; break;1491 }1492 while(0);1493 if( $_243 === FALSE) {1494 $result = $res_244;1495 $this->pos = $pos_244;1496 unset( $res_244 );1497 unset( $pos_244 );1498 }1499 $_245 = TRUE; break;1500 }1501 while(0);1502 if( $_245 === TRUE ) { return $this->finalise($result); }1503 if( $_245 === FALSE) { return FALSE; }1504}1505/* comunicato: '*' tipo:token PV :data */1506protected $match_comunicato_typestack = array('comunicato');1507function match_comunicato ($stack = array()) {1508 $matchrule = "comunicato"; $result = $this->construct($matchrule, $matchrule, null);1509 $_251 = NULL;1510 do {1511 if (substr($this->string,$this->pos,1) == '*') {1512 $this->pos += 1;1513 $result["text"] .= '*';1514 }1515 else { $_251 = FALSE; break; }1516 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;1517 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1518 if ($subres !== FALSE) {1519 $this->store( $result, $subres, "tipo" );1520 }1521 else { $_251 = FALSE; break; }1522 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;1523 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1524 if ($subres !== FALSE) { $this->store( $result, $subres ); }1525 else { $_251 = FALSE; break; }1526 $matcher = 'match_'.'data'; $key = $matcher; $pos = $this->pos;1527 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1528 if ($subres !== FALSE) {1529 $this->store( $result, $subres, "data" );1530 }1531 else { $_251 = FALSE; break; }1532 $_251 = TRUE; break;1533 }1534 while(0);1535 if( $_251 === TRUE ) { return $this->finalise($result); }1536 if( $_251 === FALSE) { return FALSE; }1537}1538/* manifestazione: '$' formato:(formato:token (PV :spec)*) editore:(DP nome:token (PV :spec)*) (componente:(DP nome:token (PV :spec)*))? */1539protected $match_manifestazione_typestack = array('manifestazione');1540function match_manifestazione ($stack = array()) {1541 $matchrule = "manifestazione"; $result = $this->construct($matchrule, $matchrule, null);1542 $_279 = NULL;1543 do {1544 if (substr($this->string,$this->pos,1) == '$') {1545 $this->pos += 1;1546 $result["text"] .= '$';1547 }1548 else { $_279 = FALSE; break; }1549 $stack[] = $result; $result = $this->construct( $matchrule, "formato" ); 1550 $_259 = NULL;1551 do {1552 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;1553 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1554 if ($subres !== FALSE) {1555 $this->store( $result, $subres, "formato" );1556 }1557 else { $_259 = FALSE; break; }1558 while (true) {1559 $res_258 = $result;1560 $pos_258 = $this->pos;1561 $_257 = NULL;1562 do {1563 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;1564 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1565 if ($subres !== FALSE) { $this->store( $result, $subres ); }1566 else { $_257 = FALSE; break; }1567 $matcher = 'match_'.'spec'; $key = $matcher; $pos = $this->pos;1568 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1569 if ($subres !== FALSE) {1570 $this->store( $result, $subres, "spec" );1571 }1572 else { $_257 = FALSE; break; }1573 $_257 = TRUE; break;1574 }1575 while(0);1576 if( $_257 === FALSE) {1577 $result = $res_258;1578 $this->pos = $pos_258;1579 unset( $res_258 );1580 unset( $pos_258 );1581 break;1582 }1583 }1584 $_259 = TRUE; break;1585 }1586 while(0);1587 if( $_259 === TRUE ) {1588 $subres = $result; $result = array_pop($stack);1589 $this->store( $result, $subres, 'formato' );1590 }1591 if( $_259 === FALSE) {1592 $result = array_pop($stack);1593 $_279 = FALSE; break;1594 }1595 $stack[] = $result; $result = $this->construct( $matchrule, "editore" ); 1596 $_267 = NULL;1597 do {1598 $matcher = 'match_'.'DP'; $key = $matcher; $pos = $this->pos;1599 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1600 if ($subres !== FALSE) { $this->store( $result, $subres ); }1601 else { $_267 = FALSE; break; }1602 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;1603 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1604 if ($subres !== FALSE) {1605 $this->store( $result, $subres, "nome" );1606 }1607 else { $_267 = FALSE; break; }1608 while (true) {1609 $res_266 = $result;1610 $pos_266 = $this->pos;1611 $_265 = NULL;1612 do {1613 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;1614 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1615 if ($subres !== FALSE) { $this->store( $result, $subres ); }1616 else { $_265 = FALSE; break; }1617 $matcher = 'match_'.'spec'; $key = $matcher; $pos = $this->pos;1618 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1619 if ($subres !== FALSE) {1620 $this->store( $result, $subres, "spec" );1621 }1622 else { $_265 = FALSE; break; }1623 $_265 = TRUE; break;1624 }1625 while(0);1626 if( $_265 === FALSE) {1627 $result = $res_266;1628 $this->pos = $pos_266;1629 unset( $res_266 );1630 unset( $pos_266 );1631 break;1632 }1633 }1634 $_267 = TRUE; break;1635 }1636 while(0);1637 if( $_267 === TRUE ) {1638 $subres = $result; $result = array_pop($stack);1639 $this->store( $result, $subres, 'editore' );1640 }1641 if( $_267 === FALSE) {1642 $result = array_pop($stack);1643 $_279 = FALSE; break;1644 }1645 $res_278 = $result;1646 $pos_278 = $this->pos;1647 $_277 = NULL;1648 do {1649 $stack[] = $result; $result = $this->construct( $matchrule, "componente" ); 1650 $_275 = NULL;1651 do {1652 $matcher = 'match_'.'DP'; $key = $matcher; $pos = $this->pos;1653 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1654 if ($subres !== FALSE) { $this->store( $result, $subres ); }1655 else { $_275 = FALSE; break; }1656 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;1657 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1658 if ($subres !== FALSE) {1659 $this->store( $result, $subres, "nome" );1660 }1661 else { $_275 = FALSE; break; }1662 while (true) {1663 $res_274 = $result;1664 $pos_274 = $this->pos;1665 $_273 = NULL;1666 do {1667 $matcher = 'match_'.'PV'; $key = $matcher; $pos = $this->pos;1668 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1669 if ($subres !== FALSE) {1670 $this->store( $result, $subres );1671 }1672 else { $_273 = FALSE; break; }1673 $matcher = 'match_'.'spec'; $key = $matcher; $pos = $this->pos;1674 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1675 if ($subres !== FALSE) {1676 $this->store( $result, $subres, "spec" );1677 }1678 else { $_273 = FALSE; break; }1679 $_273 = TRUE; break;1680 }1681 while(0);1682 if( $_273 === FALSE) {1683 $result = $res_274;1684 $this->pos = $pos_274;1685 unset( $res_274 );1686 unset( $pos_274 );1687 break;1688 }1689 }1690 $_275 = TRUE; break;1691 }1692 while(0);1693 if( $_275 === TRUE ) {1694 $subres = $result; $result = array_pop($stack);1695 $this->store( $result, $subres, 'componente' );1696 }1697 if( $_275 === FALSE) {1698 $result = array_pop($stack);1699 $_277 = FALSE; break;1700 }1701 $_277 = TRUE; break;1702 }1703 while(0);1704 if( $_277 === FALSE) {1705 $result = $res_278;1706 $this->pos = $pos_278;1707 unset( $res_278 );1708 unset( $pos_278 );1709 }1710 $_279 = TRUE; break;1711 }1712 while(0);1713 if( $_279 === TRUE ) { return $this->finalise($result); }1714 if( $_279 === FALSE) { return FALSE; }1715}1716/* partizione: '~' id:token */1717protected $match_partizione_typestack = array('partizione');1718function match_partizione ($stack = array()) {1719 $matchrule = "partizione"; $result = $this->construct($matchrule, $matchrule, null);1720 $_283 = NULL;1721 do {1722 if (substr($this->string,$this->pos,1) == '~') {1723 $this->pos += 1;1724 $result["text"] .= '~';1725 }1726 else { $_283 = FALSE; break; }1727 $matcher = 'match_'.'token'; $key = $matcher; $pos = $this->pos;1728 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1729 if ($subres !== FALSE) {1730 $this->store( $result, $subres, "id" );1731 }1732 else { $_283 = FALSE; break; }1733 $_283 = TRUE; break;1734 }1735 while(0);1736 if( $_283 === TRUE ) { return $this->finalise($result); }1737 if( $_283 === FALSE) { return FALSE; }1738}1739/* proprieta: '!' ( 'vig=' vigore:data | 'eff=' efficacia:data) */1740protected $match_proprieta_typestack = array('proprieta');1741function match_proprieta ($stack = array()) {1742 $matchrule = "proprieta"; $result = $this->construct($matchrule, $matchrule, null);1743 $_299 = NULL;1744 do {1745 if (substr($this->string,$this->pos,1) == '!') {1746 $this->pos += 1;1747 $result["text"] .= '!';1748 }1749 else { $_299 = FALSE; break; }1750 $_297 = NULL;1751 do {1752 $_295 = NULL;1753 do {1754 $res_286 = $result;1755 $pos_286 = $this->pos;1756 $_289 = NULL;1757 do {1758 if (( $subres = $this->literal( 'vig=' ) ) !== FALSE) { $result["text"] .= $subres; }1759 else { $_289 = FALSE; break; }1760 $matcher = 'match_'.'data'; $key = $matcher; $pos = $this->pos;1761 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1762 if ($subres !== FALSE) {1763 $this->store( $result, $subres, "vigore" );1764 }1765 else { $_289 = FALSE; break; }1766 $_289 = TRUE; break;1767 }1768 while(0);1769 if( $_289 === TRUE ) { $_295 = TRUE; break; }1770 $result = $res_286;1771 $this->pos = $pos_286;1772 $_293 = NULL;1773 do {1774 if (( $subres = $this->literal( 'eff=' ) ) !== FALSE) { $result["text"] .= $subres; }1775 else { $_293 = FALSE; break; }1776 $matcher = 'match_'.'data'; $key = $matcher; $pos = $this->pos;1777 $subres = ( $this->packhas( $key, $pos ) ? $this->packread( $key, $pos ) : $this->packwrite( $key, $pos, $this->$matcher(array_merge($stack, array($result))) ) );1778 if ($subres !== FALSE) {1779 $this->store( $result, $subres, "efficacia" );1780 }1781 else { $_293 = FALSE; break; }1782 $_293 = TRUE; break;1783 }1784 while(0);1785 if( $_293 === TRUE ) { $_295 = TRUE; break; }1786 $result = $res_286;1787 $this->pos = $pos_286;1788 $_295 = FALSE; break;1789 }1790 while(0);1791 if( $_295 === FALSE) { $_297 = FALSE; break; }1792 $_297 = TRUE; break;1793 }1794 while(0);1795 if( $_297 === FALSE) { $_299 = FALSE; break; }1796 $_299 = TRUE; break;1797 }1798 while(0);1799 if( $_299 === TRUE ) { return $this->finalise($result); }1800 if( $_299 === FALSE) { return FALSE; }1801}1802}1803?>...

Full Screen

Full Screen

WeeklyReport.php

Source:WeeklyReport.php Github

copy

Full Screen

1<?php2defined('BASEPATH') OR exit('No direct script access allowed');3/*4 @Author : Ritesh Rana5 @Desc : Save weekly report6 @Input :7 @Output :8 @Date : 19/03/20189 */10class WeeklyReport extends CI_Controller {11 function __construct() {12 parent::__construct();13 if (checkPermission('WeeklyReport', 'view') == false) {14 redirect('/Dashboard');15 } 16 $this->viewname = $this->router->fetch_class();17 $this->method = $this->router->fetch_method();18 $this->load->library(array('form_validation', 'Session'));19 }20 /*21 @Author : Ritesh Rana22 @Desc : Weekly report index page23 @Input : yp id24 @Output :25 @Date : 16/03/201826 */27 public function index($id,$care_home_id=0,$past_care_id=0) {28 /*29 Ritesh Rana30 for past care id inserted for archive full functionality31 */32 if ($past_care_id !== 0) {33 $temp = $this->common_model->get_records(PAST_CARE_HOME_INFO, array('move_date'), '', '', array("yp_id" => $id, "past_carehome" => $care_home_id));34 $data_care_home_detail = $this->common_model->get_records(PAST_CARE_HOME_INFO, array("enter_date,move_date"), '', '', array("yp_id" => $id, "move_date <= " => $temp[0]['move_date']));35 $created_date = $movedate = '';36 $count_care = count($data_care_home_detail);37 if ($count_care >= 1) {38 $created_date = $data_care_home_detail[0]['enter_date'];39 $movedate = $data_care_home_detail[$count_care - 1]['move_date'];40 } elseif ($count_care == 0) {41 $created_date = $data_care_home_detail[0]['enter_date'];42 $movedate = $data_care_home_detail[0]['move_date'];43 }44 }45 if (is_numeric($id)) {46 //get YP information47 $fields = array("care_home,yp_fname,yp_lname,date_of_birth,yp_id");48 $data['YP_details'] = YpDetails($id,$fields);49 if (empty($data['YP_details'])) {50 $msg = $this->lang->line('common_no_record_found');51 $this->session->set_flashdata('msg', "<div class='alert alert-danger text-center'>$msg</div>");52 redirect('YoungPerson');53 }54 $searchtext = $perpage = '';55 $searchtext = $this->input->post('searchtext');56 $sortfield = $this->input->post('sortfield');57 $sortby = $this->input->post('sortby');58 $perpage = RECORD_PER_PAGE;59 $allflag = $this->input->post('allflag');60 if (!empty($allflag) && ($allflag == 'all' || $allflag == 'changesorting' || $allflag == 'changesearch')) {61 $this->session->unset_userdata('wr_data');62 }63 $searchsort_session = $this->session->userdata('wr_data');64 //Sorting65 if (!empty($sortfield) && !empty($sortby)) {66 $data['sortfield'] = $sortfield;67 $data['sortby'] = $sortby;68 } else {69 if (!empty($searchsort_session['sortfield'])) {70 $data['sortfield'] = $searchsort_session['sortfield'];71 $data['sortby'] = $searchsort_session['sortby'];72 $sortfield = $searchsort_session['sortfield'];73 $sortby = $searchsort_session['sortby'];74 } else {75 $sortfield = 'wr.created_date';76 $sortby = 'desc';77 $data['sortfield'] = $sortfield;78 $data['sortby'] = $sortby;79 }80 }81 //Search text82 if (!empty($searchtext)) {83 $data['searchtext'] = $searchtext;84 } else {85 if (empty($allflag) && !empty($searchsort_session['searchtext'])) {86 $data['searchtext'] = $searchsort_session['searchtext'];87 $searchtext = $data['searchtext'];88 } else {89 $data['searchtext'] = '';90 }91 }92 if (!empty($perpage) && $perpage != 'null') {93 $data['perpage'] = $perpage;94 $config['per_page'] = $perpage;95 } else {96 if (!empty($searchsort_session['perpage'])) {97 $data['perpage'] = trim($searchsort_session['perpage']);98 $config['per_page'] = trim($searchsort_session['perpage']);99 } else {100 $config['per_page'] = RECORD_PER_PAGE;101 $data['perpage'] = RECORD_PER_PAGE;102 }103 }104 //pagination configuration105 $config['first_link'] = 'First';106 if($past_care_id == 0){107 $config['base_url'] = base_url() . $this->viewname . '/index/' . $id;108 if (!empty($allflag) && ($allflag == 'all' || $allflag == 'changesorting' || $allflag == 'changesearch')) {109 $config['uri_segment'] = 0;110 $uri_segment = 0;111 } else {112 $config['uri_segment'] = 4;113 $uri_segment = $this->uri->segment(4);114 }115 //Query116 $login_user_id = $this->session->userdata['LOGGED_IN']['ID'];117 $table = WEEKLY_REPORT . ' as wr';118 $where = array("wr.yp_id" => $id,"wr.is_archive"=> 0,"wr.is_delete"=> 0);119 120 $fields = array("l.login_id, CONCAT(`firstname`,' ', `lastname`) as name, ch.care_home_name, l.firstname, l.lastname, wr.*,count(wrs.weekly_report_id) as sent_report");121 $join_tables = array(LOGIN . ' as l' => 'l.login_id = wr.created_by',WR_REPORT_SENT . ' as wrs' => 'wrs.weekly_report_id= wr.weekly_report_id',CARE_HOME . ' as ch' => 'ch.care_home_id = wr.care_home_id');122 if (!empty($searchtext)) {123 $searchtext = html_entity_decode(trim(addslashes($searchtext)));124 $match = array("wr.yp_id" => $id,"wr.is_archive"=> 0,"wr.is_delete"=> 0);125 $where_search = '((CONCAT(`firstname`, \' \', `lastname`) LIKE "%' . $searchtext . '%" OR l.firstname LIKE "%' . $searchtext . '%" OR l.lastname LIKE "%' . $searchtext . '%" OR wr.start_date LIKE "%' . $searchtext . '%" OR wr.end_date LIKE "%' . $searchtext . '%" OR DATE_FORMAT(wr.start_date, "%d/%m/%Y") = "' . $searchtext . '"126 OR DATE_FORMAT(wr.end_date, "%d/%m/%Y") = "' . $searchtext . '"127 OR DATE_FORMAT(wr.created_date, "%d/%m/%Y") = "' . $searchtext . '"128 OR l.status LIKE "%' . $searchtext . '%")AND l.is_delete = "0")';129 $data['edit_data'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', $match,'' , $config['per_page'], $uri_segment, $sortfield, $sortby, 'wr.weekly_report_id', $where_search);130 131 $config['total_rows'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', $match, '', '', '', $sortfield, $sortby, 'wr.weekly_report_id', $where_search, '', '', '1');132 } else {133 $data['edit_data'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', '', '', $config['per_page'], $uri_segment, $sortfield, $sortby, 'wr.weekly_report_id', $where);134 135 $config['total_rows'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', '', '', '', '', $sortfield, $sortby, 'wr.weekly_report_id', $where, '', '', '1');136 }137 }else{138 $config['base_url'] = base_url() . $this->viewname . '/index/' . $id.'/'.$care_home_id.'/'.$past_care_id;139 if (!empty($allflag) && ($allflag == 'all' || $allflag == 'changesorting' || $allflag == 'changesearch')) {140 $config['uri_segment'] = 0;141 $uri_segment = 0;142 } else {143 $config['uri_segment'] = 6;144 $uri_segment = $this->uri->segment(6);145 }146 //Query147 $login_user_id = $this->session->userdata['LOGGED_IN']['ID'];148 $table = WEEKLY_REPORT . ' as wr';149 $where = array("wr.yp_id" => $id,"wr.is_archive"=> 0,"wr.is_delete"=> 0);150 $where_date = "wr.created_date BETWEEN '".$created_date."' AND '".$movedate."'";151 152 $fields = array("l.login_id, CONCAT(`firstname`,' ', `lastname`) as name, ch.care_home_name, l.firstname, l.lastname, wr.*,count(wrs.weekly_report_id) as sent_report");153 $join_tables = array(LOGIN . ' as l' => 'l.login_id = wr.created_by',WR_REPORT_SENT . ' as wrs' => 'wrs.weekly_report_id= wr.weekly_report_id',CARE_HOME . ' as ch' => 'ch.care_home_id = wr.care_home_id');154 if (!empty($searchtext)) {155 $searchtext = html_entity_decode(trim(addslashes($searchtext)));156 $match = array("wr.yp_id" => $id,"wr.is_archive"=> 0,"wr.is_delete"=> 0);157 $where_search = '((CONCAT(`firstname`, \' \', `lastname`) LIKE "%' . $searchtext . '%" OR l.firstname LIKE "%' . $searchtext . '%" OR l.lastname LIKE "%' . $searchtext . '%" OR wr.start_date LIKE "%' . $searchtext . '%" OR wr.end_date LIKE "%' . $searchtext . '%" OR DATE_FORMAT(wr.start_date, "%d/%m/%Y") = "' . $searchtext . '"158 OR DATE_FORMAT(wr.end_date, "%d/%m/%Y") = "' . $searchtext . '"159 OR DATE_FORMAT(wr.created_date, "%d/%m/%Y") = "' . $searchtext . '"160 OR l.status LIKE "%' . $searchtext . '%")AND l.is_delete = "0")';161 $data['edit_data'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', $match,'' , $config['per_page'], $uri_segment, $sortfield, $sortby, 'wr.weekly_report_id', $where_search,'','','','','',$where_date);162 $config['total_rows'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', $match, '', '', '', $sortfield, $sortby, 'wr.weekly_report_id', $where_search, '', '', '1','','',$where_date);163 } else {164 $data['edit_data'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', '', '', $config['per_page'], $uri_segment, $sortfield, $sortby, 'wr.weekly_report_id', $where,'','','','','',$where_date);165 166 $config['total_rows'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', '', '', '', '', $sortfield, $sortby, 'wr.weekly_report_id', $where, '', '', '1','','',$where_date);167 }168 }169 $this->ajax_pagination->initialize($config);170 $data['pagination'] = $this->ajax_pagination->create_links();171 $data['uri_segment'] = $uri_segment;172 $sortsearchpage_data = array(173 'sortfield' => $data['sortfield'],174 'sortby' => $data['sortby'],175 'searchtext' => $data['searchtext'],176 'perpage' => trim($data['perpage']),177 'uri_segment' => $uri_segment,178 'total_rows' => $config['total_rows']);179 $data['ypid'] = $id;180 $data['care_home_id'] = $care_home_id;181 $data['past_care_id'] = $past_care_id;182 //get WR form183 $match = array('wr_form_id' => 1);184 $wr_forms = $this->common_model->get_records(WR_FORM, array("form_json_data"), '', '', $match);185 if (!empty($wr_forms)) {186 $data['form_data'] = json_decode($wr_forms[0]['form_json_data'], TRUE);187 }188 $this->session->set_userdata('wr_data', $sortsearchpage_data);189 setActiveSession('wr_data'); // set current Session active190 191 $data['header'] = array('menu_module' => 'YoungPerson');192 $data['crnt_view'] = $this->viewname;193 $data['footerJs'][0] = base_url('uploads/custom/js/wr/wr.js');194 if ($this->input->post('result_type') == 'ajax') {195 $this->load->view($this->viewname . '/ajaxlist', $data);196 } else {197 $data['main_content'] = '/WeeklyReport';198 $this->parser->parse('layouts/DefaultTemplate', $data);199 }200 } else {201 show_404();202 }203 }204 /*205 @Author : Ritesh Rana206 @Desc : create Weekly report edit page207 @Input :208 @Output :209 @Date : 16/03/2018210 */211 public function edit($id, $ypid) {212 if (is_numeric($ypid) && is_numeric($id)) {213 //get pp form214 $match = array('wr_form_id' => 1);215 $wr_forms = $this->common_model->get_records(WR_FORM, array("form_json_data"), '', '', $match);216 if (!empty($wr_forms)) {217 $data['form_data'] = json_decode($wr_forms[0]['form_json_data'], TRUE);218 foreach ($data['form_data'] as $form_data) {219 if(!empty($form_data['name'])){220 $form_field[] = $form_data['name'];221 }222 }223 }224 $data['form_field_data_name'] = $form_field;225 //get YP information226 $fields = array("care_home,yp_fname,yp_lname,date_of_birth,yp_id");227 $data['YP_details'] = YpDetails($ypid,$fields);228 if (empty($data['YP_details'])) {229 $msg = $this->lang->line('common_no_record_found');230 $this->session->set_flashdata('errormsg', $msg);231 redirect('YoungPerson');232 }233 //get pp yp data234 235 $match = array('yp_id' => $ypid, 'weekly_report_id' => $id);236 $data['edit_data'] = $this->common_model->get_records(WEEKLY_REPORT, array("*"), '', '', $match);237 // signoff data238 $login_user_id = $this->session->userdata['LOGGED_IN']['ID'];239 $table = WEEKLY_REPORT_SIGNOFF . ' as wr';240 $where = array("l.is_delete" => "0", "wr.yp_id" => $ypid);241 $fields = array("wr.created_by,wr.yp_id,CONCAT(`firstname`,' ', `lastname`) as name");242 $join_tables = array(LOGIN . ' as l' => 'l.login_id=wr.created_by');243 $group_by = array('created_by');244 $data['signoff_data'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', '', '', '', '', '', '', $group_by, $where);245 $data['url'] = base_url("Filemanager/index/$ypid/?dir=uploads/filemanager/Project0" . $ypid . "/&modal=true");246 $data['drag'] = true;247 $url_data = base_url('WeeklyReport/edit/' . $id . '/' . $ypid);248 $match = array('url_data' => $url_data);249 $data['check_edit_permission'] = $this->common_model->get_records(CHECK_EDIT_URL, '*', '', '', $match);250 if (count($data['check_edit_permission']) > 0) {251 $in_time = date('Y-m-d h:i:s', strtotime($data['check_edit_permission'][0]['datetime']));252 $currnt_time = date('Y-m-d h:i:s');253 if (strtotime($in_time) > strtotime($currnt_time)) {254 $now = strtotime($in_time) - strtotime($currnt_time);255 } else {256 $now = strtotime($currnt_time) - strtotime($in_time);257 }258 // die;259 $secs = floor($now % 60);260 if ($secs >= 10) {261 $data['ypid'] = $ypid;262 $data['footerJs'][0] = base_url('uploads/custom/js/wr/wr.js');263 $data['crnt_view'] = $this->viewname;264 $data['main_content'] = '/edit';265 $data['header'] = array('menu_module' => 'YoungPerson');266 $this->parser->parse('layouts/DefaultTemplate', $data);267 } else {268 $msg = $this->lang->line('check_wr_user_update_data');269 $this->session->set_flashdata('errormsg', $msg);270 redirect('/' . $this->viewname . '/index/' . $ypid);271 }272 } else {273 $data['ypid'] = $ypid;274 $data['footerJs'][0] = base_url('uploads/custom/js/wr/wr.js');275 $data['crnt_view'] = $this->viewname;276 $data['main_content'] = '/edit';277 $data['header'] = array('menu_module' => 'YoungPerson');278 $this->parser->parse('layouts/DefaultTemplate', $data);279 }280 } else {281 show_404();282 }283 }284 /*285 @Author : Ritesh Rana286 @Desc : view wr form287 @Input :288 @Output :289 @Date : 19/03/2018290 */291 public function view($wr_id, $yp_id,$care_home_id=0,$past_care_id=0) {292 if (is_numeric($wr_id) && is_numeric($yp_id)) { 293 //get ks form294 $match = array('wr_form_id' => 1);295 $wr_forms = $this->common_model->get_records(WR_FORM, '', '', '', $match);296 if (!empty($wr_forms)) {297 $data['form_data'] = json_decode($wr_forms[0]['form_json_data'], TRUE);298 }299 300 //get YP information301 $fields = array("care_home,yp_fname,yp_lname,date_of_birth,yp_id");302 $data['YP_details'] = YpDetails($yp_id,$fields);303 //get ks yp data304 $match = array('weekly_report_id' => $wr_id);305 $data['edit_data'] = $this->common_model->get_records(WEEKLY_REPORT, array("*"), '', '', $match);306 $login_user_id = $this->session->userdata['LOGGED_IN']['ID'];307 $table = WEEKLY_REPORT_SIGNOFF . ' as wr';308 $where = array("l.is_delete" => "0", "wr.yp_id" => $yp_id, "wr.weekly_report_id" => $wr_id, "wr.is_delete" => "0");309 $fields = array("wr.created_by,wr.created_date,wr.yp_id,wr.weekly_report_id, CONCAT(`firstname`,' ', `lastname`) as name");310 $join_tables = array(LOGIN . ' as l' => 'l.login_id=wr.created_by');311 $group_by = array('created_by');312 $data['wr_signoff_data'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', '', '', '', '', '', '', $group_by, $where);313 $table = WEEKLY_REPORT_SIGNOFF . ' as wr';314 $where = array("wr.yp_id" => $yp_id, "wr.created_by" => $login_user_id, "wr.is_delete" => "0", "wr.weekly_report_id" => $wr_id);315 $fields = array("wr.*");316 $data['check_wr_signoff_data'] = $this->common_model->get_records($table, $fields, '', '', '', '', '', '', '', '', '', $where);317 //check data exist or not318 if (empty($data['YP_details']) || empty($data['edit_data'])) {319 $msg = $this->lang->line('common_no_record_found');320 $this->session->set_flashdata('msg', "<div class='alert alert-danger text-center'>$msg</div>");321 redirect('YoungPerson');322 }323 324 $table_ap = MEDICAL_PROFESSIONALS_APPOINTMENT . ' as mc';325 $where_ap = array("mc.yp_id" => $yp_id,"mc.is_delete"=>0,"mc.appointment_date >=" =>$data['edit_data'][0]['start_date'],"mc.appointment_date <=" =>$data['edit_data'][0]['end_date']);326 $fields_ap = array("mc.*,concat(if(mp.title != '',mp.title,''),' ',if(mp.first_name != '',mp.first_name,''),' ',if(mp.surname != '',mp.surname,''),' - ',if(mp.professional != '',mp.professional,'')) as mp_name, concat(mp.house_namenumber,',',mp.street,' ',mp.town,',',mp.city,',',mp.postcode) as address");327 $join_tables_ap = array(MEDICAL_PROFESSIONALS . ' as mp' => 'mc.mp_id= mp.mp_id',YP_DETAILS . ' as yp' => 'mc.yp_id= yp.yp_id');328 $data['appointments'] = $this->common_model->get_records($table_ap, $fields_ap, $join_tables_ap, 'left', $where_ap, '', '', '', 'appointment_id', 'desc', '');329 $table = MD_COMMENTS . ' as com';330 $where = array("com.yp_id" => $yp_id);331 $fields = array("com.md_comment,com.created_date,com.md_appoint_id,CONCAT(l.firstname,' ', l.lastname) as create_name,CONCAT(yp.yp_fname,' ', yp.yp_lname) as yp_name");332 $join_tables = array(LOGIN . ' as l' => 'l.login_id= com.created_by', YP_DETAILS . ' as yp' => 'yp.yp_id= com.yp_id');333 $data['appointment_view_comments'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', '', '', '', '', '', '', '', $where);334 335 $table = WR_REPORT_SENT . ' AS wr';336 $fields = array('wr.*');337 $where = array('wr.weekly_report_id' => $wr_id, 'wr.yp_id' => $yp_id);338 $data['check_external_signoff_data'] = $this->common_model->get_records($table, $fields, '', '', '', '', '', '', '', '', '', $where);339 340 $data['ypid'] = $yp_id;341 $data['care_home_id'] = $care_home_id;342 $data['past_care_id'] = $past_care_id;343 $data['weekly_report_id'] = $wr_id;344 $data['footerJs'][0] = base_url('uploads/custom/js/wr/wr.js');345 $data['crnt_view'] = $this->viewname;346 $data['header'] = array('menu_module' => 'YoungPerson');347 $data['main_content'] = '/view';348 $this->parser->parse('layouts/DefaultTemplate', $data);349 } else {350 show_404();351 }352 }353 /*354 @Author : Ritesh rana355 @Desc : Create Weekly report356 @Input : 357 @Output :358 @Date : 19/03/2018359 */360 public function create($id) {361 if(is_numeric($id))362 {363 //get ks form364 $match = array('wr_form_id'=> 1);365 $wr_forms = $this->common_model->get_records(WR_FORM,array("form_json_data"), '', '', $match);366 $form_field = array();367 if(!empty($wr_forms))368 {369 $data['form_data'] = json_decode($wr_forms[0]['form_json_data'], TRUE);370 foreach ($data['form_data'] as $form_data) {371 if(!empty($form_data['name'])){372 $form_field[] = $form_data['name'];373 }374 }375 }376 $data['form_field_data_name'] = $form_field;377 378 //get YP information379 $fields = array("care_home,yp_fname,yp_lname,date_of_birth,yp_id");380 $data['YP_details'] = YpDetails($id,$fields);381 if(empty($data['YP_details']))382 {383 $msg = $this->lang->line('common_no_record_found');384 $this->session->set_flashdata('msg', "<div class='alert alert-danger text-center'>$msg</div>");385 redirect('YoungPerson');386 }387 $data['url'] = base_url("Filemanager/index/$id/?dir=uploads/filemanager/Project0" . $id . "/&modal=true");388 $data['ypid'] = $id;389 $data['care_home_id'] = $data['YP_details'][0]['care_home'];390 $data['drag'] = true;391 $data['footerJs'][0] = base_url('uploads/custom/js/wr/wr.js');392 393 $data['header'] = array('menu_module' => 'YoungPerson');394 $data['crnt_view'] = $this->viewname;395 $data['main_content'] = '/edit';396 $this->parser->parse('layouts/DefaultTemplate', $data);397 }398 else399 {400 show_404 ();401 }402 }403 /*404 @Author : Ritesh Rana405 @Desc : insert Weekly report in db406 @Input : yp id, weekly_report_id(edit)407 @Output :408 @Date : 20/03/2018409 */410 public function insert() {411 $postData = $this->input->post();412 $draftdata = (isset($postData['saveAsDraft'])) ? $postData['saveAsDraft'] : 0;413 if($this->input->is_ajax_request()){414 $draftdata=1;415 }416 //get pp form417 $match = array('wr_form_id' => 1);418 $wr_forms = $this->common_model->get_records(WR_FORM, array("form_json_data"), '', '', $match);419 if (!empty($wr_forms)) {420 $wr_form_data = json_decode($wr_forms[0]['form_json_data'], TRUE);421 $data = array();422 foreach ($wr_form_data as $row) {423 if (isset($row['name'])) {424 if ($row['type'] == 'file') {425 $filename = $row['name'];426 //get image previous image427 $match = array('yp_id' => $postData['yp_id'], 'weekly_report_id' => $postData['weekly_report_id']);428 $pp_yp_data = $this->common_model->get_records(WEEKLY_REPORT, array('`' . $row['name'] . '`'), '', '', $match);429 if ($this->input->post('gallery_path')) {430 $gallery_path = $this->input->post('gallery_path');431 $est_files = $this->input->post('gallery_files');432 if (count($gallery_path) > 0) {433 for ($i = 0; $i < count($gallery_path); $i++) {434 $data[$row['name']] = $gallery_path[$i].''.$est_files[$i];435 }436 }437 } else {438 $data[$row['name']] = !empty($pp_yp_data[0][$filename]) ? $pp_yp_data[0][$filename] : '';439 }440 } else {441 if ($row['type'] != 'button') {442 if ($row['type'] == 'date') {443 $data[$row['name']] = dateformat($postData[$row['name']]);444 } elseif ($row['subtype'] == 'time') {445 $data[$row['name']] = dbtimeformat($postData[$row['name']]);446 } else if ($row['type'] == 'checkbox-group') {447 $data[$row['name']] = !empty($postData[$row['name']]) ? implode(',', $postData[$row['name']]) : '';448 } elseif ($row['type'] == 'textarea' && $row['subtype'] == 'tinymce') {449 $data[$row['name']] = strip_slashes($postData[$row['name']]);450 } else {451 $data[$row['name']] = strip_tags(strip_slashes($postData[$row['name']]));452 }453 }454 }455 }456 }457 }458 if(!empty($postData['weekly_report_id']))459 {460 $data['draft'] = $draftdata; 461 $data['start_date'] = dateformat($postData['start_date']);462 $data['end_date'] = dateformat($postData['end_date']);463 $data['weekly_report_id'] = $postData['weekly_report_id'];464 $data['yp_id'] = $postData['yp_id'];465 $data['modified_date'] = datetimeformat();466 $data['modified_by'] = $this->session->userdata['LOGGED_IN']['ID'];467 468 $where=array('weekly_report_id'=>$postData['weekly_report_id']);469 $this->common_model->update(WEEKLY_REPORT,$data,$where);470 471 //Insert log activity472 $activity = array(473 'user_id' => $this->session->userdata['LOGGED_IN']['ID'],474 'yp_id' => !empty($postData['yp_id'])?$postData['yp_id']:'',475 'module_name' => WR_MODULE,476 'module_field_name' => '',477 'type' => 2478 );479 log_activity($activity);480 }481 482 else483 {484 if(!empty($data))485 {486 $data['draft'] = $draftdata; 487 $data['yp_id'] = $postData['yp_id'];488 $data['care_home_id'] = $postData['care_home_id'];489 $data['start_date'] = dateformat($postData['start_date']);490 $data['end_date'] = dateformat($postData['end_date']);491 $data['created_date'] = datetimeformat();492 $data['created_by'] = $this->session->userdata['LOGGED_IN']['ID'];493 $this->common_model->insert(WEEKLY_REPORT, $data);494 $data['weekly_report_id'] = $this->db->insert_id();495 //Insert log activity496 $activity = array(497 'user_id' => $this->session->userdata['LOGGED_IN']['ID'],498 'yp_id' => !empty($postData['yp_id'])?$postData['yp_id']:'',499 'module_name' => WR_MODULE,500 'module_field_name' => '',501 'type' => 1502 );503 log_activity($activity);504 }505 506 }507 if(!empty($data))508 {509 redirect('/' . $this->viewname .'/save_weekly_report/'. $data['weekly_report_id'].'/'.$data['yp_id']);510 }511 else512 {513 $this->session->set_flashdata('msg', "<div class='alert alert-danger text-center'>Please insert weekly report details.</div>");514 redirect('/' . $this->viewname .'/create/'.$postData['yp_id']);515 }516 /*===============*/517 }518 /*519 @Author : Ritesh Rana520 @Desc : save weekly report521 @Input : yp id, weekly_report_id(edit)522 @Output :523 @Date : 21/03/2018524 */525 public function save_weekly_report($id, $ypid) {526 if (is_numeric($id) && is_numeric($ypid)) {527 //get YP information528 $fields = array("care_home,yp_fname,yp_lname,date_of_birth,yp_id");529 $data['YP_details'] = YpDetails($ypid,$fields);530 if (empty($data['YP_details'])) {531 $msg = $this->lang->line('common_no_record_found');532 $this->session->set_flashdata('errormsg', $msg);533 redirect('YoungPerson');534 }535 $data['id'] = $ypid;536 $data['main_content'] = '/save_weekly_report';537 $this->parser->parse('layouts/DefaultTemplate', $data);538 } else {539 show_404();540 }541 }542/*543 @Author : Ritesh Rana544 @Desc : download weekly report pdf545 @Input : yp id, weekly_report_id(edit)546 @Output :547 @Date : 20/03/2018548 */549 public function DownloadPDF($weekly_report_id, $yp_id, $section = NULL) {550 $data = [];551 $match = array('wr_form_id' => 1);552 $wr_forms = $this->common_model->get_records(WR_FORM, array("form_json_data"), '', '', $match);553 if (!empty($wr_forms)) {554 $data['wr_form_data'] = json_decode($wr_forms[0]['form_json_data'], TRUE);555 }556 557 //get YP information558 $fields = array("care_home,yp_fname,yp_lname,date_of_birth,yp_id");559 $data['YP_details'] = YpDetails($yp_id,$fields);560 //get RA yp data561 $match = array('yp_id' => $yp_id, 'weekly_report_id' => $weekly_report_id);562 $data['edit_data'] = $this->common_model->get_records(WEEKLY_REPORT, '', '', '', $match);563 $data['ypid'] = $yp_id;564 565 //get medical appoinyment data566 $table_ap = MEDICAL_PROFESSIONALS_APPOINTMENT . ' as mc';567 $where_ap = array("mc.yp_id" => $yp_id,"mc.is_delete"=>0,"mc.appointment_date >=" =>$data['edit_data'][0]['start_date'],"mc.appointment_date <=" =>$data['edit_data'][0]['end_date']);568 $fields_ap = array("mc.appointment_date,mc.comments,concat(if(mp.title != '',mp.title,''),' ',if(mp.first_name != '',mp.first_name,''),' ',if(mp.surname != '',mp.surname,''),' - ',if(mp.professional != '',mp.professional,'')) as mp_name, concat(mp.house_namenumber,',',mp.street,' ',mp.town,',',mp.city,',',mp.postcode) as address");569 $join_tables_ap = array(MEDICAL_PROFESSIONALS . ' as mp' => 'mc.mp_id= mp.mp_id',YP_DETAILS . ' as yp' => 'mc.yp_id= yp.yp_id');570 $data['appointments'] = $this->common_model->get_records($table_ap, $fields_ap, $join_tables_ap, 'left', $where_ap, '', '', '', 'appointment_id', 'desc', '');571 //get medical appoinyment comments data572 $table = MD_COMMENTS . ' as com';573 $where = array("com.yp_id" => $yp_id);574 $fields = array("com.md_appoint_id,com.md_comment,com.created_date,CONCAT(l.firstname,' ', l.lastname) as create_name,CONCAT(yp.yp_fname,' ', yp.yp_lname) as yp_name");575 $join_tables = array(LOGIN . ' as l' => 'l.login_id= com.created_by', YP_DETAILS . ' as yp' => 'yp.yp_id= com.yp_id');576 $data['appointment_view_comments'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', '', '', '', '', '', '', '', $where);577 $table = WR_REPORT_SENT . ' as wr';578 $match_social = array('wr.yp_id'=> $yp_id,'wr.weekly_report_id' => $weekly_report_id);579 $social_where_in = array("wr.user_type" => ['Social_worker', 'Social_data']);580 $match_parent = array('wr.yp_id'=> $yp_id,'wr.weekly_report_id' => $weekly_report_id);581 $parent_where_in = array("wr.user_type" => ['Parent', 'Parent_data']);582 $match_other = array('wr.yp_id'=> $yp_id,'wr.weekly_report_id' => $weekly_report_id,"wr.user_type" => "Other");583 $fields = array("wr.*,CONCAT(wr.fname,' ', wr.lname) as staff_name");584 $data['social_worker_signoff'] = $this->common_model->get_records($table, $fields, '', '', $match_social,'','','','','','','','',$social_where_in);585 $data['parent_signoff'] = $this->common_model->get_records($table, $fields, '', '', $match_parent,'','','','','','','','',$parent_where_in);586 $data['social_worker_signoff'] = $this->common_model->get_records($table, $fields, '', '', $match_social,'','','','','','','','',$social_where_in);587 $data['other_signoff'] = $this->common_model->get_records($table, $fields, '', '', $match_other);588 589 $data['main_content'] = '/wrpdf';590 $data['section'] = $section;591 $html = $this->parser->parse('layouts/PDFTemplate', $data);592 $pdfFileName = "weekly_report" . $weekly_report_id . ".pdf";593 $pdfFilePath = FCPATH . 'uploads/weeklyreport/';594 if (!is_dir(FCPATH . 'uploads/weeklyreport/')) {595 @mkdir(FCPATH . 'uploads/weeklyreport/', 0777, TRUE);596 }597 if (file_exists($pdfFilePath . $pdfFileName)) {598 unlink($pdfFilePath . $pdfFileName);599 }600 601 $this->load->library('m_pdf');602 $PDFInformation['yp_details'] = $data['YP_details'][0];603 604 $PDFInformation['edit_data'] = $data['edit_data'];605 606 $PDFHeaderHTML = $this->load->view('wrpdfHeader', $PDFInformation, true);607 $PDFFooterHTML = $this->load->view('wrpdfFooter', $PDFInformation, true);608 //Set Header Footer and Content For PDF609 $this->m_pdf->pdf->mPDF('utf-8','A4','','','15','15','57','25');610 $this->m_pdf->pdf->SetHTMLHeader($PDFHeaderHTML, 'O');611 $data['main_content'] = '/wrpdf';612 $html = $this->parser->parse('layouts/PdfDataTemplate', $data);613 /*remove*/614 $this->m_pdf->pdf->WriteHTML($html);615 //Store PDF in individual_strategies Folder616 617 if(!empty($section) && $section == 'download'){618 $this->m_pdf->pdf->Output($pdfFileName, "D");619 } else {620 if (!is_dir($this->config->item('wr_pdf_base_path'))) {621 mkdir($this->config->item('wr_pdf_base_path'), 0777, TRUE);622 }623 $pdfFileSavePath = $this->config->item('wr_pdf_base_path') . $pdfFileName;624 $this->m_pdf->pdf->Output($pdfFileSavePath, "F");625 return $pdfFileSavePath;626 }627 }628 /*629 @Author : Ritesh Rana630 @Desc : signoff631 @Input : yp id, weekly_report_id(edit)632 @Output :633 @Date : 20/03/2018634 */635 public function manager_review($yp_id, $weekly_report_id) {636 if (!empty($yp_id)) {637 //get YP information638 $fields = array("care_home,yp_fname,yp_lname,date_of_birth,yp_id");639 $YP_details = YpDetails($yp_id,$fields);640 $login_user_id = $this->session->userdata['LOGGED_IN']['ID'];641 $match = array('yp_id' => $yp_id, 'created_by' => $login_user_id, 'is_delete' => '0', 'weekly_report_id' => $weekly_report_id);642 $check_signoff_data = $this->common_model->get_records(WEEKLY_REPORT_SIGNOFF, array("*"), '', '', $match);643 if (empty($check_signoff_data) > 0) {644 $update_pre_data['care_home_id'] = $YP_details[0]['care_home'];645 $update_pre_data['yp_id'] = $yp_id;646 $update_pre_data['weekly_report_id'] = $weekly_report_id;647 $update_pre_data['created_date'] = datetimeformat();648 $update_pre_data['created_by'] = $this->session->userdata('LOGGED_IN')['ID'];649 if ($this->common_model->insert(WEEKLY_REPORT_SIGNOFF, $update_pre_data)) {650 $u_data['signoff'] = '1';651 $this->common_model->update(WEEKLY_REPORT, $u_data, array('weekly_report_id' => $weekly_report_id, 'yp_id' => $yp_id));652 $msg = $this->lang->line('successfully_wr_review');653 $this->session->set_flashdata('successmsg', $msg);654 } else {655 // error656 $msg = $this->lang->line('error_msg');657 $this->session->set_flashdata('errormsg', $msg);658 }659 } else {660 $msg = $this->lang->line('already_wr_review');661 $this->session->set_flashdata('errormsg', $msg);662 }663 } else {664 $msg = $this->lang->line('error_msg');665 $this->session->set_flashdata('errormsg', $msg);666 }667 redirect('/' . $this->viewname . '/index/' . $yp_id);668 }669/*670 @Author : Rtiesh Rana671 @Desc : update slug672 @Input : 673 @Output :674 @Date : 20/03/2018675 */676 public function update_slug() {677 $postData = $this->input->post();678 $where = array('url_data' => $postData['url_data']);679 $this->common_model->delete(CHECK_EDIT_URL, $where);680 $update_pre_data['datetime'] = date('Y-m-d H:i:s');681 $update_pre_data['url_data'] = $postData['url_data'];682 $this->common_model->insert(CHECK_EDIT_URL, $update_pre_data);683 return TRUE;684 685 }686/*687 @Author : Ritesh Rana688 @Desc : send weekly report to support worker689 @Input : yp id, weekly_report_id(edit)690 @Output :691 @Date : 22/03/2018692 */693 public function send_report($yp_id, $weekly_report_id, $checkSocialWorker = NULL) {694 695 696 $this->formValidation();697 698 if ($this->form_validation->run() == FALSE) {699 $data['crnt_view'] = $this->viewname;700 //get YP information701 $fields = array("care_home,yp_fname,yp_lname,date_of_birth,yp_id");702 $YP_details = YpDetails($yp_id,$fields);703 $data['care_home_id'] = $YP_details[0]['care_home']; 704 $data['ypid'] = $yp_id;705 $data['weekly_report_id'] = $weekly_report_id;706 $data['form_action_path'] = $this->viewname . '/send_report/' . $weekly_report_id . '/' . $yp_id;707 $data['header'] = array('menu_module' => 'YoungPerson');708 709 $table = PARENT_CARER_INFORMATION;710 $match = array("yp_id" => $yp_id,'is_deleted' => 0);711 $fields = array("parent_carer_id,firstname,surname");712 $data['parentRecord'] = $this->common_model->get_records($table, $fields, '', '', $match);713 714 $table = SOCIAL_WORKER_DETAILS;715 $match = "yp_id = " . $yp_id;716 $fields = array("social_worker_id,social_worker_firstname,social_worker_surname");717 $data['socialWorkerRecord'] = $this->common_model->get_records($table, $fields, '', 'left', $match);718 719 $data['validation'] = validation_errors();720 if (!empty($data['validation'])) {721 $data['main_content'] = '/signoff';722 $this->parser->parse('layouts/DefaultTemplate', $data);723 } else {724 $this->load->view('/signoff', $data);725 }726 } else { 727 $this->insertdata();728 }729 }730/*731 @Author : Ritesh Rana732 @Desc : insert data of sent weekly report733 @Input : yp id, weekly_report_id(edit)734 @Output :735 @Date : 22/03/2018736 */737 public function insertdata($social_worker = array(), $yp_id = '', $weekly_report_id = '') {738 $postdata = $this->input->post();739 //pr($postdata);exit;740 $ypid = !empty($yp_id) ? $yp_id : $postdata['ypid'];741 $pp_id = !empty($weekly_report_id) ? $weekly_report_id : $postdata['weekly_report_id'];742 $user_type = $postdata['user_type'];743 if ($user_type == 'parent') {744 $parent_data['firstname'] = strip_tags($postdata['fname']);745 $parent_data['surname'] = strip_tags($postdata['lname']);746 $parent_data['relationship'] = strip_tags($postdata['relationship']);747 $parent_data['address'] = strip_tags($postdata['address']);748 $parent_data['contact_number'] = strip_tags($postdata['contact_number']);749 $parent_data['email_address'] = strip_tags($postdata['email']);750 $parent_data['yp_authorised_communication'] = strip_tags($postdata['yp_authorised_communication']);751 $parent_data['carer_authorised_communication'] = strip_tags($postdata['carer_authorised_communication']);752 $parent_data['yp_authorised_communication'] = strip_tags($postdata['yp_authorised_communication']);753 $parent_data['comments'] = strip_tags($postdata['comments']);754 $parent_data['created_date'] = datetimeformat();755 $parent_data['created_by'] = $this->session->userdata['LOGGED_IN']['ID'];756 $parent_data['yp_id'] = $this->input->post('ypid');757 $parent_data['care_home_id'] = $this->input->post('care_home_id');758 $success = $this->common_model->insert(PARENT_CARER_INFORMATION, $parent_data);759 //Insert log activity760 $activity = array(761 'user_id' => $this->session->userdata['LOGGED_IN']['ID'],762 'yp_id' => !empty($postdata['ypid']) ? $postdata['ypid'] : '',763 'module_name' => WR_PARENT_CARER_DETAILS_YP,764 'module_field_name' => '',765 'type' => 1766 );767 log_activity($activity);768 }769 $table = YP_DETAILS . ' as yp';770 $match = "yp.is_deleted= '0' AND yp.yp_id = '" . $ypid . "'";771 $fields = array("yp.yp_id,yp.status,yp.yp_fname,yp.yp_lname");772 $duplicateEmail = $this->common_model->get_records($table, $fields, '', '', $match);773 //Current Login detail774 $main_user_data = $this->session->userdata('LOGGED_IN');775 if(empty($social_worker)){776 if (!validateFormSecret()) {777 $this->session->set_flashdata('errormsg', lang('error'));778 redirect('Dashboard'); //Redirect On Listing page779 }780 }781 $data['crnt_view'] = $this->viewname;782 if(!empty($social_worker)){783 $fname = $social_worker[0]['social_worker_firstname'];784 $lname = $social_worker[0]['social_worker_surname']; 785 $email = $social_worker[0]['email'];786 } else {787 $fname = $postdata['fname'];788 $lname = $postdata['lname'];789 $email = $postdata['email'];790 }791 $fullname = $fname. " " .$lname;792 $data = array(793 'care_home_id' => $postdata['care_home_id'],794 'yp_id' => ucfirst($ypid),795 'weekly_report_id' => ucfirst($pp_id),796 'fname' => ucfirst($fname),797 'lname' => ucfirst($lname),798 'user_type' => ucfirst($postdata['user_type']),799 'email' => $email,800 'key_data' => md5($email),801 'created_date' => datetimeformat(),802 'modified_date' => datetimeformat(),803 'created_by' => $main_user_data['ID'],804 'updated_by' => $main_user_data['ID'],805 );806 //Insert Record in Database807 if ($this->common_model->insert(WR_REPORT_SENT, $data)) {808 $signoff_id = $this->db->insert_id();809 $savePdfPath = $this->DownloadPDF($pp_id,$ypid); // send mail810 811 $this->sendMailToRelation($data, $savePdfPath, $fullname, $duplicateEmail); // send mail812 //Insert log activity813 $activity = array(814 'user_id' => $this->session->userdata['LOGGED_IN']['ID'],815 'yp_id' => !empty($ypid) ? $ypid : '',816 'module_name' => WR_MODULE,817 'module_field_name' => '',818 'type' => 1819 );820 log_activity($activity);821 $msg = $this->lang->line('wr_report_sent_msg');822 $this->session->set_flashdata('successmsg', $msg);823 } else {824 // error825 $msg = $this->lang->line('error_msg');826 $this->session->set_flashdata('errormsg', $msg);827 }828 redirect('WeeklyReport/index/' . $ypid);829 }830 /*831 @Author : Ritesh Rana832 @Desc : send email to support worker833 @Input : email data834 @Output :835 @Date : 24/03/2018836 */837 private function sendMailToRelation($data = array(), $pdfPath = '', $fullname = '', $yp_data) {838 if (!empty($data) && !empty($pdfPath)) {839 $getEmailTemplateData = $this->common_model->get_records(EMAIL_TEMPLATE_MASTER, array('*'), '', '', ['template_id' => '2']);840 if (!empty($getEmailTemplateData)) {841 $subject = $getEmailTemplateData[0]['subject'];842 $emailBody = $getEmailTemplateData[0]['body'];843 $finalSubject = str_replace('{SITE_NAME}', SITE_NAME, $subject);844 $finalEmailBody = str_replace(array('{USERNAME}','{YP_NAME}'), array($fullname, $yp_data[0]['yp_fname'] . " " . $yp_data[0]['yp_lname']), $emailBody);845 // End body846 $this->common_model->sendEmail($data['email'], $finalSubject, $finalEmailBody, FROM_EMAIL_ID, '', '', '', $pdfPath);847 }848 unlink($pdfPath); 849 }850 return true;851 }852/*853 @Author : Ritesh Rana854 @Desc : form validation rules855 @Input : 856 @Output :857 @Date : 24/03/2018858 */859 public function formValidation($id = null) {860 $this->form_validation->set_rules('fname', 'Firstname', 'trim|required|min_length[2]|max_length[100]|xss_clean');861 $this->form_validation->set_rules('lname', 'Lastname', 'trim|required|min_length[2]|max_length[100]|xss_clean');862 $this->form_validation->set_rules('email', 'Email', 'trim|required|xss_clean');863 }864 /*865 @Author : Ritesh Rana866 @Desc : delete weekly report867 @Input : yp_id, weekly report id868 @Output :869 @Date : 26/03/2018870 */871 public function deletedata($id, $ypid){872 if(is_numeric($id) && is_numeric($ypid))873 {874 $match = array('weekly_report_id'=> $id);875 $wr_data = $this->common_model->get_records(WEEKLY_REPORT,array("*"), '', '', $match);876 if(!empty($wr_data))877 {878 $update_arr = array(879 'is_delete'=> 1880 );881 $where = array('weekly_report_id'=>$id);882 $this->common_model->update(WEEKLY_REPORT, $update_arr,$where);883 //Insert log activity884 $activity = array(885 'user_id' => $this->session->userdata['LOGGED_IN']['ID'],886 'module_name' => WR_MODULE,887 'module_field_name' => '',888 'yp_id' => $ypid,889 'type' => 3890 );891 log_activity($activity);892 redirect('/WeeklyReport/index/'. $ypid);893 }894 else895 {896 $this->session->set_flashdata('msg', "<div class='alert alert-success text-center'>No data to delete.</div>");897 redirect('/WeeklyReport/index/'. $ypid);898 }899 }900 else901 {902 show_404 ();903 }904 }905 /*906 @Author : Ritesh Rana907 @Desc : get social worker detial908 @Input : yp_id, user type909 @Output :910 @Date : 04/04/2018911 */912 public function getStaffData(){913 $user_type = !empty($this->input->post("user_type"))?$this->input->post("user_type"):''; 914 $yp_id = $this->input->post("yp_id");915 $id = $this->input->post('id'); 916 $table = YP_DETAILS . ' as yp';917 $match = "yp.yp_id = " . $yp_id;918 $fields = array("yp.*,swd.social_worker_firstname,swd.social_worker_surname,swd.landline,swd.mobile,swd.email,swd.senior_social_worker_firstname,swd.senior_social_worker_surname,swd.other,pc.parent_carer_id,pc.firstname,pc.surname,pc.relationship,pc.address,pc.contact_number,pc.email_address,pc.yp_authorised_communication,pc.carer_authorised_communication,pc.comments");919 $join_tables = array(SOCIAL_WORKER_DETAILS . ' as swd' => 'swd.yp_id= yp.yp_id', PARENT_CARER_INFORMATION . ' as pc' => 'pc.yp_id= yp.yp_id');920 $data['editRecord'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', $match);921 if($user_type == 'parent_data'){922 $table = PARENT_CARER_INFORMATION . ' as pc';923 $match = array("pc.parent_carer_id" => $id,'pc.is_deleted' => 0);924 $fields = array("pc.*");925 $data['parent_data'] = $this->common_model->get_records($table, $fields, '', '', $match);926 $data['editRecord'][0]['fname'] = $data['editRecord'][0]['firstname'];927 $data['editRecord'][0]['lname'] = $data['editRecord'][0]['surname'];928 $data['editRecord'][0]['email_id'] = $data['editRecord'][0]['email_address'];929 930 } else if($user_type == 'social_data'){931 $table = SOCIAL_WORKER_DETAILS . ' as sw';932 $match = array("sw.social_worker_id" => $id);933 $fields = array("sw.*");934 $data['social_worker_data'] = $this->common_model->get_records($table, $fields, '', '', $match);935 $data['editRecord'][0]['fname'] = $data['editRecord'][0]['social_worker_firstname'];936 $data['editRecord'][0]['lname'] = $data['editRecord'][0]['social_worker_surname'];937 $data['editRecord'][0]['email_id'] = $data['editRecord'][0]['email'];938 }939 $data['user_type'] = $user_type;940 $this->load->view($this->viewname . '/signoff_ajax', $data);941 }942 /*943 @Author : Ritesh Rana944 @Desc : get list of external approver945 @Input : yp_id, wr_id946 @Output :947 @Date : 12/04/2018948 */949 public function reportReviewedBy($wr_id, $yp_id,$care_home_id=0,$past_care_id=0) {950 /*951 Ritesh Rana952 for past care id inserted for archive full functionality953 */954 if ($past_care_id !== 0) {955 $temp = $this->common_model->get_records(PAST_CARE_HOME_INFO, array('move_date'), '', '', array("yp_id" => $yp_id, "past_carehome" => $care_home_id));956 $data_care_home_detail = $this->common_model->get_records(PAST_CARE_HOME_INFO, array("enter_date,move_date"), '', '', array("yp_id" => $yp_id, "move_date <= " => $temp[0]['move_date']));957 $created_date = $movedate = '';958 $count_care = count($data_care_home_detail);959 if ($count_care >= 1) {960 $created_date = $data_care_home_detail[0]['enter_date'];961 $movedate = $data_care_home_detail[$count_care - 1]['move_date'];962 } elseif ($count_care == 0) {963 $created_date = $data_care_home_detail[0]['enter_date'];964 $movedate = $data_care_home_detail[0]['move_date'];965 }966 }967 if (is_numeric($wr_id) && is_numeric($yp_id)) { 968 969 //get YP information970 $fields = array("care_home,yp_fname,yp_lname,date_of_birth,yp_id");971 $data['YP_details'] = YpDetails($yp_id,$fields);972 $searchtext = $perpage = '';973 $searchtext = $this->input->post('searchtext');974 $sortfield = $this->input->post('sortfield');975 $sortby = $this->input->post('sortby');976 $perpage = RECORD_PER_PAGE;977 $allflag = $this->input->post('allflag');978 if (!empty($allflag) && ($allflag == 'all' || $allflag == 'changesorting' || $allflag == 'changesearch')) {979 $this->session->unset_userdata('wr_data');980 }981 $searchsort_session = $this->session->userdata('wr_data');982 //Sorting983 if (!empty($sortfield) && !empty($sortby)) {984 $data['sortfield'] = $sortfield;985 $data['sortby'] = $sortby;986 } else {987 if (!empty($searchsort_session['sortfield'])) {988 $data['sortfield'] = $searchsort_session['sortfield'];989 $data['sortby'] = $searchsort_session['sortby'];990 $sortfield = $searchsort_session['sortfield'];991 $sortby = $searchsort_session['sortby'];992 } else {993 $sortfield = 'wr.created_date';994 $sortby = 'desc';995 $data['sortfield'] = $sortfield;996 $data['sortby'] = $sortby;997 }998 }999 //Search text1000 if (!empty($searchtext)) {1001 $data['searchtext'] = $searchtext;1002 } else {1003 if (empty($allflag) && !empty($searchsort_session['searchtext'])) {1004 $data['searchtext'] = $searchsort_session['searchtext'];1005 $searchtext = $data['searchtext'];1006 } else {1007 $data['searchtext'] = '';1008 }1009 }1010 if (!empty($perpage) && $perpage != 'null') {1011 $data['perpage'] = $perpage;1012 $config['per_page'] = $perpage;1013 } else {1014 if (!empty($searchsort_session['perpage'])) {1015 $data['perpage'] = trim($searchsort_session['perpage']);1016 $config['per_page'] = trim($searchsort_session['perpage']);1017 } else {1018 $config['per_page'] = RECORD_PER_PAGE;1019 $data['perpage'] = RECORD_PER_PAGE;1020 }1021 }1022 //pagination configuration1023 $config['first_link'] = 'First';1024 if($past_care_id == 0){1025 $config['base_url'] = base_url() . $this->viewname . '/reportReviewedBy/' . $yp_id . '/' . $wr_id;1026 if (!empty($allflag) && ($allflag == 'all' || $allflag == 'changesorting' || $allflag == 'changesearch')) {1027 $config['uri_segment'] = 0;1028 $uri_segment = 0;1029 } else {1030 $config['uri_segment'] = 5;1031 $uri_segment = $this->uri->segment(5);1032 }1033 $table = WR_REPORT_SENT . ' AS wr';1034 $fields = array('wr.user_type,wr.created_date,CONCAT(l.firstname," ", l.lastname) as sent_by, CONCAT(wr.fname," ", wr.lname) as review_by,ch.care_home_name');1035 $where = array('wr.weekly_report_id' => $wr_id, 'wr.yp_id' => $yp_id);1036 $join_tables = array(LOGIN . ' as l' => 'l.login_id=wr.created_by',CARE_HOME . ' as ch' => 'ch.care_home_id = wr.care_home_id');1037 1038 if (!empty($searchtext)) {1039 $searchtext = html_entity_decode(trim(addslashes($searchtext)));1040 $match = '';1041 $where_search = '((l.firstname LIKE "%' . $searchtext . '%" OR l.lastname LIKE "%' . $searchtext . '%" OR wr.fname LIKE "%' . $searchtext . '%" OR wr.lname LIKE "%' . $searchtext . '%" OR wr.created_date LIKE "%' . $searchtext . '%") AND l.is_delete = "0" AND wr.weekly_report_id = "'. $wr_id . '" AND wr.yp_id = "' .$yp_id .'")';1042 $data['wr_signoff_data'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', '', $match, $config['per_page'], $uri_segment, $sortfield, $sortby, '', $where_search);1043 $config['total_rows'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', '', $match, '', '', $sortfield, $sortby, '', $where_search, '', '', '1');1044 } else {1045 $data['wr_signoff_data'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', '', '', $config['per_page'], $uri_segment, $sortfield, $sortby, '', $where);1046 $config['total_rows'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', '', '', '', '', $sortfield, $sortby, '', $where, '', '', '1');1047 }1048 }else{1049 $config['base_url'] = base_url() . $this->viewname . '/reportReviewedBy/' . $yp_id . '/' . $wr_id.'/'.$care_home_id.'/'.$past_care_id;1050 if (!empty($allflag) && ($allflag == 'all' || $allflag == 'changesorting' || $allflag == 'changesearch')) {1051 $config['uri_segment'] = 0;1052 $uri_segment = 0;1053 } else {1054 $config['uri_segment'] = 7;1055 $uri_segment = $this->uri->segment(7);1056 }1057 1058 $table = WR_REPORT_SENT . ' AS wr';1059 $fields = array('wr.user_type,wr.created_date,wr.sent_by,CONCAT(l.firstname," ", l.lastname) as sent_by, CONCAT(wr.fname," ", wr.lname) as review_by,ch.care_home_name');1060 $where = array('wr.weekly_report_id' => $wr_id, 'wr.yp_id' => $yp_id);1061 $where_date = "wr.created_date BETWEEN '".$created_date."' AND '".$movedate."'";1062 $join_tables = array(LOGIN . ' as l' => 'l.login_id=wr.created_by',CARE_HOME . ' as ch' => 'ch.care_home_id = wr.care_home_id');1063 1064 if (!empty($searchtext)) {1065 $searchtext = html_entity_decode(trim(addslashes($searchtext)));1066 $match = '';1067 $where_search = '((l.firstname LIKE "%' . $searchtext . '%" OR l.lastname LIKE "%' . $searchtext . '%" OR wr.fname LIKE "%' . $searchtext . '%" OR wr.lname LIKE "%' . $searchtext . '%" OR wr.created_date LIKE "%' . $searchtext . '%") AND l.is_delete = "0" AND wr.weekly_report_id = "'. $wr_id . '" AND wr.yp_id = "' .$yp_id .'")';1068 $data['wr_signoff_data'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', '', $match, $config['per_page'], $uri_segment, $sortfield, $sortby, '', $where_search,'','','','','',$where_date);1069 $config['total_rows'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', '', $match, '', '', $sortfield, $sortby, '', $where_search, '', '', '1','','',$where_date);1070 } else {1071 $data['wr_signoff_data'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', '', '', $config['per_page'], $uri_segment, $sortfield, $sortby, '', $where,'','','','','',$where_date);1072 $config['total_rows'] = $this->common_model->get_records($table, $fields, $join_tables, 'left', '', '', '', '', $sortfield, $sortby, '', $where, '', '', '1','','',$where_date);1073 } 1074 }1075 $this->ajax_pagination->initialize($config);1076 $data['pagination'] = $this->ajax_pagination->create_links();1077 1078 $data['uri_segment'] = $uri_segment;1079 $sortsearchpage_data = array(1080 'sortfield' => $data['sortfield'],1081 'sortby' => $data['sortby'],1082 'searchtext' => $data['searchtext'],1083 'perpage' => trim($data['perpage']),1084 'uri_segment' => $uri_segment,1085 'total_rows' => $config['total_rows']);1086 1087 if (empty($data['YP_details'])) {1088 $msg = $this->lang->line('common_no_record_found');1089 $this->session->set_flashdata('msg', "<div class='alert alert-danger text-center'>$msg</div>");1090 redirect('YoungPerson');1091 }1092 $data['ypid'] = $yp_id;1093 $data['care_home_id'] = $care_home_id;1094 $data['past_care_id'] = $past_care_id;1095 $data['weekly_report_id'] = $wr_id;1096 $data['footerJs'][0] = base_url('uploads/custom/js/wr/wr.js');1097 $data['crnt_view'] = $this->viewname;1098 $data['header'] = array('menu_module' => 'YoungPerson');1099 if ($this->input->post('result_type') == 'ajax') {1100 $this->load->view($this->viewname . '/reviewed_ajaxlist', $data);1101 } else {1102 $data['main_content'] = '/reviewed_by';1103 $this->parser->parse('layouts/DefaultTemplate', $data);1104 }1105 } else {1106 show_404();1107 }1108 }1109 1110}...

Full Screen

Full Screen

TokenMatcherTest.php

Source:TokenMatcherTest.php Github

copy

Full Screen

...210 }211 public function testItMatchesOtherPreservingIndent(): void212 {213 $token = $this->createTokenWithContents(' Arbitrary text');214 self::assertTrue($this->tokenMatcher->match_Other($token));215 self::assertSame(TokenType::Other, $token->match?->tokenType);216 self::assertSame(' Arbitrary text', $token->match?->text);217 self::assertSame(0, $token->match?->indent);218 }219 public function testItMatchesOtherWithIndentRemovedInsideDocstring(): void220 {221 $prevToken = $this->createTokenWithContents(' ```');222 $this->tokenMatcher->match_DocStringSeparator($prevToken);223 $token = $this->createTokenWithContents(' Arbitrary text');224 self::assertTrue($this->tokenMatcher->match_Other($token));225 self::assertSame(TokenType::Other, $token->match?->tokenType);226 self::assertSame('Arbitrary text', $token->match?->text);227 self::assertSame(0, $token->match?->indent);228 }229 public function testItUnescapesAlternativeDocstringSeparatorInsideDocstring(): void230 {231 $prevToken = $this->createTokenWithContents(' ```');232 $this->tokenMatcher->match_DocStringSeparator($prevToken);233 $token = $this->createTokenWithContents(' \\`\\`\\`');234 self::assertTrue($this->tokenMatcher->match_Other($token));235 self::assertSame(TokenType::Other, $token->match?->tokenType);236 self::assertSame('```', $token->match?->text);237 self::assertSame(0, $token->match?->indent);238 }239 public function testItUnescapesRegularDocstringSeparatorInsideDocstring(): void240 {241 $prevToken = $this->createTokenWithContents(' """');242 $this->tokenMatcher->match_DocStringSeparator($prevToken);243 $token = $this->createTokenWithContents(' \\"\\"\\"');244 self::assertTrue($this->tokenMatcher->match_Other($token));245 self::assertSame(TokenType::Other, $token->match?->tokenType);246 self::assertSame('"""', $token->match?->text);247 self::assertSame(0, $token->match?->indent);248 }249 public function testItDoesNotMatchTagsWhenLineDoesNotStartWithAt(): void250 {251 $token = $this->createNonMatchingToken();252 self::assertFalse($this->tokenMatcher->match_TagLine($token));253 self::assertNull($token->match);254 }255 public function testItMatchesTagLine(): void256 {257 $token = $this->createTokenWithContents(' @foo @bar');258 self::assertTrue($this->tokenMatcher->match_TagLine($token));...

Full Screen

Full Screen

TokenMatcher.php

Source:TokenMatcher.php Github

copy

Full Screen

...81 }82 }83 return false;84 }85 public function match_Other(Token $token): bool86 {87 //take the entire line, except removing DocString indents88 $text = $token->line?->getLineText($this->indentToRemove) ?? '';89 $this->setTokenMatched($token, TokenType::Other, $this->unescapeDocString($text), indent: 0);90 return true;91 }92 public function match_Empty(Token $token): bool93 {94 if ($token->line?->isEmpty()) {95 $this->setTokenMatched($token, TokenType::Empty);96 return true;97 }98 return false;99 }...

Full Screen

Full Screen

TokenMatcherInterface.php

Source:TokenMatcherInterface.php Github

copy

Full Screen

...22 public function match_StepLine(Token $token): bool;23 public function match_DocStringSeparator(Token $token): bool;24 public function match_TableRow(Token $token): bool;25 public function match_Language(Token $token): bool;26 public function match_Other(Token $token): bool;27 public function reset(): void;28}...

Full Screen

Full Screen

match_Other

Using AI Code Generation

copy

Full Screen

1require_once 'Parser.php';2$parser = new Parser();3$parser->match_Other('1.php');4require_once 'Parser.php';5$parser = new Parser();6$parser->match_Other('2.php');7require_once 'Parser.php';8$parser = new Parser();9$parser->match_Other('3.php');10require_once 'Parser.php';11$parser = new Parser();12$parser->match_Other('4.php');13require_once 'Parser.php';14$parser = new Parser();15$parser->match_Other('5.php');16require_once 'Parser.php';17$parser = new Parser();18$parser->match_Other('6.php');19require_once 'Parser.php';20$parser = new Parser();21$parser->match_Other('7.php');22require_once 'Parser.php';23$parser = new Parser();24$parser->match_Other('8.php');25require_once 'Parser.php';26$parser = new Parser();27$parser->match_Other('9.php');28require_once 'Parser.php';29$parser = new Parser();30$parser->match_Other('10.php');31require_once 'Parser.php';32$parser = new Parser();33$parser->match_Other('11.php');34require_once 'Parser.php';35$parser = new Parser();36$parser->match_Other('12.php');37require_once 'Parser.php';

Full Screen

Full Screen

match_Other

Using AI Code Generation

copy

Full Screen

1require_once('parser.php');2$parser = new Parser();3$parser->match_Other('1.php');4require_once('parser.php');5$parser = new Parser();6$parser->match_Other('2.php');7require_once('parser.php');8$parser = new Parser();9$parser->match_Other('3.php');10require_once('parser.php');11$parser = new Parser();12$parser->match_Other('4.php');13require_once('parser.php');14$parser = new Parser();15$parser->match_Other('5.php');16require_once('parser.php');17$parser = new Parser();18$parser->match_Other('6.php');19require_once('parser.php');20$parser = new Parser();21$parser->match_Other('7.php');22require_once('parser.php');23$parser = new Parser();24$parser->match_Other('8.php');25require_once('parser.php');26$parser = new Parser();27$parser->match_Other('9.php');28require_once('parser.php');29$parser = new Parser();30$parser->match_Other('10.php');31require_once('parser.php');32$parser = new Parser();33$parser->match_Other('11.php');34require_once('parser.php');35$parser = new Parser();36$parser->match_Other('12.php');37require_once('parser.php');

Full Screen

Full Screen

match_Other

Using AI Code Generation

copy

Full Screen

1$parser = new Parser();2$parser->match_Other('1.php','2.php');3$parser = new Parser();4$parser->match_Other('2.php','1.php');5$parser = new Parser();6$parser->match_Other('3.php','4.php');7$parser = new Parser();8$parser->match_Other('4.php','3.php');9$parser = new Parser();10$parser->match_Other('5.php','6.php');11$parser = new Parser();12$parser->match_Other('6.php','5.php');13$parser = new Parser();14$parser->match_Other('7.php','8.php');15$parser = new Parser();16$parser->match_Other('8.php','7.php');17$parser = new Parser();18$parser->match_Other('9.php','10.php');19$parser = new Parser();20$parser->match_Other('10.php','9.php');21$parser = new Parser();22$parser->match_Other('11.php','12.php');23$parser = new Parser();24$parser->match_Other('12.php','11.php');25$parser = new Parser();26$parser->match_Other('13.php','14.php');

Full Screen

Full Screen

match_Other

Using AI Code Generation

copy

Full Screen

1require_once 'Parser.php';2$parser = new Parser();3$parser->match_Other('1.php');4require_once 'Parser.php';5$parser = new Parser();6$parser->match_Other('2.php');7require_once 'Parser.php';8$parser = new Parser();9$parser->match_Other('3.php');10require_once 'Parser.php';11$parser = new Parser();12$parser->match_Other('4.php');13require_once 'Parser.php';14$parser = new Parser();15$parser->match_Other('5.php');16require_once 'Parser.php';17$parser = new Parser();18$parser->match_Other('6.php');19require_once 'Parser.php';20$parser = new Parser();21$parser->match_Other('7.php');22require_once 'Parser.php';23$parser = new Parser();24$parser->match_Other('8.php');25require_once 'Parser.php';26$parser = new Parser();27$parser->match_Other('9.php');28require_once 'Parser.php';29$parser = new Parser();30$parser->match_Other('10.php');31require_once 'Parser.php';32$parser = new Parser();33$parser->match_Other('11.php');

Full Screen

Full Screen

match_Other

Using AI Code Generation

copy

Full Screen

1require_once 'Parser.php';2$parser = new Parser();3$parser->match_Other('1.php');4require_once 'Parser.php';5$parser = new Parser();6$parser->match_Other('2.php');7require_once 'Parser.php';8$parser = new Parser();9$parser->match_Other('3.php');10require_once 'Parser.php';11$parser = new Parser();12$parser->match_Other('4.php');13require_once 'Parser.php';14$parser = new Parser();15$parser->match_Other('5.php');16require_once 'Parser.php';17$parser = new Parser();18$parser->match_Other('6.php');19require_once 'Parser.php';20$parser = new Parser();21$parser->match_Other('7.php');22require_once 'Parser.php';23$parser = new Parser();24$parser->match_Other('8.php');25require_once 'Parser.php';26$parser = new Parser();27$parser->match_Other('9.php');28require_once 'Parser.php';29$parser = new Parser();30$parser->match_Other('10.php');31require_once 'Parser.php';32$parser = new Parser();33$parser->match_Other('11.php');

Full Screen

Full Screen

match_Other

Using AI Code Generation

copy

Full Screen

1require_once("Parser.php");2$parser = new Parser();3$parser->match_Other("1.php");4require_once("Parser.php");5$parser = new Parser();6$parser->match_Other("2.php");7require_once("Parser.php");8$parser = new Parser();9$parser->match_Other("3.php");10require_once("Parser.php");11$parser = new Parser();12$parser->match_Other("4.php");13require_once("Parser.php");14$parser = new Parser();15$parser->match_Other("5.php");16require_once("Parser.php");17$parser = new Parser();18$parser->match_Other("6.php");19require_once("Parser.php");20$parser = new Parser();21$parser->match_Other("7.php");22require_once("Parser.php");23$parser = new Parser();24$parser->match_Other("8.php");25require_once("Parser.php");26$parser = new Parser();27$parser->match_Other("9.php");28require_once("Parser.php");29$parser = new Parser();30$parser->match_Other("10.php");31require_once("Parser.php");32$parser = new Parser();33$parser->match_Other("11.php");34require_once("

Full Screen

Full Screen

match_Other

Using AI Code Generation

copy

Full Screen

1require_once 'Parser.php';2$obj = new Parser();3$obj->match_Other();4require_once 'Parser.php';5$obj = new Parser();6$obj->match_Other();7require_once 'Parser.php';8$obj = new Parser();9$obj->match_Other();10require_once 'Parser.php';11$obj = new Parser();12$obj->match_Other();13require_once 'Parser.php';14$obj = new Parser();15$obj->match_Other();16require_once 'Parser.php';17$obj = new Parser();18$obj->match_Other();19require_once 'Parser.php';20$obj = new Parser();21$obj->match_Other();22require_once 'Parser.php';23$obj = new Parser();24$obj->match_Other();25require_once 'Parser.php';26$obj = new Parser();

Full Screen

Full Screen

Automation Testing Tutorials

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.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful