omega_h
Reliable mesh adaptation
Omega_h_language.hpp
1 #ifndef OMEGA_H_LANGUAGE_HPP
2 #define OMEGA_H_LANGUAGE_HPP
3 
4 #include <iosfwd>
5 #include <map>
6 #include <string>
7 #include <vector>
8 
9 #include <Omega_h_finite_automaton.hpp>
10 #include <Omega_h_grammar.hpp>
11 #include <Omega_h_reader_tables.hpp>
12 
13 namespace Omega_h {
14 
15 struct Language {
16  struct Token {
17  std::string name;
18  std::string regex;
19  };
20  std::vector<Token> tokens;
21  struct Production {
22  std::string lhs;
23  std::vector<std::string> rhs;
24  };
25  std::vector<Production> productions;
26 };
27 
28 using LanguagePtr = std::shared_ptr<Language>;
29 
30 GrammarPtr build_grammar(Language const& language);
31 
32 FiniteAutomaton build_lexer(Language const& language);
33 
34 ReaderTablesPtr build_reader_tables(Language const& language);
35 
36 std::ostream& operator<<(std::ostream& os, Language const& lang);
37 
38 } // namespace Omega_h
39 
40 #endif
Definition: amr_mpi_test.cpp:6
Definition: Omega_h_finite_automaton.hpp:19
Definition: Omega_h_language.hpp:21
Definition: Omega_h_language.hpp:16
Definition: Omega_h_language.hpp:15