|
mjplusplus
v0.4.1
|
#include <stateomat.hpp>
Public Member Functions | |
| Stateomat () | |
| bool | state_is_accepting (unsigned int state) |
| void | dump_graph (std::string const &file_name) |
Public Attributes | |
| std::vector< std::vector < unsigned int > > | transitions |
| std::vector< Token::Token_type > | state_type |
| std::unordered_map < std::string, Token::Token_type > | keywords |
| std::vector < std::unordered_map < std::string, Token::Token_type > > | operators |
| std::map< Token::Token_type, std::string > | reverse |
| lexer::Stateomat::Stateomat | ( | ) |
Constructor.
| void lexer::Stateomat::dump_graph | ( | std::string const & | file_name | ) |
Writes the stateomat transition graph as a gml-file.
| file_name | file to write the graph into |
| bool lexer::Stateomat::state_is_accepting | ( | unsigned int | state | ) |
Returns whether the current state is accepting.
| state | the state to test |
| std::unordered_map<std::string, Token::Token_type> lexer::Stateomat::keywords |
maps string representation to token type for all keywords
| std::vector<std::unordered_map<std::string, Token::Token_type> > lexer::Stateomat::operators |
maps string representation to token type for operators. indexed by end state to get the appropriate map
| std::map<Token::Token_type, std::string> lexer::Stateomat::reverse |
maps token type to its string representation (for printing purposes)
| std::vector<Token::Token_type> lexer::Stateomat::state_type |
saves the token types corresponding to the different states
| std::vector<std::vector<unsigned int> > lexer::Stateomat::transitions |
transition map
1.8.8