Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Examples  

ExprScanner.h

Go to the documentation of this file.
00001 #ifndef EXPRSCANNER_H
00002 #define EXPRSCANNER_H
00003 
00004 #include "SundanceDefs.h"
00005 
00006 #include "Token.h"
00007 #include "TSFArray.h"
00008 
00009 
00010 
00011 namespace Sundance
00012 {
00013 
00014   using namespace TSF;
00015   using std::string;
00016 
00017   using std::ostream;
00018 
00019 
00020   class ExprScanner
00021     {
00022     public:
00023       ExprScanner(const string& line);
00024 
00025       const Token& pop() const ;
00026       const Token& peek() const ;
00027       const Token& peekAtNext() const ;
00028       bool hasMore() const ;
00029 
00030       string showError() const ;
00031 
00032     private:
00033       bool isWhite(char c) const ;
00034       bool isDelimiter(char c) const ;
00035       Token getToken(const string& line, int& place) const ;
00036 
00037       TSFArray<Token> tok_;
00038       /* mutable */ int ptr_;
00039     };
00040 
00041 
00042 }
00043 #endif

Contact:
Kevin Long (krlong@ca.sandia.gov)


Documentation generated by