@@ -58,7 +58,7 @@ template <typename Grammar, basic_fixed_string input, typename ActionSelector =
5858 }
5959 // if rule is pop_input => move to next character
6060 template <size_t Pos, typename Terminal, typename Stack, typename Subject>
61- static constexpr auto move (ctll::pop_input, Terminal, Stack stack , Subject subject ) noexcept {
61+ static constexpr auto move (ctll::pop_input, Terminal, Stack, Subject) noexcept {
6262 return seed<Pos+1 , Stack, Subject, decision::undecided>();
6363 }
6464 // if rule is string => push it to the front of stack
@@ -74,21 +74,21 @@ template <typename Grammar, basic_fixed_string input, typename ActionSelector =
7474 // if rule is string with current character at the beginning (term<V>) => move to next character
7575 // and push string without the character (quick LL(1))
7676 template <size_t Pos, auto V, typename ... Content, typename Stack, typename Subject>
77- static constexpr auto move (ctll::list<term<V>, Content...> string , term<V>, Stack stack, Subject subject ) noexcept {
77+ static constexpr auto move (ctll::list<term<V>, Content...>, term<V>, Stack stack, Subject) noexcept {
7878 return seed<Pos+1 , decltype (push_front (list<Content...>(), stack)), Subject, decision::undecided>();
7979 }
8080 // if rule is string with any character at the beginning (compatible with current term<T>) => move to next character
8181 // and push string without the character (quick LL(1))
8282 template <size_t Pos, auto V, typename ... Content, auto T, typename Stack, typename Subject>
83- static constexpr auto move (ctll::list<anything, Content...> string , term<T>, Stack stack, Subject subject ) noexcept {
83+ static constexpr auto move (ctll::list<anything, Content...>, term<T>, Stack stack, Subject) noexcept {
8484 return seed<Pos+1 , decltype (push_front (list<Content...>(), stack)), Subject, decision::undecided>();
8585 }
8686 // decide if we need to take action or move
8787 template <size_t Pos, typename Stack, typename Subject> static constexpr auto decide (Stack previous_stack, Subject previous_subject) noexcept {
8888 // each call means we pop something from stack
8989 auto top_symbol = decltype (ctll::front (previous_stack, empty_stack_symbol ()))();
90- auto stack = decltype ( ctll::pop_front (previous_stack))();
91- // auto [top_symbol, stack] = pop_and_get_front(previous_stack, empty_stack_symbol() );
90+ // gcc pedantic warning
91+ [[maybe_unused]] auto stack = decltype ( ctll::pop_front (previous_stack))( );
9292
9393 // in case top_symbol is action type (apply it on previous subject and get new one)
9494 if constexpr (std::is_base_of_v<ctll::action, decltype (top_symbol)>) {
@@ -132,7 +132,7 @@ template <typename Grammar, basic_fixed_string input, typename ActionSelector =
132132 };
133133
134134 // trampolines with folded expression
135- template <typename Subject, size_t ... Pos> static constexpr auto trampoline_decide (Subject default_subject , std::index_sequence<Pos...>) noexcept {
135+ template <typename Subject, size_t ... Pos> static constexpr auto trampoline_decide (Subject, std::index_sequence<Pos...>) noexcept {
136136 // parse everything for first char and than for next and next ...
137137 // Pos+1 is needed as we want to finish calculation with epsilons on stack
138138 return (seed<0 , decltype (grammar.start_stack ), Subject, decision::undecided>::parse () + ... + placeholder<Pos+1 >());
@@ -143,9 +143,9 @@ template <typename Grammar, basic_fixed_string input, typename ActionSelector =
143143 return trampoline_decide (subject, std::make_index_sequence<input.size ()>());
144144 }
145145
146- template <typename Subject = empty_subject> using output = decltype (trampoline_decide( Subject() ));
146+ template <typename Subject = empty_subject> using output = decltype (trampoline_decide< Subject>( ));
147147 static inline constexpr bool correct = trampoline_decide(empty_subject());
148- template <typename Subject = empty_subject> static inline constexpr bool correct_with = trampoline_decide( Subject() );
148+ template <typename Subject = empty_subject> static inline constexpr bool correct_with = trampoline_decide< Subject>( );
149149};
150150
151151} // end of ctll namespace
0 commit comments