BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
symbolmap.h
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) BDSIM Collaboration, 2001 - 2026.
3
4This file is part of BDSIM.
5
6BDSIM is free software: you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published
8by the Free Software Foundation version 3 of the License.
9
10BDSIM is distributed in the hope that it will be useful, but
11WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
17*/
18#ifndef SYMBOLMAP_H
19#define SYMBOLMAP_H
20
21#include <map>
22#include <string>
23
24namespace GMAD {
25
26 class Symtab;
27
32 class SymbolMap {
33 public:
35 void clear();
37 Symtab * symcreate(std::string s);
39 Symtab * symlook(std::string s);
40
41 private:
43 std::map<std::string, Symtab*> symtab_map;
44 };
45}
46
47#endif
Class that hold the symbol table.
Definition symbolmap.h:32
void clear()
Destructor that clears memory.
Definition symbolmap.cc:47
std::map< std::string, Symtab * > symtab_map
Parser symbol map.
Definition symbolmap.h:43
Symtab * symlook(std::string s)
Look up parser symbol.
Definition symbolmap.cc:41
Symtab * symcreate(std::string s)
Create new parser symbol.
Definition symbolmap.cc:27
Common header for the lexer and the parser to share Symbol table for numeric variables,...
Definition sym_table.h:32
Parser namespace for GMAD language. Combination of Geant4 and MAD.