Initial MIME sniffer rule parser checkin. The first draft of the
scanner portion of the parser is done, but completely untested and unused. More to come... git-svn-id: file:///srv/svn/repos/haiku/trunk/current@452 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
//----------------------------------------------------------------------
|
||||
// This software is part of the OpenBeOS distribution and is covered
|
||||
// by the OpenBeOS license.
|
||||
//---------------------------------------------------------------------
|
||||
/*!
|
||||
\file sniffer/Parser.h
|
||||
MIME sniffer rule parser declarations
|
||||
*/
|
||||
#ifndef _sk_sniffer_parser_h_
|
||||
#define _sk_sniffer_parser_h_
|
||||
|
||||
#include <SupportDefs.h>
|
||||
|
||||
class BString;
|
||||
|
||||
namespace Sniffer {
|
||||
class Rule;
|
||||
status_t parse(const char *rule, Rule *result, BString *parseError = NULL);
|
||||
}
|
||||
|
||||
#endif // _sk_sniffer_parser_h_
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
//----------------------------------------------------------------------
|
||||
// This software is part of the OpenBeOS distribution and is covered
|
||||
// by the OpenBeOS license.
|
||||
//---------------------------------------------------------------------
|
||||
/*!
|
||||
\file sniffer/Rule.h
|
||||
Mime sniffer rule declarations
|
||||
*/
|
||||
#ifndef _sk_sniffer_rule_h_
|
||||
#define _sk_sniffer_rule_h_
|
||||
|
||||
#include <List.h>
|
||||
|
||||
namespace Sniffer {
|
||||
|
||||
class Expr;
|
||||
|
||||
class Rule {
|
||||
public:
|
||||
Rule();
|
||||
Rule(const char *rule);
|
||||
status_t SetTo(const char *rule);
|
||||
private:
|
||||
float fPriority;
|
||||
BList fExprList;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // _sk_sniffer_rule_h_
|
||||
Reference in New Issue
Block a user