Skip to content

Commit

Permalink
Merge pull request #288 from OnionGrief/fa-regex-refactoring
Browse files Browse the repository at this point in the history
Fa and regex refactoring
  • Loading branch information
xendalm authored Nov 4, 2023
2 parents 07f319d + 0181014 commit 1d3cd93
Show file tree
Hide file tree
Showing 57 changed files with 3,412 additions and 3,987 deletions.
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ AllowShortIfStatementsOnASingleLine: WithoutElse
SpaceBeforeParens: ControlStatements
AllowShortFunctionsOnASingleLine: Empty
AlignAfterOpenBracket: Align
ColumnLimit: 80
ColumnLimit: 100
42 changes: 21 additions & 21 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,28 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Configure Refal
run: mkdir refal5 && cd ./refal5 && wget http://www.botik.ru/pub/local/scp/refal5/ref5_081222.zip && unzip ref5_081222.zip &&rm makefile && cp makefile.lin makefile && make
- name: test Refal
run: cd ./refal5 && export PATH=$PATH:$(pwd) && echo $(pwd) >> $GITHUB_PATH
- name: build Refal program
run: cd ./refal && ls *.ref && find . -type f -name "*.ref" | xargs refc && ls *.rsl
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build
- uses: actions/checkout@v3
- name: Configure Refal
run: mkdir refal5 && cd ./refal5 && wget http://www.botik.ru/pub/local/scp/refal5/ref5_081222.zip && unzip ref5_081222.zip &&rm makefile && cp makefile.lin makefile && make
- name: test Refal
run: cd ./refal5 && export PATH=$PATH:$(pwd) && echo $(pwd) >> $GITHUB_PATH
- name: build Refal program
run: cd ./refal && ls *.ref && find . -type f -name "*.ref" | xargs refc && ls *.rsl
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: cmake -B ${{github.workspace}}/build

- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build

- name: Test
#working-directory: ${{github.workspace}}/build/apps/TestsApp
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
# ну почему не из корня ...
#run: ctest -C ${{env.BUILD_TYPE}}
run: ./build/apps/TestsApp/TestsApp
- name: Test
#working-directory: ${{github.workspace}}/build/apps/TestsApp
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
# ну почему не из корня ...
#run: ctest -C ${{env.BUILD_TYPE}}
run: ./build/apps/TestsApp/TestsApp


2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.5)
set (CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD 17)

project(chipollino)

Expand Down
3 changes: 2 additions & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
MIT License

Copyright (c) 2022 Andrei Ilin, Alexander Delman, Kirill Shevchenko, Mikhail Teriukha, Anna Terentyeva, Danila Knyazihin, Alina Chibizova, Edgar Makarov
Copyright (c) 2022 Andrei Ilin, Alexander Delman, Kirill Shevchenko, Mikhail Teriukha, Anna Terentyeva, Danila
Knyazihin, Alina Chibizova, Edgar Makarov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
164 changes: 102 additions & 62 deletions README.md

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions apps/InputGeneratorApp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Set the project name
project (InputGeneratorApp)
project(InputGeneratorApp)

# Create a sources variable with a link to all cpp files to compile
set(SOURCES
src/main.cpp)
src/main.cpp)

# Add a library with the above sources
add_executable(${PROJECT_NAME} ${SOURCES})

target_include_directories( ${PROJECT_NAME}
PUBLIC ${PROJECT_SOURCE_DIR}/include
)
target_include_directories(${PROJECT_NAME}
PUBLIC ${PROJECT_SOURCE_DIR}/include
)

target_link_libraries(${PROJECT_NAME}
InputGenerator
Interpreter
)
InputGenerator
Interpreter
)
14 changes: 7 additions & 7 deletions apps/InterpreterApp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Set the project name
project (InterpreterApp)
project(InterpreterApp)

# Create a sources variable with a link to all cpp files to compile
set(SOURCES
src/main.cpp)
src/main.cpp)

# Add a library with the above sources
add_executable(${PROJECT_NAME} ${SOURCES})

target_include_directories( ${PROJECT_NAME}
PUBLIC ${PROJECT_SOURCE_DIR}/include
)
target_include_directories(${PROJECT_NAME}
PUBLIC ${PROJECT_SOURCE_DIR}/include
)

target_link_libraries(${PROJECT_NAME}
Interpreter
)
Interpreter
)
24 changes: 12 additions & 12 deletions apps/TestsApp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# Set the project name
project (TestsApp)
project(TestsApp)

# Create a sources variable with a link to all cpp files to compile
set(SOURCES
src/Example.cpp
src/main.cpp)
src/Example.cpp
src/main.cpp)

# Add a library with the above sources
add_executable(${PROJECT_NAME} ${SOURCES})

target_include_directories( ${PROJECT_NAME}
PUBLIC ${PROJECT_SOURCE_DIR}/include
)
target_include_directories(${PROJECT_NAME}
PUBLIC ${PROJECT_SOURCE_DIR}/include
)

target_link_libraries(${PROJECT_NAME}
InputGenerator
Interpreter
Tester
Objects
)
InputGenerator
Interpreter
Tester
Objects
)

enable_testing()

add_test(NAME UnitTests
COMMAND ${PROJECT_NAME})
COMMAND ${PROJECT_NAME})
6 changes: 3 additions & 3 deletions apps/TestsApp/include/TestsApp/Example.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ class Example {
static void table();
static void fa_semdet_check();
static void classes_number_GlaisterShallit();
static void testing_with_generator(
int regex_length, int star_num, int star_nesting, int alphabet_size,
const function<void(string& rgx_str)>& check_function);
static void testing_with_generator(int regex_length, int star_num, int star_nesting,
int alphabet_size,
const function<void(string& rgx_str)>& check_function);
static void arden_lemma_testing();
static void fa_to_pgrammar();
static void logger_test();
Expand Down
Loading

0 comments on commit 1d3cd93

Please sign in to comment.