#include <string>
#include <sstream>
#include <map>
#include <vector>
Go to the source code of this file.
Classes | |
struct | Parser::Token< TokenType > |
class | Parser::Tokenizer< TokenType, Init > |
class | Parser::TokenizerData< TokenType > |
struct | Parser::TokenStream< TokenType > |
struct | Parser::tstream_state |
Namespaces | |
namespace | Parser |
Defines | |
#define | ADD_ERROR(tkn, X) |
#define | TKN_NEXT(TKN) TKN_NEXT_OPTIONAL(TKN, return false) |
#define | TKN_NEXT_OPTIONAL(TKN, RET) TKN_NEXT_SEARCH_OPTIONAL(tkn.type==TKN, RET) |
#define | TKN_NEXT_SEARCH(TKN) TKN_NEXT_SEARCH_OPTIONAL(TKN, return false) |
#define | TKN_NEXT_SEARCH_OPTIONAL(TKN, RET) stream >> tkn; if(not (TKN)) RET; |
#define | TKN_SEARCH(TKN) TKN_SEARCH_OPTIONAL(TKN, return false) |
#define | TKN_SEARCH_CLOSE_PARENT(END, stream, topen, tclose, X) |
#define | TKN_SEARCH_OPTIONAL(TKN, RET) if(not (TKN)) RET; |
Functions | |
template<class TokenType > | |
static ostream & | Parser::operator<< (ostream &out, const Token< TokenType > &t) |
string | Parser::str (char c) |
template<class TokenType > | |
size_t | Parser::tkn_search_close_parent (TokenStream< TokenType > &stream, TokenType topen, TokenType tclose) |
#define TKN_NEXT | ( | TKN | ) | TKN_NEXT_OPTIONAL(TKN, return false) |
Definition at line 151 of file Tokenizer.h.
#define TKN_NEXT_OPTIONAL | ( | TKN, | |
RET | |||
) | TKN_NEXT_SEARCH_OPTIONAL(tkn.type==TKN, RET) |
Definition at line 149 of file Tokenizer.h.
#define TKN_NEXT_SEARCH | ( | TKN | ) | TKN_NEXT_SEARCH_OPTIONAL(TKN, return false) |
Definition at line 153 of file Tokenizer.h.
#define TKN_NEXT_SEARCH_OPTIONAL | ( | TKN, | |
RET | |||
) | stream >> tkn; if(not (TKN)) RET; |
Definition at line 148 of file Tokenizer.h.
#define TKN_SEARCH | ( | TKN | ) | TKN_SEARCH_OPTIONAL(TKN, return false) |
Definition at line 152 of file Tokenizer.h.
#define TKN_SEARCH_CLOSE_PARENT | ( | END, | |
stream, | |||
topen, | |||
tclose, | |||
X | |||
) |
tkn_search_close_parent(stream, topen, tclose);\ if(END==size_t(-1)){\ PRINT("Unexpected end of file during " X ".");\ int l,p; searchLineInfo(tkn.end, l,p);\ errors<<"In "<<filename<<":"<<l<<":"<<p<<" "<<tkn<<endl<<" Unexpected end of structure during " X " parsing."<<endl;\ return false;\ }
Definition at line 139 of file Tokenizer.h.
#define TKN_SEARCH_OPTIONAL | ( | TKN, | |
RET | |||
) | if(not (TKN)) RET; |
Definition at line 147 of file Tokenizer.h.