MCPcopy Create free account
hub / github.com/Tripwire/tripwire-open-source / Check

Method Check

src/twparser/policyparser.cpp:97–110  ·  view source on GitHub ↗

////////////////////////////////////////////////////////////////////////// Check -- only checks syntax and basic semantics. on failure, it will throw an error //////////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

95// on failure, it will throw an error
96///////////////////////////////////////////////////////////////////////////////
97void cPolicyParser::Check(cErrorBucket* pError) //throw(eError);
98{
99 cParserHelper::Init(pError);
100 cParserHelper::SetParseOnly(true);
101
102 std::basic_stringstream<char> in(ConvertMultibyte(mIn));
103 tw_yy_scan lexer(in);
104
105 // start the parsing
106 if (mParser.yyparse(&lexer) != 0)
107 throw eParseFailed(_T(""));
108
109 cParserHelper::Finit(NULL);
110}
111
112///////////////////////////////////////////////////////////////////////////////
113// Execute -- attempts to parse input to create list of fcospecs

Callers 1

ExecuteMethod · 0.80

Calls 1

yyparseMethod · 0.80

Tested by

no test coverage detected