Преглед на файлове

3rdparty: upgrade PEGTL to its latest version (2.1.4 or something).

legacy
Sam Hocevar преди 7 години
родител
ревизия
f9058a384d
променени са 5 файла, в които са добавени 145 реда и са изтрити 122 реда
  1. +1
    -1
      build/autotools/m4/lol-conf.m4
  2. +1
    -1
      build/msbuild/lol.vars.props
  3. +134
    -115
      src/3rdparty/lol-pegtl.am
  4. +1
    -1
      src/3rdparty/pegtl
  5. +8
    -4
      src/gpu/shader.cpp

+ 1
- 1
build/autotools/m4/lol-conf.m4 Целия файл

@@ -65,7 +65,7 @@ dnl Activate some header-only libraries
dnl

LOL_CFLAGS="$LOL_CFLAGS -I\$(lol_srcdir)/src/3rdparty/mingw-std-threads"
LOL_CFLAGS="$LOL_CFLAGS -I\$(lol_srcdir)/src/3rdparty/pegtl"
LOL_CFLAGS="$LOL_CFLAGS -I\$(lol_srcdir)/src/3rdparty/pegtl/include"
LOL_CFLAGS="$LOL_CFLAGS -I\$(lol_srcdir)/src/3rdparty/imgui"

dnl Use system-provided getopt_long?


+ 1
- 1
build/msbuild/lol.vars.props Целия файл

@@ -5,7 +5,7 @@
<ExternalDir>$(LolDir)\external</ExternalDir>

<!-- PEGTL -->
<PegtlDir>$(LolDir)\src/3rdparty\pegtl</PegtlDir>
<PegtlDir>$(LolDir)\src/3rdparty\pegtl\include</PegtlDir>
<PegtlIncludes>$(PegtlDir)</PegtlIncludes>

<!-- imgui -->


+ 134
- 115
src/3rdparty/lol-pegtl.am Целия файл

@@ -1,119 +1,138 @@

pegtl_sources = \
pegtl/pegtl/action_input.hh \
pegtl/pegtl/analysis/analyze_cycles.hh \
pegtl/pegtl/analysis/counted.hh \
pegtl/pegtl/analysis/generic.hh \
pegtl/pegtl/analysis/grammar_info.hh \
pegtl/pegtl/analysis/insert_guard.hh \
pegtl/pegtl/analysis/insert_rules.hh \
pegtl/pegtl/analysis/rule_info.hh \
pegtl/pegtl/analysis/rule_type.hh \
pegtl/pegtl/analyze.hh \
pegtl/pegtl/apply_mode.hh \
pegtl/pegtl/ascii.hh \
pegtl/pegtl/buffer_input.hh \
pegtl/pegtl/contrib/abnf.hh \
pegtl/pegtl/contrib/alphabet.hh \
pegtl/pegtl/contrib/changes.hh \
pegtl/pegtl/contrib/http.hh \
pegtl/pegtl/contrib/json.hh \
pegtl/pegtl/contrib/raw_string.hh \
pegtl/pegtl/contrib/unescape.hh \
pegtl/pegtl/contrib/uri.hh \
pegtl/pegtl/cr_crlf_eol.hh \
pegtl/pegtl/cr_eol.hh \
pegtl/pegtl/crlf_eol.hh \
pegtl/pegtl/eol.hh \
pegtl/pegtl/file_parser.hh \
pegtl/pegtl.hh \
pegtl/pegtl/input_error.hh \
pegtl/pegtl/internal/action.hh \
pegtl/pegtl/internal/any.hh \
pegtl/pegtl/internal/at.hh \
pegtl/pegtl/internal/bump_util.hh \
pegtl/pegtl/internal/bytes.hh \
pegtl/pegtl/internal/control.hh \
pegtl/pegtl/internal/cstream_reader.hh \
pegtl/pegtl/internal/cstring_reader.hh \
pegtl/pegtl/internal/demangle_cxxabi.hh \
pegtl/pegtl/internal/demangle.hh \
pegtl/pegtl/internal/demangle_nop.hh \
pegtl/pegtl/internal/disable.hh \
pegtl/pegtl/internal/discard.hh \
pegtl/pegtl/internal/discard_if.hh \
pegtl/pegtl/internal/enable.hh \
pegtl/pegtl/internal/eof.hh \
pegtl/pegtl/internal/eolf.hh \
pegtl/pegtl/internal/eol.hh \
pegtl/pegtl/internal/eol_impl.hh \
pegtl/pegtl/internal/file_mapper.hh \
pegtl/pegtl/internal/file_opener.hh \
pegtl/pegtl/internal/file_reader.hh \
pegtl/pegtl/internal/if_must_else.hh \
pegtl/pegtl/internal/if_must.hh \
pegtl/pegtl/internal/if_then_else.hh \
pegtl/pegtl/internal/input_data.hh \
pegtl/pegtl/internal/input_mark.hh \
pegtl/pegtl/internal/input_pair.hh \
pegtl/pegtl/internal/istream_reader.hh \
pegtl/pegtl/internal/istring.hh \
pegtl/pegtl/internal/list.hh \
pegtl/pegtl/internal/list_must.hh \
pegtl/pegtl/internal/list_tail.hh \
pegtl/pegtl/internal/list_tail_pad.hh \
pegtl/pegtl/internal/minus.hh \
pegtl/pegtl/internal/must.hh \
pegtl/pegtl/internal/not_at.hh \
pegtl/pegtl/internal/one.hh \
pegtl/pegtl/internal/opt.hh \
pegtl/pegtl/internal/pad.hh \
pegtl/pegtl/internal/pad_opt.hh \
pegtl/pegtl/internal/peek_char.hh \
pegtl/pegtl/internal/peek_utf16.hh \
pegtl/pegtl/internal/peek_utf32.hh \
pegtl/pegtl/internal/peek_utf8.hh \
pegtl/pegtl/internal/pegtl_string.hh \
pegtl/pegtl/internal/plus.hh \
pegtl/pegtl/internal/raise.hh \
pegtl/pegtl/internal/range.hh \
pegtl/pegtl/internal/ranges.hh \
pegtl/pegtl/internal/rep.hh \
pegtl/pegtl/internal/rep_min.hh \
pegtl/pegtl/internal/rep_min_max.hh \
pegtl/pegtl/internal/rep_opt.hh \
pegtl/pegtl/internal/require.hh \
pegtl/pegtl/internal/result_on_found.hh \
pegtl/pegtl/internal/rule_conjunction.hh \
pegtl/pegtl/internal/rule_match_one.hh \
pegtl/pegtl/internal/rule_match_three.hh \
pegtl/pegtl/internal/rule_match_two.hh \
pegtl/pegtl/internal/rules.hh \
pegtl/pegtl/internal/seq.hh \
pegtl/pegtl/internal/skip_control.hh \
pegtl/pegtl/internal/sor.hh \
pegtl/pegtl/internal/star.hh \
pegtl/pegtl/internal/star_must.hh \
pegtl/pegtl/internal/state.hh \
pegtl/pegtl/internal/string.hh \
pegtl/pegtl/internal/trivial.hh \
pegtl/pegtl/internal/try_catch_type.hh \
pegtl/pegtl/internal/until.hh \
pegtl/pegtl/lf_crlf_eol.hh \
pegtl/pegtl/lf_eol.hh \
pegtl/pegtl/memory_input.hh \
pegtl/pegtl/mmap_parser.hh \
pegtl/pegtl/normal.hh \
pegtl/pegtl/nothing.hh \
pegtl/pegtl/parse_error.hh \
pegtl/pegtl/parse.hh \
pegtl/pegtl/position_info.hh \
pegtl/pegtl/read_parser.hh \
pegtl/pegtl/rules.hh \
pegtl/pegtl/string_parser.hh \
pegtl/pegtl/trace.hh \
pegtl/pegtl/utf16.hh \
pegtl/pegtl/utf32.hh \
pegtl/pegtl/utf8.hh \
pegtl/include/tao/pegtl/analysis/analyze_cycles.hpp \
pegtl/include/tao/pegtl/analysis/counted.hpp \
pegtl/include/tao/pegtl/analysis/generic.hpp \
pegtl/include/tao/pegtl/analysis/grammar_info.hpp \
pegtl/include/tao/pegtl/analysis/insert_guard.hpp \
pegtl/include/tao/pegtl/analysis/insert_rules.hpp \
pegtl/include/tao/pegtl/analysis/rule_info.hpp \
pegtl/include/tao/pegtl/analysis/rule_type.hpp \
pegtl/include/tao/pegtl/analyze.hpp \
pegtl/include/tao/pegtl/apply_mode.hpp \
pegtl/include/tao/pegtl/argv_input.hpp \
pegtl/include/tao/pegtl/ascii.hpp \
pegtl/include/tao/pegtl/buffer_input.hpp \
pegtl/include/tao/pegtl/config.hpp \
pegtl/include/tao/pegtl/contrib/abnf.hpp \
pegtl/include/tao/pegtl/contrib/alphabet.hpp \
pegtl/include/tao/pegtl/contrib/changes.hpp \
pegtl/include/tao/pegtl/contrib/counter.hpp \
pegtl/include/tao/pegtl/contrib/http.hpp \
pegtl/include/tao/pegtl/contrib/json.hpp \
pegtl/include/tao/pegtl/contrib/raw_string.hpp \
pegtl/include/tao/pegtl/contrib/rep_one_min_max.hpp \
pegtl/include/tao/pegtl/contrib/to_string.hpp \
pegtl/include/tao/pegtl/contrib/tracer.hpp \
pegtl/include/tao/pegtl/contrib/unescape.hpp \
pegtl/include/tao/pegtl/contrib/uri.hpp \
pegtl/include/tao/pegtl/cstream_input.hpp \
pegtl/include/tao/pegtl/eol.hpp \
pegtl/include/tao/pegtl/file_input.hpp \
pegtl/include/tao/pegtl.hpp \
pegtl/include/tao/pegtl/input_error.hpp \
pegtl/include/tao/pegtl/internal/action.hpp \
pegtl/include/tao/pegtl/internal/action_input.hpp \
pegtl/include/tao/pegtl/internal/alnum.hpp \
pegtl/include/tao/pegtl/internal/alpha.hpp \
pegtl/include/tao/pegtl/internal/any.hpp \
pegtl/include/tao/pegtl/internal/apply0.hpp \
pegtl/include/tao/pegtl/internal/apply.hpp \
pegtl/include/tao/pegtl/internal/at.hpp \
pegtl/include/tao/pegtl/internal/bof.hpp \
pegtl/include/tao/pegtl/internal/bol.hpp \
pegtl/include/tao/pegtl/internal/bump_help.hpp \
pegtl/include/tao/pegtl/internal/bump_impl.hpp \
pegtl/include/tao/pegtl/internal/bytes.hpp \
pegtl/include/tao/pegtl/internal/control.hpp \
pegtl/include/tao/pegtl/internal/cr_crlf_eol.hpp \
pegtl/include/tao/pegtl/internal/cr_eol.hpp \
pegtl/include/tao/pegtl/internal/crlf_eol.hpp \
pegtl/include/tao/pegtl/internal/cstream_reader.hpp \
pegtl/include/tao/pegtl/internal/cstring_reader.hpp \
pegtl/include/tao/pegtl/internal/demangle_cxxabi.hpp \
pegtl/include/tao/pegtl/internal/demangle.hpp \
pegtl/include/tao/pegtl/internal/demangle_nop.hpp \
pegtl/include/tao/pegtl/internal/demangle_sanitise.hpp \
pegtl/include/tao/pegtl/internal/disable.hpp \
pegtl/include/tao/pegtl/internal/discard.hpp \
pegtl/include/tao/pegtl/internal/dusel_mode.hpp \
pegtl/include/tao/pegtl/internal/duseltronik.hpp \
pegtl/include/tao/pegtl/internal/enable.hpp \
pegtl/include/tao/pegtl/internal/eof.hpp \
pegtl/include/tao/pegtl/internal/eolf.hpp \
pegtl/include/tao/pegtl/internal/eol.hpp \
pegtl/include/tao/pegtl/internal/file_mapper.hpp \
pegtl/include/tao/pegtl/internal/file_opener.hpp \
pegtl/include/tao/pegtl/internal/file_reader.hpp \
pegtl/include/tao/pegtl/internal/has_apply0.hpp \
pegtl/include/tao/pegtl/internal/identifier.hpp \
pegtl/include/tao/pegtl/internal/if_apply.hpp \
pegtl/include/tao/pegtl/internal/if_must_else.hpp \
pegtl/include/tao/pegtl/internal/if_must.hpp \
pegtl/include/tao/pegtl/internal/if_then_else.hpp \
pegtl/include/tao/pegtl/internal/input_pair.hpp \
pegtl/include/tao/pegtl/internal/integer_sequence.hpp \
pegtl/include/tao/pegtl/internal/istream_reader.hpp \
pegtl/include/tao/pegtl/internal/istring.hpp \
pegtl/include/tao/pegtl/internal/iterator.hpp \
pegtl/include/tao/pegtl/internal/lf_crlf_eol.hpp \
pegtl/include/tao/pegtl/internal/lf_eol.hpp \
pegtl/include/tao/pegtl/internal/list.hpp \
pegtl/include/tao/pegtl/internal/list_must.hpp \
pegtl/include/tao/pegtl/internal/list_tail.hpp \
pegtl/include/tao/pegtl/internal/list_tail_pad.hpp \
pegtl/include/tao/pegtl/internal/marker.hpp \
pegtl/include/tao/pegtl/internal/minus.hpp \
pegtl/include/tao/pegtl/internal/must.hpp \
pegtl/include/tao/pegtl/internal/not_at.hpp \
pegtl/include/tao/pegtl/internal/one.hpp \
pegtl/include/tao/pegtl/internal/opt.hpp \
pegtl/include/tao/pegtl/internal/pad.hpp \
pegtl/include/tao/pegtl/internal/pad_opt.hpp \
pegtl/include/tao/pegtl/internal/peek_char.hpp \
pegtl/include/tao/pegtl/internal/peek_utf16.hpp \
pegtl/include/tao/pegtl/internal/peek_utf32.hpp \
pegtl/include/tao/pegtl/internal/peek_utf8.hpp \
pegtl/include/tao/pegtl/internal/pegtl_string.hpp \
pegtl/include/tao/pegtl/internal/plus.hpp \
pegtl/include/tao/pegtl/internal/raise.hpp \
pegtl/include/tao/pegtl/internal/range.hpp \
pegtl/include/tao/pegtl/internal/ranges.hpp \
pegtl/include/tao/pegtl/internal/rep.hpp \
pegtl/include/tao/pegtl/internal/rep_min.hpp \
pegtl/include/tao/pegtl/internal/rep_min_max.hpp \
pegtl/include/tao/pegtl/internal/rep_opt.hpp \
pegtl/include/tao/pegtl/internal/require.hpp \
pegtl/include/tao/pegtl/internal/result_on_found.hpp \
pegtl/include/tao/pegtl/internal/rule_conjunction.hpp \
pegtl/include/tao/pegtl/internal/rules.hpp \
pegtl/include/tao/pegtl/internal/seq.hpp \
pegtl/include/tao/pegtl/internal/skip_control.hpp \
pegtl/include/tao/pegtl/internal/sor.hpp \
pegtl/include/tao/pegtl/internal/star.hpp \
pegtl/include/tao/pegtl/internal/star_must.hpp \
pegtl/include/tao/pegtl/internal/state.hpp \
pegtl/include/tao/pegtl/internal/string.hpp \
pegtl/include/tao/pegtl/internal/trivial.hpp \
pegtl/include/tao/pegtl/internal/try_catch_type.hpp \
pegtl/include/tao/pegtl/internal/until.hpp \
pegtl/include/tao/pegtl/istream_input.hpp \
pegtl/include/tao/pegtl/memory_input.hpp \
pegtl/include/tao/pegtl/mmap_input.hpp \
pegtl/include/tao/pegtl/normal.hpp \
pegtl/include/tao/pegtl/nothing.hpp \
pegtl/include/tao/pegtl/parse_error.hpp \
pegtl/include/tao/pegtl/parse.hpp \
pegtl/include/tao/pegtl/position.hpp \
pegtl/include/tao/pegtl/read_input.hpp \
pegtl/include/tao/pegtl/rewind_mode.hpp \
pegtl/include/tao/pegtl/rules.hpp \
pegtl/include/tao/pegtl/string_input.hpp \
pegtl/include/tao/pegtl/tracking_mode.hpp \
pegtl/include/tao/pegtl/utf16.hpp \
pegtl/include/tao/pegtl/utf32.hpp \
pegtl/include/tao/pegtl/utf8.hpp \
pegtl/include/tao/pegtl/version.hpp \
$(NULL)


+ 1
- 1
src/3rdparty/pegtl

@@ -1 +1 @@
Subproject commit 267e992c17074a1afdc35ac361f7dd7525c37939
Subproject commit ffefbefc8d2a320d93face402dfb2b3ed7490cff

+ 8
- 4
src/gpu/shader.cpp Целия файл

@@ -21,7 +21,7 @@
# undef WIN32_LEAN_AND_MEAN
#endif

#include "pegtl.hh"
#include "tao/pegtl.hpp"

#include "lolgl.h"

@@ -99,6 +99,7 @@ int ShaderData::nshaders = 0;
* LolFx parser
*/

using namespace tao;
using namespace pegtl;

struct lolfx_parser
@@ -154,14 +155,16 @@ public:
lolfx_parser(String const &code)
: m_section("header")
{
pegtl::parse_string<lolfx, action>(code.C(), "shader", this);
string_input<> in(code.C(), "shader");
pegtl::parse<lolfx, action>(in, this);
}
};

template<>
struct lolfx_parser::action<lolfx_parser::do_title>
{
static void apply(action_input const &in, lolfx_parser *that)
template<typename INPUT>
static void apply(INPUT const &in, lolfx_parser *that)
{
that->m_section = in.string().c_str();
}
@@ -170,7 +173,8 @@ struct lolfx_parser::action<lolfx_parser::do_title>
template<>
struct lolfx_parser::action<lolfx_parser::code_section>
{
static void apply(action_input const &in, lolfx_parser *that)
template<typename INPUT>
static void apply(INPUT const &in, lolfx_parser *that)
{
that->m_programs[that->m_section] = in.string().c_str();
}


Зареждане…
Отказ
Запис