/*
 * SDK Pullenti Lingvo, version 4.33, fabruary 2026. Copyright (c) 2013-2026, Pullenti. All rights reserved. 
 * Non-Commercial Freeware and Commercial Software.
 * This class is generated using the converter Unisharping (www.unisharping.ru) from Pullenti C#.NET project. 
 * The latest version of the code is available on the site www.pullenti.ru
 */

const Utils = require("./../../../unisharp/Utils");
const StringBuilder = require("./../../../unisharp/StringBuilder");

const MorphCase = require("./../../../morph/MorphCase");
const DerivateService = require("./../../../semantic/utils/DerivateService");
const NumberSpellingType = require("./../../NumberSpellingType");
const DenominationReferent = require("./../../denomination/DenominationReferent");
const TerminParseAttr = require("./../../core/TerminParseAttr");
const GetTextAttr = require("./../../core/GetTextAttr");
const UriReferent = require("./../../uri/UriReferent");
const MorphBaseInfo = require("./../../../morph/MorphBaseInfo");
const VerbPhraseHelper = require("./../../core/VerbPhraseHelper");
const NumberParseAttr = require("./../../core/NumberParseAttr");
const NumberWithUnitParseAttr = require("./../../measure/internal/NumberWithUnitParseAttr");
const DenominationAnalyzer = require("./../../denomination/DenominationAnalyzer");
const MeasureReferent = require("./../../measure/MeasureReferent");
const BracketParseAttr = require("./../../core/BracketParseAttr");
const NumbersWithUnitToken = require("./../../measure/internal/NumbersWithUnitToken");
const GoodAttrType = require("./../GoodAttrType");
const MorphNumber = require("./../../../morph/MorphNumber");
const MorphGender = require("./../../../morph/MorphGender");
const Referent = require("./../../Referent");
const ReferentToken = require("./../../ReferentToken");
const NounPhraseParseAttr = require("./../../core/NounPhraseParseAttr");
const BracketHelper = require("./../../core/BracketHelper");
const NumberToken = require("./../../NumberToken");
const MetaToken = require("./../../MetaToken");
const NounPhraseHelper = require("./../../core/NounPhraseHelper");
const MorphClass = require("./../../../morph/MorphClass");
const TextToken = require("./../../TextToken");
const MiscHelper = require("./../../core/MiscHelper");
const Termin = require("./../../core/Termin");
const TerminCollection = require("./../../core/TerminCollection");
const NumberHelper = require("./../../core/NumberHelper");
const GoodAttributeReferent = require("./../GoodAttributeReferent");
const MeasureToken = require("./../../measure/internal/MeasureToken");
const LanguageHelper = require("./../../../morph/LanguageHelper");
const RusLatAccord = require("./../../core/internal/RusLatAccord");

class GoodAttrToken extends MetaToken {
    
    constructor(b, e) {
        super(b, e, null);
        this.typ = GoodAttrType.UNDEFINED;
        this.value = null;
        this.altValue = null;
        this.name = null;
        this.ref = null;
        this.refTok = null;
    }
    
    toString() {
        return (String(this.typ) + ": " + this.value + (this.altValue === null ? "" : (" / " + this.altValue)) + " " + (this.ref === null ? "" : this.ref.toString()));
    }
    
    _createAttr() {
        if (this.ref instanceof GoodAttributeReferent) 
            return Utils.as(this.ref, GoodAttributeReferent);
        let ar = new GoodAttributeReferent();
        if (this.typ !== GoodAttrType.UNDEFINED) 
            ar.typ = this.typ;
        if (this.name !== null) 
            ar.addSlot(GoodAttributeReferent.ATTR_NAME, this.name, false, 0);
        if (this.ref !== null) 
            ar.addSlot(GoodAttributeReferent.ATTR_REF, this.ref, true, 0);
        else if (this.refTok !== null) {
            ar.addSlot(GoodAttributeReferent.ATTR_REF, this.refTok.referent, true, 0);
            ar.addExtReferent(this.refTok);
        }
        if (this.typ === GoodAttrType.NUMERIC) {
        }
        let vals = null;{
                vals = new Array();
                if (this.value !== null) 
                    vals.push(this.value);
                if (this.altValue !== null) 
                    vals.push(this.altValue);
            }
        for (const v of vals) {
            let v1 = v;
            if (ar.typ === GoodAttrType.PROPER) {
                v1 = v.toUpperCase();
                if (v1.indexOf('\'') >= 0) 
                    v1 = Utils.replaceString(v1, "'", "");
            }
            if (Utils.isNullOrEmpty(v1)) 
                continue;
            ar.addSlot((v === this.value ? GoodAttributeReferent.ATTR_VALUE : GoodAttributeReferent.ATTR_ALTVALUE), v1, false, 0);
            if ((v1.length < 10) && LanguageHelper.isLatinChar(v1[0]) && ar.typ === GoodAttrType.PROPER) {
                let rus = RusLatAccord.getVariants(v1);
                if (rus === null || rus.length === 0) 
                    continue;
                for (const vv of rus) {
                    if (ar.findSlot(null, vv, true) === null) {
                        ar.addSlot(GoodAttributeReferent.ATTR_ALTVALUE, vv, false, 0);
                        if (ar.slots.length > 20) 
                            break;
                    }
                }
            }
        }
        if (ar.findSlot(GoodAttributeReferent.ATTR_VALUE, null, true) === null && ar.findSlot(GoodAttributeReferent.ATTR_REF, null, true) === null) 
            return null;
        return ar;
    }
    
    static tryParseList(t) {
        if (t === null) 
            return null;
        let li = GoodAttrToken._tryParseList(t);
        if (li === null || li.length === 0) 
            return null;
        let res = new Array();
        for (const a of li) {
            let attr = a._createAttr();
            if (attr !== null) 
                res.push(new ReferentToken(attr, a.beginToken, a.endToken));
        }
        return res;
    }
    
    static _tryParseList(t) {
        let res = new Array();
        let key = null;
        let nextSeq = false;
        for (let tt = t; tt !== null; tt = tt.next) {
            if (tt !== t && tt.isNewlineBefore) 
                break;
            if (tt !== t && MiscHelper.canBeStartOfSentence(tt) && !tt.isChar('(')) {
                nextSeq = true;
                if (key === null) 
                    break;
                let re2 = GoodAttrToken.tryParse(tt, key, t !== tt, false);
                if (re2 !== null && ((re2.typ === GoodAttrType.NUMERIC || re2.typ === GoodAttrType.MODEL))) {
                }
                else if (re2 !== null && ((re2.refTok !== null || re2.ref !== null))) 
                    nextSeq = false;
                else if ((tt.getMorphClassInDictionary().isVerb && re2 !== null && re2.typ === GoodAttrType.CHARACTER) && GoodAttrToken._isSpecVerb(tt)) {
                }
                else {
                    let npt = NounPhraseHelper.tryParse(tt, NounPhraseParseAttr.NO, 0, null);
                    if (npt === null) 
                        break;
                    let noun = npt.noun.getNormalCaseText(null, MorphNumber.SINGULAR, MorphGender.UNDEFINED, false);
                    if (key.value === null) {
                        if (key.ref === null) 
                            break;
                        if (key.ref.toString().toUpperCase().includes(noun)) {
                        }
                        else 
                            break;
                    }
                    else if (noun.includes(key.value) || key.value.includes(noun)) {
                    }
                    else 
                        break;
                }
            }
            if ((tt instanceof TextToken) && nextSeq) {
                let dc = tt.getMorphClassInDictionary();
                if (dc.equals(MorphClass.VERB)) {
                    if (!GoodAttrToken._isSpecVerb(tt)) 
                        break;
                }
            }
            if (tt.isValue("ДОЛЖЕН", null) || tt.isValue("ДОЛЖНА", null) || tt.isValue("ДОЛЖНО", null)) {
                if (tt.next !== null && tt.next.getMorphClassInDictionary().isVerb) 
                    tt = tt.next;
                continue;
            }
            let re = GoodAttrToken.tryParse(tt, key, tt !== t, false);
            if (re !== null) {
                if (key === null) {
                    if (re.typ === GoodAttrType.KEYWORD) 
                        key = re;
                    else if (re.typ === GoodAttrType.NUMERIC || re.typ === GoodAttrType.MODEL) 
                        return null;
                }
                res.push(re);
                tt = re.endToken;
                continue;
            }
            if ((tt instanceof TextToken) && !tt.chars.isLetter) 
                continue;
            if (tt.morph._class.isPreposition || tt.morph._class.isConjunction) 
                continue;
            if (tt instanceof NumberToken) 
                res.push(GoodAttrToken._new1934(tt, tt, tt.getSourceText()));
        }
        if (res.length > 0 && res[res.length - 1].typ === GoodAttrType.CHARACTER) {
            if (res[res.length - 1].endToken === res[res.length - 1].beginToken && res[res.length - 1].endToken.getMorphClassInDictionary().isAdverb) 
                res.splice(res.length - 1, 1);
        }
        return res;
    }
    
    static _isSpecVerb(t) {
        if (t === null) 
            return false;
        if ((t.isValue("ПРИМЕНЯТЬ", null) || t.isValue("ИСПОЛЬЗОВАТЬ", null) || t.isValue("ИЗГОТАВЛИВАТЬ", null)) || t.isValue("ПРИМЕНЯТЬ", null) || t.isValue("ИЗГОТОВИТЬ", null)) 
            return true;
        return false;
    }
    
    static tryParse(t, key, canBeMeasure, isChars = false) {
        let res = GoodAttrToken._tryParse_(t, key, canBeMeasure, isChars);
        if (res === null || res.value === null) 
            return res;
        if ((res !== null && res.typ === GoodAttrType.CHARACTER && ((res.endToken === res.beginToken || (res.value.indexOf(' ') < 0)))) && res.altValue === null) {
            if (res.value === "ДЛЯ") 
                return GoodAttrToken.tryParse(t.next, key, false, false);
            if (res.value !== null) {
                if (Utils.startsWithString(res.value, "ДВУ", true) && !Utils.startsWithString(res.value, "ДВУХ", true)) 
                    res.value = "ДВУХ" + res.value.substring(3);
            }
        }
        if ((res !== null && res.typ === GoodAttrType.CHARACTER && res.beginToken.morph._class.isPreposition) && res.endToken !== res.beginToken && res.altValue === null) {
            let npt = NounPhraseHelper.tryParse(res.beginToken.next, NounPhraseParseAttr.NO, 0, null);
            if (npt !== null && npt.endToken === res.endToken) 
                res.altValue = npt.getNormalCaseText(null, MorphNumber.SINGULAR, MorphGender.UNDEFINED, false);
        }
        return res;
    }
    
    static _tryParse_(t, key, canBeMeasure, isChars) {
        if (t === null) 
            return null;
        if (t.isValue("ПРЕДНАЗНАЧЕН", null)) {
        }
        let res = null;
        let r = t.getReferent();
        if (r !== null) {
            if (r.typeName === "ORGANIZATION" || r.typeName === "GEO") 
                return GoodAttrToken._new1935(t, t, GoodAttrType.REFERENT, r);
        }
        if (canBeMeasure) {
            if ((((res = GoodAttrToken._tryParseNum(t)))) !== null) 
                return res;
        }
        if (isChars) {
            if ((((res = GoodAttrToken._tryParseChars(t)))) !== null) 
                return res;
        }
        let ms = MeasureToken.tryParse(t, null, true, false, false, false);
        if (ms !== null && ms.nums !== null) {
            let nres = GoodAttrToken._new1936(t, ms.endToken, GoodAttrType.NUMERIC);
            nres.name = ms.name;
            nres.value = ms.getNormValues();
            return nres;
        }
        if (t.kit.ontology !== null) {
            let li = t.kit.ontology.attachToken(GoodAttributeReferent.OBJ_TYPENAME, t);
            if (li !== null && li[0].item !== null && (li[0].item.referent instanceof GoodAttributeReferent)) {
                res = new GoodAttrToken(li[0].beginToken, li[0].endToken);
                res.typ = li[0].item.referent.typ;
                res.ref = li[0].item.referent.clone();
                return res;
            }
        }
        let tok = null;
        if ((((tok = GoodAttrToken.m_StdAbbrs.tryParse(t, TerminParseAttr.NO)))) !== null) {
            let ty = GoodAttrType.of(tok.termin.tag);
            if (ty === GoodAttrType.UNDEFINED && tok.termin.tag2 !== null) {
                let tt2 = tok.endToken.next;
                if (tt2 !== null && ((tt2.isChar(':') || tt2.isHiphen))) 
                    tt2 = tt2.next;
                res = GoodAttrToken._tryParse_(tt2, key, false, isChars);
                if (res !== null && ((res.typ === GoodAttrType.PROPER || res.typ === GoodAttrType.MODEL))) {
                    res.beginToken = t;
                    res.name = tok.termin.canonicText;
                    return res;
                }
                let tok2 = GoodAttrToken.m_StdAbbrs.tryParse(tt2, TerminParseAttr.NO);
                if (tok2 !== null && (Utils.asString(tok2.termin.tag2)) === "NO") {
                    res = GoodAttrToken._new1936(t, tok2.endToken, GoodAttrType.UNDEFINED);
                    return res;
                }
                res = GoodAttrToken._tryParseModel(tt2);
                if (res !== null) {
                    res.beginToken = t;
                    res.name = tok.termin.canonicText;
                    return res;
                }
            }
            if (ty !== GoodAttrType.REFERENT) {
                res = GoodAttrToken._new1938(t, tok.endToken, ty, tok.termin.canonicText, tok.morph);
                if (res.endToken.next !== null && res.endToken.next.isChar('.')) 
                    res.endToken = res.endToken.next;
                return res;
            }
            if (ty === GoodAttrType.REFERENT) {
                let tt = tok.endToken.next;
                for (; tt !== null; tt = tt.next) {
                    if (tt.isNewlineBefore) 
                        break;
                    if (tt.isHiphen || tt.isCharOf(":")) 
                        continue;
                    if (tt.getMorphClassInDictionary().isAdverb) 
                        continue;
                    let tok2 = GoodAttrToken.m_StdAbbrs.tryParse(tt, TerminParseAttr.NO);
                    if (tok2 !== null) {
                        let ty2 = GoodAttrType.of(tok2.termin.tag);
                        if (ty2 === GoodAttrType.REFERENT || ty2 === GoodAttrType.UNDEFINED) {
                            tt = tok2.endToken;
                            continue;
                        }
                    }
                    break;
                }
                if (tt === null) 
                    return null;
                if (tt.getReferent() !== null) 
                    return GoodAttrToken._new1939(t, tt, tt.getReferent(), GoodAttrType.REFERENT);
                if ((tt instanceof TextToken) && !tt.chars.isAllLower && tt.chars.isLetter) {
                    let rt = tt.kit.processReferent("ORGANIZATION", tt, null);
                    if (rt !== null) 
                        return GoodAttrToken._new1940(t, rt.endToken, rt, GoodAttrType.REFERENT);
                }
                if (BracketHelper.canBeStartOfSequence(tt, false, false)) {
                    let rt = tt.kit.processReferent("ORGANIZATION", tt.next, null);
                    if (rt !== null) {
                        let t1 = rt.endToken;
                        if (BracketHelper.canBeEndOfSequence(t1.next, false, null, false)) 
                            t1 = t1.next;
                        return GoodAttrToken._new1940(t, t1, rt, GoodAttrType.REFERENT);
                    }
                }
            }
        }
        if (t.isValue("КАТАЛОЖНЫЙ", null)) {
            let tt = MiscHelper.checkNumberPrefix(t.next);
            if (tt !== null) {
                if (tt.isCharOf(":") || tt.isHiphen) 
                    tt = tt.next;
                res = GoodAttrToken._tryParseModel(tt);
                if (res !== null) {
                    res.beginToken = t;
                    res.name = "КАТАЛОЖНЫЙ НОМЕР";
                    return res;
                }
            }
        }
        if (t.isValue("ФАСОВКА", null) || t.isValue("УПАКОВКА", null)) {
            if (!(t.previous instanceof NumberToken)) {
                let tt = t.next;
                if (tt !== null) {
                    if (tt.isCharOf(":") || tt.isHiphen) 
                        tt = tt.next;
                }
                if (tt === null) 
                    return null;
                res = GoodAttrToken._new1942(t, tt, GoodAttrType.NUMERIC, "ФАСОВКА");
                let et = null;
                for (; tt !== null; tt = tt.next) {
                    if (tt.isComma) 
                        break;
                    if (MiscHelper.canBeStartOfSentence(tt)) 
                        break;
                    if ((tt instanceof TextToken) && tt.chars.isLetter && !tt.chars.isAllLower) 
                        break;
                    et = tt;
                }
                if (et !== null) {
                    res.value = MiscHelper.getTextValue(res.endToken, et, GetTextAttr.KEEPREGISTER);
                    res.endToken = et;
                }
                return res;
            }
        }
        if ((t instanceof ReferentToken) && (((t.getReferent() instanceof UriReferent) || t.getReferent().typeName === "DECREE"))) {
            res = GoodAttrToken._new1942(t, t, GoodAttrType.MODEL, "СПЕЦИФИКАЦИЯ");
            res.value = t.getReferent().toString();
            return res;
        }
        if (key === null && !isChars) {
            let isAllUpper = true;
            for (let tt = t; tt !== null; tt = tt.next) {
                if (tt !== t && tt.isNewlineBefore) 
                    break;
                if (tt.chars.isCyrillicLetter && !tt.chars.isAllUpper) {
                    isAllUpper = false;
                    break;
                }
            }
            if ((((!t.chars.isAllUpper || isAllUpper)) && ((t.morph._class.isNoun || t.morph._class.isUndefined)) && t.chars.isCyrillicLetter) && (t instanceof TextToken)) {
                if (t.isValue("СООТВЕТСТВИЕ", null)) {
                    let tt1 = t.next;
                    if (tt1 !== null && ((tt1.isChar(':') || tt1.isHiphen))) 
                        tt1 = tt1.next;
                    res = GoodAttrToken._tryParse_(tt1, key, false, isChars);
                    if (res !== null) 
                        res.beginToken = t;
                    return res;
                }
                let ok = true;
                if (t.morph._class.isAdjective || t.morph._class.isVerb) {
                    let npt1 = NounPhraseHelper.tryParse(t, NounPhraseParseAttr.PARSEVERBS, 0, null);
                    if (npt1 !== null && npt1.endToken !== t && npt1.adjectives.length > 0) 
                        ok = false;
                }
                if (ok) {
                    res = GoodAttrToken._new1944(t, t, GoodAttrType.KEYWORD, t.morph);
                    res.value = t.getNormalCaseText(MorphClass.NOUN, MorphNumber.SINGULAR, MorphGender.UNDEFINED, false);
                    if ((t.next !== null && t.next.isHiphen && (t.next.next instanceof TextToken)) && ((t.next.next.chars.isAllLower || t.next.next.chars.equals(t.chars)))) {
                        if (!t.isWhitespaceAfter && !t.next.isWhitespaceAfter) {
                            res.endToken = (t = t.next.next);
                            res.value = (res.value + "-" + t.term);
                        }
                    }
                    return res;
                }
            }
        }
        if ((t.isWhitespaceBefore && (t instanceof TextToken) && t.chars.isLetter) && (t.lengthChar < 5) && !isChars) {
            let rt = GoodAttrToken.m_DenomAn.tryAttach(t, false);
            if ((rt === null && t.whitespacesAfterCount === 1 && (t.next instanceof NumberToken)) && (t.lengthChar < 3) && GoodAttrToken._tryParseNum(t.next) === null) 
                rt = GoodAttrToken.m_DenomAn.tryAttach(t, true);
            if (rt !== null) {
                res = GoodAttrToken._new1936(t, rt.endToken, GoodAttrType.MODEL);
                let dr = Utils.as(rt.referent, DenominationReferent);
                for (const s of dr.slots) {
                    if (s.typeName === DenominationReferent.ATTR_VALUE) {
                        if (res.value === null) 
                            res.value = Utils.asString(s.value);
                        else 
                            res.altValue = Utils.asString(s.value);
                    }
                }
                return res;
            }
            if (!t.isWhitespaceAfter && (t.next instanceof NumberToken) && GoodAttrToken._tryParseNum(t.next) === null) {
                res = GoodAttrToken._tryParseModel(t);
                return res;
            }
        }
        if (t.chars.isLatinLetter && t.isWhitespaceBefore) {
            res = GoodAttrToken._new1936(t, t, GoodAttrType.PROPER);
            for (let ttt = t.next; ttt !== null; ttt = ttt.next) {
                if (ttt.chars.isLatinLetter && ttt.chars.equals(t.chars)) 
                    res.endToken = ttt;
                else if (((ttt instanceof TextToken) && !ttt.isLetters && ttt.next !== null) && ttt.next.chars.isLatinLetter) {
                }
                else 
                    break;
            }
            if (res.endToken.isWhitespaceAfter) {
                res.value = MiscHelper.getTextValueOfMetaToken(res, GetTextAttr.NO);
                if (res.value.indexOf(' ') > 0) 
                    res.altValue = Utils.replaceString(res.value, " ", "");
                if (res.lengthChar < 2) 
                    return null;
                return res;
            }
        }
        let pref = null;
        let t0 = t;
        if (t.morph._class.isPreposition && t.next !== null && t.next.chars.isLetter) {
            pref = t.getNormalCaseText(MorphClass.PREPOSITION, MorphNumber.UNDEFINED, MorphGender.UNDEFINED, false);
            t = t.next;
            if ((t.isCommaAnd && (t.next instanceof TextToken) && t.next.morph._class.isPreposition) && t.next.next !== null) {
                pref = (pref + " И " + t.next.getNormalCaseText(MorphClass.PREPOSITION, MorphNumber.UNDEFINED, MorphGender.UNDEFINED, false));
                t = t.next.next;
            }
        }
        else if ((((((t.isValue("Д", null) || t.isValue("Б", null) || t.isValue("Н", null)) || t.isValue("H", null))) && t.next !== null && t.next.isCharOf("\\/")) && !t.isWhitespaceAfter && !t.next.isWhitespaceAfter) && (t.next.next instanceof TextToken)) {
            pref = (t.isValue("Д", null) ? "ДЛЯ" : (t.isValue("Б", null) ? "БЕЗ" : "НЕ"));
            t = t.next.next;
            if (pref === "НЕ") {
                let re = GoodAttrToken._tryParse_(t, key, false, isChars);
                if (re !== null && re.typ === GoodAttrType.CHARACTER && re.value !== null) {
                    re.beginToken = t0;
                    re.value = "НЕ" + re.value;
                    if (re.altValue !== null) 
                        re.altValue = "НЕ" + re.altValue;
                    return re;
                }
            }
        }
        if (pref !== null) {
            let npt = NounPhraseHelper.tryParse(t, NounPhraseParseAttr.NO, 0, null);
            if (npt === null && t.getMorphClassInDictionary().isAdverb) 
                npt = NounPhraseHelper.tryParse(t.next, NounPhraseParseAttr.NO, 0, null);
            if (npt !== null && ((npt.chars.isAllLower || npt.chars.isAllUpper)) && npt.chars.isCyrillicLetter) {
                let re = GoodAttrToken._new1936(t0, npt.endToken, GoodAttrType.CHARACTER);
                let cas = new MorphCase();
                for (let tt = npt.endToken.next; tt !== null; tt = tt.next) {
                    if (tt.isNewlineBefore || tt.isChar(';')) 
                        break;
                    if (tt.isCommaAnd && tt.next !== null) 
                        tt = tt.next;
                    let npt1 = NounPhraseHelper.tryParse(tt, NounPhraseParseAttr.PARSEPREPOSITION, 0, null);
                    if (npt1 === null && tt.getMorphClassInDictionary().isAdverb) 
                        npt1 = NounPhraseHelper.tryParse(tt.next, NounPhraseParseAttr.NO, 0, null);
                    if (npt1 === null) 
                        break;
                    if (!npt1.chars.equals(npt.chars)) 
                        break;
                    if (tt.previous.isComma) {
                        if (!cas.isUndefined && (MorphCase.ooBitand(cas, npt1.morph._case)).isUndefined) 
                            break;
                        let re2 = GoodAttrToken._tryParseNum(tt);
                        if (re2 !== null && re2.typ === GoodAttrType.NUMERIC) 
                            break;
                    }
                    tt = re.endToken = npt1.endToken;
                    cas = npt1.morph._case;
                }
                re.value = MiscHelper.getTextValue(npt.beginToken, re.endToken, GetTextAttr.NO);
                if (npt.endToken === re.endToken && npt.adjectives.length === 0) {
                    if (pref === "ДЛЯ" || pref === "ИЗ") {
                        let noun = npt.noun.getNormalCaseText(MorphClass.NOUN, MorphNumber.SINGULAR, MorphGender.UNDEFINED, false);
                        let grs = DerivateService.findDerivates(noun, true, null);
                        if (grs !== null) {
                            for (const g of grs) {
                                if (re.altValue !== null) 
                                    break;
                                for (const v of g.words) {
                                    if (v._class.isAdjective) {
                                        re.altValue = v.spelling;
                                        break;
                                    }
                                }
                            }
                        }
                    }
                }
                if (pref !== null) 
                    re.value = (pref + " " + re.value);
                return re;
            }
        }
        if (t.chars.isCyrillicLetter || (t instanceof NumberToken)) {
            let npt1 = NounPhraseHelper.tryParse(t, NounPhraseParseAttr.of((NounPhraseParseAttr.ADJECTIVECANBELAST.value()) | (NounPhraseParseAttr.PARSENUMERICASADJECTIVE.value())), 0, null);
            if (npt1 !== null) {
                if (((npt1.noun.beginToken.isValue("СОРТ", null) || npt1.noun.beginToken.isValue("КЛАСС", null) || npt1.noun.beginToken.isValue("ГРУППА", null)) || npt1.noun.beginToken.isValue("КАТЕГОРИЯ", null) || npt1.noun.beginToken.isValue("ТИП", null)) || npt1.noun.beginToken.isValue("ПОДТИП", null)) {
                    res = GoodAttrToken._new1936(t, npt1.endToken, GoodAttrType.CHARACTER);
                    res.value = npt1.getNormalCaseText(null, MorphNumber.UNDEFINED, MorphGender.UNDEFINED, false);
                    if (res.beginToken === res.endToken) {
                        if (t.next !== null && t.next.isValue("ВЫСШ", null)) {
                            res.value = ((((npt1.noun.beginToken.morph.gender.value()) & (MorphGender.FEMINIE.value())) !== (MorphGender.UNDEFINED.value()) ? "ВЫСШАЯ" : "ВЫСШИЙ ")) + res.value;
                            res.endToken = t.next;
                            if (res.endToken.next !== null && res.endToken.next.isChar('.')) 
                                res.endToken = res.endToken.next;
                        }
                        else if (t.whitespacesAfterCount < 2) {
                            if ((t.next instanceof NumberToken) && t.next.intValue !== null) {
                                res.value = (NumberHelper.getNumberAdjective(t.next.intValue, (((npt1.morph.gender.value()) & (MorphGender.FEMINIE.value())) !== (MorphGender.UNDEFINED.value()) ? MorphGender.FEMINIE : MorphGender.MASCULINE), MorphNumber.SINGULAR) + " " + t.getNormalCaseText(MorphClass.NOUN, MorphNumber.SINGULAR, MorphGender.UNDEFINED, false));
                                res.endToken = t.next;
                            }
                            else {
                                let rom = NumberHelper.tryParseRoman(t.next);
                                if (rom !== null && rom.intValue !== null) {
                                    res.value = (NumberHelper.getNumberAdjective(rom.intValue, (((npt1.morph.gender.value()) & (MorphGender.FEMINIE.value())) !== (MorphGender.UNDEFINED.value()) ? MorphGender.FEMINIE : MorphGender.MASCULINE), MorphNumber.SINGULAR) + " " + t.getNormalCaseText(MorphClass.NOUN, MorphNumber.SINGULAR, MorphGender.UNDEFINED, false));
                                    res.endToken = rom.endToken;
                                }
                            }
                        }
                    }
                    if (res.beginToken !== res.endToken) 
                        return res;
                }
            }
            if (((t instanceof NumberToken) && t.intValue !== null && t.typ === NumberSpellingType.DIGIT) && (t.next instanceof TextToken) && (t.whitespacesAfterCount < 2)) {
                if (((t.next.isValue("СОРТ", null) || t.next.isValue("КЛАСС", null) || t.next.isValue("ГРУППА", null)) || t.next.isValue("КАТЕГОРИЯ", null) || t.next.isValue("ТИП", null)) || t.next.isValue("ПОДТИП", null)) {
                    res = GoodAttrToken._new1936(t, t.next, GoodAttrType.CHARACTER);
                    res.value = (NumberHelper.getNumberAdjective(t.intValue, (((t.next.morph.gender.value()) & (MorphGender.FEMINIE.value())) !== (MorphGender.UNDEFINED.value()) ? MorphGender.FEMINIE : MorphGender.MASCULINE), MorphNumber.SINGULAR) + " " + t.next.getNormalCaseText(MorphClass.NOUN, MorphNumber.SINGULAR, MorphGender.UNDEFINED, false));
                    return res;
                }
            }
            if (npt1 !== null && npt1.noun.beginToken.isValue("ХАРАКТЕРИСТИКА", null)) {
                let t11 = npt1.endToken.next;
                if (t11 !== null && ((t11.isValue("УКАЗАТЬ", null) || t11.isValue("УКАЗЫВАТЬ", null)))) {
                    res = GoodAttrToken._new1936(t, t11, GoodAttrType.UNDEFINED);
                    let npt2 = NounPhraseHelper.tryParse(t11.next, NounPhraseParseAttr.PARSEPREPOSITION, 0, null);
                    if (npt2 !== null) 
                        res.endToken = npt2.endToken;
                    else if (t11.next !== null && t11.next.isValue("В", null)) {
                        res.endToken = t11.next;
                        if (res.endToken.next !== null) 
                            res.endToken = res.endToken.next;
                    }
                    return res;
                }
            }
        }
        if ((t.chars.isCyrillicLetter && pref === null && (t instanceof TextToken)) && t.morph._class.isAdjective) {
            if (t.morph.containsAttr("к.ф.", null) && t.next !== null && t.next.isHiphen) {
                let val = t.term;
                let tt = null;
                for (tt = t.next.next; tt !== null; ) {
                    if (((tt instanceof TextToken) && tt.next !== null && tt.next.isHiphen) && (tt.next.next instanceof TextToken)) {
                        val = (val + "-" + tt.term);
                        tt = tt.next.next;
                        continue;
                    }
                    let re = GoodAttrToken._tryParse_(tt, key, false, isChars);
                    if (re !== null && re.typ === GoodAttrType.CHARACTER) {
                        re.beginToken = t;
                        re.value = (val + "-" + re.value);
                        return re;
                    }
                    break;
                }
            }
            let _isChar = false;
            if (key !== null && t.morph.checkAccord(key.morph, false, false) && ((t.chars.isAllLower || MiscHelper.canBeStartOfSentence(t)))) 
                _isChar = true;
            else if (t.getMorphClassInDictionary().isAdjective && !t.morph.containsAttr("неизм.", null)) 
                _isChar = true;
            if (_isChar && t.morph._class.isVerb) {
                if ((t.isValue("ПРЕДНАЗНАЧИТЬ", null) || t.isValue("ПРЕДНАЗНАЧАТЬ", null) || t.isValue("ИЗГОТОВИТЬ", null)) || t.isValue("ИЗГОТОВЛЯТЬ", null)) 
                    _isChar = false;
            }
            if (_isChar) {
                res = GoodAttrToken._new1936(t, t, GoodAttrType.CHARACTER);
                res.value = t.getNormalCaseText(MorphClass.ADJECTIVE, MorphNumber.SINGULAR, MorphGender.MASCULINE, false);
                return res;
            }
        }
        if ((t.chars.isCyrillicLetter && pref === null && (t instanceof TextToken)) && t.morph._class.isVerb) {
            let re = GoodAttrToken._tryParse_(t.next, key, false, isChars);
            if (re !== null && re.typ === GoodAttrType.CHARACTER) {
                re.beginToken = t;
                re.altValue = (t.term + " " + re.value);
                return re;
            }
        }
        if (t.chars.isCyrillicLetter) {
            let npt = NounPhraseHelper.tryParse(t, NounPhraseParseAttr.PARSEVERBS, 0, null);
            if ((npt !== null && npt.adjectives.length > 0 && npt.adjectives[0].chars.isAllLower) && !npt.noun.chars.isAllLower) 
                npt = null;
            if (pref === null && npt !== null && npt.noun.endToken.getMorphClassInDictionary().isAdjective) 
                npt = null;
            if (npt !== null && !npt.endToken.chars.isCyrillicLetter) 
                npt = null;
            if (npt !== null) {
                let isProp = false;
                if (pref !== null) 
                    isProp = true;
                else if (npt.chars.isAllLower) 
                    isProp = true;
                if (npt.adjectives.length > 0 && pref === null) {
                    if (key === null) 
                        return GoodAttrToken._new1952(t0, npt.adjectives[0].endToken, GoodAttrType.CHARACTER, npt.adjectives[0].getNormalCaseText(MorphClass.ADJECTIVE, MorphNumber.SINGULAR, MorphGender.MASCULINE, false));
                }
                if (pref === null && key !== null && npt.noun.isValue(key.value, null)) {
                    if (npt.adjectives.length === 0) 
                        return GoodAttrToken._new1938(t0, npt.endToken, GoodAttrType.KEYWORD, npt.noun.getNormalCaseText(MorphClass.NOUN, MorphNumber.SINGULAR, MorphGender.UNDEFINED, false), npt.morph);
                    return GoodAttrToken._new1952(t0, npt.adjectives[0].endToken, GoodAttrType.CHARACTER, npt.adjectives[0].getNormalCaseText(MorphClass.ADJECTIVE, MorphNumber.SINGULAR, MorphGender.MASCULINE, false));
                }
                if (isProp) {
                    res = GoodAttrToken._new1936(t0, npt.endToken, GoodAttrType.CHARACTER);
                    res.value = npt.getNormalCaseText(null, MorphNumber.SINGULAR, MorphGender.UNDEFINED, false);
                    return res;
                }
                if (!npt.chars.isAllLower) 
                    return GoodAttrToken._new1938(t0, npt.endToken, GoodAttrType.PROPER, npt.getSourceText(), npt.morph);
            }
            if (t instanceof TextToken) {
                if (((t.getMorphClassInDictionary().isAdjective || t.morph._class.equals(MorphClass.ADJECTIVE))) && pref === null) 
                    return GoodAttrToken._new1938(t0, t, GoodAttrType.CHARACTER, t.lemma, t.morph);
            }
            if ((t instanceof NumberToken) && pref !== null) {
                let num = GoodAttrToken._tryParseNum(t);
                if (num !== null) {
                    num.beginToken = t0;
                    return num;
                }
            }
            if (pref !== null && t.morph._class.isAdjective && (t instanceof TextToken)) {
                res = GoodAttrToken._new1936(t0, t, GoodAttrType.CHARACTER);
                res.value = t.getNormalCaseText(MorphClass.ADJECTIVE, MorphNumber.SINGULAR, MorphGender.MASCULINE, false);
                return res;
            }
            if (pref !== null && t.next !== null && t.next.isValue("WC", null)) 
                return GoodAttrToken._new1952(t, t.next, GoodAttrType.CHARACTER, "туалет");
            if (pref !== null) 
                return null;
        }
        if (t !== null && t.isValue("№", null) && (t.next instanceof NumberToken)) 
            return GoodAttrToken._new1952(t, t.next, GoodAttrType.MODEL, ("№" + t.next.value));
        if ((t instanceof TextToken) && t.chars.isLetter) {
            if (t.lengthChar > 2 && ((!t.chars.isAllLower || t.chars.isLatinLetter))) 
                return GoodAttrToken._new1952(t, t, GoodAttrType.PROPER, t.term);
            return null;
        }
        if (BracketHelper.canBeStartOfSequence(t, true, false)) {
            let br = BracketHelper.tryParse(t, BracketParseAttr.NO, 100);
            if (br !== null) {
                let res1 = GoodAttrToken._tryParse_(t.next, key, false, isChars);
                if (res1 !== null && res1.endToken.next === br.endToken) {
                    if (res1.typ === GoodAttrType.CHARACTER) 
                        res1.typ = GoodAttrType.PROPER;
                    res1.beginToken = t;
                    res1.endToken = br.endToken;
                }
                else {
                    res1 = GoodAttrToken._new1936(br.beginToken, br.endToken, GoodAttrType.PROPER);
                    res1.value = MiscHelper.getTextValueOfMetaToken(br, GetTextAttr.NO);
                }
                return res1;
            }
        }
        if (t.isChar('(')) {
            let br = BracketHelper.tryParse(t, BracketParseAttr.NO, 100);
            if (br !== null) {
                if (t.next.isValue("ПРИЛОЖЕНИЕ", null)) 
                    return GoodAttrToken._new1936(t, br.endToken, GoodAttrType.UNDEFINED);
            }
        }
        let nnn = GoodAttrToken._tryParseNum2(t);
        if (nnn !== null) 
            return nnn;
        return null;
    }
    
    static _tryParseModel(t) {
        if (t === null) 
            return null;
        let res = GoodAttrToken._new1936(t, t, GoodAttrType.MODEL);
        let tmp = new StringBuilder();
        for (let tt = t; tt !== null; tt = tt.next) {
            if (tt.isWhitespaceBefore && tt !== t) 
                break;
            if (tt instanceof NumberToken) {
                if (tmp.length > 0 && Utils.isDigit(tmp.charAt(tmp.length - 1))) 
                    tmp.append('-');
                tmp.append(tt.getSourceText());
                res.endToken = tt;
                continue;
            }
            if (tt instanceof ReferentToken) {
                let den = Utils.as(tt.getReferent(), DenominationReferent);
                if (den !== null) {
                    tmp.append(den.value);
                    continue;
                }
            }
            if (!(tt instanceof TextToken)) 
                break;
            if (!tt.chars.isLetter) {
                if (tt.isCharOf("\\/-:")) {
                    if (tt.isCharOf(":") && tt.isWhitespaceAfter) 
                        break;
                    tmp.append('-');
                }
                else if (tt.isChar('.')) {
                    if (tt.isWhitespaceAfter) 
                        break;
                    tmp.append('.');
                }
                else 
                    break;
            }
            else 
                tmp.append(tt.term);
            res.endToken = tt;
        }
        res.value = tmp.toString();
        return res;
    }
    
    static _tryParseNum(t) {
        if (t === null) 
            return null;
        let mt = MeasureToken.tryParse(t, null, true, false, false, false);
        if (mt === null) 
            mt = MeasureToken.tryParseMinimal(t, null, false);
        if (mt !== null) {
            let mrs = mt.createRefenetsTokensWithRegister(null, false);
            if (mrs !== null && mrs.length > 0 && (mrs[mrs.length - 1].referent instanceof MeasureReferent)) {
                let mr = Utils.as(mrs[mrs.length - 1].referent, MeasureReferent);
                let res = GoodAttrToken._new1942(t, mt.endToken, GoodAttrType.NUMERIC, mr.getStringValue(MeasureReferent.ATTR_NAME));
                res.value = mr.toStringEx(true, null, 0);
                return res;
            }
        }
        let mts = NumbersWithUnitToken.tryParseMulti(t, null, NumberWithUnitParseAttr.NO);
        if ((mts !== null && mts.length === 1 && mts[0].units !== null) && mts[0].units.length > 0) {
            let mrs = mts[0].createRefenetsTokensWithRegister(null, null, true);
            let mr = mrs[mrs.length - 1];
            let res = GoodAttrToken._new1936(t, mr.endToken, GoodAttrType.NUMERIC);
            res.value = mr.referent.toStringEx(true, null, 0);
            return res;
        }
        return null;
    }
    
    static _tryParseNum2(t) {
        if (!(t instanceof NumberToken) || t.intValue === null) 
            return null;
        let tok = GoodAttrToken.m_NumSuff.tryParse(t.next, TerminParseAttr.NO);
        if (tok !== null && (t.whitespacesAfterCount < 3)) {
            let res = GoodAttrToken._new1936(t, tok.endToken, GoodAttrType.NUMERIC);
            res.value = t.value + tok.termin.canonicText.toLowerCase();
            if (res.endToken.next !== null && res.endToken.next.isChar('.')) 
                res.endToken = res.endToken.next;
            return res;
        }
        let num = NumberHelper.tryParseRealNumber(t, NumberParseAttr.NO);
        if (num !== null) {
            let tt = num.endToken;
            if (tt instanceof MetaToken) {
                if (tt.endToken.isValue("СП", null)) {
                    if (num.value === "1") 
                        return GoodAttrToken._new1952(t, tt, GoodAttrType.CHARACTER, "односпальный");
                    if (num.value === "1.5") 
                        return GoodAttrToken._new1952(t, tt, GoodAttrType.CHARACTER, "полутораспальный");
                    if (num.value === "2") 
                        return GoodAttrToken._new1952(t, tt, GoodAttrType.CHARACTER, "вдухспальный");
                }
            }
            tt = tt.next;
            if (tt !== null && tt.isHiphen) 
                tt = tt.next;
            if (tt !== null && tt.isValue("СП", null)) {
                if (num.value === "1") 
                    return GoodAttrToken._new1952(t, tt, GoodAttrType.CHARACTER, "односпальный");
                if (num.value === "1.5") 
                    return GoodAttrToken._new1952(t, tt, GoodAttrType.CHARACTER, "полутораспальный");
                if (num.value === "2") 
                    return GoodAttrToken._new1952(t, tt, GoodAttrType.CHARACTER, "вдухспальный");
            }
            return GoodAttrToken._new1952(t, num.endToken, GoodAttrType.NUMERIC, num.value);
        }
        return null;
    }
    
    static _tryParseChars(t) {
        if (t === null) 
            return null;
        let t1 = null;
        let npt = NounPhraseHelper.tryParse(t, NounPhraseParseAttr.NO, 0, null);
        if (npt !== null) 
            t1 = npt.endToken;
        else if (((t instanceof TextToken) && t.lengthChar > 2 && t.getMorphClassInDictionary().isUndefined) && !t.chars.isAllLower) 
            t1 = t;
        if (t1 === null) 
            return null;
        let t11 = t1;
        let t2 = null;
        for (let tt = t1.next; tt !== null; tt = tt.next) {
            if (MiscHelper.canBeStartOfSentence(tt) || tt.isChar(';')) 
                break;
            if (tt.isChar(':') || tt.isHiphen) {
                t2 = tt.next;
                break;
            }
            if (tt.isValue("ДА", null) || tt.isValue("НЕТ", null)) {
                t2 = tt;
                break;
            }
            let vvv = VerbPhraseHelper.tryParse(tt, false, false, false);
            if (vvv !== null) {
                t2 = vvv.endToken.next;
                break;
            }
            t1 = tt;
        }
        if (t2 === null) {
            if (t11.next !== null && t11.next.getMorphClassInDictionary().isAdjective && NounPhraseHelper.tryParse(t11.next, NounPhraseParseAttr.NO, 0, null) === null) {
                t1 = t11;
                t2 = t11.next;
            }
        }
        if (t2 === null) 
            return null;
        let t3 = t2;
        for (let tt = t2; tt !== null; tt = tt.next) {
            if (MiscHelper.canBeStartOfSentence(tt)) 
                break;
            if (tt.isChar(';')) 
                break;
            t3 = tt;
        }
        let _name = MiscHelper.getTextValue(t, t1, GetTextAttr.NO);
        let val = MiscHelper.getTextValue(t2, (t3.isChar('.') ? t3.previous : t3), GetTextAttr.NO);
        if (Utils.isNullOrEmpty(val)) 
            return null;
        return GoodAttrToken._new1975(t, t3, GoodAttrType.CHARACTER, _name, val);
    }
    
    static initialize() {
        if (GoodAttrToken.m_Inited) 
            return;
        GoodAttrToken.m_Inited = true;
        let t = null;
        t = new Termin("ПР");
        t.addVariant("ПРЕДМЕТ", false);
        GoodAttrToken.m_NumSuff.add(t);
        t = new Termin("ШТ");
        t.addVariant("ШТУКА", false);
        GoodAttrToken.m_NumSuff.add(t);
        t = new Termin("УП");
        t.addVariant("УПАКОВКА", false);
        GoodAttrToken.m_NumSuff.add(t);
        t = new Termin("ЯЩ");
        t.addVariant("ЯЩИК", false);
        GoodAttrToken.m_NumSuff.add(t);
        t = new Termin("КОРОБ");
        t.addVariant("КОРОБКА", false);
        GoodAttrToken.m_NumSuff.add(t);
        t = new Termin("БУТ");
        t.addVariant("БУТЫЛКА", false);
        GoodAttrToken.m_NumSuff.add(t);
        t = new Termin("МЕШ");
        t.addVariant("МЕШОК", false);
        GoodAttrToken.m_NumSuff.add(t);
        t = Termin._new96("ЕРШ", GoodAttrType.KEYWORD);
        t.addVariant("ЕРШИК", false);
        GoodAttrToken.m_StdAbbrs.add(t);
        t = Termin._new96("КОНДИЦИОНЕР", GoodAttrType.KEYWORD);
        t.addVariant("КОНДИЦ", false);
        GoodAttrToken.m_StdAbbrs.add(t);
        t = Termin._new96("УДЛИНИТЕЛЬ", GoodAttrType.KEYWORD);
        t.addAbridge("УДЛ-ЛЬ");
        t.addAbridge("УДЛИН-ЛЬ");
        GoodAttrToken.m_StdAbbrs.add(t);
        t = Termin._new96("УСТРОЙСТВО", GoodAttrType.KEYWORD);
        t.addAbridge("УСТР-ВО");
        t.addAbridge("УСТР.");
        GoodAttrToken.m_StdAbbrs.add(t);
        t = Termin._new96("ПРОКЛАДКИ", GoodAttrType.KEYWORD);
        t.addVariant("ПРОКЛ", false);
        GoodAttrToken.m_StdAbbrs.add(t);
        t = Termin._new96("ДЕЗОДОРАНТ", GoodAttrType.KEYWORD);
        t.addVariant("ДЕЗ", false);
        GoodAttrToken.m_StdAbbrs.add(t);
        t = Termin._new96("ОХЛАЖДЕННЫЙ", GoodAttrType.CHARACTER);
        t.addVariant("ОХЛ", false);
        t.addVariant("ОХЛАЖД", false);
        GoodAttrToken.m_StdAbbrs.add(t);
        t = Termin._new96("МЕДИЦИНСКИЙ", GoodAttrType.CHARACTER);
        t.addVariant("МЕД", false);
        GoodAttrToken.m_StdAbbrs.add(t);
        t = Termin._new96("СТЕРИЛЬНЫЙ", GoodAttrType.CHARACTER);
        t.addVariant("СТЕР", false);
        t.addVariant("СТ", false);
        GoodAttrToken.m_StdAbbrs.add(t);
        t = Termin._new96("ХЛОПЧАТОБУМАЖНЫЙ", GoodAttrType.CHARACTER);
        t.addAbridge("Х/Б");
        t.addAbridge("ХБ");
        GoodAttrToken.m_StdAbbrs.add(t);
        t = Termin._new96("ДЕТСКИЙ", GoodAttrType.CHARACTER);
        t.addVariant("ДЕТ", false);
        GoodAttrToken.m_StdAbbrs.add(t);
        t = Termin._new96("МУЖСКОЙ", GoodAttrType.CHARACTER);
        t.addVariant("МУЖ", false);
        GoodAttrToken.m_StdAbbrs.add(t);
        t = Termin._new96("ЖЕНСКИЙ", GoodAttrType.CHARACTER);
        t.addVariant("ЖЕН", false);
        GoodAttrToken.m_StdAbbrs.add(t);
        t = Termin._new96("СТРАНА", GoodAttrType.REFERENT);
        t.addVariant("СТРАНА ПРОИСХОЖДЕНИЯ", false);
        t.addVariant("ПРОИСХОЖДЕНИЕ", false);
        GoodAttrToken.m_StdAbbrs.add(t);
        t = Termin._new96("ПРОИЗВОДИТЕЛЬ", GoodAttrType.REFERENT);
        t.addAbridge("ПР-ЛЬ");
        t.addAbridge("ПРОИЗВ-ЛЬ");
        t.addAbridge("ПРОИЗВ.");
        t.addVariant("ПРОИЗВОДСТВО", false);
        t.addAbridge("ПР-ВО");
        t.addVariant("ПРОИЗВЕСТИ", false);
        t.addVariant("КОМПАНИЯ", false);
        t.addVariant("ФИРМА", false);
        GoodAttrToken.m_StdAbbrs.add(t);
        t = Termin._new98("ТОВАРНЫЙ ЗНАК", GoodAttrType.UNDEFINED, "");
        GoodAttrToken.m_StdAbbrs.add(t);
        t = Termin._new98("КАТАЛОЖНЫЙ НОМЕР", GoodAttrType.UNDEFINED, "");
        t.addVariant("НОМЕР В КАТАЛОГЕ", false);
        GoodAttrToken.m_StdAbbrs.add(t);
        t = Termin._new98("МАРКА", GoodAttrType.UNDEFINED, "");
        GoodAttrToken.m_StdAbbrs.add(t);
        t = Termin._new98("ФИРМА", GoodAttrType.UNDEFINED, "");
        GoodAttrToken.m_StdAbbrs.add(t);
        t = Termin._new98("МОДЕЛЬ", GoodAttrType.UNDEFINED, "");
        GoodAttrToken.m_StdAbbrs.add(t);
        t = Termin._new98("НЕТ", GoodAttrType.UNDEFINED, "NO");
        t.addVariant("ОТСУТСТВОВАТЬ", false);
        t.addVariant("НЕ ИМЕТЬ", false);
        GoodAttrToken.m_StdAbbrs.add(t);
        t = Termin._new96("БОЛЕЕ", GoodAttrType.UNDEFINED);
        t.addVariant("МЕНЕЕ", false);
        t.addVariant("НЕ БОЛЕЕ", false);
        t.addVariant("НЕ МЕНЕЕ", false);
        GoodAttrToken.m_StdAbbrs.add(t);
    }
    
    static _new1934(_arg1, _arg2, _arg3) {
        let res = new GoodAttrToken(_arg1, _arg2);
        res.value = _arg3;
        return res;
    }
    
    static _new1935(_arg1, _arg2, _arg3, _arg4) {
        let res = new GoodAttrToken(_arg1, _arg2);
        res.typ = _arg3;
        res.ref = _arg4;
        return res;
    }
    
    static _new1936(_arg1, _arg2, _arg3) {
        let res = new GoodAttrToken(_arg1, _arg2);
        res.typ = _arg3;
        return res;
    }
    
    static _new1938(_arg1, _arg2, _arg3, _arg4, _arg5) {
        let res = new GoodAttrToken(_arg1, _arg2);
        res.typ = _arg3;
        res.value = _arg4;
        res.morph = _arg5;
        return res;
    }
    
    static _new1939(_arg1, _arg2, _arg3, _arg4) {
        let res = new GoodAttrToken(_arg1, _arg2);
        res.ref = _arg3;
        res.typ = _arg4;
        return res;
    }
    
    static _new1940(_arg1, _arg2, _arg3, _arg4) {
        let res = new GoodAttrToken(_arg1, _arg2);
        res.refTok = _arg3;
        res.typ = _arg4;
        return res;
    }
    
    static _new1942(_arg1, _arg2, _arg3, _arg4) {
        let res = new GoodAttrToken(_arg1, _arg2);
        res.typ = _arg3;
        res.name = _arg4;
        return res;
    }
    
    static _new1944(_arg1, _arg2, _arg3, _arg4) {
        let res = new GoodAttrToken(_arg1, _arg2);
        res.typ = _arg3;
        res.morph = _arg4;
        return res;
    }
    
    static _new1952(_arg1, _arg2, _arg3, _arg4) {
        let res = new GoodAttrToken(_arg1, _arg2);
        res.typ = _arg3;
        res.value = _arg4;
        return res;
    }
    
    static _new1975(_arg1, _arg2, _arg3, _arg4, _arg5) {
        let res = new GoodAttrToken(_arg1, _arg2);
        res.typ = _arg3;
        res.name = _arg4;
        res.value = _arg5;
        return res;
    }
    
    static static_constructor() {
        GoodAttrToken.m_NumSuff = new TerminCollection();
        GoodAttrToken.m_StdAbbrs = new TerminCollection();
        GoodAttrToken.m_DenomAn = new DenominationAnalyzer();
        GoodAttrToken.m_Inited = false;
    }
}


GoodAttrToken.static_constructor();

module.exports = GoodAttrToken