From be4902eccc9accca970eb851e4bbb0b09e102a82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Renaud=20Casenave-P=C3=A9r=C3=A9?= Date: Tue, 26 Aug 2025 21:14:34 +0200 Subject: [PATCH] Move old lexy parser out of the way --- parser.pro => lexy-parser.pro | 7 ++++++- src/{parser => lexy-parser}/ast.cc | 0 src/{parser => lexy-parser}/ast.hh | 0 src/{parser => lexy-parser}/ecl_helpers.hh | 0 src/{parser => lexy-parser}/grammar.hh | 0 src/{parser/parser.cc => lexy-parser/lexy-parser.cc} | 0 src/{parser/parser.hh => lexy-parser/lexy-parser.hh} | 0 src/{parser => lexy-parser}/node_sink.hh | 0 8 files changed, 6 insertions(+), 1 deletion(-) rename parser.pro => lexy-parser.pro (95%) rename src/{parser => lexy-parser}/ast.cc (100%) rename src/{parser => lexy-parser}/ast.hh (100%) rename src/{parser => lexy-parser}/ecl_helpers.hh (100%) rename src/{parser => lexy-parser}/grammar.hh (100%) rename src/{parser/parser.cc => lexy-parser/lexy-parser.cc} (100%) rename src/{parser/parser.hh => lexy-parser/lexy-parser.hh} (100%) rename src/{parser => lexy-parser}/node_sink.hh (100%) diff --git a/parser.pro b/lexy-parser.pro similarity index 95% rename from parser.pro rename to lexy-parser.pro index b5afe62..cfa0e00 100644 --- a/parser.pro +++ b/lexy-parser.pro @@ -4,6 +4,8 @@ TARGET = sextant-parser DESTDIR = $$PWD OBJECTS_DIR = $$PWD/tmp/parser/ INCLUDEPATH += $$PWD/external/lexy/include +INCLUDEPATH += $$PWD/external/tree-sitter/lib/src $$PWD/external/tree-sitter/lib/include +INCLUDEPATH += $$PWD/external/tree-sitter-org/src DEFINES += LEXY_HAS_UNICODE_DATABASE=1 LIBS += -lecl QMAKE_CXXFLAGS += -std=c++2a -Wno-parentheses -Wno-unused-local-typedefs -Wno-array-bounds -Wno-maybe-uninitialized -Wno-restrict @@ -14,7 +16,10 @@ INSTALLS = target SOURCES += \ src/parser/parser.cc \ - src/parser/ast.cc + src/parser/ast.cc \ + external/tree-sitter/lib/src/lib.c \ + external/tree-sitter-org/src/parser.c \ + external/tree-sitter-org/src/scanner.c HEADERS+= \ src/parser/grammar.hh \ diff --git a/src/parser/ast.cc b/src/lexy-parser/ast.cc similarity index 100% rename from src/parser/ast.cc rename to src/lexy-parser/ast.cc diff --git a/src/parser/ast.hh b/src/lexy-parser/ast.hh similarity index 100% rename from src/parser/ast.hh rename to src/lexy-parser/ast.hh diff --git a/src/parser/ecl_helpers.hh b/src/lexy-parser/ecl_helpers.hh similarity index 100% rename from src/parser/ecl_helpers.hh rename to src/lexy-parser/ecl_helpers.hh diff --git a/src/parser/grammar.hh b/src/lexy-parser/grammar.hh similarity index 100% rename from src/parser/grammar.hh rename to src/lexy-parser/grammar.hh diff --git a/src/parser/parser.cc b/src/lexy-parser/lexy-parser.cc similarity index 100% rename from src/parser/parser.cc rename to src/lexy-parser/lexy-parser.cc diff --git a/src/parser/parser.hh b/src/lexy-parser/lexy-parser.hh similarity index 100% rename from src/parser/parser.hh rename to src/lexy-parser/lexy-parser.hh diff --git a/src/parser/node_sink.hh b/src/lexy-parser/node_sink.hh similarity index 100% rename from src/parser/node_sink.hh rename to src/lexy-parser/node_sink.hh