35 #ifndef LSST_PEX_POLICY_PAF_TOKENIZER_H 36 #define LSST_PEX_POLICY_PAF_TOKENIZER_H 40 #include "lsst/daf/base/Citizen.h" 44 #include <boost/regex.hpp> 84 virtual int parse(std::istream& is);
88 std::ios::iostate _nextLine(std::istream& is, std::string& line);
91 void _pushBackLine(
const std::string& line);
93 int _parseIntoPolicy(std::istream& is,
Policy& policy);
94 int _addValue(
const std::string& propname, std::string& value,
95 Policy& policy, std::istream& is);
97 static const boost::regex COMMENT_LINE;
98 static const boost::regex EMPTY_LINE;
99 static const boost::regex SPACE_SRCH;
100 static const boost::regex PARAM_SRCH;
101 static const boost::regex NAME_MTCH;
102 static const boost::regex OPEN_SRCH;
103 static const boost::regex CLOSE_SRCH;
104 static const boost::regex DOUBLE_VALUE;
105 static const boost::regex INT_VALUE;
106 static const boost::regex ATRUE_VALUE;
107 static const boost::regex AFALSE_VALUE;
108 static const boost::regex QQSTRING_VALUE;
109 static const boost::regex QSTRING_VALUE;
110 static const boost::regex QQSTRING_START;
111 static const boost::regex QSTRING_START;
112 static const boost::regex QQSTRING_EMPTYSTART;
113 static const boost::regex QSTRING_EMPTYSTART;
114 static const boost::regex QQSTRING_END;
115 static const boost::regex QSTRING_END;
116 static const boost::regex BARE_STRING_LINE;
117 static const boost::regex BARE_STRING;
118 static const boost::regex URN_VALUE;
119 static const boost::regex FILE_VALUE;
122 std::list<std::string> _buffer;
129 #endif // LSST_PEX_POLICY_PAF_PAFPARSER_H an abstract class for parsing serialized Policy data and loading it into a Policy object...
virtual ~PAFParser()
delete this parser
definition of the PolicyParser class
a container for holding hierarchical configuration data in memory.
PAFParser(Policy &policy)
create a parser to load a Policy
virtual int parse(std::istream &is)
parse the data found on the given stream
a parser for reading PAF-formatted data into a Policy object