jdl-api-cpp-3.4.4
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
grammar.h
Go to the documentation of this file.
1 /*
2 Copyright (c) Members of the EGEE Collaboration. 2004.
3 See http://www.eu-egee.org/partners/ for details on the
4 copyright holders.
5 
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9 
10  http://www.apache.org/licenses/LICENSE-2.0
11 
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
15 either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18 */
19 
21 // Author: Simone Pellegrini
22 // Mail: simone.pellegrini@cnaf.infn.it
24 
25 #ifndef GLITE_WMS_COMMON_REQUESTAD_GRAMMAR_H
26 #define GLITE_WMS_COMMON_REQUESTAD_GRAMMAR_H
27 
28 
29 #include <dirent.h>
30 #include <iostream>
31 #include <exception>
32 #include <stdexcept>
33 #include <string>
34 #include <fstream>
35 #include <stack>
36 #include <boost/scoped_ptr.hpp>
37 
38 namespace glite {
39 namespace jdl {
40 
41 
42 struct jdl_grammar ;
43 
44 class jdl_parser{
45  //boost::scoped_ptr<glite::jdl::jdl_grammar> grammar ;
46  boost::scoped_ptr<jdl_grammar> grammar ;
47  std::stack<std::vector<std::string> *> stack;
48  public:
49  jdl_parser();
50 
51  void parseString(std::string str);
52 
53  void parseFile(std::string file_name);
54 
55  std::string open_file(const std::string &file_name);
56 
57  ~jdl_parser();
58 };
59 
60 } // jdl namespace
61 } // glite namespace
62 #endif
63 
std::string open_file(const std::string &file_name)
Definition: grammar.h:44
void parseString(std::string str)
void parseFile(std::string file_name)