// Path: src/main/java/ch/digitalfondue/jfiveparse/TreeConstructor.java
// static final byte CHARACTER = 0;
// 
// Path: src/main/java/ch/digitalfondue/jfiveparse/TreeConstructor.java
// static final byte COMMENT = 1;
// 
// Path: src/main/java/ch/digitalfondue/jfiveparse/TreeConstructor.java
// static final byte DOCTYPE = 2;
// 
// Path: src/main/java/ch/digitalfondue/jfiveparse/TreeConstructor.java
// static final byte END_TAG = 4;
// 
// Path: src/main/java/ch/digitalfondue/jfiveparse/TreeConstructor.java
// static final byte EOF = 3;
// 
// Path: src/main/java/ch/digitalfondue/jfiveparse/TreeConstructor.java
// static final byte START_TAG = 5;
// 
// Path: src/main/java/ch/digitalfondue/jfiveparse/TreeConstructor.java
// static void genericRCDataParsing(TreeConstructor treeConstructor) {
//     treeConstructor.insertHtmlElementToken();
//     treeConstructor.tokenizer.setState(TokenizerState.RCDATA_STATE);
//     treeConstructor.originalInsertionMode = treeConstructor.insertionMode;
//     treeConstructor.insertionMode = TreeConstructionInsertionMode.TEXT;
// }
// 
// Path: src/main/java/ch/digitalfondue/jfiveparse/TreeConstructor.java
// static void genericRawTextElementParsing(TreeConstructor treeConstructor) {
//     treeConstructor.insertHtmlElementToken();
//     treeConstructor.tokenizer.setState(TokenizerState.RAWTEXT_STATE);
//     treeConstructor.originalInsertionMode = treeConstructor.insertionMode;
//     treeConstructor.insertionMode = TreeConstructionInsertionMode.TEXT;
// }


import static ch.digitalfondue.jfiveparse.TreeConstructor.CHARACTER;
import static ch.digitalfondue.jfiveparse.TreeConstructor.COMMENT;
import static ch.digitalfondue.jfiveparse.TreeConstructor.DOCTYPE;
import static ch.digitalfondue.jfiveparse.TreeConstructor.END_TAG;
import static ch.digitalfondue.jfiveparse.TreeConstructor.EOF;
import static ch.digitalfondue.jfiveparse.TreeConstructor.START_TAG;
import static ch.digitalfondue.jfiveparse.TreeConstructor.genericRCDataParsing;
import static ch.digitalfondue.jfiveparse.TreeConstructor.genericRawTextElementParsing;
            treeConstructor.stopParsing();
        } else {
            treeConstructor.emitParseError();
            // ignore
        }
    }

    static void afterAfterBody(byte tokenType, String tagName, TreeConstructor treeConstructor) {
        if (tokenType == COMMENT) {
            treeConstructor.insertCommentToDocument();
        } else if (tokenType == DOCTYPE || //
                (tokenType == CHARACTER && Common.isTabLfFfCrOrSpace(treeConstructor.getChr())) || //
                Common.isStartTagNamed(tokenType, "html", tagName)) {
            TreeConstructorInBodyForeignContentText.inBody(tokenType, tagName, treeConstructor);
        } else if (tokenType == EOF) {
            treeConstructor.stopParsing();
        } else {
            treeConstructor.emitParseError();
            treeConstructor.setInsertionMode(TreeConstructionInsertionMode.IN_BODY);
            treeConstructor.dispatch();
        }
    }

    static void afterAfterFrameset(byte tokenType, String tagName, TreeConstructor treeConstructor) {
        if (tokenType == COMMENT) {
            treeConstructor.insertCommentToDocument();
        } else if ((tokenType == DOCTYPE) || //
                (tokenType == CHARACTER && Common.isTabLfFfCrOrSpace(treeConstructor.getChr())) || //
                (Common.isStartTagNamed(tokenType, "html", tagName))) {
            TreeConstructorInBodyForeignContentText.inBody(tokenType, tagName, treeConstructor);
// Path: src/main/java/ch/digitalfondue/jfiveparse/TreeConstructor.java
// static final byte CHARACTER = 0;
// 
// Path: src/main/java/ch/digitalfondue/jfiveparse/TreeConstructor.java
// static final byte COMMENT = 1;
// 
// Path: src/main/java/ch/digitalfondue/jfiveparse/TreeConstructor.java
// static final byte DOCTYPE = 2;
// 
// Path: src/main/java/ch/digitalfondue/jfiveparse/TreeConstructor.java
// static final byte END_TAG = 4;
// 
// Path: src/main/java/ch/digitalfondue/jfiveparse/TreeConstructor.java
// static final byte EOF = 3;
// 
// Path: src/main/java/ch/digitalfondue/jfiveparse/TreeConstructor.java
// static final byte START_TAG = 5;
// 
// Path: src/main/java/ch/digitalfondue/jfiveparse/TreeConstructor.java
// static void genericRCDataParsing(TreeConstructor treeConstructor) {
//     treeConstructor.insertHtmlElementToken();
//     treeConstructor.tokenizer.setState(TokenizerState.RCDATA_STATE);
//     treeConstructor.originalInsertionMode = treeConstructor.insertionMode;
//     treeConstructor.insertionMode = TreeConstructionInsertionMode.TEXT;
// }
// 
// Path: src/main/java/ch/digitalfondue/jfiveparse/TreeConstructor.java
// static void genericRawTextElementParsing(TreeConstructor treeConstructor) {
//     treeConstructor.insertHtmlElementToken();
//     treeConstructor.tokenizer.setState(TokenizerState.RAWTEXT_STATE);
//     treeConstructor.originalInsertionMode = treeConstructor.insertionMode;
//     treeConstructor.insertionMode = TreeConstructionInsertionMode.TEXT;
// }


// Path: src/main/java/ch/digitalfondue/jfiveparse/TreeConstructorAftersBeforeInitialInHead.java
import static ch.digitalfondue.jfiveparse.TreeConstructor.CHARACTER;
import static ch.digitalfondue.jfiveparse.TreeConstructor.COMMENT;
import static ch.digitalfondue.jfiveparse.TreeConstructor.DOCTYPE;
import static ch.digitalfondue.jfiveparse.TreeConstructor.END_TAG;
import static ch.digitalfondue.jfiveparse.TreeConstructor.EOF;
import static ch.digitalfondue.jfiveparse.TreeConstructor.START_TAG;
import static ch.digitalfondue.jfiveparse.TreeConstructor.genericRCDataParsing;
import static ch.digitalfondue.jfiveparse.TreeConstructor.genericRawTextElementParsing;

            treeConstructor.stopParsing();
        } else {
            treeConstructor.emitParseError();
            // ignore
        }
    }

    static void afterAfterBody(byte tokenType, String tagName, TreeConstructor treeConstructor) {
        if (tokenType == COMMENT) {
            treeConstructor.insertCommentToDocument();
        } else if (tokenType == DOCTYPE || //
                (tokenType == CHARACTER && Common.isTabLfFfCrOrSpace(treeConstructor.getChr())) || //
                Common.isStartTagNamed(tokenType, "html", tagName)) {
            TreeConstructorInBodyForeignContentText.inBody(tokenType, tagName, treeConstructor);
        } else if (tokenType == EOF) {
            treeConstructor.stopParsing();
        } else {
            treeConstructor.emitParseError();
            treeConstructor.setInsertionMode(TreeConstructionInsertionMode.IN_BODY);
            treeConstructor.dispatch();
        }
    }

    static void afterAfterFrameset(byte tokenType, String tagName, TreeConstructor treeConstructor) {
        if (tokenType == COMMENT) {
            treeConstructor.insertCommentToDocument();
        } else if ((tokenType == DOCTYPE) || //
                (tokenType == CHARACTER && Common.isTabLfFfCrOrSpace(treeConstructor.getChr())) || //
                (Common.isStartTagNamed(tokenType, "html", tagName))) {
            TreeConstructorInBodyForeignContentText.inBody(tokenType, tagName, treeConstructor);
        } else if (tokenType == EOF) {