Flow123d  JS_before_hm-62-ge56f9d5
Public Types | Public Member Functions | Static Public Attributes | List of all members
Input::uncommenting_fsm Struct Reference

#include <comment_filter.hh>

Inheritance diagram for Input::uncommenting_fsm:
Inheritance graph
[legend]
Collaboration diagram for Input::uncommenting_fsm:
Collaboration graph
[legend]

Public Types

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
 
- Public Types inherited from boost::iostreams::finite_state_machine< uncommenting_fsm >
typedef char char_type
 
typedef char_traits< char >::int_type int_type
 

Public Member Functions

 BOOST_IOSTREAMS_FSM (uncommenting_fsm) inline void slash_and_push(char ch)
 
- Public Member Functions inherited from boost::iostreams::finite_state_machine< uncommenting_fsm >
void imbue (const std::locale &loc)
 
const std::locale & getloc () const
 

Static Public Attributes

static const int no_comment = initial_state
 
static const int one_slash = initial_state + 1
 
static const int one_line_comment = initial_state + 2
 
static const int multi_line_comment = initial_state + 3
 
static const int star_in_comment = initial_state + 4
 
static const int no_comment_bsl = initial_state + 5
 
static const int in_quote = initial_state + 6
 
static const int in_quote_bsl = initial_state + 7
 
- Static Public Attributes inherited from boost::iostreams::finite_state_machine_base
static const int initial_state = 0
 

Additional Inherited Members

- Protected Member Functions inherited from boost::iostreams::finite_state_machine< uncommenting_fsm >
 finite_state_machine ()
 
bool empty () const
 
void push (char c)
 
char_type pop ()
 
char_typetop ()
 
void clear ()
 
void on_eof ()
 
void skip (char_type)
 
void on_any (char_type)
 

Detailed Description

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 41 of file comment_filter.hh.

Member Typedef Documentation

Definition at line 45 of file comment_filter.hh.

Declaration of rules of the FSM.

Definition at line 96 of file comment_filter.hh.

Member Function Documentation

Input::uncommenting_fsm::BOOST_IOSTREAMS_FSM ( uncommenting_fsm  )
inline

Definition at line 42 of file comment_filter.hh.

Member Data Documentation

const int Input::uncommenting_fsm::in_quote = initial_state + 6
static

Definition at line 56 of file comment_filter.hh.

const int Input::uncommenting_fsm::in_quote_bsl = initial_state + 7
static

Definition at line 57 of file comment_filter.hh.

const int Input::uncommenting_fsm::multi_line_comment = initial_state + 3
static

Definition at line 53 of file comment_filter.hh.

const int Input::uncommenting_fsm::no_comment = initial_state
static

Declaration of all states of FSM.

Definition at line 50 of file comment_filter.hh.

const int Input::uncommenting_fsm::no_comment_bsl = initial_state + 5
static

Definition at line 55 of file comment_filter.hh.

const int Input::uncommenting_fsm::one_line_comment = initial_state + 2
static

Definition at line 52 of file comment_filter.hh.

const int Input::uncommenting_fsm::one_slash = initial_state + 1
static

Definition at line 51 of file comment_filter.hh.

const int Input::uncommenting_fsm::star_in_comment = initial_state + 4
static

Definition at line 54 of file comment_filter.hh.


The documentation for this struct was generated from the following file: