30 std::map<std::string,Symtab*>::iterator it =
symtab_map.find(s);
33 std::cerr <<
"ERROR Variable " << s <<
" is already defined!" << std::endl;
38 std::pair<std::map<std::string,Symtab*>::iterator,
bool> ret =
symtab_map.insert(std::make_pair(s,sp));
39 return (*(ret.first)).second;
44 std::map<std::string,Symtab*>::iterator it =
symtab_map.find(s);
45 return it ==
symtab_map.end() ? nullptr : (*it).second;
void clear()
Destructor that clears memory.
std::map< std::string, Symtab * > symtab_map
Parser symbol map.
Symtab * symlook(std::string s)
Look up parser symbol.
Symtab * symcreate(std::string s)
Create new parser symbol.
Common header for the lexer and the parser to share Symbol table for numeric variables,...
Parser namespace for GMAD language. Combination of Geant4 and MAD.