1 
2 // -*- mode: c++; c-basic-offset:4 -*-
3 
4 // This file is part of libdap, A C++ implementation of the OPeNDAP Data
5 // Access Protocol.
6 
7 // Copyright (c) 2002,2003 OPeNDAP, Inc.
8 // Author: James Gallagher <jgallagher@opendap.org>
9 //
10 // This library is free software; you can redistribute it and/or
11 // modify it under the terms of the GNU Lesser General Public
12 // License as published by the Free Software Foundation; either
13 // version 2.1 of the License, or (at your option) any later version.
14 //
15 // This library is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 // Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public
21 // License along with this library; if not, write to the Free Software
22 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
23 //
24 // You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
25 
26 
27 #ifndef D4CESCANNER_H_
28 #define D4CESCANNER_H_
29 
30 // Only include FlexLexer.h if it hasn't been already included
31 #if ! defined(yyFlexLexerOnce)
32 #undef yyFlexLexer
33 #define yyFlexLexer d4_ceFlexLexer
34 #include "FlexLexer.h"
35 #endif
36 
37 # ifndef YY_NULL
38 #  if defined __cplusplus && 201103L <= __cplusplus
39 #   define YY_NULL nullptr
40 #  else
41 #   define YY_NULL 0
42 #  endif
43 # endif
44 
45 #undef  YY_DECL
46 #define YY_DECL int  libdap::D4CEScanner::yylex()
47 
48 #include "d4_ce_parser.tab.hh"
49 
50 namespace libdap {
51 
52 class D4CEScanner : public d4_ceFlexLexer{
53 public:
54 
D4CEScanner(std::istream & in)55 	D4CEScanner(std::istream &in) : d4_ceFlexLexer(&in), yylval(0), loc(0) { };
56 
yylex(libdap::D4CEParser::semantic_type * lval,libdap::location * l)57 	int yylex(libdap::D4CEParser::semantic_type *lval, libdap::location *l)
58 	{
59 		loc = l;
60 		yylval = lval;
61 		return( yylex() );
62 	}
63 
64 private:
65 	/* hide this one from public view */
66 	int yylex();
67 
68 	/* yyval ptr */
69 	libdap::D4CEParser::semantic_type *yylval;
70 
71 	libdap::location *loc;
72 };
73 
74 } /* end namespace libdap */
75 
76 #endif /* D4CESCANNER_H_ */
77