1 #ifndef INC_RequirementParser_hpp_
2 #define INC_RequirementParser_hpp_
4 #include <antlr/config.hpp>
5 /* $ANTLR 2.7.7 (20120228): "requirements.grammar" -> "RequirementParser.hpp"$ */
6 #include <antlr/TokenStream.hpp>
7 #include <antlr/TokenBuffer.hpp>
8 #include "RequirementParserTokenTypes.hpp"
9 #include <antlr/LLkParser.hpp>
12 #include "requirement.h"
13 using namespace CodeSigning;
14 typedef Requirement::Maker Maker;
16 ANTLR_BEGIN_NAMESPACE(Security_CodeSigning)
17 class CUSTOM_API RequirementParser : public antlr::LLkParser, public RequirementParserTokenTypes
22 void reportError(const antlr::RecognitionException &ex);
23 void reportError(const std::string &s);
26 static string hexString(const string &s);
27 static void hashString(const string &s, SHA1::Digest hash);
28 void certMatchOperation(Maker &maker, int32_t slot, string key);
30 void initializeASTFactory( antlr::ASTFactory& factory );
32 RequirementParser(antlr::TokenBuffer& tokenBuf, int k);
34 RequirementParser(antlr::TokenBuffer& tokenBuf);
36 RequirementParser(antlr::TokenStream& lexer, int k);
38 RequirementParser(antlr::TokenStream& lexer);
39 RequirementParser(const antlr::ParserSharedInputState& state);
40 int getNumTokens() const
42 return RequirementParser::NUM_TOKENS;
44 const char* getTokenName( int type ) const
46 if( type > getNumTokens() ) return 0;
47 return RequirementParser::tokenNames[type];
49 const char* const* getTokenNames() const
51 return RequirementParser::tokenNames;
53 public: BlobCore * autosense();
54 public: Requirement * requirement();
55 public: Requirements * requirementSet();
56 public: uint32_t requirementType();
57 public: Requirement * requirementElement();
68 public: void certspec(
71 public: void infospec(
74 public: void entitlementspec(
78 public: string identifierString();
82 public: void appleanchor(
85 public: int32_t certSlot();
86 public: void certslotspec(
87 Maker &maker, int32_t slot
90 public: void certificateDigest(
93 public: string bracketKey();
94 public: void match_suffix(
97 public: string datavalue();
98 public: string stringvalue();
99 public: string pathstring();
101 antlr::RefAST getAST()
107 antlr::RefAST returnAST;
109 static const char* tokenNames[];
110 #ifndef NO_STATIC_CONSTS
111 static const int NUM_TOKENS = 57;
118 static const unsigned long _tokenSet_0_data_[];
119 static const antlr::BitSet _tokenSet_0;
120 static const unsigned long _tokenSet_1_data_[];
121 static const antlr::BitSet _tokenSet_1;
122 static const unsigned long _tokenSet_2_data_[];
123 static const antlr::BitSet _tokenSet_2;
124 static const unsigned long _tokenSet_3_data_[];
125 static const antlr::BitSet _tokenSet_3;
126 static const unsigned long _tokenSet_4_data_[];
127 static const antlr::BitSet _tokenSet_4;
128 static const unsigned long _tokenSet_5_data_[];
129 static const antlr::BitSet _tokenSet_5;
130 static const unsigned long _tokenSet_6_data_[];
131 static const antlr::BitSet _tokenSet_6;
132 static const unsigned long _tokenSet_7_data_[];
133 static const antlr::BitSet _tokenSet_7;
134 static const unsigned long _tokenSet_8_data_[];
135 static const antlr::BitSet _tokenSet_8;
136 static const unsigned long _tokenSet_9_data_[];
137 static const antlr::BitSet _tokenSet_9;
138 static const unsigned long _tokenSet_10_data_[];
139 static const antlr::BitSet _tokenSet_10;
140 static const unsigned long _tokenSet_11_data_[];
141 static const antlr::BitSet _tokenSet_11;
142 static const unsigned long _tokenSet_12_data_[];
143 static const antlr::BitSet _tokenSet_12;
144 static const unsigned long _tokenSet_13_data_[];
145 static const antlr::BitSet _tokenSet_13;
146 static const unsigned long _tokenSet_14_data_[];
147 static const antlr::BitSet _tokenSet_14;
148 static const unsigned long _tokenSet_15_data_[];
149 static const antlr::BitSet _tokenSet_15;
153 #endif /*INC_RequirementParser_hpp_*/