Public Member Functions | |
| void | lex_error (const std::string &msg="Lex error.") |
| Put the lexer into an error state. | |
| void | lex (const std::string &in, const Element< S, T > &e) |
| Perform lexing. | |
| bool | error () const |
| Return true when an error occured. | |
| const std::string & | error_msg () const |
| Return the error message. | |
| krat_exp_token_t | first () const |
| Return the first token. | |
| krat_exp_token_t | second () const |
| Return the second token. | |
| void | eat () |
| Shift tokens. | |
Parser Definition at line 238 of file krat_exp_parser.hxx.
| void lex | ( | const std::string & | in, | |
| const Element< S, T > & | e | |||
| ) | [inline] |
Perform lexing.
| in | The rational expression to lex, as a string. | |
| e | The element which will be used later for parsing. It used to guess words and semiring types. |
Definition at line 271 of file krat_exp_parser.hxx.
References vcsn::misc::escaped(), Lexer::lex_error(), vcsn::parse_weight(), vcsn::parse_word(), KRatExpToken::reset(), Element::structure(), and vcsn::misc::usual_escaped_characters().
Referenced by vcsn::algebra::parse().
| void eat | ( | ) | [inline] |
Shift tokens.
Remove the first token from the token stream. So second becames first, third becames second, and so on...
Definition at line 363 of file krat_exp_parser.hxx.
1.5.5