#ifndef GREY_H
#define GREY_H
#include <vector>
#include <string>
#include "ue2common.h"
namespace ue2 {
struct Grey {
Grey(void);
bool optimiseComponentTree;
bool calcComponents;
bool performGraphSimplification;
bool prefilterReductions;
bool removeEdgeRedundancy;
bool allowGough;
bool allowHaigLit;
bool allowLitHaig;
bool allowLbr;
bool allowMcClellan;
bool allowSheng;
bool allowMcSheng;
bool allowPuff;
bool allowLiteral;
bool allowViolet;
bool allowExtendedNFA;
bool allowLimExNFA;
bool allowAnchoredAcyclic;
bool allowSmallLiteralSet;
bool allowCastle;
bool allowDecoratedLiteral;
bool allowApproximateMatching;
bool allowNoodle;
bool fdrAllowTeddy;
bool fdrAllowFlood;
u32 violetAvoidSuffixes;
bool violetAvoidWeakInfixes;
bool violetDoubleCut;
bool violetExtractStrongLiterals;
bool violetLiteralChains;
u32 violetDoubleCutLiteralLen;
u32 violetEarlyCleanLiteralLen;
bool puffImproveHead;
bool castleExclusive;
bool mergeSEP;
bool mergeRose;
bool mergeSuffixes;
bool mergeOutfixes;
bool onlyOneOutfix;
bool allowShermanStates;
bool allowMcClellan8;
bool allowWideStates; bool highlanderPruneDFA;
bool minimizeDFA;
bool accelerateDFA;
bool accelerateNFA;
bool reverseAccelerate;
bool squashNFA;
bool compressNFAState;
bool numberNFAStatesWrong;
bool highlanderSquash;
bool allowZombies;
bool floodAsPuffette;
u32 nfaForceSize;
u32 maxHistoryAvailable;
u32 minHistoryAvailable;
u32 maxAnchoredRegion;
u32 minRoseLiteralLength;
u32 minRoseNetflowLiteralLength;
u32 maxRoseNetflowEdges;
u32 maxEditDistance;
u32 minExtBoundedRepeatSize;
bool goughCopyPropagate;
bool goughRegisterAllocate;
bool shortcutLiterals;
bool roseGraphReduction;
bool roseRoleAliasing;
bool roseMasks;
bool roseConvertFloodProneSuffixes;
bool roseMergeRosesDuringAliasing;
bool roseMultiTopRoses;
bool roseHamsterMasks;
bool roseLookaroundMasks;
u32 roseMcClellanPrefix;
u32 roseMcClellanSuffix;
u32 roseMcClellanOutfix;
bool roseTransformDelay;
bool earlyMcClellanPrefix;
bool earlyMcClellanInfix;
bool earlyMcClellanSuffix;
bool allowCountingMiracles;
bool allowSomChain;
u32 somMaxRevNfaLength;
bool hamsterAccelForward;
bool hamsterAccelReverse;
u32 miracleHistoryBonus;
bool equivalenceEnable;
bool allowSmallWrite;
bool allowSmallWriteSheng;
u32 smallWriteLargestBuffer; u32 smallWriteLargestBufferBad; u32 limitSmallWriteOutfixSize; u32 smallWriteMaxPatterns; u32 smallWriteMaxLiterals; u32 smallWriteMergeBatchSize;
bool allowTamarama;
u32 tamaChunkSize;
enum DumpFlags {
DUMP_NONE = 0,
DUMP_BASICS = 1 << 0, DUMP_PARSE = 1 << 1, DUMP_INT_GRAPH = 1 << 2, DUMP_IMPL = 1 << 3 };
u32 dumpFlags;
std::string dumpPath;
u32 limitPatternCount; u32 limitPatternLength; u32 limitGraphVertices; u32 limitGraphEdges; u32 limitReportCount;
u32 limitLiteralCount; u32 limitLiteralLength; u32 limitLiteralMatcherChars; u32 limitLiteralMatcherSize;
u32 limitRoseRoleCount; u32 limitRoseEngineCount; u32 limitRoseAnchoredSize;
u32 limitEngineSize; u32 limitDFASize; u32 limitNFASize; u32 limitLBRSize;
u32 limitApproxMatchingVertices; };
#ifndef RELEASE_BUILD
#include <string>
void applyGreyOverrides(Grey *g, const std::string &overrides);
#endif
}
#endif