1 #ifndef AWFUL_IDLPARSE_ASTFLAGS_H_
2 #define AWFUL_IDLPARSE_ASTFLAGS_H_
6 namespace awful
{ namespace idlparser
8 // Grammar action functors used to setup flags.
10 struct action_ResetAllFlags
12 action_ResetAllFlags( ASTState
& State_
) :
17 template< typename IterT
> void operator()( const IterT
& first
, const IterT
& last
) const
19 m_State
.m_pCurrentFlags
->clear();
25 struct action_SetFlagTrue
27 action_SetFlagTrue( ASTState
& State_
) :
32 template< typename TokenT
> void operator()( const TokenT
& tok
) const
34 ( *m_State
.m_pCurrentFlags
)[ m_State
.m_CurrentIdentifier
] = true;
40 struct action_SetFlagFalse
42 action_SetFlagFalse( ASTState
& State_
) :
47 template< typename TokenT
> void operator()( const TokenT
& tok
) const
49 ( *m_State
.m_pCurrentFlags
)[ m_State
.m_CurrentIdentifier
] = false;
55 struct action_ResetFlag
57 action_ResetFlag( ASTState
& State_
) :
62 template< typename TokenT
> void operator()( const TokenT
& tok
) const
64 ( *m_State
.m_pCurrentFlags
).erase( m_State
.m_CurrentIdentifier
);