00001 /* 00002 * String Input Buffer 00003 * Universal Accelerator Parser 00004 * Copyright (C) 2005 Andy Wolski, Daniel Bates 00005 * 00006 * This library is free software; you can redistribute it and/or modify it 00007 * under the terms of the GNU Lesser General Public License as published by 00008 * the Free Software Foundation; either version 3 of the License, or (at 00009 * your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, but WITHOUT 00012 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00013 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License 00014 * for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public License 00017 * along with this library; if not, write to the Free Software Foundation, Inc., 00018 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 * 00020 * Direct questions, comments, etc to: 00021 * Andy Wolski (awolski@lbl.gov), Daniel Bates (dbates@lbl.gov) 00022 */ 00023 00024 #ifndef StringInputBuffer_hpp 00025 #define StringInputBuffer_hpp 1 00026 00027 #include "antlr/InputBuffer.hpp" 00028 00029 ANTLR_USING_NAMESPACE(antlr) 00030 00031 00037 class StringInputBuffer : public InputBuffer 00038 { 00039 public: 00040 00046 StringInputBuffer(std::string& _istr); 00047 00051 int getChar(); 00052 00053 private: 00054 00056 std::string& istr; 00057 00059 int nchar; 00060 00061 }; 00062 00063 #endif
1.5.7