|
typedef uncommenting_fsm | self |
|
typedef boost::mpl::vector< row< no_comment, is<'/'>, one_slash,&self::skip >, row< no_comment, is<'"'>, in_quote, &self::push>, row<no_comment, is<'\\'>, no_comment_bsl, &self::push>, row<no_comment, is_any, no_comment, &self::push>, row<one_slash, is<'/'>, one_line_comment, &self::skip>, row<one_slash, is<'*'>, multi_line_comment, &self::skip>, row<one_slash, is_any, no_comment, &self::slash_and_push>, row<one_line_comment, is<'\n'>, no_comment, &self::push>, row<one_line_comment, is<'\r'>, no_comment, &self::push>, row<one_line_comment, is_any , one_line_comment, &self::skip>, row<multi_line_comment, is<'*'>, star_in_comment, &self::skip>, row<multi_line_comment, is<'\n'>, multi_line_comment, &self::push>, row<multi_line_comment, is<'\r'>, multi_line_comment, &self::push>, row<multi_line_comment, is_any, multi_line_comment, &self::skip>, row<star_in_comment, is<'/'>, no_comment, &self::skip>, row<star_in_comment, is<'\n'>, multi_line_comment, &self::push>, row<star_in_comment, is<'\r'>, multi_line_comment, &self::push>, row<star_in_comment, is_any, multi_line_comment, &self::skip>, row<in_quote, is<'"'>, no_comment,&self::push >, row< in_quote, is<'\\'>, in_quote_bsl,&self::push >, row< in_quote, is_any, in_quote,&self::push >, row< in_quote_bsl, is_any, in_quote,&self::push >, row< no_comment_bsl, is_any, no_comment,&self::push > > | transition_table |
|
typedef char | char_type |
|
typedef char_traits< char >::int_type | int_type |
|
This structure implements a finite state machine for filtering comments of the input file. The comment starts with '#' at any place save in quotas and after backslash. The comment ends be fors non-backslashed end of line. Backslashed end of line consists of the backslash, any sequence of whitespaces
We assume, that json parser use backslash as an escape character, so we also have to escape any special meaning of the next character, but we keep backslash on the place.
Don't ask me for syntactic bloat. This struct has to define transition_table
of the FSM. Access to the rules is provided by methods derived from io::finite_state_machine
. Then the FSM is used to implement filter.
Definition at line 31 of file comment_filter.hh.