Skip to content

Commit 4dfd660

Browse files
author
Hana Dusíková
committed
Issue #38: Added missing include in pcre.hpp. Using push alias in parser instead of list for better readability.
1 parent fd0ac45 commit 4dfd660

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

include/ctll/parser.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ template <typename Grammar, basic_fixed_string input, typename ActionSelector =
7070
}
7171
// if rule is string => push it to the front of stack
7272
template <size_t Pos, typename... Content, typename Terminal, typename Stack, typename Subject>
73-
static constexpr auto move(ctll::list<Content...> string, Terminal, Stack stack, Subject subject) noexcept {
73+
static constexpr auto move(ctll::push<Content...> string, Terminal, Stack stack, Subject subject) noexcept {
7474
return decide<Pos>(push_front(string, stack), subject);
7575
}
7676
// if rule is epsilon (empty string) => continue
@@ -81,13 +81,13 @@ template <typename Grammar, basic_fixed_string input, typename ActionSelector =
8181
// if rule is string with current character at the beginning (term<V>) => move to next character
8282
// and push string without the character (quick LL(1))
8383
template <size_t Pos, auto V, typename... Content, typename Stack, typename Subject>
84-
static constexpr auto move(ctll::list<term<V>, Content...>, term<V>, Stack stack, Subject) noexcept {
84+
static constexpr auto move(ctll::push<term<V>, Content...>, term<V>, Stack stack, Subject) noexcept {
8585
return seed<Pos+1, decltype(push_front(list<Content...>(), stack)), Subject, decision::undecided>();
8686
}
8787
// if rule is string with any character at the beginning (compatible with current term<T>) => move to next character
8888
// and push string without the character (quick LL(1))
8989
template <size_t Pos, auto V, typename... Content, auto T, typename Stack, typename Subject>
90-
static constexpr auto move(ctll::list<anything, Content...>, term<T>, Stack stack, Subject) noexcept {
90+
static constexpr auto move(ctll::push<anything, Content...>, term<T>, Stack stack, Subject) noexcept {
9191
return seed<Pos+1, decltype(push_front(list<Content...>(), stack)), Subject, decision::undecided>();
9292
}
9393
// decide if we need to take action or move

include/ctre/pcre.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
// THIS FILE WAS GENERATED BY DESATOMAT TOOL, DO NOT MODIFY THIS FILE
55

6+
#include <ctll/grammars.hpp>
7+
68
namespace ctre {
79

810
struct pcre {

0 commit comments

Comments
 (0)